Commit | Line | Data |
---|---|---|
a01b6da7 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
a5e3d59b | 3 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> |
8e451885 | 4 | ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr> |
e99f4211 | 5 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
4dcb135e | 6 | ;;; Copyright © 2014, 2017 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> |
62a4b952 | 10 | ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> |
0bdc1671 | 11 | ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org> |
345f0611 | 12 | ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> |
2b2f2fc1 | 13 | ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> |
7637de23 | 14 | ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name> |
04fb4516 | 15 | ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com> |
b9893908 | 16 | ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com> |
c5be3467 | 17 | ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
b89e3c77 | 18 | ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com> |
daeeea71 | 19 | ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com> |
b31fbea5 | 20 | ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org> |
88bb4197 | 21 | ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> |
34581f68 | 22 | ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com> |
0de78c95 | 23 | ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org> |
9250b0f3 | 24 | ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> |
bb3b4b4e | 25 | ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com> |
b3593688 | 26 | ;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org> |
6eb7af2a | 27 | ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> |
3f641af0 | 28 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
fcaab9c0 | 29 | ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com> |
ca0e62bf | 30 | ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at> |
b04a52a6 | 31 | ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> |
e65acb31 | 32 | ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com> |
33e9490c | 33 | ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net> |
5220022a | 34 | ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu> |
9e8401a5 | 35 | ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
ec074213 | 36 | ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be> |
916aafa4 | 37 | ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au> |
1a917fc9 | 38 | ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com> |
09b9cf73 | 39 | ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com> |
16fe516e | 40 | ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au> |
a5e8f597 | 41 | ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> |
3015d455 | 42 | ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org> |
fa3f5f47 | 43 | ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> |
44e4a621 | 44 | ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net> |
f817b4d9 | 45 | ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> |
3fee0039 | 46 | ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com> |
2e15906c | 47 | ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org> |
956ba99c | 48 | ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com |
6055e88c | 49 | ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com> |
a01b6da7 NK |
50 | ;;; |
51 | ;;; This file is part of GNU Guix. | |
52 | ;;; | |
53 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
54 | ;;; under the terms of the GNU General Public License as published by | |
55 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
56 | ;;; your option) any later version. | |
57 | ;;; | |
58 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
59 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
60 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
61 | ;;; GNU General Public License for more details. | |
62 | ;;; | |
63 | ;;; You should have received a copy of the GNU General Public License | |
64 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
65 | ||
1ffa7090 | 66 | (define-module (gnu packages python) |
3f641af0 | 67 | #:use-module ((guix licenses) #:prefix license:) |
3fdc99da | 68 | #:use-module (gnu packages) |
8e451885 | 69 | #:use-module (gnu packages algebra) |
d79a343b | 70 | #:use-module (gnu packages adns) |
89b2e0b0 | 71 | #:use-module (gnu packages attr) |
d96034ed | 72 | #:use-module (gnu packages backup) |
3969ca54 | 73 | #:use-module (gnu packages bash) |
a0596a2f | 74 | #:use-module (gnu packages check) |
1ffa7090 | 75 | #:use-module (gnu packages compression) |
dc1bd2b5 | 76 | #:use-module (gnu packages crypto) |
4ed20663 | 77 | #:use-module (gnu packages databases) |
5e1c9367 | 78 | #:use-module (gnu packages file) |
4ed20663 | 79 | #:use-module (gnu packages fontutils) |
4ed20663 | 80 | #:use-module (gnu packages gcc) |
44e4a621 | 81 | #:use-module (gnu packages geo) |
4ed20663 | 82 | #:use-module (gnu packages ghostscript) |
6eb7af2a | 83 | #:use-module (gnu packages gl) |
4ed20663 | 84 | #:use-module (gnu packages glib) |
c227458a | 85 | #:use-module (gnu packages graphviz) |
5eebe8dc | 86 | #:use-module (gnu packages graphics) |
6eb7af2a | 87 | #:use-module (gnu packages gstreamer) |
4ed20663 | 88 | #:use-module (gnu packages gtk) |
421a80a2 | 89 | #:use-module (gnu packages icu4c) |
c937562e | 90 | #:use-module (gnu packages image) |
4ed20663 | 91 | #:use-module (gnu packages imagemagick) |
d79a343b | 92 | #:use-module (gnu packages libevent) |
b10ab723 | 93 | #:use-module (gnu packages libffi) |
89b2e0b0 | 94 | #:use-module (gnu packages linux) |
be6eb2f1 | 95 | #:use-module (gnu packages machine-learning) |
ed118043 | 96 | #:use-module (gnu packages man) |
0da98533 | 97 | #:use-module (gnu packages maths) |
4ed20663 | 98 | #:use-module (gnu packages multiprecision) |
45203542 | 99 | #:use-module (gnu packages networking) |
be7134bf | 100 | #:use-module (gnu packages ncurses) |
b04a52a6 | 101 | #:use-module (gnu packages openstack) |
d488d5d6 | 102 | #:use-module (gnu packages password-utils) |
c9b1b4f9 | 103 | #:use-module (gnu packages pcre) |
4ed20663 | 104 | #:use-module (gnu packages perl) |
b10ab723 | 105 | #:use-module (gnu packages pkg-config) |
cc6f4912 | 106 | #:use-module (gnu packages python-crypto) |
1b2f753d | 107 | #:use-module (gnu packages python-web) |
4535a93a | 108 | #:use-module (gnu packages qt) |
4ed20663 | 109 | #:use-module (gnu packages readline) |
6eb7af2a | 110 | #:use-module (gnu packages sdl) |
5f94ec91 | 111 | #:use-module (gnu packages search) |
80ce42bd | 112 | #:use-module (gnu packages shells) |
7ea498e5 | 113 | #:use-module (gnu packages ssh) |
c9b1b4f9 | 114 | #:use-module (gnu packages statistics) |
34581f68 | 115 | #:use-module (gnu packages terminals) |
8f9ac901 | 116 | #:use-module (gnu packages tex) |
1c65314c | 117 | #:use-module (gnu packages texinfo) |
33dc54b0 | 118 | #:use-module (gnu packages time) |
cc2b77df | 119 | #:use-module (gnu packages tls) |
e25f0174 | 120 | #:use-module (gnu packages version-control) |
02f8f804 | 121 | #:use-module (gnu packages video) |
8d12be1e | 122 | #:use-module (gnu packages web) |
ce0614dd | 123 | #:use-module (gnu packages base) |
26b307e2 | 124 | #:use-module (gnu packages xml) |
6fa14469 | 125 | #:use-module (gnu packages xorg) |
0bdc1671 | 126 | #:use-module (gnu packages xdisorg) |
afa181ff | 127 | #:use-module (gnu packages tcl) |
63bcec71 | 128 | #:use-module (gnu packages bdw-gc) |
a01b6da7 NK |
129 | #:use-module (guix packages) |
130 | #:use-module (guix download) | |
ea5456c8 | 131 | #:use-module (guix git-download) |
11bb85a1 | 132 | #:use-module (guix utils) |
acc26ff1 | 133 | #:use-module (guix build-system gnu) |
d8c4998f | 134 | #:use-module (guix build-system cmake) |
898238b9 | 135 | #:use-module (guix build-system python) |
1c65314c FB |
136 | #:use-module (guix build-system trivial) |
137 | #:use-module (srfi srfi-1)) | |
a01b6da7 | 138 | |
45848023 | 139 | (define-public python-2.7 |
a01b6da7 NK |
140 | (package |
141 | (name "python") | |
603a6492 | 142 | (version "2.7.14") |
a01b6da7 NK |
143 | (source |
144 | (origin | |
145 | (method url-fetch) | |
9b43a0ff | 146 | (uri (string-append "https://www.python.org/ftp/python/" |
a01b6da7 NK |
147 | version "/Python-" version ".tar.xz")) |
148 | (sha256 | |
149 | (base32 | |
603a6492 | 150 | "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi")) |
c3052d6b ML |
151 | (patches (search-patches "python-2.7-search-paths.patch" |
152 | "python-2-deterministic-build-info.patch" | |
15e57f57 | 153 | "python-2.7-site-prefixes.patch" |
dc5cec21 | 154 | "python-2.7-source-date-epoch.patch" |
603a6492 | 155 | "python-2.7-adjust-tests.patch")) |
10a42aa2 EF |
156 | (modules '((guix build utils))) |
157 | ;; suboptimal to delete failing tests here, but if we delete them in the | |
158 | ;; arguments then we need to make sure to strip out that phase when it | |
159 | ;; gets inherited by python and python-minimal. | |
160 | (snippet | |
161 | '(begin | |
162 | (for-each delete-file | |
163 | '("Lib/test/test_compileall.py" | |
f0499100 | 164 | "Lib/test/test_ctypes.py" ; fails on mips64el |
10a42aa2 EF |
165 | "Lib/test/test_distutils.py" |
166 | "Lib/test/test_import.py" | |
167 | "Lib/test/test_shutil.py" | |
168 | "Lib/test/test_socket.py" | |
1bb163b0 | 169 | "Lib/test/test_subprocess.py")) |
10a42aa2 | 170 | #t)))) |
02f0c3b2 LC |
171 | (outputs '("out" |
172 | "tk")) ;tkinter; adds 50 MiB to the closure | |
a01b6da7 | 173 | (build-system gnu-build-system) |
3fdc99da | 174 | (arguments |
10a42aa2 | 175 | `(;; 356 tests OK. |
e7e7a1eb EF |
176 | ;; 6 tests failed: |
177 | ;; test_compileall test_distutils test_import test_shutil test_socket | |
178 | ;; test_subprocess | |
179 | ;; 39 tests skipped: | |
ff6f33cf ED |
180 | ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185 |
181 | ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk | |
e7e7a1eb EF |
182 | ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses |
183 | ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl | |
184 | ;; test_kqueue test_linuxaudiodev test_macos test_macostools | |
185 | ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet | |
186 | ;; test_socketserver test_startfile test_sunaudiodev test_timeout | |
187 | ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet | |
188 | ;; test_winreg test_winsound test_zipfile64 | |
189 | ;; 4 skips unexpected on linux2: | |
190 | ;; test_bsddb test_bsddb3 test_gdb test_ioctl | |
af807dea | 191 | #:test-target "test" |
3fdc99da | 192 | #:configure-flags |
6a20289d LC |
193 | (list "--enable-shared" ;allow embedding |
194 | "--with-system-ffi" ;build ctypes | |
aaf75c89 | 195 | "--with-ensurepip=install" ;install pip and setuptools |
a282d7ff | 196 | "--enable-unicode=ucs4" |
6a20289d LC |
197 | (string-append "LDFLAGS=-Wl,-rpath=" |
198 | (assoc-ref %outputs "out") "/lib")) | |
fd982732 | 199 | |
d2cc9c7c LC |
200 | #:modules ((ice-9 ftw) (ice-9 match) |
201 | (guix build utils) (guix build gnu-build-system)) | |
fd982732 | 202 | #:phases |
46472ecd MW |
203 | (modify-phases %standard-phases |
204 | (add-before | |
205 | 'configure 'patch-lib-shells | |
206 | (lambda _ | |
207 | ;; Filter for existing files, since some may not exist in all | |
208 | ;; versions of python that are built with this recipe. | |
209 | (substitute* (filter file-exists? | |
210 | '("Lib/subprocess.py" | |
211 | "Lib/popen2.py" | |
212 | "Lib/distutils/tests/test_spawn.py" | |
b18226c3 | 213 | "Lib/test/support/__init__.py" |
46472ecd MW |
214 | "Lib/test/test_subprocess.py")) |
215 | (("/bin/sh") (which "sh"))) | |
dedc8320 LC |
216 | |
217 | ;; Use zero as the timestamp in .pyc files so that builds are | |
218 | ;; deterministic. TODO: Remove it when this variable is set in | |
219 | ;; gnu-build-system.scm. | |
a665996f | 220 | (setenv "SOURCE_DATE_EPOCH" "1") |
46472ecd | 221 | #t)) |
5b4e2791 LC |
222 | (add-before 'configure 'do-not-record-configure-flags |
223 | (lambda* (#:key configure-flags #:allow-other-keys) | |
224 | ;; Remove configure flags from the installed '_sysconfigdata.py' | |
225 | ;; and 'Makefile' so we don't end up keeping references to the | |
226 | ;; build tools. | |
227 | ;; | |
228 | ;; Preserve at least '--with-system-ffi' since otherwise the | |
229 | ;; thing tries to build libffi, fails, and we end up with a | |
230 | ;; Python that lacks ctypes. | |
231 | (substitute* "configure" | |
232 | (("^CONFIG_ARGS=.*$") | |
233 | (format #f "CONFIG_ARGS='~a'\n" | |
234 | (if (member "--with-system-ffi" configure-flags) | |
235 | "--with-system-ffi" | |
236 | "")))) | |
237 | #t)) | |
46472ecd MW |
238 | (add-before |
239 | 'check 'pre-check | |
240 | (lambda _ | |
241 | ;; 'Lib/test/test_site.py' needs a valid $HOME | |
242 | (setenv "HOME" (getcwd)) | |
243 | #t)) | |
244 | (add-after | |
245 | 'unpack 'set-source-file-times-to-1980 | |
246 | ;; XXX One of the tests uses a ZIP library to pack up some of the | |
247 | ;; source tree, and fails with "ZIP does not support timestamps | |
248 | ;; before 1980". Work around this by setting the file times in the | |
249 | ;; source tree to sometime in early 1980. | |
250 | (lambda _ | |
251 | (let ((circa-1980 (* 10 366 24 60 60))) | |
252 | (ftw "." (lambda (file stat flag) | |
253 | (utime file circa-1980 circa-1980) | |
254 | #t)) | |
02f0c3b2 | 255 | #t))) |
9ffe61b0 LC |
256 | (add-after 'install 'remove-tests |
257 | ;; Remove 25 MiB of unneeded unit tests. Keep test_support.* | |
258 | ;; because these files are used by some libraries out there. | |
259 | (lambda* (#:key outputs #:allow-other-keys) | |
260 | (let ((out (assoc-ref outputs "out"))) | |
261 | (match (scandir (string-append out "/lib") | |
262 | (lambda (name) | |
263 | (string-prefix? "python" name))) | |
264 | ((pythonX.Y) | |
265 | (let ((testdir (string-append out "/lib/" pythonX.Y | |
266 | "/test"))) | |
267 | (with-directory-excursion testdir | |
268 | (for-each delete-file-recursively | |
269 | (scandir testdir | |
270 | (match-lambda | |
271 | ((or "." "..") #f) | |
272 | (file | |
273 | (not | |
274 | (string-prefix? "test_support." | |
275 | file)))))) | |
276 | (call-with-output-file "__init__.py" (const #t)) | |
277 | #t))))))) | |
216c283b LC |
278 | (add-before 'strip 'make-libraries-writable |
279 | (lambda* (#:key outputs #:allow-other-keys) | |
280 | ;; Make .so files writable so they can be stripped. | |
281 | (let ((out (assoc-ref outputs "out"))) | |
282 | (for-each (lambda (file) | |
283 | (chmod file #o755)) | |
284 | (find-files (string-append out "/lib") | |
285 | "\\.so")) | |
286 | #t))) | |
02f0c3b2 LC |
287 | (add-after 'install 'move-tk-inter |
288 | (lambda* (#:key outputs #:allow-other-keys) | |
289 | ;; When Tkinter support is built move it to a separate output so | |
290 | ;; that the main output doesn't contain a reference to Tcl/Tk. | |
291 | (let ((out (assoc-ref outputs "out")) | |
292 | (tk (assoc-ref outputs "tk"))) | |
293 | (when tk | |
294 | (match (find-files out "tkinter.*\\.so") | |
295 | ((tkinter.so) | |
296 | ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we | |
297 | ;; want it under TK/lib/pythonX.Y/site-packages. | |
298 | (let* ((len (string-length out)) | |
299 | (target (string-append | |
300 | tk "/" | |
301 | (string-drop | |
302 | (dirname (dirname tkinter.so)) | |
303 | len) | |
304 | "/site-packages"))) | |
305 | (install-file tkinter.so target) | |
306 | (delete-file tkinter.so))))) | |
307 | #t)))))) | |
a01b6da7 | 308 | (inputs |
3fdc99da CR |
309 | `(("bzip2" ,bzip2) |
310 | ("gdbm" ,gdbm) | |
b10ab723 | 311 | ("libffi" ,libffi) ; for ctypes |
b88e1b0a | 312 | ("sqlite" ,sqlite) ; for sqlite extension |
a01b6da7 | 313 | ("openssl" ,openssl) |
3fdc99da | 314 | ("readline" ,readline) |
afa181ff LC |
315 | ("zlib" ,zlib) |
316 | ("tcl" ,tcl) | |
317 | ("tk" ,tk))) ; for tkinter | |
b10ab723 CR |
318 | (native-inputs |
319 | `(("pkg-config" ,pkg-config))) | |
9be8d7c8 LC |
320 | (native-search-paths |
321 | (list (search-path-specification | |
322 | (variable "PYTHONPATH") | |
af070955 | 323 | (files '("lib/python2.7/site-packages"))))) |
f0499100 | 324 | (home-page "https://www.python.org") |
afa181ff | 325 | (synopsis "High-level, dynamically-typed programming language") |
a01b6da7 NK |
326 | (description |
327 | "Python is a remarkably powerful dynamic programming language that | |
328 | is used in a wide variety of application domains. Some of its key | |
329 | distinguishing features include: clear, readable syntax; strong | |
330 | introspection capabilities; intuitive object orientation; natural | |
331 | expression of procedural code; full modularity, supporting hierarchical | |
332 | packages; exception-based error handling; and very high level dynamic | |
333 | data types.") | |
3f641af0 | 334 | (license license:psfl))) |
acc26ff1 | 335 | |
45848023 HG |
336 | ;; Current 2.x version. |
337 | (define-public python-2 python-2.7) | |
338 | ||
b18226c3 | 339 | (define-public python-3.6 |
b24d1cfc | 340 | (package (inherit python-2) |
b18226c3 | 341 | (version "3.6.3") |
717003e3 LC |
342 | (source (origin |
343 | (method url-fetch) | |
344 | (uri (string-append "https://www.python.org/ftp/python/" | |
345 | version "/Python-" version ".tar.xz")) | |
fc1adab1 AK |
346 | (patches (search-patches |
347 | "python-fix-tests.patch" | |
b18226c3 | 348 | "python-3-fix-tests.patch" |
fc1adab1 AK |
349 | "python-3-deterministic-build-info.patch" |
350 | "python-3-search-paths.patch")) | |
717003e3 LC |
351 | (patch-flags '("-p0")) |
352 | (sha256 | |
353 | (base32 | |
b18226c3 | 354 | "1nl1raaagr4car787a2hmjv2dw6gqny53xfd6wisbgx4r5kxk9yd")) |
fd615918 | 355 | (snippet |
e46e9573 EF |
356 | '(begin |
357 | (for-each delete-file | |
49c620e0 EF |
358 | '("Lib/ctypes/test/test_structures.py" ; fails on aarch64 |
359 | "Lib/ctypes/test/test_win32.py" ; fails on aarch64 | |
360 | "Lib/test/test_fcntl.py")) ; fails on aarch64 | |
e46e9573 | 361 | #t)))) |
1f434457 MW |
362 | (arguments (substitute-keyword-arguments (package-arguments python-2) |
363 | ((#:tests? _) #t))) | |
1aebc0cb AE |
364 | (native-search-paths |
365 | (list (search-path-specification | |
366 | (variable "PYTHONPATH") | |
0e05d01e SB |
367 | (files (list (string-append "lib/python" |
368 | (version-major+minor version) | |
369 | "/site-packages")))))))) | |
f26a77ff | 370 | |
45848023 | 371 | ;; Current 3.x version. |
b18226c3 | 372 | (define-public python-3 python-3.6) |
45848023 HG |
373 | |
374 | ;; Current major version. | |
375 | (define-public python python-3) | |
376 | ||
95288fcc LC |
377 | ;; Minimal variants of Python, mostly used to break the cycle between Tk and |
378 | ;; Python (Tk -> libxcb -> Python.) | |
379 | ||
380 | (define-public python2-minimal | |
381 | (package (inherit python-2) | |
382 | (name "python-minimal") | |
02f0c3b2 | 383 | (outputs '("out")) |
5927a843 LC |
384 | |
385 | ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which | |
386 | ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus | |
387 | ;; libffi. | |
388 | (inputs `(("libffi" ,libffi) | |
389 | ("zlib" ,zlib))))) | |
95288fcc LC |
390 | |
391 | (define-public python-minimal | |
898238b9 | 392 | (package (inherit python) |
95288fcc | 393 | (name "python-minimal") |
02f0c3b2 | 394 | (outputs '("out")) |
95288fcc | 395 | |
d0b73960 | 396 | ;; Build fails due to missing ctypes without libffi. |
95288fcc LC |
397 | ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib; |
398 | ;; zlib is required by 'zipimport', used by pip. | |
d0b73960 CAW |
399 | (inputs `(("libffi" ,libffi) |
400 | ("openssl" ,openssl) | |
95288fcc LC |
401 | ("zlib" ,zlib))))) |
402 | ||
64cb064c LC |
403 | (define* (wrap-python3 python |
404 | #:optional | |
405 | (name (string-append (package-name python) "-wrapper"))) | |
898238b9 | 406 | (package (inherit python) |
95288fcc | 407 | (name name) |
898238b9 AE |
408 | (source #f) |
409 | (build-system trivial-build-system) | |
02f0c3b2 | 410 | (outputs '("out")) |
3969ca54 | 411 | (inputs `(("bash" ,bash))) |
3c0f2329 | 412 | (propagated-inputs `(("python" ,python))) |
898238b9 AE |
413 | (arguments |
414 | `(#:modules ((guix build utils)) | |
415 | #:builder | |
416 | (begin | |
417 | (use-modules (guix build utils)) | |
418 | (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
419 | (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) | |
420 | (mkdir-p bin) | |
421 | (for-each | |
422 | (lambda (old new) | |
423 | (symlink (string-append python old) | |
424 | (string-append bin "/" new))) | |
3969ca54 SB |
425 | `("python3" ,"pydoc3" ,"idle3" ,"pip3") |
426 | `("python" ,"pydoc" ,"idle" ,"pip")) | |
427 | ;; python-config outputs search paths based upon its location, | |
428 | ;; use a bash wrapper to avoid changing its outputs. | |
429 | (let ((bash (string-append (assoc-ref %build-inputs "bash") | |
430 | "/bin/bash")) | |
431 | (old (string-append python "python3-config")) | |
432 | (new (string-append bin "/python-config"))) | |
433 | (with-output-to-file new | |
434 | (lambda () | |
435 | (format #t "#!~a~%" bash) | |
436 | (format #t "exec \"~a\" \"$@\"~%" old) | |
437 | (chmod new #o755) | |
438 | #t))))))) | |
0d56e3e1 LC |
439 | (synopsis "Wrapper for the Python 3 commands") |
440 | (description | |
441 | "This package provides wrappers for the commands of Python@tie{}3.x such | |
442 | that they can be invoked under their usual name---e.g., @command{python} | |
443 | instead of @command{python3}."))) | |
444 | ||
95288fcc LC |
445 | (define-public python-wrapper (wrap-python3 python)) |
446 | (define-public python-minimal-wrapper (wrap-python3 python-minimal)) | |
898238b9 | 447 | |
aaf625b8 RW |
448 | (define-public python-psutil |
449 | (package | |
450 | (name "python-psutil") | |
fb2477f6 | 451 | (version "5.4.3") |
aaf625b8 RW |
452 | (source |
453 | (origin | |
454 | (method url-fetch) | |
f56777be | 455 | (uri (pypi-uri "psutil" version)) |
aaf625b8 RW |
456 | (sha256 |
457 | (base32 | |
fb2477f6 | 458 | "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2")))) |
aaf625b8 | 459 | (build-system python-build-system) |
fb08c4fe MB |
460 | (arguments |
461 | ;; FIXME: some tests does not return and times out. | |
462 | '(#:tests? #f)) | |
88535a44 | 463 | (home-page "https://www.github.com/giampaolo/psutil") |
aaf625b8 RW |
464 | (synopsis "Library for retrieving information on running processes") |
465 | (description | |
466 | "psutil (Python system and process utilities) is a library for retrieving | |
467 | information on running processes and system utilization (CPU, memory, disks, | |
468 | network) in Python. It is useful mainly for system monitoring, profiling and | |
469 | limiting process resources and management of running processes. It implements | |
470 | many functionalities offered by command line tools such as: ps, top, lsof, | |
471 | netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime, | |
472 | pidof, tty, taskset, pmap.") | |
fb2477f6 | 473 | (properties `((python2-variant . ,(delay python2-psutil)))) |
3f641af0 | 474 | (license license:bsd-3))) |
aaf625b8 RW |
475 | |
476 | (define-public python2-psutil | |
fb2477f6 MB |
477 | (let ((base (package-with-python2 (strip-python2-variant python-psutil)))) |
478 | (package | |
479 | (inherit base) | |
480 | (propagated-inputs | |
481 | `(("python2-enum34" ,python2-enum34) ;optional | |
482 | ,@(package-propagated-inputs base)))))) | |
898238b9 | 483 | |
44e4a621 KK |
484 | (define-public python-shapely |
485 | (package | |
486 | (name "python-shapely") | |
487 | (version "1.6.3") | |
488 | (source | |
489 | (origin | |
490 | (method url-fetch) | |
491 | (uri (pypi-uri "Shapely" version)) | |
492 | (sha256 | |
493 | (base32 | |
494 | "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l")))) | |
495 | (build-system python-build-system) | |
496 | (native-inputs | |
497 | `(("python-cython" ,python-cython) | |
498 | ("python-matplotlib" ,python-matplotlib) | |
499 | ("python-pytest" ,python-pytest) | |
500 | ("python-pytest-cov" ,python-pytest-cov))) | |
501 | (inputs | |
502 | `(("geos" ,geos))) | |
503 | (propagated-inputs | |
504 | `(("python-numpy" ,python-numpy))) | |
505 | (arguments | |
506 | `(#:phases | |
507 | (modify-phases %standard-phases | |
508 | (add-after 'unpack 'patch-geos-path | |
509 | (lambda* (#:key inputs #:allow-other-keys) | |
510 | (let ((geos (assoc-ref inputs "geos")) | |
511 | (glibc (assoc-ref inputs ,(if (%current-target-system) | |
512 | "cross-libc" "libc")))) | |
513 | (substitute* "shapely/geos.py" | |
514 | (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)") | |
515 | (string-append "_lgeos = load_dll('geos_c', fallbacks=['" | |
516 | geos "/lib/libgeos_c.so'])")) | |
517 | (("free = load_dll\\('c'\\)\\.free") | |
518 | (string-append "free = load_dll('c', fallbacks=['" | |
519 | glibc "/lib/libc.so.6']).free")))) | |
520 | #t))))) | |
521 | (home-page "https://github.com/Toblerity/Shapely") | |
522 | (synopsis "Library for the manipulation and analysis of geometric objects") | |
523 | (description "Shapely is a Python package for manipulation and analysis of | |
524 | planar geometric objects. It is based on the @code{GEOS} library.") | |
525 | (license license:bsd-3))) | |
526 | ||
527 | (define-public python2-shapely | |
528 | (package-with-python2 python-shapely)) | |
529 | ||
1f84ff51 MFM |
530 | (define-public python-clyent |
531 | (package | |
532 | (name "python-clyent") | |
533 | (version "1.2.1") | |
534 | (source | |
535 | (origin | |
536 | (method url-fetch) | |
537 | (uri (pypi-uri "clyent" version)) | |
538 | (sha256 | |
539 | (base32 | |
540 | "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj")))) | |
541 | (build-system python-build-system) | |
542 | (native-inputs | |
543 | `(("python-mock" ,python-mock))) | |
544 | (home-page "https://github.com/binstar/clyent") | |
545 | (synopsis "Command line client library") | |
546 | (description "Clyent is a Python command line utiliy library. It is used | |
547 | by @code{binstar}, @code{binstar-build} and @code{chalmers}.") | |
548 | (license license:bsd-3))) | |
549 | ||
550 | (define-public python2-clyent | |
551 | (package-with-python2 python-clyent)) | |
552 | ||
89114f39 | 553 | (define-public python-babel |
5ace6e2f | 554 | (package |
89114f39 | 555 | (name "python-babel") |
ffb1e98d | 556 | (version "2.3.4") |
5ace6e2f CR |
557 | (source |
558 | (origin | |
559 | (method url-fetch) | |
b850a6d8 | 560 | (uri (pypi-uri "Babel" version)) |
5ace6e2f CR |
561 | (sha256 |
562 | (base32 | |
ffb1e98d | 563 | "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5")))) |
5ace6e2f | 564 | (build-system python-build-system) |
f22efa01 | 565 | (propagated-inputs |
f3b98f4f | 566 | `(("python-pytz" ,python-pytz))) |
8498b8cf | 567 | (arguments `(#:tests? #f)) ; no test target |
e1804763 | 568 | (home-page "http://babel.pocoo.org/") |
5ace6e2f CR |
569 | (synopsis |
570 | "Tools for internationalizing Python applications") | |
571 | (description | |
572 | "Babel is composed of two major parts: | |
573 | - tools to build and work with gettext message catalogs | |
574 | - a Python interface to the CLDR (Common Locale Data Repository), providing | |
575 | access to various locale display names, localized number and date formatting, | |
576 | etc. ") | |
3f641af0 | 577 | (license license:bsd-3))) |
89114f39 AE |
578 | |
579 | (define-public python2-babel | |
11bb85a1 | 580 | (package-with-python2 python-babel)) |
73adf220 | 581 | |
ed377cc6 RW |
582 | (define-public python2-backport-ssl-match-hostname |
583 | (package | |
584 | (name "python2-backport-ssl-match-hostname") | |
f2d06d46 | 585 | (version "3.5.0.1") |
ed377cc6 RW |
586 | (source |
587 | (origin | |
588 | (method url-fetch) | |
589 | (uri (string-append | |
590 | "https://pypi.python.org/packages/source/b/" | |
591 | "backports.ssl_match_hostname/backports.ssl_match_hostname-" | |
592 | version ".tar.gz")) | |
593 | (sha256 | |
594 | (base32 | |
f2d06d46 | 595 | "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh")))) |
ed377cc6 | 596 | (build-system python-build-system) |
f2d06d46 EF |
597 | (arguments |
598 | `(#:python ,python-2 | |
599 | #:tests? #f)) ; no test target | |
f2d06d46 EF |
600 | (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname") |
601 | (synopsis "Backport of ssl.match_hostname() function from Python 3.5") | |
ed377cc6 RW |
602 | (description |
603 | "This backport brings the ssl.match_hostname() function to users of | |
604 | earlier versions of Python. The function checks the hostname in the | |
605 | certificate returned by the server to which a connection has been established, | |
606 | and verifies that it matches the intended target hostname.") | |
3f641af0 | 607 | (license license:psfl))) |
ed377cc6 | 608 | |
d205f895 TD |
609 | (define-public python-hdf4 |
610 | (package | |
611 | (name "python-hdf4") | |
612 | (version "0.9") | |
613 | (source | |
614 | (origin | |
615 | (method url-fetch) | |
616 | (uri (pypi-uri name version)) | |
617 | (sha256 | |
618 | (base32 | |
619 | "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks")))) | |
620 | (build-system python-build-system) | |
621 | (native-inputs `(("nose" ,python-nose))) | |
622 | (propagated-inputs `(("numpy" ,python-numpy))) | |
623 | (inputs | |
624 | `(("hdf4" ,hdf4) | |
625 | ("libjpeg" ,libjpeg) | |
626 | ("zlib" ,zlib))) | |
627 | (arguments | |
628 | `(#:phases | |
629 | (modify-phases %standard-phases | |
630 | (replace 'check | |
631 | (lambda _ | |
632 | ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes | |
633 | ;; on to import numpy. Somehow this works on their CI system. | |
634 | ;; Let's just manage PYTHONPATH here instead. | |
635 | (substitute* "runexamples.sh" | |
636 | (("export PYTHONPATH=.*") "")) | |
637 | (setenv "PYTHONPATH" | |
638 | (string-append (getcwd) ":" | |
639 | (getenv "PYTHONPATH"))) | |
640 | (and (zero? (system* "./runexamples.sh")) | |
641 | (zero? (system* "nosetests" "-v")))))))) | |
642 | (home-page "https://github.com/fhs/python-hdf4") | |
643 | (synopsis "Python interface to the NCSA HDF4 library") | |
644 | (description | |
645 | "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library, | |
646 | which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s. | |
647 | NetCDF files can also be read and modified. Python-HDF4 is a fork of | |
648 | @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.") | |
649 | (license license:expat))) | |
650 | ||
651 | (define-public python2-hdf4 | |
652 | (package-with-python2 python-hdf4)) | |
653 | ||
ef5cbf9b RW |
654 | (define-public python-h5py |
655 | (package | |
656 | (name "python-h5py") | |
5c78db62 | 657 | (version "2.7.0") |
ef5cbf9b RW |
658 | (source |
659 | (origin | |
660 | (method url-fetch) | |
fe147c41 | 661 | (uri (pypi-uri "h5py" version)) |
ef5cbf9b RW |
662 | (sha256 |
663 | (base32 | |
5c78db62 | 664 | "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br")))) |
ef5cbf9b | 665 | (build-system python-build-system) |
797e1401 RW |
666 | (arguments |
667 | `(#:tests? #f ; no test target | |
668 | #:phases | |
669 | (modify-phases %standard-phases | |
670 | (add-after 'unpack 'fix-hdf5-paths | |
671 | (lambda* (#:key inputs #:allow-other-keys) | |
672 | (let ((prefix (assoc-ref inputs "hdf5"))) | |
673 | (substitute* "setup_build.py" | |
674 | (("\\['/opt/local/lib', '/usr/local/lib'\\]") | |
675 | (string-append "['" prefix "/lib" "']")) | |
676 | (("'/opt/local/include', '/usr/local/include'") | |
677 | (string-append "'" prefix "/include" "'"))) | |
678 | (substitute* "setup_configure.py" | |
679 | (("\\['/usr/local/lib', '/opt/local/lib'\\]") | |
680 | (string-append "['" prefix "/lib" "']"))) | |
681 | #t)))))) | |
3c4010b1 | 682 | (propagated-inputs |
69866690 HG |
683 | `(("python-six" ,python-six) |
684 | ("python-numpy" ,python-numpy))) | |
ef5cbf9b | 685 | (inputs |
69866690 | 686 | `(("hdf5" ,hdf5))) |
ef5cbf9b | 687 | (native-inputs |
fe147c41 EF |
688 | `(("python-cython" ,python-cython) |
689 | ("python-pkgconfig" ,python-pkgconfig))) | |
ef5cbf9b RW |
690 | (home-page "http://www.h5py.org/") |
691 | (synopsis "Read and write HDF5 files from Python") | |
692 | (description | |
693 | "The h5py package provides both a high- and low-level interface to the | |
694 | HDF5 library from Python. The low-level interface is intended to be a | |
695 | complete wrapping of the HDF5 API, while the high-level component supports | |
696 | access to HDF5 files, datasets and groups using established Python and NumPy | |
697 | concepts.") | |
9820a028 | 698 | (license license:bsd-3))) |
ef5cbf9b RW |
699 | |
700 | (define-public python2-h5py | |
9820a028 | 701 | (package-with-python2 python-h5py)) |
ef5cbf9b | 702 | |
ea8450c8 TD |
703 | (define-public python-netcdf4 |
704 | (package | |
705 | (name "python-netcdf4") | |
1206c95a | 706 | (version "1.2.9") |
ea8450c8 TD |
707 | (source |
708 | (origin | |
709 | (method url-fetch) | |
710 | (uri (pypi-uri "netCDF4" version)) | |
711 | (sha256 | |
712 | (base32 | |
1206c95a | 713 | "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5")))) |
ea8450c8 TD |
714 | (build-system python-build-system) |
715 | (native-inputs | |
716 | `(("python-cython" ,python-cython))) | |
717 | (propagated-inputs | |
718 | `(("python-numpy" ,python-numpy))) | |
719 | (inputs | |
720 | `(("netcdf" ,netcdf) | |
721 | ("hdf4" ,hdf4) | |
722 | ("hdf5" ,hdf5))) | |
723 | (arguments | |
724 | '(#:phases | |
725 | (modify-phases %standard-phases | |
726 | (replace 'check | |
727 | (lambda _ | |
728 | (setenv "NO_NET" "1") ; disable opendap tests | |
729 | (with-directory-excursion "test" | |
730 | (setenv "PYTHONPATH" ; find and add the library we just built | |
731 | (string-append | |
732 | (car (find-files "../build" "lib.*" | |
733 | #:directories? #:t | |
734 | #:fail-on-error? #:t)) | |
735 | ":" (getenv "PYTHONPATH"))) | |
736 | (zero? (system* "python" "run_all.py")))))))) | |
737 | (home-page | |
738 | "https://github.com/Unidata/netcdf4-python") | |
739 | (synopsis "Python/numpy interface to the netCDF library") | |
740 | (description "Netcdf4-python is a Python interface to the netCDF C | |
741 | library. netCDF version 4 has many features not found in earlier | |
742 | versions of the library and is implemented on top of HDF5. This module | |
743 | can read and write files in both the new netCDF 4 and the old netCDF 3 | |
744 | format, and can create files that are readable by HDF5 clients. The | |
745 | API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar | |
746 | to users of that module.") | |
747 | ;; The software is mainly ISC, but includes some files covered | |
748 | ;; by the Expat license. | |
749 | (license (list license:isc license:expat)))) | |
750 | ||
751 | (define-public python2-netcdf4 | |
752 | (package-with-python2 python-netcdf4)) | |
753 | ||
c1448c69 EB |
754 | (define-public python-lockfile |
755 | (package | |
756 | (name "python-lockfile") | |
692add53 | 757 | (version "0.12.2") |
c1448c69 EB |
758 | (source |
759 | (origin | |
760 | (method url-fetch) | |
761 | (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/" | |
762 | "lockfile-" version ".tar.gz")) | |
763 | (sha256 | |
764 | (base32 | |
692add53 | 765 | "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba")))) |
c1448c69 EB |
766 | (build-system python-build-system) |
767 | (arguments '(#:test-target "check")) | |
692add53 BW |
768 | (native-inputs |
769 | `(("python-pbr" ,python-pbr))) | |
6a8f26a4 | 770 | (home-page "https://launchpad.net/pylockfile") |
c1448c69 EB |
771 | (synopsis "Platform-independent file locking module") |
772 | (description | |
773 | "The lockfile package exports a LockFile class which provides a simple | |
774 | API for locking files.") | |
f210e944 | 775 | (license license:expat))) |
c1448c69 EB |
776 | |
777 | (define-public python2-lockfile | |
f210e944 | 778 | (package-with-python2 python-lockfile)) |
c1448c69 | 779 | |
73adf220 AE |
780 | (define-public python-setuptools |
781 | (package | |
782 | (name "python-setuptools") | |
d660f7be | 783 | (version "31.0.0") |
73adf220 AE |
784 | (source |
785 | (origin | |
786 | (method url-fetch) | |
d660f7be | 787 | (uri (pypi-uri "setuptools" version)) |
73adf220 AE |
788 | (sha256 |
789 | (base32 | |
d660f7be | 790 | "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608")) |
e0ed4579 HG |
791 | (modules '((guix build utils))) |
792 | (snippet | |
793 | '(begin | |
794 | ;; Remove included binaries which are used to build self-extracting | |
795 | ;; installers for Windows. | |
796 | ;; TODO: Find some way to build them ourself so we can include them. | |
797 | (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$")) | |
798 | #t)))) | |
73adf220 | 799 | (build-system python-build-system) |
d3d656c5 AE |
800 | ;; FIXME: Tests require pytest, which itself relies on setuptools. |
801 | ;; One could bootstrap with an internal untested setuptools. | |
73adf220 | 802 | (arguments |
824af8ca | 803 | `(#:tests? #f)) |
73adf220 AE |
804 | (home-page "https://pypi.python.org/pypi/setuptools") |
805 | (synopsis | |
806 | "Library designed to facilitate packaging Python projects") | |
807 | (description | |
808 | "Setuptools is a fully-featured, stable library designed to facilitate | |
809 | packaging Python projects, where packaging includes: | |
810 | Python package and module definitions, | |
811 | distribution package metadata, | |
812 | test hooks, | |
813 | project installation, | |
814 | platform-specific details, | |
815 | Python 3 support.") | |
d660f7be MB |
816 | ;; TODO: setuptools now bundles the following libraries: |
817 | ;; packaging, pyparsing, six and appdirs. How to unbundle? | |
818 | (license (list license:psfl ; setuptools itself | |
819 | license:expat ; six, appdirs, pyparsing | |
820 | license:asl2.0 ; packaging is dual ASL2/BSD-2 | |
821 | license:bsd-2)))) | |
73adf220 AE |
822 | |
823 | (define-public python2-setuptools | |
824 | (package-with-python2 python-setuptools)) | |
fc50e9c6 | 825 | |
fa56c773 KK |
826 | (define-public python-uniseg |
827 | (package | |
828 | (name "python-uniseg") | |
829 | (version "0.7.1") | |
830 | (source | |
831 | (origin | |
832 | (method url-fetch) | |
526789a1 | 833 | (uri (pypi-uri "uniseg" version ".zip")) |
fa56c773 KK |
834 | (sha256 |
835 | (base32 | |
526789a1 | 836 | "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2")))) |
fa56c773 KK |
837 | (build-system python-build-system) |
838 | (arguments | |
839 | '(#:tests? #f)) ; The test suite requires network access. | |
526789a1 BS |
840 | (native-inputs |
841 | `(("unzip" ,unzip))) | |
fa56c773 KK |
842 | (home-page |
843 | "https://bitbucket.org/emptypage/uniseg-python") | |
844 | (synopsis | |
845 | "Python library to determine Unicode text segmentations") | |
846 | (description | |
847 | "Uniseg is a Python package used to determine Unicode text segmentations. | |
848 | Supported segmentations include: | |
849 | @enumerate | |
850 | @item @dfn{Code point} (any value in the Unicode codespace) | |
851 | @item @dfn{Grapheme cluster} (user-perceived character made of a single or | |
852 | multiple Unicode code points, e.g. \"G\" + acute-accent) | |
853 | @item Word break | |
854 | @item Sentence break | |
855 | @item Line break | |
856 | @end enumerate") | |
857 | (license license:expat))) | |
858 | ||
859 | (define-public python2-uniseg | |
860 | (package-with-python2 python-uniseg)) | |
861 | ||
92eb9a35 | 862 | (define-public python-humanfriendly |
863 | (package | |
864 | (name "python-humanfriendly") | |
865 | (version "4.4.1") | |
866 | (source | |
867 | (origin | |
868 | (method url-fetch) | |
869 | (uri (pypi-uri "humanfriendly" version)) | |
870 | (sha256 | |
871 | (base32 | |
872 | "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi")))) | |
873 | (build-system python-build-system) | |
874 | (arguments | |
875 | `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly. | |
876 | #:tests? #f)) | |
877 | (propagated-inputs | |
878 | `(("python-monotonic" ,python-monotonic))) | |
879 | (home-page "https://humanfriendly.readthedocs.io") | |
880 | (synopsis "Human-friendly input and output in Python") | |
881 | (description | |
882 | "The functions and classes in @code{humanfriendly} can be used to make | |
883 | text interfaces more user-friendly. It includes tools to parse and format | |
884 | numbers, file sizes, and timespans, timers for long-running operations, menus | |
885 | to allow the user to choose from a list of options, and terminal interaction | |
886 | helpers.") | |
887 | (license license:expat))) | |
888 | ||
889 | (define-public python2-humanfriendly | |
890 | (package-with-python2 python-humanfriendly)) | |
891 | ||
2a81537f | 892 | (define-public python-capturer |
893 | (package | |
894 | (name "python-capturer") | |
895 | (version "2.4") | |
896 | (source | |
897 | (origin | |
898 | (method url-fetch) | |
899 | (uri (pypi-uri "capturer" version)) | |
900 | (sha256 | |
901 | (base32 | |
902 | "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089")))) | |
903 | (build-system python-build-system) | |
904 | (arguments | |
905 | `(#:tests? #f)) | |
906 | (propagated-inputs | |
907 | `(("python-humanfriendly" ,python-humanfriendly))) | |
908 | (home-page "https://capturer.readthedocs.io") | |
909 | (synopsis "Capture stdout and stderr streams of the current process") | |
910 | (description | |
911 | "The capturer package makes it easy to capture the stdout and stderr | |
912 | streams of the current process and subprocesses. Output can be relayed | |
913 | to the terminal in real time but is also available to the Python program | |
914 | for additional processing.") | |
915 | (license license:expat))) | |
916 | ||
917 | (define-public python2-capturer | |
918 | (package-with-python2 python-capturer)) | |
919 | ||
7d414763 | 920 | (define-public python-verboselogs |
921 | (package | |
922 | (name "python-verboselogs") | |
923 | (version "1.7") | |
924 | (source | |
925 | (origin | |
926 | (method url-fetch) | |
927 | (uri (pypi-uri "verboselogs" version)) | |
928 | (sha256 | |
929 | (base32 | |
930 | "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3")))) | |
931 | (build-system python-build-system) | |
932 | (native-inputs | |
933 | `(("python-mock" ,python-mock) | |
934 | ("python-astroid" ,python-astroid) | |
935 | ("python-pylint" ,python-pylint))) | |
936 | (home-page "https://verboselogs.readthedocs.io") | |
937 | (synopsis "Verbose logging level for Python's logging module") | |
938 | (description | |
939 | "The @code{verboselogs} package extends Python's @code{logging} module to | |
940 | add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.") | |
941 | (license license:expat))) | |
942 | ||
943 | (define-public python2-verboselogs | |
944 | (package-with-python2 python-verboselogs)) | |
945 | ||
00463093 | 946 | (define-public python-coloredlogs |
947 | (package | |
948 | (name "python-coloredlogs") | |
949 | (version "7.3") | |
950 | (source | |
951 | (origin | |
952 | (method url-fetch) | |
953 | (uri (pypi-uri "coloredlogs" version)) | |
954 | (sha256 | |
955 | (base32 | |
956 | "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9")))) | |
957 | (build-system python-build-system) | |
958 | (arguments | |
959 | `(;Tests require some updated modules | |
960 | #:tests? #f)) | |
961 | (propagated-inputs | |
962 | `(("python-capturer" ,python-capturer))) | |
963 | (home-page "https://coloredlogs.readthedocs.io") | |
964 | (synopsis "Colored stream handler for Python's logging module") | |
965 | (description | |
966 | "The @code{coloredlogs} package enables colored terminal output for | |
967 | Python's logging module. The @code{ColoredFormatter} class inherits from | |
968 | @code{logging.Formatter} and uses ANSI escape sequences to render your logging | |
969 | messages in color.") | |
970 | (license license:expat))) | |
971 | ||
972 | (define-public python2-coloredlogs | |
973 | (package-with-python2 python-coloredlogs)) | |
974 | ||
de959250 | 975 | (define-public python-eventlet |
976 | (package | |
977 | (name "python-eventlet") | |
978 | (version "0.20.1") | |
979 | (source | |
980 | (origin | |
981 | (method url-fetch) | |
982 | (uri (pypi-uri "eventlet" version)) | |
983 | (sha256 | |
984 | (base32 | |
985 | "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s")))) | |
986 | (build-system python-build-system) | |
987 | (propagated-inputs | |
988 | `(("python-greenlet" ,python-greenlet))) | |
5150d8b4 TGR |
989 | (arguments |
990 | ;; TODO: Requires unpackaged 'enum-compat'. | |
991 | '(#:tests? #f)) | |
de959250 | 992 | (home-page "http://eventlet.net") |
993 | (synopsis "Concurrent networking library for Python") | |
994 | (description | |
995 | "Eventlet is a concurrent networking library for Python that | |
996 | allows you to change how you run your code, not how you write it. | |
997 | It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O. | |
998 | Coroutines ensure that the developer uses a blocking style of programming | |
999 | that is similar to threading, but provide the benefits of non-blocking I/O. | |
1000 | The event dispatch is implicit, which means you can easily use @code{Eventlet} | |
1001 | from the Python interpreter, or as a small part of a larger application.") | |
1002 | (license license:expat))) | |
1003 | ||
1004 | (define-public python2-eventlet | |
1005 | (let ((base (package-with-python2 | |
1006 | (strip-python2-variant python-eventlet)))) | |
1007 | (package (inherit base) | |
1008 | (propagated-inputs | |
1009 | `(("python2-enum34" ,python2-enum34) | |
1010 | ,@(package-propagated-inputs base)))))) | |
1011 | ||
a480bc41 EB |
1012 | (define-public python-six |
1013 | (package | |
1014 | (name "python-six") | |
8ed675a7 | 1015 | (version "1.11.0") |
a480bc41 EB |
1016 | (source |
1017 | (origin | |
1018 | (method url-fetch) | |
b6ab89ef | 1019 | (uri (pypi-uri "six" version)) |
a480bc41 EB |
1020 | (sha256 |
1021 | (base32 | |
8ed675a7 | 1022 | "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h")))) |
a480bc41 | 1023 | (build-system python-build-system) |
8dd339e5 MB |
1024 | (arguments |
1025 | `(#:phases | |
1026 | (modify-phases %standard-phases | |
1027 | (replace 'check | |
1028 | (lambda _ | |
1029 | (zero? (system* "py.test" "-v"))))))) | |
4fd129ee MB |
1030 | (native-inputs |
1031 | `(("python-py" ,python-py) | |
92b2101a | 1032 | ("python-pytest" ,python-pytest-bootstrap))) |
9be5ecdf | 1033 | (home-page "https://pypi.python.org/pypi/six/") |
a480bc41 EB |
1034 | (synopsis "Python 2 and 3 compatibility utilities") |
1035 | (description | |
35b9e423 | 1036 | "Six is a Python 2 and 3 compatibility library. It provides utility |
a480bc41 EB |
1037 | functions for smoothing over the differences between the Python versions with |
1038 | the goal of writing Python code that is compatible on both Python versions. | |
35b9e423 | 1039 | Six supports every Python version since 2.5. It is contained in only one |
a480bc41 | 1040 | Python file, so it can be easily copied into your project.") |
3f641af0 | 1041 | (license license:x11))) |
a480bc41 | 1042 | |
0c20025c AE |
1043 | (define-public python2-six |
1044 | (package-with-python2 python-six)) | |
1045 | ||
24d15813 SR |
1046 | (define-public python-schedule |
1047 | (package | |
1048 | (name "python-schedule") | |
1049 | (version "0.4.3") | |
1050 | (source | |
1051 | (origin | |
1052 | (method url-fetch) | |
1053 | (uri (pypi-uri "schedule" version)) | |
1054 | (sha256 | |
1055 | (base32 | |
1056 | "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i")))) | |
1057 | (build-system python-build-system) | |
1058 | (native-inputs | |
1059 | `(("python-pytest" ,python-pytest) | |
1060 | ("python-mock" ,python-mock))) | |
1061 | (home-page "https://github.com/dbader/schedule") | |
1062 | (synopsis "Schedule periodic function calls in Python") | |
1063 | (description | |
1064 | "Schedule is an in-process scheduler for periodic jobs that uses the | |
1065 | builder pattern for configuration. Schedule lets you run Python functions (or | |
1066 | any other callable) periodically at pre-determined intervals using a simple, | |
1067 | human-friendly syntax.") | |
1068 | (license license:expat))) | |
1069 | ||
1070 | (define-public python2-schedule | |
1071 | (package-with-python2 python-schedule)) | |
1072 | ||
d072efcb RW |
1073 | (define-public python-pandas |
1074 | (package | |
1075 | (name "python-pandas") | |
ce2cfcab | 1076 | (version "0.22.0") |
d072efcb RW |
1077 | (source |
1078 | (origin | |
1b96f069 | 1079 | (method url-fetch) |
8e086048 | 1080 | (uri (pypi-uri "pandas" version)) |
1b96f069 | 1081 | (sha256 |
ce2cfcab | 1082 | (base32 "0v0fi2i10kwnmlpsl6f1fgajcpx3q6766qf6xqi5kw3ivn8l1aa4")))) |
d072efcb | 1083 | (build-system python-build-system) |
ce2cfcab MB |
1084 | (arguments |
1085 | `(#:modules ((guix build utils) | |
1086 | (guix build python-build-system) | |
1087 | (ice-9 ftw) | |
1088 | (srfi srfi-26)) | |
1089 | #:phases (modify-phases %standard-phases | |
1090 | (replace 'check | |
1091 | (lambda _ | |
1092 | (let ((build-directory | |
1093 | (string-append | |
1094 | (getcwd) "/build/" | |
1095 | (car (scandir "build" | |
1096 | (cut string-prefix? "lib." <>)))))) | |
1097 | (with-directory-excursion build-directory | |
1098 | ;; Delete tests that require "moto" which is not yet in Guix. | |
1099 | (for-each delete-file | |
1100 | '("pandas/tests/io/conftest.py" | |
1101 | "pandas/tests/io/json/test_compression.py" | |
1102 | "pandas/tests/io/test_excel.py")) | |
1103 | (invoke "pytest" "-v" "pandas" "-k" | |
1104 | (string-append | |
1105 | "not network and not disabled" | |
1106 | ;; XXX: Due to the deleted tests above. | |
1107 | " and not test_read_s3_jsonl"))))))))) | |
d072efcb | 1108 | (propagated-inputs |
f22efa01 HG |
1109 | `(("python-numpy" ,python-numpy) |
1110 | ("python-pytz" ,python-pytz) | |
22d7360b | 1111 | ("python-dateutil" ,python-dateutil))) |
d072efcb | 1112 | (native-inputs |
ce2cfcab MB |
1113 | `(("python-cython" ,python-cython) |
1114 | ("python-lxml" ,python-lxml) | |
1115 | ("python-nose" ,python-nose) | |
1116 | ("python-pytest" ,python-pytest))) | |
1117 | (home-page "https://pandas.pydata.org") | |
d072efcb RW |
1118 | (synopsis "Data structures for data analysis, time series, and statistics") |
1119 | (description | |
1120 | "Pandas is a Python package providing fast, flexible, and expressive data | |
1121 | structures designed to make working with structured (tabular, | |
1122 | multidimensional, potentially heterogeneous) and time series data both easy | |
1123 | and intuitive. It aims to be the fundamental high-level building block for | |
1124 | doing practical, real world data analysis in Python.") | |
f210e944 | 1125 | (license license:bsd-3))) |
d072efcb RW |
1126 | |
1127 | (define-public python2-pandas | |
f210e944 | 1128 | (package-with-python2 python-pandas)) |
d072efcb | 1129 | |
2875caf5 AE |
1130 | (define-public python2-mechanize |
1131 | (package | |
1132 | (name "python2-mechanize") | |
1133 | (version "0.2.5") | |
1134 | (source | |
1135 | (origin | |
1136 | (method url-fetch) | |
1137 | (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-" | |
1138 | version ".tar.gz")) | |
1139 | (sha256 | |
1140 | (base32 | |
1141 | "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf")))) | |
1142 | (build-system python-build-system) | |
2875caf5 AE |
1143 | (arguments |
1144 | `(#:python ,python-2 ; apparently incompatible with Python 3 | |
1145 | #:tests? #f)) | |
1146 | ;; test fails with message | |
1147 | ;; AttributeError: 'module' object has no attribute 'test_pullparser' | |
1148 | ;; (python-3.3.2) or | |
1149 | ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet' | |
1150 | ;; (python-2.7.5). | |
1151 | ;; The source code is from March 2011 and probably not up-to-date | |
1152 | ;; with respect to python unit tests. | |
1153 | (home-page "http://wwwsearch.sourceforge.net/mechanize/") | |
1154 | (synopsis | |
1155 | "Stateful programmatic web browsing in Python") | |
1156 | (description | |
1157 | "Mechanize implements stateful programmatic web browsing in Python, | |
1158 | after Andy Lester’s Perl module WWW::Mechanize.") | |
3f641af0 DC |
1159 | (license (license:non-copyleft |
1160 | "file://COPYING" | |
1161 | "See COPYING in the distribution.")))) | |
2875caf5 | 1162 | |
0352532e AE |
1163 | |
1164 | (define-public python-simplejson | |
1165 | (package | |
1166 | (name "python-simplejson") | |
b2e6e150 | 1167 | (version "3.10.0") |
0352532e AE |
1168 | (source |
1169 | (origin | |
1170 | (method url-fetch) | |
988d1bad | 1171 | (uri (pypi-uri "simplejson" version)) |
0352532e AE |
1172 | (sha256 |
1173 | (base32 | |
b2e6e150 | 1174 | "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm")))) |
0352532e AE |
1175 | (build-system python-build-system) |
1176 | (home-page "http://simplejson.readthedocs.org/en/latest/") | |
1177 | (synopsis | |
1178 | "Json library for Python") | |
1179 | (description | |
e881752c AK |
1180 | "JSON (JavaScript Object Notation) is a subset of JavaScript |
1181 | syntax (ECMA-262 3rd edition) used as a lightweight data interchange | |
1182 | format. | |
0352532e AE |
1183 | |
1184 | Simplejson exposes an API familiar to users of the standard library marshal | |
1185 | and pickle modules. It is the externally maintained version of the json | |
1186 | library contained in Python 2.6, but maintains compatibility with Python 2.5 | |
1187 | and (currently) has significant performance advantages, even without using | |
1188 | the optional C extension for speedups. Simplejson is also supported on | |
1189 | Python 3.3+.") | |
3f641af0 | 1190 | (license license:x11))) |
0352532e AE |
1191 | |
1192 | (define-public python2-simplejson | |
1193 | (package-with-python2 python-simplejson)) | |
421a80a2 AE |
1194 | |
1195 | ||
ed07b08d | 1196 | (define-public python-pyicu |
421a80a2 | 1197 | (package |
ed07b08d | 1198 | (name "python-pyicu") |
d152d933 | 1199 | (version "1.9.8") |
421a80a2 AE |
1200 | (source |
1201 | (origin | |
1202 | (method url-fetch) | |
2e161eaf | 1203 | (uri (pypi-uri "PyICU" version)) |
421a80a2 AE |
1204 | (sha256 |
1205 | (base32 | |
d152d933 | 1206 | "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd")))) |
421a80a2 AE |
1207 | (build-system python-build-system) |
1208 | (inputs | |
1209 | `(("icu4c" ,icu4c))) | |
d152d933 TGR |
1210 | (native-inputs |
1211 | `(("python-pytest" ,python-pytest) | |
1212 | ("python-six" ,python-six))) | |
8fab029d | 1213 | (home-page "https://github.com/ovalhub/pyicu") |
9e771e3b | 1214 | (synopsis "Python extension wrapping the ICU C++ API") |
421a80a2 AE |
1215 | (description |
1216 | "PyICU is a python extension wrapping the ICU C++ API.") | |
574b1d02 | 1217 | (properties `((python2-variant . ,(delay python2-pyicu)))) |
f210e944 | 1218 | (license license:x11))) |
ed07b08d LF |
1219 | |
1220 | (define-public python2-pyicu | |
d65854bd TGR |
1221 | (let ((base (package-with-python2 |
1222 | (strip-python2-variant python-pyicu)))) | |
1223 | (package | |
1224 | (inherit base) | |
1225 | (arguments | |
1226 | `(,@(package-arguments base) | |
1227 | #:phases | |
1228 | (modify-phases %standard-phases | |
1229 | (add-before 'check 'delete-failing-test | |
1230 | (λ _ | |
1231 | ;; XXX: This fails due to Unicode issues unique to Python 2, | |
1232 | ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>. | |
1233 | (delete-file "test/test_Script.py") | |
1234 | #t)))))))) | |
cc20a22a LC |
1235 | |
1236 | (define-public python2-dogtail | |
1237 | ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and | |
1238 | ;; spaces in indentation" with Python 3. | |
1239 | (package | |
1240 | (name "python2-dogtail") | |
c5be3467 | 1241 | (version "0.9.9") |
cc20a22a LC |
1242 | (source (origin |
1243 | (method url-fetch) | |
c5be3467 | 1244 | (uri (pypi-uri "dogtail" version)) |
cc20a22a LC |
1245 | (sha256 |
1246 | (base32 | |
c5be3467 | 1247 | "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x")))) |
cc20a22a LC |
1248 | (build-system python-build-system) |
1249 | (arguments `(#:python ,python-2 | |
1250 | #:tests? #f)) ; invalid command "test" | |
5ee684ff EJ |
1251 | ;; Currently no offical homepage. |
1252 | (home-page "https://pypi.python.org/pypi/dogtail/") | |
1003fbcf | 1253 | (synopsis "GUI test tool and automation framework written in Python") |
cc20a22a | 1254 | (description |
35b9e423 | 1255 | "Dogtail is a GUI test tool and automation framework written in Python. |
cc20a22a LC |
1256 | It uses Accessibility (a11y) technologies to communicate with desktop |
1257 | applications. dogtail scripts are written in Python and executed like any | |
1258 | other Python program.") | |
3f641af0 | 1259 | (license license:gpl2+))) |
515e6878 | 1260 | |
011b18c3 LC |
1261 | (define-public python2-empy |
1262 | (package | |
1263 | (name "python2-empy") | |
1264 | (version "3.3") | |
1265 | (source (origin | |
1266 | (method url-fetch) | |
1267 | (uri (string-append "http://www.alcyone.com/software/empy/empy-" | |
1268 | version ".tar.gz")) | |
1269 | (sha256 | |
1270 | (base32 | |
1271 | "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6")))) | |
1272 | (build-system python-build-system) | |
1273 | (arguments | |
1274 | `(#:python ,python-2 | |
dc1d3cde KK |
1275 | #:phases |
1276 | (modify-phases %standard-phases | |
1277 | (replace 'check | |
1278 | (lambda _ | |
1279 | (zero? (system* "./test.sh"))))))) | |
011b18c3 LC |
1280 | (home-page "http://www.alcyone.com/software/empy/") |
1281 | (synopsis "Templating system for Python") | |
1282 | (description | |
1283 | "EmPy is a system for embedding Python expressions and statements in | |
1284 | template text; it takes an EmPy source file, processes it, and produces | |
1285 | output. This is accomplished via expansions, which are special signals to the | |
1cd4027c | 1286 | EmPy system and are set off by a special prefix (by default the at sign, @@). |
011b18c3 LC |
1287 | EmPy can expand arbitrary Python expressions and statements in this way, as |
1288 | well as a variety of special forms. Textual data not explicitly delimited in | |
1289 | this way is sent unaffected to the output, allowing Python to be used in | |
1290 | effect as a markup language. Also supported are callbacks via hooks, | |
1291 | recording and playback via diversions, and dynamic, chainable filters. The | |
1292 | system is highly configurable via command line options and embedded | |
1293 | commands.") | |
3f641af0 | 1294 | (license license:lgpl2.1+))) |
011b18c3 | 1295 | |
8deeda0c LC |
1296 | (define-public python2-element-tree |
1297 | (package | |
1298 | (name "python2-element-tree") | |
1299 | (version "1.2.6") | |
1300 | (source (origin | |
1301 | (method url-fetch) | |
1302 | (uri (string-append | |
1303 | "http://effbot.org/media/downloads/elementtree-" | |
1304 | version "-20050316.tar.gz")) | |
1305 | (sha256 | |
1306 | (base32 | |
1307 | "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj")))) | |
1308 | (build-system python-build-system) | |
1309 | (arguments | |
1310 | `(#:python ,python-2 ; seems to be part of Python 3 | |
1311 | #:tests? #f)) ; no 'test' sub-command | |
1312 | (synopsis "Toolkit for XML processing in Python") | |
1313 | (description | |
1314 | "ElementTree is a Python library supporting lightweight XML processing.") | |
1315 | (home-page "http://effbot.org/zone/element-index.htm") | |
3f641af0 DC |
1316 | (license (license:x11-style |
1317 | "http://docs.python.org/2/license.html" | |
1318 | "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\".")))) | |
8deeda0c LC |
1319 | |
1320 | (define-public python2-pybugz | |
1321 | (package | |
1322 | (name "python2-pybugz") | |
1323 | (version "0.6.11") | |
1324 | (source (origin | |
1325 | (method url-fetch) | |
1326 | (uri (string-append | |
1327 | "http://bits.liquidx.net/projects/pybugz/pybugz-" | |
1328 | version ".tar.gz")) | |
1329 | (sha256 | |
1330 | (base32 | |
6f194a1e | 1331 | "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd")) |
fc1adab1 AK |
1332 | (patches (search-patches "pybugz-stty.patch" |
1333 | "pybugz-encode-error.patch")))) | |
8deeda0c LC |
1334 | (build-system python-build-system) |
1335 | (arguments | |
1336 | `(#:python ,python-2 ; SyntaxError with Python 3 | |
1337 | #:tests? #f)) ; no 'test' sub-command | |
f22efa01 HG |
1338 | (propagated-inputs |
1339 | `(("element-tree" ,python2-element-tree))) | |
8deeda0c LC |
1340 | (synopsis "Python and command-line interface to Bugzilla") |
1341 | (description | |
1342 | "PyBugz is a Python library and command-line tool to query the Bugzilla | |
1343 | bug tracking system. It is meant as an aid to speed up interaction with the | |
1344 | bug tracker.") | |
1345 | (home-page "http://www.liquidx.net/pybugz/") | |
3f641af0 | 1346 | (license license:gpl2))) |
8deeda0c | 1347 | |
a6c6a59f MB |
1348 | (define-public python2-enum |
1349 | (package | |
1350 | (name "python2-enum") | |
1351 | (version "0.4.6") | |
1352 | (source (origin | |
1353 | (method url-fetch) | |
1354 | (uri (pypi-uri "enum" version)) | |
1355 | (sha256 | |
1356 | (base32 | |
1357 | "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl")))) | |
1358 | (build-system python-build-system) | |
1359 | (arguments | |
1360 | `(#:python ,python-2)) | |
1361 | (home-page "http://pypi.python.org/pypi/enum/") | |
1362 | (synopsis "Robust enumerated type support in Python") | |
1363 | (description | |
1364 | "This provides a module for robust enumerations in Python. It has | |
1365 | been superseded by the Python standard library and is provided only for | |
1366 | compatibility.") | |
1367 | ;; Choice of either license. | |
1368 | (license (list license:gpl3+ license:psfl)))) | |
1369 | ||
a480bc41 EB |
1370 | (define-public python-enum34 |
1371 | (package | |
1372 | (name "python-enum34") | |
5e923414 | 1373 | (version "1.1.6") |
a480bc41 EB |
1374 | (source |
1375 | (origin | |
1376 | (method url-fetch) | |
d39ae1e5 | 1377 | (uri (pypi-uri "enum34" version)) |
a480bc41 EB |
1378 | (sha256 |
1379 | (base32 | |
5e923414 | 1380 | "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a")))) |
a480bc41 | 1381 | (build-system python-build-system) |
a480bc41 EB |
1382 | (home-page "https://pypi.python.org/pypi/enum34") |
1383 | (synopsis "Backported Python 3.4 Enum") | |
1384 | (description | |
1385 | "Enum34 is the new Python stdlib enum module available in Python 3.4 | |
1386 | backported for previous versions of Python from 2.4 to 3.3.") | |
3f641af0 | 1387 | (license license:bsd-3))) |
a480bc41 | 1388 | |
820acd1b LF |
1389 | (define-public python2-enum34 |
1390 | (package-with-python2 python-enum34)) | |
1391 | ||
a480bc41 EB |
1392 | (define-public python-parse-type |
1393 | (package | |
1394 | (name "python-parse-type") | |
557f8f21 | 1395 | (version "0.4.2") |
a480bc41 EB |
1396 | (source |
1397 | (origin | |
1398 | (method url-fetch) | |
557f8f21 | 1399 | (uri (pypi-uri "parse_type" version)) |
a480bc41 EB |
1400 | (sha256 |
1401 | (base32 | |
557f8f21 | 1402 | "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm")))) |
a480bc41 | 1403 | (build-system python-build-system) |
f22efa01 | 1404 | (propagated-inputs |
f3b98f4f | 1405 | `(("python-six" ,python-six) |
68f1cdec | 1406 | ("python-parse" ,python-parse))) |
8ed12889 DM |
1407 | (native-inputs |
1408 | `(("python-pytest" ,python-pytest) | |
1409 | ("python-pytest-runner" ,python-pytest-runner))) | |
a480bc41 EB |
1410 | (home-page "https://github.com/jenisys/parse_type") |
1411 | (synopsis "Extended parse module") | |
1412 | (description | |
1413 | "Parse_type extends the python parse module.") | |
8ed12889 DM |
1414 | (properties |
1415 | `((python2-variant . ,(delay python2-parse-type)))) | |
3f641af0 | 1416 | (license license:bsd-3))) |
a480bc41 | 1417 | |
8ed12889 DM |
1418 | (define-public python2-parse-type |
1419 | (let ((base (package-with-python2 | |
1420 | (strip-python2-variant python-parse-type)))) | |
1421 | (package (inherit base) | |
1422 | (propagated-inputs | |
1423 | `(("python2-enum34" ,python2-enum34) | |
1424 | ,@(package-propagated-inputs base)))))) | |
1425 | ||
a480bc41 EB |
1426 | (define-public python-parse |
1427 | (package | |
1428 | (name "python-parse") | |
2115bde3 | 1429 | (version "1.8.2") |
a480bc41 EB |
1430 | (source |
1431 | (origin | |
1432 | (method url-fetch) | |
eb3d3503 | 1433 | (uri (pypi-uri "parse" version)) |
a480bc41 EB |
1434 | (sha256 |
1435 | (base32 | |
2115bde3 | 1436 | "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40")))) |
a480bc41 EB |
1437 | (build-system python-build-system) |
1438 | (arguments | |
1439 | `(#:phases | |
f9a65318 EF |
1440 | (modify-phases %standard-phases |
1441 | (replace 'check | |
2115bde3 | 1442 | (lambda _ (invoke "python" "test_parse.py")))))) |
a480bc41 EB |
1443 | (home-page "https://github.com/r1chardj0n3s/parse") |
1444 | (synopsis "Parse strings") | |
1445 | (description | |
1446 | "Parse strings using a specification based on the Python format() | |
1447 | syntax.") | |
3f641af0 | 1448 | (license license:x11))) |
a480bc41 | 1449 | |
d3eff97a JL |
1450 | (define-public python-polib |
1451 | (package | |
1452 | (name "python-polib") | |
1453 | (version "1.0.8") | |
1454 | (source (origin | |
1455 | (method url-fetch) | |
1456 | (uri (pypi-uri "polib" version)) | |
1457 | (sha256 | |
1458 | (base32 | |
1459 | "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss")))) | |
1460 | (build-system python-build-system) | |
1461 | (home-page "https://bitbucket.org/izi/polib/wiki/Home") | |
1462 | (synopsis "Manipulate, create and modify gettext files") | |
1463 | (description "Polib can manipulate any gettext format (po, pot and mo) | |
1464 | files. It can be used to create po files from scratch or to modify | |
1465 | existing ones.") | |
1466 | (license license:expat))) | |
1467 | ||
1468 | (define-public python2-polib | |
1469 | (let ((base (package-with-python2 (strip-python2-variant python-polib)))) | |
1470 | (package | |
1471 | (inherit base) | |
1472 | (arguments `(,@(package-arguments base) | |
1473 | ;; Tests don't work with python2. | |
1474 | #:tests? #f))))) | |
a480bc41 | 1475 | |
515e6878 LC |
1476 | (define-public scons |
1477 | (package | |
1478 | (name "scons") | |
bf630276 | 1479 | (version "3.0.1") |
515e6878 LC |
1480 | (source (origin |
1481 | (method url-fetch) | |
de67e922 LF |
1482 | (uri (string-append "mirror://sourceforge/scons/scons/" version |
1483 | "/scons-" version ".tar.gz")) | |
515e6878 LC |
1484 | (sha256 |
1485 | (base32 | |
bf630276 | 1486 | "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4")))) |
515e6878 LC |
1487 | (build-system python-build-system) |
1488 | (arguments | |
bf630276 | 1489 | `(#:use-setuptools? #f ; still relies on distutils |
515e6878 LC |
1490 | #:tests? #f)) ; no 'python setup.py test' command |
1491 | (home-page "http://scons.org/") | |
1492 | (synopsis "Software construction tool written in Python") | |
1493 | (description | |
1494 | "SCons is a software construction tool. Think of SCons as an improved, | |
1495 | cross-platform substitute for the classic Make utility with integrated | |
1496 | functionality similar to autoconf/automake and compiler caches such as ccache. | |
1497 | In short, SCons is an easier, more reliable and faster way to build | |
1498 | software.") | |
3f641af0 | 1499 | (license license:x11))) |
011b18c3 | 1500 | |
bf630276 AI |
1501 | (define-public scons-python2 |
1502 | (package | |
1503 | (inherit (package-with-python2 scons)) | |
1504 | (name "scons-python2"))) | |
1505 | ||
c15a5c0e DT |
1506 | (define-public python-extras |
1507 | (package | |
1508 | (name "python-extras") | |
881ed3f8 | 1509 | (version "1.0.0") |
c15a5c0e DT |
1510 | (source |
1511 | (origin | |
1512 | (method url-fetch) | |
881ed3f8 | 1513 | (uri (pypi-uri "extras" version)) |
c15a5c0e DT |
1514 | (sha256 |
1515 | (base32 | |
881ed3f8 | 1516 | "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk")))) |
c15a5c0e | 1517 | (build-system python-build-system) |
c15a5c0e | 1518 | (arguments |
881ed3f8 | 1519 | ;; FIXME: Circular dependency on testtools. |
c15a5c0e DT |
1520 | '(#:tests? #f)) |
1521 | (home-page "https://github.com/testing-cabal/extras") | |
1522 | (synopsis "Useful extensions to the Python standard library") | |
1523 | (description | |
1524 | "Extras is a set of extensions to the Python standard library.") | |
bd3fa666 | 1525 | (license license:expat))) |
c15a5c0e DT |
1526 | |
1527 | (define-public python2-extras | |
1528 | (package-with-python2 python-extras)) | |
1529 | ||
56ea0efd DT |
1530 | (define-public python-mimeparse |
1531 | (package | |
1532 | (name "python-mimeparse") | |
1533 | (version "0.1.4") | |
1534 | (source | |
1535 | (origin | |
1536 | (method url-fetch) | |
1537 | (uri (string-append | |
1538 | "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-" | |
1539 | version ".tar.gz")) | |
1540 | (sha256 | |
1541 | (base32 | |
1542 | "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w")))) | |
1543 | (build-system python-build-system) | |
56ea0efd DT |
1544 | (arguments |
1545 | '(#:tests? #f)) ; no setup.py test command | |
1546 | (home-page | |
1547 | "https://github.com/dbtsai/python-mimeparse") | |
9e771e3b | 1548 | (synopsis "Python library for parsing MIME types") |
56ea0efd DT |
1549 | (description |
1550 | "Mimeparse provides basic functions for parsing MIME type names and | |
1551 | matching them against a list of media-ranges.") | |
bd3fa666 | 1552 | (license license:expat))) |
56ea0efd DT |
1553 | |
1554 | (define-public python2-mimeparse | |
1555 | (package-with-python2 python-mimeparse)) | |
1556 | ||
02f8f804 | 1557 | (define-public python-pafy |
4435427e | 1558 | (package |
02f8f804 | 1559 | (name "python-pafy") |
745d85b7 | 1560 | (version "0.5.3.1") |
4435427e | 1561 | (source |
02f8f804 | 1562 | (origin |
1563 | (method url-fetch) | |
1564 | (uri (pypi-uri "pafy" version)) | |
1565 | (sha256 | |
1566 | (base32 | |
745d85b7 | 1567 | "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim")))) |
4435427e | 1568 | (build-system python-build-system) |
4435427e | 1569 | (arguments |
ed3fee5f | 1570 | `(#:tests? #f)) ; Currently pafy can not find itself in the tests |
f22efa01 | 1571 | (propagated-inputs |
02f8f804 | 1572 | ;; Youtube-dl is a python package which is imported in the file |
1573 | ;; "backend_youtube_dl.py", therefore it needs to be propagated. | |
1574 | `(("youtube-dl" ,youtube-dl))) | |
1575 | (home-page "https://np1.github.io/pafy/") | |
1576 | (synopsis "Retrieve YouTube content and metadata") | |
0aea283a | 1577 | (description |
02f8f804 | 1578 | "@code{pafy} is a python library to retrieve YouTube content and metadata.") |
1579 | (license license:lgpl3+))) | |
0aea283a | 1580 | |
6bb9645e MB |
1581 | (define-public python2-funcsigs |
1582 | (package | |
1583 | (name "python2-funcsigs") | |
1584 | (version "1.0.2") | |
1585 | (source (origin | |
1586 | (method url-fetch) | |
1587 | (uri (pypi-uri "funcsigs" version)) | |
1588 | (sha256 | |
1589 | (base32 | |
1590 | "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7")))) | |
1591 | (build-system python-build-system) | |
1592 | (arguments | |
1593 | `(#:python ,python-2)) | |
1594 | (native-inputs | |
1595 | `(("python2-unittest2" ,python2-unittest2))) | |
1596 | (home-page "http://funcsigs.readthedocs.org") | |
1597 | (synopsis "Python function signatures from PEP362") | |
1598 | (description | |
1599 | "Backport of @code{funcsigs} which was introduced in Python 3.3.") | |
1600 | (license license:asl2.0))) | |
1601 | ||
2dd12924 | 1602 | (define-public python-pafy |
6cd9c356 | 1603 | (package |
2dd12924 MB |
1604 | (name "python-pafy") |
1605 | (version "0.5.3.1") | |
6cd9c356 DT |
1606 | (source |
1607 | (origin | |
1608 | (method url-fetch) | |
2dd12924 | 1609 | (uri (pypi-uri "pafy" version)) |
02f8f804 | 1610 | (sha256 |
1611 | (base32 | |
745d85b7 | 1612 | "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim")))) |
02f8f804 | 1613 | (build-system python-build-system) |
ed3fee5f | 1614 | (arguments |
1615 | `(#:tests? #f)) ; Currently pafy can not find itself in the tests | |
02f8f804 | 1616 | (propagated-inputs |
1617 | ;; Youtube-dl is a python package which is imported in the file | |
1618 | ;; "backend_youtube_dl.py", therefore it needs to be propagated. | |
1619 | `(("youtube-dl" ,youtube-dl))) | |
1620 | (home-page "https://np1.github.io/pafy/") | |
1621 | (synopsis "Retrieve YouTube content and metadata") | |
1622 | (description | |
1623 | "@code{pafy} is a python library to retrieve YouTube content and metadata.") | |
1624 | (license license:lgpl3+))) | |
1625 | ||
542ad60f DT |
1626 | (define-public python-py |
1627 | (package | |
1628 | (name "python-py") | |
220b0ac3 | 1629 | (version "1.4.34") |
542ad60f DT |
1630 | (source |
1631 | (origin | |
1632 | (method url-fetch) | |
71c8a804 | 1633 | (uri (pypi-uri "py" version)) |
542ad60f DT |
1634 | (sha256 |
1635 | (base32 | |
220b0ac3 | 1636 | "1qyd5z0hv8ymxy84v5vig3vps2fvhcf4bdlksb3r03h549fmhb8g")))) |
542ad60f | 1637 | (build-system python-build-system) |
dcb0da7b MB |
1638 | (arguments |
1639 | ;; FIXME: "ImportError: 'test' module incorrectly imported from | |
1640 | ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'. | |
1641 | ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'. | |
1642 | ;; Is this module globally installed?" | |
1643 | '(#:tests? #f)) | |
542ad60f DT |
1644 | (home-page "http://pylib.readthedocs.org/") |
1645 | (synopsis "Python library for parsing, I/O, instrospection, and logging") | |
1646 | (description | |
1647 | "Py is a Python library for file name parsing, .ini file parsing, I/O, | |
1648 | code introspection, and logging.") | |
bd3fa666 | 1649 | (license license:expat))) |
542ad60f DT |
1650 | |
1651 | (define-public python2-py | |
1652 | (package-with-python2 python-py)) | |
1653 | ||
d2a8db92 HG |
1654 | ;; Recent versions of python-fixtures and python-testrepository need |
1655 | ;; python-pbr for packaging, which itself needs these two packages for | |
1656 | ;; testing. | |
1657 | ;; To fix this circular dependency, we use a build of python-pbr, based on the | |
1658 | ;; same source, just without any test dependencies and with tests disabled. | |
1659 | ;; python-pbr-minmal is then used to package python-fixtures and | |
1660 | ;; python-testrepository. | |
1661 | ;; Strictly speaking we currently could remove the test-requirements from the | |
1662 | ;; normal python-pbr package (and save this package) since test are disabled | |
1663 | ;; there anyway. But this may change in future. | |
ac257f12 | 1664 | (define-public python-pbr-minimal |
cd49454b | 1665 | (package |
d2a8db92 | 1666 | (name "python-pbr-minimal") |
269504a7 | 1667 | (version "3.0.1") |
7787ef76 CR |
1668 | (source |
1669 | (origin | |
1670 | (method url-fetch) | |
d2a8db92 | 1671 | (uri (pypi-uri "pbr" version)) |
7787ef76 CR |
1672 | (sha256 |
1673 | (base32 | |
269504a7 | 1674 | "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p")))) |
7787ef76 CR |
1675 | (build-system python-build-system) |
1676 | (arguments | |
d2a8db92 HG |
1677 | `(#:tests? #f)) |
1678 | (home-page "http://docs.openstack.org/developer/pbr/") | |
1679 | (synopsis "Minimal build of python-pbr used for bootstrapping") | |
7787ef76 | 1680 | (description |
d2a8db92 | 1681 | "Used only for bootstrapping python2-pbr, you should not need this.") |
3f641af0 | 1682 | (license license:asl2.0))) |
7787ef76 | 1683 | |
ac257f12 | 1684 | (define-public python2-pbr-minimal |
d2a8db92 | 1685 | (package-with-python2 python-pbr-minimal)) |
7787ef76 | 1686 | |
1ef09c0c | 1687 | (define-public python-pbr |
e25f0174 | 1688 | (package |
d2a8db92 | 1689 | (inherit python-pbr-minimal) |
e25f0174 | 1690 | (name "python-pbr") |
e25f0174 BW |
1691 | (arguments |
1692 | `(#:tests? #f)) ;; Most tests seem to use the Internet. | |
1693 | (propagated-inputs | |
d2a8db92 HG |
1694 | `(("git" ,git))) ;; pbr actually uses the "git" binary. |
1695 | (native-inputs | |
335c9e39 | 1696 | `(("python-fixtures" ,python-fixtures-bootstrap) |
d2a8db92 | 1697 | ;; discover, coverage, hacking, subunit |
e25f0174 | 1698 | ("python-mock" ,python-mock) |
d2a8db92 | 1699 | ("python-six" ,python-six) |
e25f0174 | 1700 | ("python-sphinx" ,python-sphinx) |
335c9e39 | 1701 | ("python-testrepository" ,python-testrepository-bootstrap) |
bc69104a | 1702 | ("python-testresources" ,python-testresources-bootstrap) |
8b93f7e4 MB |
1703 | ("python-testscenarios" ,python-testscenarios-bootstrap) |
1704 | ("python-testtools" ,python-testtools-bootstrap) | |
e25f0174 | 1705 | ("python-virtualenv" ,python-virtualenv))) |
d2a8db92 | 1706 | (synopsis "Enhance the default behavior of Python’s setuptools") |
041358fb | 1707 | (description |
e25f0174 | 1708 | "Python Build Reasonableness (PBR) is a library that injects some useful |
d2a8db92 HG |
1709 | and sensible default behaviors into your setuptools run. It will set |
1710 | versions, process requirements files and generate AUTHORS and ChangeLog file | |
1711 | from git information. | |
1712 | "))) | |
041358fb | 1713 | |
1ef09c0c | 1714 | (define-public python2-pbr |
e25f0174 | 1715 | (package-with-python2 python-pbr)) |
c7303d3c DT |
1716 | |
1717 | (define-public python-exif-read | |
1718 | (package | |
1719 | (name "python-exif-read") | |
2a2d0981 | 1720 | (version "2.1.2") |
c7303d3c DT |
1721 | (source (origin |
1722 | (method url-fetch) | |
2a2d0981 | 1723 | (uri (pypi-uri "ExifRead" version)) |
c7303d3c DT |
1724 | (sha256 |
1725 | (base32 | |
2a2d0981 | 1726 | "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr")))) |
c7303d3c | 1727 | (build-system python-build-system) |
c7303d3c DT |
1728 | (arguments `(#:tests? #f)) ; no tests |
1729 | (home-page "https://github.com/ianare/exif-py") | |
1730 | (synopsis "Python library to extract EXIF data from image files") | |
1731 | (description | |
1732 | "ExifRead is a Python library to extract EXIF data from tiff and jpeg | |
1733 | files.") | |
3f641af0 | 1734 | (license license:bsd-3))) |
c7303d3c DT |
1735 | |
1736 | (define-public python2-exif-read | |
1737 | (package-with-python2 python-exif-read)) | |
d5f89b22 DT |
1738 | |
1739 | (define-public python-pyld | |
1740 | (package | |
1741 | (name "python-pyld") | |
8957af32 | 1742 | (version "0.7.1") |
d5f89b22 DT |
1743 | (source (origin |
1744 | (method url-fetch) | |
af1ab773 | 1745 | (uri (pypi-uri "PyLD" version)) |
d5f89b22 DT |
1746 | (sha256 |
1747 | (base32 | |
8957af32 | 1748 | "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156")))) |
d5f89b22 | 1749 | (build-system python-build-system) |
d5f89b22 | 1750 | (arguments `(#:tests? #f)) ; no tests |
7bf837fd | 1751 | (home-page "https://github.com/digitalbazaar/pyld") |
d5f89b22 DT |
1752 | (synopsis "Python implementation of the JSON-LD specification") |
1753 | (description | |
1754 | "PyLD is an implementation of the JSON-LD specification.") | |
3f641af0 | 1755 | (license license:bsd-3))) |
d5f89b22 DT |
1756 | |
1757 | (define-public python2-pyld | |
1758 | (package-with-python2 python-pyld)) | |
3a1f9a68 | 1759 | |
12c270dd RW |
1760 | (define-public python-click |
1761 | (package | |
1762 | (name "python-click") | |
d4acb6db | 1763 | (version "6.7") |
12c270dd RW |
1764 | (source |
1765 | (origin | |
1766 | (method url-fetch) | |
375f224b | 1767 | (uri (pypi-uri "click" version)) |
12c270dd | 1768 | (sha256 |
43accb58 | 1769 | (base32 |
d4acb6db | 1770 | "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi")))) |
12c270dd | 1771 | (build-system python-build-system) |
e2ab5a09 | 1772 | (arguments |
6a25c6cd LF |
1773 | `(;; The tests are fragile, depending on a specific version of pytest: |
1774 | ;; <https://github.com/pallets/click/issues/823> | |
1775 | #:tests? #f | |
1776 | #:phases | |
e2ab5a09 BW |
1777 | (modify-phases %standard-phases |
1778 | (add-after 'unpack 'fix-paths | |
1779 | (lambda* (#:key inputs #:allow-other-keys) | |
1780 | (let ((glibc (assoc-ref inputs ,(if (%current-target-system) | |
1781 | "cross-libc" "libc")))) | |
1782 | (substitute* "click/_unicodefun.py" | |
1783 | (("'locale'") | |
1784 | (string-append "'" glibc "/bin/locale'")))) | |
6a25c6cd | 1785 | #t))))) |
97be1bc2 MB |
1786 | (native-inputs |
1787 | `(("python-pytest" ,python-pytest))) | |
12c270dd RW |
1788 | (home-page "http://click.pocoo.org") |
1789 | (synopsis "Command line library for Python") | |
1790 | (description | |
1791 | "Click is a Python package for creating command line interfaces in a | |
1792 | composable way with as little code as necessary. Its name stands for | |
1793 | \"Command Line Interface Creation Kit\". It's highly configurable but comes | |
1794 | with sensible defaults out of the box.") | |
3f641af0 | 1795 | (license license:bsd-3))) |
12c270dd RW |
1796 | |
1797 | (define-public python2-click | |
1798 | (package-with-python2 python-click)) | |
1799 | ||
addc808d EF |
1800 | (define-public python-wheel |
1801 | (package | |
1802 | (name "python-wheel") | |
0e6df70b | 1803 | (version "0.30.0a0") |
e1ba0749 EF |
1804 | (source |
1805 | (origin | |
1806 | (method url-fetch) | |
1807 | (uri (pypi-uri "wheel" version)) | |
1808 | (sha256 | |
1809 | (base32 | |
0e6df70b | 1810 | "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq")))) |
e1ba0749 EF |
1811 | (build-system python-build-system) |
1812 | (native-inputs | |
f3b98f4f | 1813 | `(("python-jsonschema" ,python-jsonschema) |
e1ba0749 EF |
1814 | ("python-pytest-cov" ,python-pytest-cov))) |
1815 | (home-page "https://bitbucket.org/pypa/wheel/") | |
1816 | (synopsis "Format for built Python packages") | |
1817 | (description | |
1818 | "A wheel is a ZIP-format archive with a specially formatted filename and | |
1819 | the @code{.whl} extension. It is designed to contain all the files for a PEP | |
1820 | 376 compatible install in a way that is very close to the on-disk format. Many | |
1821 | packages will be properly installed with only the @code{Unpack} step and the | |
1822 | unpacked archive preserves enough information to @code{Spread} (copy data and | |
1823 | scripts to their final locations) at any later time. Wheel files can be | |
1824 | installed with a newer @code{pip} or with wheel's own command line utility.") | |
8ad4ae20 LF |
1825 | (license license:expat) |
1826 | (properties `((python2-variant . ,(delay python2-wheel)))))) | |
addc808d EF |
1827 | |
1828 | (define-public python2-wheel | |
8ad4ae20 LF |
1829 | (let ((wheel (package-with-python2 |
1830 | (strip-python2-variant python-wheel)))) | |
264ae686 | 1831 | (package (inherit wheel) |
8ad4ae20 LF |
1832 | (native-inputs `(("python2-functools32" ,python2-functools32) |
1833 | ,@(package-native-inputs wheel)))))) | |
1834 | ||
ea521b42 DT |
1835 | (define-public python-vcversioner |
1836 | (package | |
1837 | (name "python-vcversioner") | |
538fe019 | 1838 | (version "2.16.0.0") |
ea521b42 DT |
1839 | (source |
1840 | (origin | |
1841 | (method url-fetch) | |
1842 | (uri (pypi-uri "vcversioner" version)) | |
1843 | (sha256 | |
1844 | (base32 | |
538fe019 | 1845 | "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns")))) |
ea521b42 | 1846 | (build-system python-build-system) |
ea521b42 DT |
1847 | (synopsis "Python library for version number discovery") |
1848 | (description "Vcversioner is a Python library that inspects tagging | |
1849 | information in a variety of version control systems in order to discover | |
1850 | version numbers.") | |
1851 | (home-page "https://github.com/habnabit/vcversioner") | |
f210e944 | 1852 | (license license:isc))) |
ea521b42 DT |
1853 | |
1854 | (define-public python2-vcversioner | |
f210e944 | 1855 | (package-with-python2 python-vcversioner)) |
ae641128 | 1856 | |
864b5211 DT |
1857 | (define-public python-jsonschema |
1858 | (package | |
1859 | (name "python-jsonschema") | |
b3667afb | 1860 | (version "2.5.1") |
864b5211 DT |
1861 | (source (origin |
1862 | (method url-fetch) | |
1863 | (uri | |
1864 | (string-append | |
1865 | "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-" | |
1866 | version ".tar.gz")) | |
1867 | (sha256 | |
1868 | (base32 | |
b3667afb | 1869 | "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn")))) |
864b5211 | 1870 | (build-system python-build-system) |
8bcd6b91 EF |
1871 | (arguments |
1872 | '(#:phases | |
1873 | (modify-phases %standard-phases | |
1874 | (replace 'check (lambda _ (zero? (system* "nosetests"))))))) | |
eaba9d66 | 1875 | (native-inputs |
8bcd6b91 EF |
1876 | `(("python-nose" ,python-nose) |
1877 | ("python-vcversioner" ,python-vcversioner))) | |
1878 | (home-page "https://github.com/Julian/jsonschema") | |
864b5211 DT |
1879 | (synopsis "Implementation of JSON Schema for Python") |
1880 | (description | |
1881 | "Jsonschema is an implementation of JSON Schema for Python.") | |
a14600ec LF |
1882 | (license license:expat) |
1883 | (properties `((python2-variant . ,(delay python2-jsonschema)))))) | |
864b5211 DT |
1884 | |
1885 | (define-public python2-jsonschema | |
a14600ec LF |
1886 | (let ((jsonschema (package-with-python2 |
1887 | (strip-python2-variant python-jsonschema)))) | |
264ae686 | 1888 | (package (inherit jsonschema) |
eaba9d66 | 1889 | (native-inputs |
8bcd6b91 | 1890 | `(("python2-mock" ,python2-mock) |
eaba9d66 MB |
1891 | ,@(package-native-inputs jsonschema))) |
1892 | (propagated-inputs | |
1893 | `(("python2-functools32" ,python2-functools32)))))) | |
850189b8 | 1894 | |
7734ed7a OP |
1895 | (define-public python-schema |
1896 | (package | |
1897 | (name "python-schema") | |
1898 | (version "0.6.6") | |
1899 | (source | |
1900 | (origin | |
1901 | (method url-fetch) | |
1902 | (uri (pypi-uri "schema" version)) | |
1903 | (sha256 | |
1904 | (base32 | |
1905 | "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm")))) | |
1906 | (build-system python-build-system) | |
1907 | (native-inputs | |
1908 | `(("python-pytest" ,python-pytest))) | |
1909 | (home-page "https://github.com/keleshev/schema") | |
1910 | (synopsis "Simple data validation library") | |
1911 | (description | |
1912 | "@code{python-schema} is a library for validating Python data | |
1913 | structures, such as those obtained from config-files, forms, external | |
1914 | services or command-line parsing, converted from JSON/YAML (or | |
1915 | something else) to Python data-types.") | |
1916 | (license license:psfl))) | |
1917 | ||
1918 | (define-public python2-schema | |
1919 | (package-with-python2 python-schema)) | |
1920 | ||
1921 | (define-public python-schema-0.5 | |
1922 | (package (inherit python-schema) | |
1923 | (version "0.5.0") | |
1924 | (source | |
1925 | (origin | |
1926 | (method url-fetch) | |
1927 | (uri (pypi-uri "schema" version)) | |
1928 | (sha256 | |
1929 | (base32 | |
1930 | "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s")))))) | |
1931 | ||
1932 | (define-public python2-schema-0.5 | |
1933 | (package-with-python2 python-schema-0.5)) | |
1934 | ||
9f21414d | 1935 | (define-public python-kitchen |
1936 | (package | |
1937 | (name "python-kitchen") | |
1938 | (version "1.2.4") | |
1939 | (source | |
1940 | (origin | |
1941 | (method url-fetch) | |
1942 | (uri (pypi-uri "kitchen" version)) | |
1943 | (sha256 | |
1944 | (base32 | |
1945 | "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq")))) | |
1946 | (build-system python-build-system) | |
1947 | (propagated-inputs | |
1948 | `(("python-chardet" ,python-chardet))) | |
cb542830 | 1949 | (home-page "https://github.com/fedora-infra/kitchen") |
9f21414d | 1950 | (synopsis "Python API for snippets") |
1951 | (description "@code{kitchen} module provides a python API for all sorts of | |
1952 | little useful snippets of code that everybody ends up writing for their projects | |
1953 | but never seem big enough to build an independent release. Use kitchen and stop | |
1954 | cutting and pasting that code over and over.") | |
1955 | (license (list license:lgpl2.1+ | |
1956 | ;; subprocess.py, test_subprocess.py, | |
1957 | ;; kitchen/pycompat25/defaultdict.py: | |
1958 | license:psfl)))) | |
1959 | ||
1960 | (define-public python2-kitchen | |
1961 | (package-with-python2 python-kitchen)) | |
1962 | ||
850189b8 DT |
1963 | (define-public python-unidecode |
1964 | (package | |
1965 | (name "python-unidecode") | |
c37f58b7 | 1966 | (version "0.04.21") |
850189b8 DT |
1967 | (source (origin |
1968 | (method url-fetch) | |
8925d4f3 | 1969 | (uri (pypi-uri "Unidecode" version)) |
850189b8 DT |
1970 | (sha256 |
1971 | (base32 | |
c37f58b7 | 1972 | "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8")))) |
850189b8 | 1973 | (build-system python-build-system) |
850189b8 DT |
1974 | (home-page "https://pypi.python.org/pypi/Unidecode") |
1975 | (synopsis "ASCII transliterations of Unicode text") | |
1976 | (description | |
1977 | "Unidecode provides ASCII transliterations of Unicode text. Unidecode is | |
1978 | useful when integrating with legacy code that doesn't support Unicode, or for | |
1979 | ease of entry of non-Roman names on a US keyboard, or when constructing ASCII | |
1980 | machine identifiers from human-readable Unicode strings that should still be | |
a0b80a57 | 1981 | somewhat intelligible.") |
3f641af0 | 1982 | (license license:gpl2+))) |
850189b8 DT |
1983 | |
1984 | (define-public python2-unidecode | |
1985 | (package-with-python2 python-unidecode)) | |
6d45fef4 DT |
1986 | |
1987 | (define-public python-pyjwt | |
1988 | (package | |
1989 | (name "python-pyjwt") | |
ad0f92d0 | 1990 | (version "1.5.3") |
6d45fef4 DT |
1991 | (source |
1992 | (origin | |
1993 | (method url-fetch) | |
eb31d4b4 | 1994 | (uri (pypi-uri "PyJWT" version)) |
6d45fef4 DT |
1995 | (sha256 |
1996 | (base32 | |
ad0f92d0 | 1997 | "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh")) |
7e31427f MB |
1998 | (modules '((guix build utils))) |
1999 | (snippet | |
2000 | '(begin | |
2001 | (for-each delete-file-recursively | |
2002 | (find-files "." "\\.pyc$")) | |
2003 | #t)))) | |
6d45fef4 | 2004 | (build-system python-build-system) |
eb31d4b4 | 2005 | (native-inputs |
928da609 | 2006 | `(("python-pytest" ,python-pytest) |
130fe994 HG |
2007 | ("python-pytest-cov" ,python-pytest-cov) |
2008 | ("python-pytest-runner" ,python-pytest-runner))) | |
7bf837fd | 2009 | (home-page "https://github.com/progrium/pyjwt") |
6d45fef4 DT |
2010 | (synopsis "JSON Web Token implementation in Python") |
2011 | (description | |
2012 | "PyJWT is a JSON Web Token implementation written in Python.") | |
bd3fa666 | 2013 | (license license:expat))) |
6d45fef4 DT |
2014 | |
2015 | (define-public python2-pyjwt | |
2016 | (package-with-python2 python-pyjwt)) | |
2017 | ||
a80488c2 | 2018 | (define-public python-pykka |
2019 | (package | |
2020 | (name "python-pykka") | |
2021 | (version "1.2.1") | |
2022 | (source | |
2023 | (origin | |
2024 | (method url-fetch) | |
2025 | (uri (pypi-uri "Pykka" version)) | |
2026 | (sha256 | |
2027 | (base32 | |
2028 | "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8")))) | |
2029 | (build-system python-build-system) | |
2030 | (native-inputs | |
2031 | `(("python-mock" ,python-mock) | |
2032 | ("python-nose" ,python-nose) | |
2033 | ("python-gevent" ,python-gevent) | |
2034 | ("python-eventlet" ,python-eventlet))) | |
2035 | (home-page "https://www.pykka.org/") | |
2036 | (synopsis "Pykka is a Python implementation of the actor model") | |
2037 | (description | |
2038 | "Pykka is a Python implementation of the actor model. | |
2039 | The actor model introduces some simple rules to control the sharing | |
2040 | of state and cooperation between execution units, which makes it | |
2041 | easier to build concurrent applications.") | |
2042 | (license license:asl2.0))) | |
2043 | ||
2044 | (define-public python2-pykka | |
2045 | (package-with-python2 python-pykka)) | |
2046 | ||
ec5dbb5c DT |
2047 | (define-public python-itsdangerous |
2048 | (package | |
2049 | (name "python-itsdangerous") | |
2050 | (version "0.24") | |
2051 | (source | |
2052 | (origin | |
2053 | (method url-fetch) | |
2054 | (uri (string-append | |
2055 | "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-" | |
2056 | version ".tar.gz")) | |
2057 | (sha256 | |
2058 | (base32 | |
2059 | "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb")))) | |
2060 | (build-system python-build-system) | |
7bf837fd | 2061 | (home-page "https://github.com/mitsuhiko/itsdangerous") |
ec5dbb5c DT |
2062 | (synopsis "Python library for passing data to/from untrusted environments") |
2063 | (description | |
2064 | "Itsdangerous provides various helpers to pass trusted data to untrusted | |
2065 | environments and back.") | |
f210e944 | 2066 | (license license:bsd-3))) |
ec5dbb5c DT |
2067 | |
2068 | (define-public python2-itsdangerous | |
f210e944 | 2069 | (package-with-python2 python-itsdangerous)) |
5731cae3 | 2070 | |
8d12be1e RW |
2071 | (define-public python-pyyaml |
2072 | (package | |
2073 | (name "python-pyyaml") | |
bf5e4bc4 | 2074 | (version "3.12") |
8d12be1e RW |
2075 | (source |
2076 | (origin | |
2077 | (method url-fetch) | |
bf5e4bc4 | 2078 | (uri (pypi-uri "PyYAML" version)) |
8d12be1e RW |
2079 | (sha256 |
2080 | (base32 | |
bf5e4bc4 | 2081 | "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr")))) |
8d12be1e RW |
2082 | (build-system python-build-system) |
2083 | (inputs | |
2084 | `(("libyaml" ,libyaml))) | |
8d12be1e RW |
2085 | (home-page "http://pyyaml.org/wiki/PyYAML") |
2086 | (synopsis "YAML parser and emitter for Python") | |
2087 | (description | |
2088 | "PyYAML is a YAML parser and emitter for Python. PyYAML features a | |
2089 | complete YAML 1.1 parser, Unicode support, pickle support, capable extension | |
2090 | API, and sensible error messages. PyYAML supports standard YAML tags and | |
2091 | provides Python-specific tags that allow to represent an arbitrary Python | |
2092 | object.") | |
2093 | (license license:expat))) | |
2094 | ||
2095 | (define-public python2-pyyaml | |
2096 | (package-with-python2 python-pyyaml)) | |
2097 | ||
5731cae3 DT |
2098 | (define-public python-virtualenv |
2099 | (package | |
2100 | (name "python-virtualenv") | |
58d04dba | 2101 | (version "15.0.3") |
5731cae3 DT |
2102 | (source |
2103 | (origin | |
2104 | (method url-fetch) | |
17804240 | 2105 | (uri (pypi-uri "virtualenv" version)) |
5731cae3 DT |
2106 | (sha256 |
2107 | (base32 | |
58d04dba | 2108 | "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d")))) |
5731cae3 | 2109 | (build-system python-build-system) |
17804240 EF |
2110 | (arguments |
2111 | `(#:phases | |
2112 | (modify-phases %standard-phases | |
58d04dba RW |
2113 | (replace 'check |
2114 | (lambda _ | |
2115 | ;; Disable failing test. See upstream bug report | |
2116 | ;; https://github.com/pypa/virtualenv/issues/957 | |
2117 | (substitute* "tests/test_virtualenv.py" | |
2118 | (("skipif.*") "skipif(True, reason=\"Guix\")\n")) | |
2119 | (zero? (system* "py.test"))))))) | |
e7881f3d | 2120 | (native-inputs |
f3b98f4f | 2121 | `(("python-mock" ,python-mock) |
17804240 | 2122 | ("python-pytest" ,python-pytest))) |
5731cae3 DT |
2123 | (home-page "https://virtualenv.pypa.io/") |
2124 | (synopsis "Virtual Python environment builder") | |
2125 | (description | |
2126 | "Virtualenv is a tool to create isolated Python environments.") | |
bd3fa666 | 2127 | (license license:expat))) |
5731cae3 DT |
2128 | |
2129 | (define-public python2-virtualenv | |
2130 | (package-with-python2 python-virtualenv)) | |
8176d4d5 DT |
2131 | |
2132 | (define-public python-markupsafe | |
2133 | (package | |
2134 | (name "python-markupsafe") | |
2135 | (version "0.23") | |
2136 | (source | |
2137 | (origin | |
2138 | (method url-fetch) | |
2139 | (uri (string-append | |
2140 | "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-" | |
2141 | version ".tar.gz")) | |
2142 | (sha256 | |
2143 | (base32 | |
2144 | "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54")))) | |
2145 | (build-system python-build-system) | |
7bf837fd | 2146 | (home-page "https://github.com/mitsuhiko/markupsafe") |
8176d4d5 DT |
2147 | (synopsis "XML/HTML/XHTML markup safe string implementation for Python") |
2148 | (description | |
2149 | "Markupsafe provides an XML/HTML/XHTML markup safe string implementation | |
2150 | for Python.") | |
3f641af0 | 2151 | (license license:bsd-3))) |
8176d4d5 DT |
2152 | |
2153 | (define-public python2-markupsafe | |
2154 | (package-with-python2 python-markupsafe)) | |
fe34f0d1 DT |
2155 | |
2156 | (define-public python-jinja2 | |
2157 | (package | |
2158 | (name "python-jinja2") | |
bac5fd21 | 2159 | (version "2.9.6") |
fe34f0d1 DT |
2160 | (source |
2161 | (origin | |
2162 | (method url-fetch) | |
e98149b3 | 2163 | (uri (pypi-uri "Jinja2" version)) |
fe34f0d1 DT |
2164 | (sha256 |
2165 | (base32 | |
bac5fd21 | 2166 | "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx")))) |
fe34f0d1 | 2167 | (build-system python-build-system) |
f22efa01 | 2168 | (propagated-inputs |
f3b98f4f | 2169 | `(("python-markupsafe" ,python-markupsafe))) |
fe34f0d1 DT |
2170 | (home-page "http://jinja.pocoo.org/") |
2171 | (synopsis "Python template engine") | |
2172 | (description | |
2173 | "Jinja2 is a small but fast and easy to use stand-alone template engine | |
2174 | written in pure Python.") | |
3f641af0 | 2175 | (license license:bsd-3))) |
fe34f0d1 DT |
2176 | |
2177 | (define-public python2-jinja2 | |
2178 | (package-with-python2 python-jinja2)) | |
3580ab8b | 2179 | |
f7d17ac7 EE |
2180 | (define-public python-pystache |
2181 | (package | |
2182 | (name "python-pystache") | |
2183 | (version "0.5.4") | |
2184 | (source (origin | |
2185 | (method url-fetch) | |
2186 | (uri (pypi-uri "pystache" version)) | |
2187 | (sha256 | |
2188 | (base32 | |
2189 | "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp")))) | |
2190 | (build-system python-build-system) | |
8bd5164b MB |
2191 | (arguments |
2192 | '(#:tests? #f)) ; FIXME: Python 3 tests are failing. | |
f7d17ac7 EE |
2193 | (home-page "http://defunkt.io/pystache/") |
2194 | (synopsis "Python logic-less template engine") | |
2195 | (description | |
2196 | "Pystache is a Python implementation of the framework agnostic, | |
2197 | logic-free templating system Mustache.") | |
8bd5164b MB |
2198 | (license license:expat) |
2199 | (properties `((python2-variant . ,(delay python2-pystache)))))) | |
f7d17ac7 EE |
2200 | |
2201 | (define-public python2-pystache | |
8bd5164b MB |
2202 | (package (inherit (package-with-python2 |
2203 | (strip-python2-variant python-pystache))) | |
2204 | (arguments | |
2205 | `(#:python ,python-2 | |
2206 | #:phases | |
2207 | (modify-phases %standard-phases | |
2208 | (replace 'check | |
2209 | (lambda _ | |
2210 | (zero? (system* "python" "test_pystache.py"))))))))) | |
f7d17ac7 | 2211 | |
1285119b RW |
2212 | (define-public python-joblib |
2213 | (package | |
2214 | (name "python-joblib") | |
f34ef331 | 2215 | (version "0.10.3") |
1285119b RW |
2216 | (source (origin |
2217 | (method url-fetch) | |
f34ef331 | 2218 | (uri (pypi-uri "joblib" version)) |
1285119b RW |
2219 | (sha256 |
2220 | (base32 | |
6aa5f1ca HG |
2221 | "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9")) |
2222 | (modules '((guix build utils))) | |
2223 | (snippet | |
2224 | '(begin | |
2225 | ;; Remove pre-compiled .pyc files from source. | |
2226 | (for-each delete-file-recursively | |
2227 | (find-files "." "__pycache__" #:directories? #t)) | |
2228 | (for-each delete-file (find-files "." "\\.pyc$")) | |
2229 | #t)))) | |
1285119b | 2230 | (build-system python-build-system) |
a8dd960a RW |
2231 | (arguments |
2232 | `(#:phases | |
2233 | (modify-phases %standard-phases | |
2234 | (add-before 'check 'disable-failing-tests | |
2235 | (lambda _ | |
2236 | ;; This numpydoc tests fails for unknown reasons | |
2237 | (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py") | |
2238 | ;; This numpydoc test depends on matplotlib, which is not a | |
2239 | ;; required input. | |
2240 | (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py") | |
2241 | ;; These tests fail to execute sys.executable | |
2242 | (substitute* "joblib/test/test_parallel.py" | |
2243 | (("import nose" line) | |
2244 | (string-append "from nose.plugins.skip import SkipTest\n" line)) | |
2245 | (("def test_nested_parallel_warnings" line) | |
2246 | (string-append "@SkipTest\n" line)) | |
2247 | (("def test_parallel_with_interactively_defined_functions" line) | |
2248 | (string-append "@SkipTest\n" line))) | |
2249 | #t))))) | |
f052ec9a | 2250 | ;; Provide nose to enable tests command |
1285119b | 2251 | (native-inputs |
f3b98f4f | 2252 | `(("python-nose" ,python-nose) |
f34ef331 RW |
2253 | ("python-sphinx" ,python-sphinx) |
2254 | ("python-docutils" ,python-docutils) | |
2255 | ("python-numpydoc" ,python-numpydoc))) | |
1285119b RW |
2256 | (home-page "http://pythonhosted.org/joblib/") |
2257 | (synopsis "Using Python functions as pipeline jobs") | |
2258 | (description | |
2259 | "Joblib is a set of tools to provide lightweight pipelining in Python. | |
2260 | In particular, joblib offers: transparent disk-caching of the output values | |
2261 | and lazy re-evaluation (memoize pattern), easy simple parallel computing | |
2262 | logging and tracing of the execution.") | |
3f641af0 | 2263 | (license license:bsd-3))) |
1285119b RW |
2264 | |
2265 | (define-public python2-joblib | |
2266 | (package-with-python2 python-joblib)) | |
2267 | ||
3580ab8b DT |
2268 | (define-public python-docutils |
2269 | (package | |
2270 | (name "python-docutils") | |
db4411b4 | 2271 | (version "0.14") |
3580ab8b DT |
2272 | (source |
2273 | (origin | |
2274 | (method url-fetch) | |
00e0ca7c | 2275 | (uri (pypi-uri "docutils" version)) |
3580ab8b DT |
2276 | (sha256 |
2277 | (base32 | |
db4411b4 | 2278 | "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji")))) |
3580ab8b | 2279 | (build-system python-build-system) |
3580ab8b DT |
2280 | (arguments |
2281 | '(#:tests? #f)) ; no setup.py test command | |
2282 | (home-page "http://docutils.sourceforge.net/") | |
2283 | (synopsis "Python Documentation Utilities") | |
2284 | (description | |
2285 | "Docutils is a modular system for processing documentation into useful | |
2286 | formats, such as HTML, XML, and LaTeX. For input Docutils supports | |
2287 | reStructuredText.") | |
2288 | ;; Most of the source code is public domain, but some source files are | |
2289 | ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses. | |
3f641af0 | 2290 | (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+)))) |
3580ab8b DT |
2291 | |
2292 | (define-public python2-docutils | |
2293 | (package-with-python2 python-docutils)) | |
fb35b7c0 DT |
2294 | |
2295 | (define-public python-pygments | |
2296 | (package | |
2297 | (name "python-pygments") | |
00c78882 | 2298 | (version "2.2.0") |
fb35b7c0 DT |
2299 | (source |
2300 | (origin | |
2301 | (method url-fetch) | |
9f442285 | 2302 | (uri (pypi-uri "Pygments" version)) |
fb35b7c0 DT |
2303 | (sha256 |
2304 | (base32 | |
00c78882 | 2305 | "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv")))) |
fb35b7c0 | 2306 | (build-system python-build-system) |
995cb99e MB |
2307 | (arguments |
2308 | ;; FIXME: Tests require sphinx, which depends on this. | |
2309 | '(#:tests? #f)) | |
fb35b7c0 DT |
2310 | (home-page "http://pygments.org/") |
2311 | (synopsis "Syntax highlighting") | |
2312 | (description | |
2313 | "Pygments is a syntax highlighting package written in Python.") | |
3f641af0 | 2314 | (license license:bsd-2))) |
fb35b7c0 DT |
2315 | |
2316 | (define-public python2-pygments | |
2317 | (package-with-python2 python-pygments)) | |
9dd6078d | 2318 | |
5f94ec91 RW |
2319 | (define-public python-sphinxcontrib-websupport |
2320 | (package | |
2321 | (name "python-sphinxcontrib-websupport") | |
2322 | (version "1.0.1") | |
2323 | (source (origin | |
2324 | (method url-fetch) | |
2325 | (uri (pypi-uri "sphinxcontrib-websupport" version)) | |
2326 | (sha256 | |
2327 | (base32 | |
2328 | "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs")))) | |
2329 | (build-system python-build-system) | |
2330 | (propagated-inputs | |
2331 | `(("python-mock" ,python-mock) | |
2332 | ("python-pytest" ,python-pytest) | |
2333 | ("python-xapian-bindings" ,python-xapian-bindings))) | |
2334 | ;; Needed for running the test suite | |
2335 | (native-inputs | |
2336 | `(("python-six" ,python-six) | |
2337 | ("python-jinja2" ,python-jinja2) | |
2338 | ("python-docutils" ,python-docutils) | |
2339 | ("python-sphinx" ,python-sphinx) | |
2340 | ("python-sqlalchemy" ,python-sqlalchemy) | |
2341 | ("python-whoosh" ,python-whoosh))) | |
2342 | (home-page "http://sphinx-doc.org/") | |
2343 | (synopsis "Sphinx API for web applications") | |
2344 | (description "This package provides a Python API to easily integrate | |
2345 | Sphinx documentation into your web application. It provides tools to | |
2346 | integrate Sphinx documents in web templates and to handle searches.") | |
2347 | (license license:bsd-3))) | |
2348 | ||
9dd6078d DT |
2349 | (define-public python-sphinx |
2350 | (package | |
2351 | (name "python-sphinx") | |
c227458a | 2352 | (version "1.5.1") |
9dd6078d DT |
2353 | (source |
2354 | (origin | |
2355 | (method url-fetch) | |
9a8acd00 | 2356 | (uri (pypi-uri "Sphinx" version)) |
9dd6078d DT |
2357 | (sha256 |
2358 | (base32 | |
c227458a | 2359 | "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf")))) |
9dd6078d | 2360 | (build-system python-build-system) |
03cb5f9e | 2361 | (arguments |
c227458a DM |
2362 | `(#:phases |
2363 | (modify-phases %standard-phases | |
2364 | (replace 'check | |
2365 | (lambda _ | |
2366 | ;; Requires Internet access. | |
2367 | (delete-file "tests/test_build_linkcheck.py") | |
2368 | (zero? (system* "make" "test"))))))) | |
f22efa01 | 2369 | (propagated-inputs |
9a8acd00 DM |
2370 | `(("python-imagesize" ,python-imagesize) |
2371 | ("python-sphinx-alabaster-theme" | |
2372 | ,python-sphinx-alabaster-theme) | |
2373 | ("python-babel" ,python-babel) | |
2374 | ("python-snowballstemmer" ,python-snowballstemmer) | |
9dd6078d | 2375 | ("python-docutils" ,python-docutils) |
9a8acd00 DM |
2376 | ("python-jinja2" ,python-jinja2) |
2377 | ("python-pygments" ,python-pygments) | |
a10b9810 | 2378 | ("python-requests" ,python-requests) |
9a8acd00 | 2379 | ("python-six" ,python-six))) |
c227458a DM |
2380 | (native-inputs |
2381 | `(("graphviz" ,graphviz) | |
2382 | ("python-html5lib" ,python-html5lib) | |
2383 | ("python-mock" ,python-mock) | |
a10b9810 | 2384 | ("python-nose" ,python-nose))) |
9dd6078d DT |
2385 | (home-page "http://sphinx-doc.org/") |
2386 | (synopsis "Python documentation generator") | |
2387 | (description "Sphinx is a tool that makes it easy to create documentation | |
2388 | for Python projects or other documents consisting of multiple reStructuredText | |
2389 | sources.") | |
9a8acd00 DM |
2390 | (license license:bsd-3) |
2391 | (properties `((python2-variant . ,(delay python2-sphinx)))))) | |
9dd6078d | 2392 | |
e7304ab1 RW |
2393 | (define-public python-sphinx-1.6 |
2394 | (package (inherit python-sphinx) | |
2395 | (name "python-sphinx") | |
2396 | (version "1.6.3") | |
2397 | (source (origin | |
2398 | (method url-fetch) | |
2399 | (uri (pypi-uri "Sphinx" version)) | |
2400 | (sha256 | |
2401 | (base32 | |
2402 | "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg")))) | |
2403 | (arguments | |
2404 | `(#:phases | |
2405 | (modify-phases %standard-phases | |
2406 | (replace 'check | |
2407 | (lambda _ | |
2408 | ;; Requires Internet access. | |
2409 | (delete-file "tests/test_build_linkcheck.py") | |
2410 | (substitute* "tests/test_build_latex.py" | |
2411 | (("@pytest.mark.sphinx\\('latex', testroot='images'\\)") | |
2412 | "@pytest.mark.skip()")) | |
2413 | (zero? (system* "make" "test"))))))) | |
2414 | (propagated-inputs | |
2415 | `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport) | |
2416 | ,@(package-propagated-inputs python-sphinx))) | |
2417 | (native-inputs | |
928da609 | 2418 | `(("python-pytest" ,python-pytest) |
e7304ab1 RW |
2419 | ("imagemagick" ,imagemagick) ; for "convert" |
2420 | ,@(package-native-inputs python-sphinx))) | |
3719d0ed MB |
2421 | (properties `((python2-variant . ,(delay python2-sphinx-1.6)))))) |
2422 | ||
2423 | (define-public python2-sphinx-1.6 | |
2424 | (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6)))) | |
2425 | (package | |
2426 | (inherit base) | |
2427 | (propagated-inputs | |
2428 | `(("python2-typing" ,python2-typing) | |
2429 | ,@(package-propagated-inputs base))) | |
2430 | (native-inputs `(("python2-enum34" ,python2-enum34) | |
2431 | ,@(package-native-inputs base)))))) | |
e7304ab1 | 2432 | |
3061b331 MFM |
2433 | (define-public python-sphinx-1.5.3 |
2434 | (package | |
2435 | (inherit python-sphinx) | |
2436 | (name "python-sphinx") | |
2437 | (version "1.5.3") | |
2438 | (source | |
2439 | (origin | |
2440 | (method url-fetch) | |
2441 | (uri (pypi-uri "Sphinx" version)) | |
2442 | (sha256 | |
2443 | (base32 | |
2444 | "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg")))) | |
2445 | (native-inputs | |
928da609 | 2446 | `(("python-pytest" ,python-pytest) |
3061b331 MFM |
2447 | ,@(package-native-inputs python-sphinx))))) |
2448 | ||
9dd6078d | 2449 | (define-public python2-sphinx |
9a8acd00 DM |
2450 | (let ((base (package-with-python2 (strip-python2-variant python-sphinx)))) |
2451 | (package | |
2452 | (inherit base) | |
2453 | (native-inputs `(("python2-mock" ,python2-mock) | |
c227458a | 2454 | ("python2-enum34" ,python2-enum34) |
9a8acd00 DM |
2455 | ,@(package-native-inputs base))) |
2456 | (propagated-inputs `(("python2-pytz" ,python2-pytz) | |
2457 | ,@(package-propagated-inputs base)))))) | |
6888830b | 2458 | |
ad320b20 RW |
2459 | (define-public python-sphinx-rtd-theme |
2460 | (package | |
2461 | (name "python-sphinx-rtd-theme") | |
af842d45 | 2462 | (version "0.2.4") |
ad320b20 RW |
2463 | (source |
2464 | (origin | |
2465 | (method url-fetch) | |
af842d45 | 2466 | (uri (pypi-uri "sphinx_rtd_theme" version)) |
ad320b20 RW |
2467 | (sha256 |
2468 | (base32 | |
af842d45 | 2469 | "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd")))) |
ad320b20 | 2470 | (build-system python-build-system) |
9893cff3 | 2471 | (arguments '(#:tests? #f)) ; No tests. |
9d3a15b4 LF |
2472 | (propagated-inputs |
2473 | `(("python-sphinx" ,python-sphinx))) | |
ad320b20 RW |
2474 | (home-page "https://github.com/snide/sphinx_rtd_theme/") |
2475 | (synopsis "ReadTheDocs.org theme for Sphinx") | |
2476 | (description "A theme for Sphinx used by ReadTheDocs.org.") | |
bd3fa666 | 2477 | (license license:expat))) |
ad320b20 RW |
2478 | |
2479 | (define-public python2-sphinx-rtd-theme | |
2480 | (package-with-python2 python-sphinx-rtd-theme)) | |
2481 | ||
d7eb680d LF |
2482 | (define-public python-guzzle-sphinx-theme |
2483 | (package | |
2484 | (name "python-guzzle-sphinx-theme") | |
2485 | (version "0.7.11") | |
2486 | (source | |
2487 | (origin | |
2488 | (method url-fetch) | |
2489 | (uri (pypi-uri "guzzle_sphinx_theme" version)) | |
2490 | (sha256 | |
2491 | (base32 | |
2492 | "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v")))) | |
2493 | (build-system python-build-system) | |
2494 | (propagated-inputs | |
2495 | `(("python-sphinx" ,python-sphinx))) | |
2496 | (home-page "https://github.com/guzzle/guzzle_sphinx_theme") | |
2497 | (synopsis "Sphinx theme used by Guzzle") | |
2498 | (description "This package provides guzzle_sphinx_theme, a theme for the | |
2499 | Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle} | |
2500 | and several other projects.") | |
2501 | (license license:expat))) | |
2502 | ||
2503 | (define-public python2-guzzle-sphinx-theme | |
2504 | (package-with-python2 python-guzzle-sphinx-theme)) | |
2505 | ||
fe94cf0c HG |
2506 | (define-public python-rst.linker |
2507 | (package | |
2508 | (name "python-rst.linker") | |
2509 | (version "1.7") | |
2510 | (source | |
2511 | (origin | |
2512 | (method url-fetch) | |
2513 | (uri (pypi-uri "rst.linker" version)) | |
2514 | (sha256 | |
2515 | (base32 | |
2516 | "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr")))) | |
2517 | (build-system python-build-system) | |
2518 | (propagated-inputs | |
22d7360b | 2519 | `(("python-dateutil" ,python-dateutil) |
fe94cf0c HG |
2520 | ("python-six" ,python-six))) |
2521 | (native-inputs | |
2522 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
2523 | ;; Test would require path.py, which would introduce a cyclic dependence. | |
2524 | (arguments `(#:tests? #f)) | |
2525 | ;; Note: As of version 1.7 the documentation is not worth building. | |
2526 | (home-page "https://github.com/jaraco/rst.linker") | |
2527 | (synopsis "Sphinx plugin to add links and timestamps") | |
2528 | (description "rst.linker allows to automatically replace text by a | |
2529 | reStructuredText external reference or timestamps. It's primary purpose is to | |
2530 | augment the changelog, but it can be used for other documents, too.") | |
2531 | (license license:expat))) | |
2532 | ||
2533 | (define-public python2-rst.linker | |
2534 | (package-with-python2 python-rst.linker)) | |
2535 | ||
f4de5b3b CAW |
2536 | (define-public python-feedgenerator |
2537 | (package | |
2538 | (name "python-feedgenerator") | |
d5c183d1 | 2539 | (version "1.9") |
f4de5b3b | 2540 | (source |
f4de5b3b | 2541 | (origin |
f0412aa2 EF |
2542 | (method url-fetch) |
2543 | (uri (pypi-uri "feedgenerator" version)) | |
f4de5b3b CAW |
2544 | (sha256 |
2545 | (base32 | |
d5c183d1 | 2546 | "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s")) |
7c88bcf4 HG |
2547 | (modules '((guix build utils))) |
2548 | (snippet | |
2549 | '(begin | |
2550 | ;; Remove pre-compiled .pyc files from source. | |
2551 | (for-each delete-file-recursively | |
2552 | (find-files "." "__pycache__" #:directories? #t)) | |
2553 | (for-each delete-file (find-files "." "\\.pyc$")) | |
2554 | #t)))) | |
f4de5b3b | 2555 | (build-system python-build-system) |
dae73d9b | 2556 | (propagated-inputs |
f3b98f4f | 2557 | `(("python-pytz" ,python-pytz) |
f4de5b3b | 2558 | ("python-six" ,python-six))) |
f0412aa2 | 2559 | (home-page "https://github.com/getpelican/feedgenerator") |
f4de5b3b CAW |
2560 | (synopsis |
2561 | "Standalone version of Django's Atom/RSS feed generator") | |
2562 | (description | |
2563 | "Feedgenerator-py3k is a standalone version of Django's feedgenerator, | |
2564 | which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") | |
3f641af0 | 2565 | (license license:bsd-3))) |
f4de5b3b CAW |
2566 | |
2567 | (define-public python2-feedgenerator | |
2568 | (package-with-python2 python-feedgenerator)) | |
2569 | ||
59ad30e3 CAW |
2570 | (define-public python-blinker |
2571 | (package | |
2572 | (name "python-blinker") | |
7fb9ff4d | 2573 | (version "1.4") |
59ad30e3 CAW |
2574 | (source |
2575 | (origin | |
2576 | (method url-fetch) | |
7fb9ff4d | 2577 | (uri (pypi-uri "blinker" version)) |
59ad30e3 CAW |
2578 | (sha256 |
2579 | (base32 | |
7fb9ff4d | 2580 | "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7")))) |
59ad30e3 | 2581 | (build-system python-build-system) |
59ad30e3 CAW |
2582 | (home-page "http://pythonhosted.org/blinker/") |
2583 | (synopsis "Fast, simple object-to-object and broadcast signaling") | |
2584 | (description | |
2585 | "Blinker provides a fast dispatching system that allows any number of | |
2586 | interested parties to subscribe to events, or \"signals\".") | |
2587 | (license license:expat))) | |
2588 | ||
2589 | (define-public python2-blinker | |
2590 | (package-with-python2 python-blinker)) | |
2591 | ||
b8050e71 CAW |
2592 | (define-public pelican |
2593 | (package | |
2594 | (name "pelican") | |
11f97c27 | 2595 | (version "3.6.3") |
b8050e71 CAW |
2596 | (source |
2597 | (origin | |
2598 | (method url-fetch) | |
11f97c27 | 2599 | (uri (pypi-uri "pelican" version)) |
b8050e71 CAW |
2600 | (sha256 |
2601 | (base32 | |
11f97c27 | 2602 | "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k")))) |
b8050e71 | 2603 | (build-system python-build-system) |
f22efa01 | 2604 | (propagated-inputs |
b8050e71 CAW |
2605 | `(("python-feedgenerator" ,python-feedgenerator) |
2606 | ("python-jinja2" ,python-jinja2) | |
2607 | ("python-pygments" ,python-pygments) | |
2608 | ("python-docutils" ,python-docutils) | |
2609 | ("python-pytz" ,python-pytz) | |
2610 | ("python-blinker" ,python-blinker) | |
2611 | ("python-unidecode" ,python-unidecode) | |
2612 | ("python-six" ,python-six) | |
b438d7cf BS |
2613 | ("python-dateutil" ,python-dateutil) |
2614 | ("python-markdown" ,python-markdown))) | |
b8050e71 CAW |
2615 | (home-page "http://getpelican.com/") |
2616 | (arguments | |
2617 | `(;; XXX Requires a lot more packages to do unit tests :P | |
2618 | #:tests? #f | |
2619 | #:phases (modify-phases %standard-phases | |
2620 | (add-before | |
2621 | 'install 'adjust-requires | |
2622 | ;; Since feedgenerator is installed from git, it doesn't | |
2623 | ;; conform to the version requirements. | |
2624 | ;; | |
2625 | ;; We *do have* "feedgenerator >= 1.6", but strip off the | |
2626 | ;; version requirement so setuptools doesn't get confused. | |
2627 | (lambda _ | |
2628 | (substitute* "setup.py" | |
2629 | (("['\"]feedgenerator.*?['\"]") | |
2630 | "'feedgenerator'"))))))) | |
2631 | (synopsis "Python-based static site publishing system") | |
2632 | (description | |
2633 | "Pelican is a tool to generate a static blog from reStructuredText, | |
2634 | Markdown input files, and more. Pelican uses Jinja2 for templating | |
2635 | and is very extensible.") | |
3f641af0 | 2636 | (license license:agpl3+))) |
b8050e71 | 2637 | |
12f8f9bb RW |
2638 | (define-public python-scikit-image |
2639 | (package | |
2640 | (name "python-scikit-image") | |
2641 | (version "0.11.3") | |
2642 | (source | |
2643 | (origin | |
2644 | (method url-fetch) | |
2645 | (uri (string-append | |
2646 | "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-" | |
2647 | version ".tar.gz")) | |
2648 | (sha256 | |
2649 | (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn")))) | |
2650 | (build-system python-build-system) | |
9026e689 MB |
2651 | (arguments |
2652 | ;; TODO: Some tests require running X11 server. Disable them? | |
2653 | '(#:tests? #f)) | |
b83e2333 | 2654 | ;; See DEPENDS.txt for the list of build and run time requiremnts |
12f8f9bb RW |
2655 | (propagated-inputs |
2656 | `(("python-matplotlib" ,python-matplotlib) | |
2657 | ("python-networkx" ,python-networkx) | |
12f8f9bb | 2658 | ("python-scipy" ,python-scipy) |
12f8f9bb RW |
2659 | ("python-pillow" ,python-pillow))) |
2660 | (native-inputs | |
b83e2333 HG |
2661 | `(("python-numpy" ,python-numpy) |
2662 | ("python-cython" ,python-cython) | |
2663 | ("python-six" ,python-six))) | |
12f8f9bb RW |
2664 | (home-page "http://scikit-image.org/") |
2665 | (synopsis "Image processing in Python") | |
2666 | (description | |
e881752c | 2667 | "Scikit-image is a collection of algorithms for image processing.") |
12733594 | 2668 | (license license:bsd-3))) |
12f8f9bb RW |
2669 | |
2670 | (define-public python2-scikit-image | |
12733594 | 2671 | (package-with-python2 python-scikit-image)) |
12f8f9bb | 2672 | |
6888830b FB |
2673 | (define-public python-cython |
2674 | (package | |
2675 | (name "python-cython") | |
58816c3d | 2676 | (version "0.27") |
6888830b FB |
2677 | (source |
2678 | (origin | |
2679 | (method url-fetch) | |
56918e26 | 2680 | (uri (pypi-uri "Cython" version)) |
6888830b FB |
2681 | (sha256 |
2682 | (base32 | |
58816c3d | 2683 | "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr")))) |
6888830b FB |
2684 | (build-system python-build-system) |
2685 | ;; we need the full python package and not just the python-wrapper | |
2686 | ;; because we need libpython3.3m.so | |
2687 | (inputs | |
2688 | `(("python" ,python))) | |
2689 | (arguments | |
2690 | `(#:phases | |
b92f651b EF |
2691 | (modify-phases %standard-phases |
2692 | (add-before 'check 'set-HOME | |
2693 | ;; some tests require access to "$HOME/.cython" | |
e3b861ce | 2694 | (lambda _ (setenv "HOME" "/tmp") #t)) |
b92f651b EF |
2695 | (replace 'check |
2696 | (lambda _ (zero? (system* "python" "runtests.py" "-vv"))))))) | |
6888830b FB |
2697 | (home-page "http://cython.org/") |
2698 | (synopsis "C extensions for Python") | |
2699 | (description "Cython is an optimising static compiler for both the Python | |
2700 | programming language and the extended Cython programming language. It makes | |
2701 | writing C extensions for Python as easy as Python itself.") | |
3f641af0 | 2702 | (license license:asl2.0) |
48b311b1 | 2703 | (properties `((python2-variant . ,(delay python2-cython)))))) |
6888830b FB |
2704 | |
2705 | (define-public python2-cython | |
48b311b1 LC |
2706 | (package (inherit (package-with-python2 |
2707 | (strip-python2-variant python-cython))) | |
6888830b FB |
2708 | (name "python2-cython") |
2709 | (inputs | |
2710 | `(("python-2" ,python-2))))) ; this is not automatically changed | |
0da98533 | 2711 | |
ee5fb7ee AV |
2712 | ;; The RPython toolchain currently does not support Python 3. |
2713 | (define-public python2-rpython | |
2714 | (package | |
2715 | (name "python2-rpython") | |
ce1ac8ee | 2716 | (version "0.2.1") |
ee5fb7ee AV |
2717 | (source |
2718 | (origin | |
2719 | (method url-fetch) | |
2720 | (uri (pypi-uri "rpython" version)) | |
2721 | (sha256 | |
2722 | (base32 | |
ce1ac8ee | 2723 | "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0")))) |
ee5fb7ee AV |
2724 | (build-system python-build-system) |
2725 | (arguments `(#:python ,python-2)) | |
2726 | (native-inputs | |
f3b98f4f | 2727 | `(("python2-pytest" ,python2-pytest))) ; needed for running tests |
ee5fb7ee AV |
2728 | (home-page "https://rpython.readthedocs.org") |
2729 | (synopsis "Framework for implementing interpreters and virtual machines") | |
2730 | (description "RPython is a translation and support framework for | |
2731 | producing implementations of dynamic languages, emphasizing a clean separation | |
2732 | between language specification and implementation aspects.") | |
2733 | (license license:expat))) | |
2734 | ||
67a08f18 RW |
2735 | ;; NOTE: when upgrading numpy please make sure that python-pandas and |
2736 | ;; python-scipy still build, as these three packages are often used together. | |
7ccb71e0 | 2737 | (define-public python-numpy |
0da98533 | 2738 | (package |
7ccb71e0 | 2739 | (name "python-numpy") |
2c7f4ae5 | 2740 | (version "1.14.0") |
0da98533 FB |
2741 | (source |
2742 | (origin | |
2743 | (method url-fetch) | |
eaa1db1d | 2744 | (uri (string-append |
2c7f4ae5 MB |
2745 | "https://github.com/numpy/numpy/releases/download/v" |
2746 | version "/numpy-" version ".tar.gz")) | |
0da98533 FB |
2747 | (sha256 |
2748 | (base32 | |
2c7f4ae5 | 2749 | "1kh7y2ay21s9mcc11mq59g2f1yc75v152z2k2vlh0xmh9c9rjpf4")))) |
0da98533 FB |
2750 | (build-system python-build-system) |
2751 | (inputs | |
328bb95d | 2752 | `(("openblas" ,openblas) |
cba256f8 | 2753 | ("lapack" ,lapack))) |
0da98533 | 2754 | (native-inputs |
eaa1db1d | 2755 | `(("python-cython" ,python-cython) |
7ccb71e0 | 2756 | ("python-nose" ,python-nose) |
2efabc55 | 2757 | ("gfortran" ,gfortran))) |
0da98533 FB |
2758 | (arguments |
2759 | `(#:phases | |
2efabc55 | 2760 | (modify-phases %standard-phases |
e144cbcf KH |
2761 | (add-before 'build 'configure-blas-lapack |
2762 | (lambda* (#:key inputs #:allow-other-keys) | |
2763 | (call-with-output-file "site.cfg" | |
2764 | (lambda (port) | |
2765 | (format port | |
2766 | "[openblas] | |
dbdfe515 RW |
2767 | libraries = openblas |
2768 | library_dirs = ~a/lib | |
2769 | include_dirs = ~a/include | |
cba256f8 | 2770 | |
2efabc55 HG |
2771 | # backslash-n to make emacs happy |
2772 | \n[lapack] | |
cba256f8 RW |
2773 | lapack_libs = lapack |
2774 | library_dirs = ~a/lib | |
2775 | include_dirs = ~a/include | |
2776 | " | |
e144cbcf KH |
2777 | (assoc-ref inputs "openblas") |
2778 | (assoc-ref inputs "openblas") | |
2779 | (assoc-ref inputs "lapack") | |
2780 | (assoc-ref inputs "lapack")))) | |
2781 | #t)) | |
2782 | (add-before 'build 'fix-executable-paths | |
2783 | (lambda* (#:key inputs #:allow-other-keys) | |
2784 | ;; Make /gnu/store/...-bash-.../bin/sh the default shell, | |
2785 | ;; instead of /bin/sh. | |
2786 | (substitute* "numpy/distutils/exec_command.py" | |
2787 | (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end) | |
2788 | (string-append match-start (assoc-ref inputs "bash") match-end))) | |
2789 | ;; Use "gcc" executable, not "cc". | |
2790 | (substitute* "numpy/distutils/system_info.py" | |
2791 | (("c = distutils\\.ccompiler\\.new_compiler\\(\\)") | |
2792 | "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')")) | |
2793 | #t)) | |
2794 | ;; Tests can only be run after the library has been installed and not | |
2795 | ;; within the source directory. | |
2796 | (delete 'check) | |
2797 | (add-after 'install 'check | |
2798 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2799 | ;; Make installed package available for running the tests | |
2800 | (add-installed-pythonpath inputs outputs) | |
2801 | (with-directory-excursion "/tmp" | |
2802 | (zero? (system* "python" "-c" | |
2803 | "import numpy; numpy.test(verbose=2)")))))))) | |
0da98533 FB |
2804 | (home-page "http://www.numpy.org/") |
2805 | (synopsis "Fundamental package for scientific computing with Python") | |
2806 | (description "NumPy is the fundamental package for scientific computing | |
e881752c | 2807 | with Python. It contains among other things: a powerful N-dimensional array |
0da98533 FB |
2808 | object, sophisticated (broadcasting) functions, tools for integrating C/C++ |
2809 | and Fortran code, useful linear algebra, Fourier transform, and random number | |
2810 | capabilities.") | |
3f641af0 | 2811 | (license license:bsd-3))) |
0da98533 | 2812 | |
7ccb71e0 TD |
2813 | (define-public python2-numpy |
2814 | (package-with-python2 python-numpy)) | |
15bfe6d6 | 2815 | |
a08d5a07 KH |
2816 | ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of |
2817 | ;; interest only for legacy code going back to NumPy's predecessor | |
2818 | ;; Numeric. | |
2819 | (define-public python2-numpy-1.8 | |
2820 | (package (inherit python2-numpy) | |
2821 | (version "1.8.2") | |
2822 | (source | |
2823 | (origin | |
2824 | (method url-fetch) | |
2825 | (uri (string-append | |
2826 | "https://github.com/numpy/numpy/archive/v" version ".tar.gz")) | |
2827 | (file-name (string-append "python2-numpy-" version ".tar.gz")) | |
2828 | (sha256 | |
2829 | (base32 | |
2830 | "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g")))) | |
2831 | (arguments | |
2832 | (substitute-keyword-arguments (package-arguments python2-numpy) | |
2833 | ((#:phases phases) | |
2834 | `(modify-phases ,phases | |
2835 | (replace 'configure-blas-lapack | |
2836 | (lambda* (#:key inputs #:allow-other-keys) | |
2837 | (call-with-output-file "site.cfg" | |
2838 | (lambda (port) | |
2839 | (format port | |
2840 | "[openblas] | |
2841 | libraries = openblas,lapack | |
2842 | library_dirs = ~a/lib:~a/lib | |
2843 | include_dirs = ~a/include:~a/include | |
2844 | " | |
2845 | (assoc-ref inputs "openblas") | |
2846 | (assoc-ref inputs "lapack") | |
2847 | (assoc-ref inputs "openblas") | |
2848 | (assoc-ref inputs "lapack")))) | |
2849 | #t)))))) | |
2850 | (description "NumPy is the fundamental package for scientific computing | |
2851 | with Python. It contains among other things: a powerful N-dimensional array | |
2852 | object, sophisticated (broadcasting) functions, tools for integrating C/C++ | |
2853 | and Fortran code, useful linear algebra, Fourier transform, and random number | |
2854 | capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API | |
2855 | that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor | |
2856 | Numeric.") | |
2857 | (license license:bsd-3))) | |
2858 | ||
460fccd4 | 2859 | (define-public python-munch |
2860 | (package | |
2861 | (name "python-munch") | |
2862 | (version "2.0.4") | |
2863 | (source | |
2864 | (origin | |
2865 | (method url-fetch) | |
2866 | (uri (pypi-uri "munch" version)) | |
2867 | (sha256 | |
2868 | (base32 | |
2869 | "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l")))) | |
2870 | (build-system python-build-system) | |
2871 | (home-page "https://github.com/Infinidat/munch") | |
2872 | (synopsis "Dot-accessible dictionary") | |
2873 | (description "Munch is a dot-accessible dictionary similar to JavaScript | |
2874 | objects.") | |
2875 | (license license:expat))) | |
2876 | ||
2877 | (define-public python2-munch | |
2878 | (package-with-python2 python-munch)) | |
2879 | ||
beed6abc RW |
2880 | (define-public python-colormath |
2881 | (package | |
2882 | (name "python-colormath") | |
12ad52c3 | 2883 | (version "3.0.0") |
beed6abc RW |
2884 | (source |
2885 | (origin | |
2886 | (method url-fetch) | |
2887 | (uri (pypi-uri "colormath" version)) | |
2888 | (sha256 | |
2889 | (base32 | |
12ad52c3 | 2890 | "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix")))) |
beed6abc RW |
2891 | (build-system python-build-system) |
2892 | (propagated-inputs | |
2893 | `(("python-networkx" ,python-networkx) | |
2894 | ("python-numpy" ,python-numpy))) | |
2895 | (home-page "https://github.com/gtaylor/python-colormath") | |
2896 | (synopsis "Color math and conversion library") | |
2897 | (description | |
2898 | "This is a Python library for color math and conversions.") | |
2899 | (license license:bsd-3))) | |
2900 | ||
2901 | (define-public python2-colormath | |
2902 | (package-with-python2 python-colormath)) | |
2903 | ||
4a7d2009 RW |
2904 | (define-public python-spectra |
2905 | (package | |
2906 | (name "python-spectra") | |
7afd2069 | 2907 | (version "0.0.11") |
4a7d2009 RW |
2908 | (source |
2909 | (origin | |
2910 | (method url-fetch) | |
2911 | (uri (pypi-uri "spectra" version)) | |
2912 | (sha256 | |
2913 | (base32 | |
7afd2069 | 2914 | "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf")))) |
4a7d2009 RW |
2915 | (build-system python-build-system) |
2916 | (arguments | |
2917 | `(#:phases | |
2918 | (modify-phases %standard-phases | |
2919 | (replace 'check | |
2920 | (lambda _ | |
2921 | (zero? (system* "nosetests" "-v"))))))) | |
2922 | (propagated-inputs | |
2923 | `(("python-colormath" ,python-colormath))) | |
2924 | (native-inputs | |
2925 | `(("python-nose" ,python-nose))) | |
9be5ecdf | 2926 | (home-page "https://github.com/jsvine/spectra") |
4a7d2009 RW |
2927 | (synopsis "Color scales and color conversion") |
2928 | (description | |
2929 | "This package provides a Python library intended to make color math, | |
2930 | color scales, and color space conversion easy. It has support for: | |
2931 | ||
2932 | @enumerate | |
2933 | @item Color scales | |
2934 | @item Color ranges | |
2935 | @item Color blending | |
2936 | @item Brightening/darkening colors | |
2937 | @item Saturating/desaturating colors | |
2938 | @item Conversion to/from multiple color spaces. | |
2939 | @end enumerate\n") | |
2940 | (license license:expat))) | |
2941 | ||
2942 | (define-public python2-spectra | |
2943 | (package-with-python2 python-spectra)) | |
2944 | ||
3a1bfe18 RW |
2945 | (define-public python2-fastlmm |
2946 | (package | |
2947 | (name "python2-fastlmm") | |
154d0016 | 2948 | (version "0.2.21") |
3a1bfe18 RW |
2949 | (source |
2950 | (origin | |
2951 | (method url-fetch) | |
b074e7d4 | 2952 | (uri (pypi-uri "fastlmm" version ".zip")) |
3a1bfe18 RW |
2953 | (sha256 |
2954 | (base32 | |
154d0016 | 2955 | "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m")))) |
3a1bfe18 RW |
2956 | (build-system python-build-system) |
2957 | (arguments | |
2958 | `(#:python ,python-2)) ; only Python 2.7 is supported | |
2959 | (propagated-inputs | |
2960 | `(("python2-numpy" ,python2-numpy) | |
2961 | ("python2-scipy" ,python2-scipy) | |
2962 | ("python2-matplotlib" ,python2-matplotlib) | |
2963 | ("python2-pandas" ,python2-pandas) | |
2964 | ("python2-scikit-learn" ,python2-scikit-learn) | |
3a1bfe18 RW |
2965 | ("python2-pysnptools" ,python2-pysnptools))) |
2966 | (native-inputs | |
2967 | `(("unzip" ,unzip) | |
2efabc55 | 2968 | ("python2-cython" ,python2-cython) |
1b6d7c3f MB |
2969 | ("python2-mock" ,python2-mock) |
2970 | ("python2-nose" ,python2-nose))) | |
3a1bfe18 RW |
2971 | (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/") |
2972 | (synopsis "Perform genome-wide association studies on large data sets") | |
2973 | (description | |
2974 | "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed | |
2975 | Models, is a program for performing both single-SNP and SNP-set genome-wide | |
2976 | association studies (GWAS) on extremely large data sets.") | |
3f641af0 | 2977 | (license license:asl2.0))) |
3a1bfe18 | 2978 | |
7ccb71e0 TD |
2979 | (define-public python-numpy-documentation |
2980 | (package | |
2981 | (name "python-numpy-documentation") | |
2982 | (version (package-version python-numpy)) | |
2983 | (source (package-source python-numpy)) | |
2984 | (build-system python-build-system) | |
2ee8869a | 2985 | (native-inputs |
7ccb71e0 TD |
2986 | `(("python-matplotlib" ,python-matplotlib) |
2987 | ("python-numpy" ,python-numpy) | |
2988 | ("pkg-config" ,pkg-config) | |
2efabc55 HG |
2989 | ("python-sphinx" ,python-sphinx) |
2990 | ("python-numpydoc" ,python-numpydoc) | |
8b89c171 RW |
2991 | ("texlive" ,(texlive-union (list texlive-fonts-amsfonts |
2992 | texlive-fonts-ec | |
2993 | texlive-generic-ifxetex | |
2994 | texlive-generic-pdftex | |
2995 | texlive-latex-amsfonts | |
2996 | texlive-latex-capt-of | |
2997 | texlive-latex-cmap | |
2998 | texlive-latex-environ | |
2999 | texlive-latex-eqparbox | |
3000 | texlive-latex-etoolbox | |
3001 | texlive-latex-expdlist | |
3002 | texlive-latex-fancyhdr | |
3003 | texlive-latex-fancyvrb | |
3004 | texlive-latex-fncychap | |
3005 | texlive-latex-float | |
3006 | texlive-latex-framed | |
3007 | texlive-latex-geometry | |
3008 | texlive-latex-graphics | |
3009 | texlive-latex-hyperref | |
3010 | texlive-latex-mdwtools | |
3011 | texlive-latex-multirow | |
3012 | texlive-latex-oberdiek | |
3013 | texlive-latex-parskip | |
3014 | texlive-latex-preview | |
3015 | texlive-latex-tabulary | |
3016 | texlive-latex-threeparttable | |
3017 | texlive-latex-titlesec | |
3018 | texlive-latex-trimspaces | |
3019 | texlive-latex-ucs | |
3020 | texlive-latex-upquote | |
3021 | texlive-latex-url | |
3022 | texlive-latex-varwidth | |
3023 | texlive-latex-wrapfig))) | |
2ee8869a FB |
3024 | ("texinfo" ,texinfo) |
3025 | ("perl" ,perl) | |
7ccb71e0 TD |
3026 | ("scipy-sphinx-theme" |
3027 | ,(origin ; The build script expects scipy-sphinx-theme as a git submodule | |
3028 | (method git-fetch) | |
3029 | (uri (git-reference | |
3030 | (url "https://github.com/scipy/scipy-sphinx-theme.git") | |
67416769 | 3031 | (commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))) |
7ccb71e0 TD |
3032 | (sha256 |
3033 | (base32 | |
67416769 | 3034 | "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))) |
7ccb71e0 | 3035 | ,@(package-native-inputs python-numpy))) |
2ee8869a | 3036 | (arguments |
7ccb71e0 TD |
3037 | `(#:tests? #f ; we're only generating the documentation |
3038 | #:phases | |
3039 | (modify-phases %standard-phases | |
3040 | (delete 'build) | |
3041 | (replace 'install | |
3042 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3043 | (let* ((data (string-append (assoc-ref outputs "out") "/share")) | |
3044 | (doc (string-append | |
3045 | data "/doc/" ,name "-" | |
3046 | ,(package-version python-numpy))) | |
3047 | (info-reader (string-append data "/info")) | |
3048 | (html (string-append doc "/html")) | |
3049 | (scipy-sphinx-theme "scipy-sphinx-theme") | |
3050 | (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme)) | |
3051 | (pyver ,(string-append "PYVER="))) | |
8b89c171 RW |
3052 | |
3053 | ;; FIXME: this is needed to for texlive-union to generate | |
3054 | ;; fonts, which are not found. | |
3055 | (setenv "HOME" "/tmp") | |
3056 | ||
7ccb71e0 TD |
3057 | (with-directory-excursion "doc" |
3058 | (copy-recursively sphinx-theme-checkout scipy-sphinx-theme) | |
3059 | (mkdir-p html) | |
3060 | (system* "make" "html" pyver) | |
3061 | (system* "make" "latex" "PAPER=a4" pyver) | |
3062 | (system* "make" "-C" "build/latex" | |
3063 | "all-pdf" "PAPER=a4" pyver) | |
3064 | ;; FIXME: Generation of the info file fails. | |
3065 | ;; (system* "make" "info" pyver) | |
3066 | ;; (mkdir-p info) | |
3067 | ;; (copy-file "build/texinfo/numpy.info" | |
3068 | ;; (string-append info "/numpy.info")) | |
3069 | (for-each (lambda (file) | |
3070 | (copy-file (string-append "build/latex" file) | |
3071 | (string-append doc file))) | |
3072 | '("/numpy-ref.pdf" "/numpy-user.pdf")) | |
3073 | (with-directory-excursion "build/html" | |
3074 | (for-each (lambda (file) | |
3075 | (let* ((dir (dirname file)) | |
3076 | (tgt-dir (string-append html "/" dir))) | |
3077 | (unless (equal? "." dir) | |
3078 | (mkdir-p tgt-dir)) | |
3079 | (install-file file html))) | |
3080 | (find-files "." ".*"))))) | |
3081 | #t))))) | |
3082 | (home-page (package-home-page python-numpy)) | |
3083 | (synopsis "Documentation for the python-numpy package") | |
3084 | (description (package-description python-numpy)) | |
3085 | (license (package-license python-numpy)))) | |
2ee8869a | 3086 | |
7ccb71e0 TD |
3087 | (define-public python2-numpy-documentation |
3088 | (let ((numpy-documentation (package-with-python2 python-numpy-documentation))) | |
3089 | (package | |
3090 | (inherit numpy-documentation) | |
3091 | (native-inputs `(("python2-functools32" ,python2-functools32) | |
3092 | ,@(package-native-inputs numpy-documentation)))))) | |
2ee8869a | 3093 | |
0151a8df | 3094 | (define-public python-pygit2 |
3095 | (package | |
3096 | (name "python-pygit2") | |
8c0c0c4d | 3097 | (version "0.26.0") |
0151a8df | 3098 | (source |
3099 | (origin | |
3100 | (method url-fetch) | |
3101 | (uri (pypi-uri "pygit2" version)) | |
3102 | (sha256 | |
3103 | (base32 | |
8c0c0c4d | 3104 | "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57")) |
bb6043fe MB |
3105 | (patches |
3106 | (search-patches "python-pygit2-disable-network-tests.patch")))) | |
0151a8df | 3107 | (build-system python-build-system) |
3108 | (propagated-inputs | |
3109 | `(("python-six" ,python-six) | |
3110 | ("python-cffi" ,python-cffi) | |
3111 | ("libgit2" ,libgit2) | |
3112 | ("python-tox" ,python-tox))) | |
3113 | (home-page "https://github.com/libgit2/pygit2") | |
3114 | (synopsis "Python bindings for libgit2") | |
3115 | (description "Pygit2 is a set of Python bindings to the libgit2 shared | |
3116 | library, libgit2 implements Git plumbing.") | |
3117 | ;; GPL2.0 only, with linking exception. | |
3118 | (license license:gpl2))) | |
3119 | ||
3120 | (define-public python2-pygit2 | |
3121 | (package-with-python2 python-pygit2)) | |
3122 | ||
15bfe6d6 FB |
3123 | (define-public python-pyparsing |
3124 | (package | |
3125 | (name "python-pyparsing") | |
9e5ee6b6 | 3126 | (version "2.2.0") |
15bfe6d6 FB |
3127 | (source |
3128 | (origin | |
3129 | (method url-fetch) | |
de67e922 LF |
3130 | (uri (string-append "mirror://sourceforge/pyparsing/pyparsing" |
3131 | "/pyparsing-" version | |
15bfe6d6 FB |
3132 | "/pyparsing-" version ".tar.gz")) |
3133 | (sha256 | |
3134 | (base32 | |
9e5ee6b6 | 3135 | "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8")))) |
15bfe6d6 FB |
3136 | (build-system python-build-system) |
3137 | (outputs '("out" "doc")) | |
3138 | (arguments | |
3139 | `(#:tests? #f ; no test target | |
15bfe6d6 | 3140 | #:phases |
007176e7 MB |
3141 | (modify-phases %standard-phases |
3142 | (add-after 'install 'install-doc | |
3143 | (lambda* (#:key outputs #:allow-other-keys) | |
3144 | (let* ((doc (string-append (assoc-ref outputs "doc") | |
3145 | "/share/doc/" ,name "-" ,version)) | |
3146 | (html-doc (string-append doc "/html")) | |
3147 | (examples (string-append doc "/examples"))) | |
3148 | (mkdir-p html-doc) | |
3149 | (mkdir-p examples) | |
3150 | (for-each | |
3151 | (lambda (dir tgt) | |
3152 | (map (lambda (file) | |
3153 | (install-file file tgt)) | |
3154 | (find-files dir ".*"))) | |
3155 | (list "docs" "htmldoc" "examples") | |
3156 | (list doc html-doc examples)) | |
3157 | #t)))))) | |
15bfe6d6 FB |
3158 | (home-page "http://pyparsing.wikispaces.com") |
3159 | (synopsis "Python parsing class library") | |
3160 | (description | |
3161 | "The pyparsing module is an alternative approach to creating and | |
3162 | executing simple grammars, vs. the traditional lex/yacc approach, or the use | |
3163 | of regular expressions. The pyparsing module provides a library of classes | |
3164 | that client code uses to construct the grammar directly in Python code.") | |
bd3fa666 | 3165 | (license license:expat))) |
15bfe6d6 FB |
3166 | |
3167 | (define-public python2-pyparsing | |
3168 | (package-with-python2 python-pyparsing)) | |
3169 | ||
ec00de35 FB |
3170 | (define-public python-numpydoc |
3171 | (package | |
3172 | (name "python-numpydoc") | |
3173 | (version "0.5") | |
3174 | (source | |
3175 | (origin | |
3176 | (method url-fetch) | |
89b5c60e | 3177 | (uri (string-append |
ec00de35 FB |
3178 | "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-" |
3179 | version ".tar.gz")) | |
3180 | (sha256 | |
3181 | (base32 | |
5e4d8f67 AE |
3182 | "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k")) |
3183 | (modules '((guix build utils))) | |
3184 | (snippet | |
3185 | '(begin | |
3186 | ;; Drop a test requiring matplotlib, which we cannot add as an | |
3187 | ;; input since it would create a circular dependency: Extend the | |
3188 | ;; test for Python 3, where it is already dropped, to Python 2. | |
3189 | (substitute* "numpydoc/tests/test_plot_directive.py" | |
3190 | (("3") "2")))))) | |
ec00de35 | 3191 | (build-system python-build-system) |
fe4a8da4 | 3192 | (propagated-inputs |
213d1745 HG |
3193 | `(("python-sphinx" ,python-sphinx))) |
3194 | (native-inputs | |
3195 | `(("python-nose" ,python-nose))) | |
ec00de35 FB |
3196 | (home-page "https://pypi.python.org/pypi/numpydoc") |
3197 | (synopsis | |
3198 | "Numpy's Sphinx extensions") | |
3199 | (description | |
3200 | "Sphinx extension to support docstrings in Numpy format.") | |
3f641af0 | 3201 | (license license:bsd-2))) |
ec00de35 FB |
3202 | |
3203 | (define-public python2-numpydoc | |
5e4d8f67 | 3204 | (package-with-python2 python-numpydoc)) |
1c65314c | 3205 | |
1e656049 RW |
3206 | (define-public python-numexpr |
3207 | (package | |
3208 | (name "python-numexpr") | |
cb91edeb | 3209 | (version "2.6.4") |
1e656049 RW |
3210 | (source |
3211 | (origin | |
3212 | (method url-fetch) | |
26112c0a | 3213 | (uri (pypi-uri "numexpr" version)) |
1e656049 RW |
3214 | (sha256 |
3215 | (base32 | |
cb91edeb | 3216 | "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph")))) |
1e656049 RW |
3217 | (build-system python-build-system) |
3218 | (arguments `(#:tests? #f)) ; no tests included | |
3219 | (propagated-inputs | |
3220 | `(("python-numpy" ,python-numpy))) | |
3221 | (home-page "https://github.com/pydata/numexpr") | |
3222 | (synopsis "Fast numerical expression evaluator for NumPy") | |
3223 | (description | |
3224 | "Numexpr is a fast numerical expression evaluator for NumPy. With it, | |
3225 | expressions that operate on arrays are accelerated and use less memory than | |
3226 | doing the same calculation in Python. In addition, its multi-threaded | |
3227 | capabilities can make use of all your cores, which may accelerate | |
3228 | computations, most specially if they are not memory-bounded (e.g. those using | |
3229 | transcendental functions).") | |
f210e944 | 3230 | (license license:expat))) |
1e656049 RW |
3231 | |
3232 | (define-public python2-numexpr | |
f210e944 | 3233 | (package-with-python2 python-numexpr)) |
1e656049 | 3234 | |
361d982c MB |
3235 | (define-public python-cycler |
3236 | (package | |
3237 | (name "python-cycler") | |
3238 | (version "0.10.0") | |
3239 | (source (origin | |
3240 | (method url-fetch) | |
3241 | (uri (pypi-uri "cycler" version)) | |
3242 | (sha256 | |
3243 | (base32 | |
3244 | "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd")))) | |
3245 | (build-system python-build-system) | |
3246 | (arguments | |
3247 | ;; XXX: The current version requires 'coveralls' which we don't have. | |
3248 | ;; Enable this for the next release which uses 'python-pytest'. | |
3249 | '(#:tests? #f)) | |
3250 | (propagated-inputs | |
3251 | `(("python-six" ,python-six))) | |
3252 | (home-page "http://matplotlib.org/cycler/") | |
3253 | (synopsis "Composable keyword argument iterator") | |
3254 | (description | |
3255 | "When using @code{matplotlib} and plotting more than one line, it is | |
3256 | common to want to be able to want to be able to cycle over one or more artist | |
3257 | styles; but the plotting logic can quickly become involved. | |
3258 | To address this and enable easy cycling over arbitrary @code{kwargs}, the | |
3259 | @code{Cycler} class was developed.") | |
3260 | (license license:bsd-3))) | |
3261 | ||
3262 | (define-public python2-cycler | |
3263 | (package-with-python2 python-cycler)) | |
3264 | ||
2aa6d3ae TD |
3265 | (define-public python-colorspacious |
3266 | (package | |
3267 | (name "python-colorspacious") | |
3268 | (version "1.1.0") | |
3269 | (source | |
3270 | (origin | |
3271 | (method url-fetch) | |
3272 | (uri (string-append "https://github.com/njsmith/colorspacious/archive/v" | |
3273 | version ".tar.gz")) | |
3274 | (file-name (string-append name "-" version)) | |
3275 | (sha256 | |
3276 | (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k")))) | |
3277 | (build-system python-build-system) | |
3278 | (propagated-inputs | |
3279 | `(("python-numpy" ,python-numpy))) | |
ba062b3e TD |
3280 | (native-inputs |
3281 | `(("python-nose" ,python-nose))) | |
3282 | (arguments | |
3283 | `(#:phases | |
3284 | (modify-phases %standard-phases | |
3285 | (replace 'check | |
3286 | (lambda _ | |
3287 | (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious"))))))) | |
2aa6d3ae TD |
3288 | (home-page "https://github.com/njsmith/colorspacious") |
3289 | (synopsis "Python library for colorspace conversions") | |
3290 | (description "@code{colorspacious} is a Python library that lets you | |
3291 | convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") | |
3292 | (license license:expat))) | |
3293 | ||
3294 | (define-public python2-colorspacious | |
3295 | (package-with-python2 python-colorspacious)) | |
3296 | ||
1c65314c FB |
3297 | (define-public python-matplotlib |
3298 | (package | |
3299 | (name "python-matplotlib") | |
71d20587 | 3300 | (version "2.0.2") |
1c65314c FB |
3301 | (source |
3302 | (origin | |
3303 | (method url-fetch) | |
71d20587 | 3304 | (uri (pypi-uri "matplotlib" version)) |
1c65314c FB |
3305 | (sha256 |
3306 | (base32 | |
71d20587 | 3307 | "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg")))) |
1c65314c | 3308 | (build-system python-build-system) |
25f9a068 | 3309 | (propagated-inputs ; the following packages are all needed at run time |
4535a93a TD |
3310 | `(("python-cycler" ,python-cycler) |
3311 | ("python-pyparsing" ,python-pyparsing) | |
25f9a068 FB |
3312 | ("python-pygobject" ,python-pygobject) |
3313 | ("gobject-introspection" ,gobject-introspection) | |
1bbc659f | 3314 | ("python-tkinter" ,python "tk") |
22d7360b | 3315 | ("python-dateutil" ,python-dateutil) |
7ccb71e0 | 3316 | ("python-numpy" ,python-numpy) |
ca33a3ad HG |
3317 | ("python-pillow" ,python-pillow) |
3318 | ("python-pytz" ,python-pytz) | |
3319 | ("python-six" ,python-six) | |
25f9a068 FB |
3320 | ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated |
3321 | ;; from 'gtk+') provides the required 'typelib' files used by | |
3322 | ;; 'gobject-introspection'. The location of these files is set with the | |
3323 | ;; help of the environment variable GI_TYPELIB_PATH. At build time this | |
3324 | ;; is done automatically by a 'native-search-path' procedure. However, | |
3325 | ;; at run-time the user must set this variable as follows: | |
3326 | ;; | |
3327 | ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0 | |
25f9a068 FB |
3328 | ("gtk+" ,gtk+) |
3329 | ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of | |
3330 | ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context' | |
3331 | ;; object. For this reason we need to import both libraries. | |
3332 | ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo | |
3333 | ("python-pycairo" ,python-pycairo) | |
7e060865 | 3334 | ("python-pyqt" ,python-pyqt) |
25f9a068 | 3335 | ("python-cairocffi" ,python-cairocffi))) |
1c65314c | 3336 | (inputs |
ca33a3ad | 3337 | `(("libpng" ,libpng) |
1c65314c FB |
3338 | ("imagemagick" ,imagemagick) |
3339 | ("freetype" ,freetype) | |
25f9a068 FB |
3340 | ("cairo" ,cairo) |
3341 | ("glib" ,glib) | |
1c65314c | 3342 | ;; FIXME: Add backends when available. |
1c65314c | 3343 | ;("python-wxpython" ,python-wxpython) |
1bbc659f FB |
3344 | ("tcl" ,tcl) |
3345 | ("tk" ,tk))) | |
1c65314c FB |
3346 | (native-inputs |
3347 | `(("pkg-config" ,pkg-config) | |
ca33a3ad | 3348 | ("python-nose" ,python-nose) |
4535a93a | 3349 | ("python-mock" ,python-mock))) |
1c65314c FB |
3350 | (arguments |
3351 | `(#:phases | |
42b7009a DM |
3352 | (modify-phases %standard-phases |
3353 | (add-before 'build 'configure-environment | |
3354 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
3355 | (let ((cairo (assoc-ref inputs "cairo")) | |
3356 | (gtk+ (assoc-ref inputs "gtk+"))) | |
3357 | ;; Setting these directories in the 'basedirlist' of 'setup.cfg' | |
3358 | ;; has not effect. | |
3359 | (setenv "LD_LIBRARY_PATH" | |
3360 | (string-append cairo "/lib:" gtk+ "/lib")) | |
3361 | (setenv "HOME" (getcwd)) | |
3362 | (call-with-output-file "setup.cfg" | |
3363 | (lambda (port) | |
3364 | (format port "[directories]~% | |
1bbc659f | 3365 | basedirlist = ~a,~a~% |
57b7b8cd | 3366 | [rc_options]~% |
1bbc659f FB |
3367 | backend = TkAgg~%" |
3368 | (assoc-ref inputs "tcl") | |
4535a93a TD |
3369 | (assoc-ref inputs "tk"))))) |
3370 | #t))))) | |
1c65314c FB |
3371 | (home-page "http://matplotlib.org") |
3372 | (synopsis "2D plotting library for Python") | |
3373 | (description | |
3374 | "Matplotlib is a Python 2D plotting library which produces publication | |
3375 | quality figures in a variety of hardcopy formats and interactive environments | |
3376 | across platforms. Matplotlib can be used in Python scripts, the python and | |
3377 | ipython shell, web application servers, and six graphical user interface | |
3378 | toolkits.") | |
3f641af0 | 3379 | (license license:psfl) |
57b7b8cd | 3380 | (properties `((python2-variant . ,(delay python2-matplotlib)))))) |
1c65314c | 3381 | |
764c077b | 3382 | (define-public python2-matplotlib |
57b7b8cd LC |
3383 | (let ((matplotlib (package-with-python2 |
3384 | (strip-python2-variant python-matplotlib)))) | |
764c077b | 3385 | (package (inherit matplotlib) |
88c26834 AE |
3386 | ;; Make sure to use special packages for Python 2 instead |
3387 | ;; of those automatically rewritten by package-with-python2. | |
89b5c60e | 3388 | (propagated-inputs |
7ca0dbc3 | 3389 | `(("python2-pycairo" ,python2-pycairo) |
4535a93a | 3390 | ("python2-functools32" ,python2-functools32) |
764c077b | 3391 | ("python2-pygobject-2" ,python2-pygobject-2) |
4535a93a | 3392 | ("python2-subprocess32" ,python2-subprocess32) |
1bbc659f FB |
3393 | ("python2-tkinter" ,python-2 "tk") |
3394 | ,@(fold alist-delete (package-propagated-inputs matplotlib) | |
3395 | '("python-pycairo" "python-pygobject" "python-tkinter"))))))) | |
94914805 | 3396 | |
4535a93a TD |
3397 | (define-public python-matplotlib-documentation |
3398 | (package | |
3399 | (name "python-matplotlib-documentation") | |
3400 | (version (package-version python-matplotlib)) | |
3401 | (source (package-source python-matplotlib)) | |
3402 | (build-system python-build-system) | |
3403 | (native-inputs | |
3404 | `(("python-matplotlib" ,python-matplotlib) | |
3405 | ("python-colorspacious" ,python-colorspacious) | |
3406 | ("python-sphinx" ,python-sphinx) | |
3407 | ("python-numpydoc" ,python-numpydoc) | |
3408 | ("python-ipython" ,python-ipython) | |
1eaaea41 TD |
3409 | ("python-mock" ,python-mock) |
3410 | ("graphviz" ,graphviz) | |
4535a93a TD |
3411 | ("texlive" ,texlive) |
3412 | ("texinfo" ,texinfo) | |
3413 | ,@(package-native-inputs python-matplotlib))) | |
3414 | (arguments | |
3415 | `(#:tests? #f ; we're only generating documentation | |
3416 | #:phases | |
3417 | (modify-phases %standard-phases | |
1eaaea41 TD |
3418 | (replace 'build |
3419 | (lambda _ | |
3420 | (chdir "doc") | |
3421 | ;; Produce pdf in 'A4' format. | |
3422 | (substitute* "conf.py" | |
3423 | (("latex_paper_size = 'letter'") "") | |
3424 | ;; latex_paper_size is deprecated -> set paper size using | |
3425 | ;; latex_elements | |
3426 | (("latex_elements\\['pointsize'\\] = '11pt'" match) | |
3427 | ;; insert at a point where latex_elements{} is defined: | |
3428 | (string-append match "\nlatex_elements['papersize'] = 'a4paper'"))) | |
3429 | (zero? (system* "python" "make.py" "html" "latex" "texinfo")))) | |
4535a93a | 3430 | (replace 'install |
42b7009a | 3431 | (lambda* (#:key inputs outputs #:allow-other-keys) |
4535a93a | 3432 | (let* ((data (string-append (assoc-ref outputs "out") "/share")) |
1eaaea41 | 3433 | (doc (string-append data "/doc/python-matplotlib-" ,version)) |
42b7009a DM |
3434 | (info (string-append data "/info")) |
3435 | (html (string-append doc "/html"))) | |
1eaaea41 TD |
3436 | (mkdir-p html) |
3437 | (mkdir-p info) | |
3438 | (copy-recursively "build/html" html) | |
3439 | (symlink (string-append html "/_images") | |
3440 | (string-append info "/matplotlib-figures")) | |
3441 | (with-directory-excursion "build/texinfo" | |
3442 | (substitute* "matplotlib.texi" | |
3443 | (("@image\\{([^,]*)" all file) | |
3444 | (string-append "@image{matplotlib-figures/" file))) | |
18b31516 | 3445 | (symlink (string-append html "/_images") |
1eaaea41 TD |
3446 | "./matplotlib-figures") |
3447 | (system* "makeinfo" "--no-split" | |
3448 | "-o" "matplotlib.info" "matplotlib.texi")) | |
3449 | (copy-file "build/texinfo/matplotlib.info" | |
3450 | (string-append info "/matplotlib.info")) | |
3451 | (copy-file "build/latex/Matplotlib.pdf" | |
3452 | (string-append doc "/Matplotlib.pdf"))) | |
4535a93a TD |
3453 | #t))))) |
3454 | (home-page (package-home-page python-matplotlib)) | |
3455 | (synopsis "Documentation for the python-matplotlib package") | |
3456 | (description (package-description python-matplotlib)) | |
3457 | (license (package-license python-matplotlib)))) | |
1c65314c | 3458 | |
4535a93a TD |
3459 | (define-public python2-matplotlib-documentation |
3460 | (package-with-python2 python-matplotlib-documentation)) | |
94914805 | 3461 | |
0dde6232 RW |
3462 | (define-public python2-pysnptools |
3463 | (package | |
3464 | (name "python2-pysnptools") | |
a800018e | 3465 | (version "0.3.9") |
0dde6232 RW |
3466 | (source |
3467 | (origin | |
3468 | (method url-fetch) | |
3f2e9675 | 3469 | (uri (pypi-uri "pysnptools" version ".zip")) |
0dde6232 RW |
3470 | (sha256 |
3471 | (base32 | |
a800018e | 3472 | "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2")))) |
0dde6232 RW |
3473 | (build-system python-build-system) |
3474 | (arguments | |
3475 | `(#:python ,python-2)) ; only Python 2.7 is supported | |
3476 | (propagated-inputs | |
3477 | `(("python2-numpy" ,python2-numpy) | |
3478 | ("python2-scipy" ,python2-scipy) | |
b72ac1b5 HG |
3479 | ("python2-pandas" ,python2-pandas))) |
3480 | (native-inputs | |
3481 | `(("python2-cython" ,python2-cython))) | |
0dde6232 | 3482 | (native-inputs |
f3b98f4f | 3483 | `(("unzip" ,unzip))) |
0dde6232 RW |
3484 | (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/") |
3485 | (synopsis "Library for reading and manipulating genetic data") | |
3486 | (description | |
3487 | "PySnpTools is a library for reading and manipulating genetic data. It | |
3488 | can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of | |
3489 | those files. It can also efficiently manipulate ranges of integers using set | |
3490 | operators such as union, intersection, and difference.") | |
3f641af0 | 3491 | (license license:asl2.0))) |
0dde6232 | 3492 | |
c9b1b4f9 RW |
3493 | (define-public python-rpy2 |
3494 | (package | |
3495 | (name "python-rpy2") | |
deee5dda | 3496 | (version "2.9.0") |
c9b1b4f9 RW |
3497 | (source |
3498 | (origin | |
3499 | (method url-fetch) | |
ec3bcbc7 | 3500 | (uri (pypi-uri "rpy2" version)) |
c9b1b4f9 RW |
3501 | (sha256 |
3502 | (base32 | |
deee5dda | 3503 | "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni")))) |
c9b1b4f9 | 3504 | (build-system python-build-system) |
444464ec | 3505 | (arguments |
deee5dda RW |
3506 | '(#:modules ((ice-9 ftw) |
3507 | (srfi srfi-1) | |
3508 | (srfi srfi-26) | |
3509 | (guix build utils) | |
3510 | (guix build python-build-system)) | |
3511 | #:phases | |
444464ec | 3512 | (modify-phases %standard-phases |
deee5dda RW |
3513 | ;; Without this phase the test loader cannot find the directories, in |
3514 | ;; which it is supposed to look for test files. | |
3515 | (add-after 'unpack 'fix-tests | |
3516 | (lambda* (#:key outputs #:allow-other-keys) | |
3517 | (substitute* "rpy/tests.py" | |
3518 | (("loader.discover\\(") | |
3519 | "loader.discover(rpy_root + '/' +")) | |
3520 | #t)) | |
3521 | (replace 'check | |
444464ec | 3522 | (lambda* (#:key outputs inputs #:allow-other-keys) |
deee5dda RW |
3523 | (let ((cwd (getcwd))) |
3524 | (setenv "PYTHONPATH" | |
3525 | (string-append cwd "/build/" | |
3526 | (find (cut string-prefix? "lib" <>) | |
3527 | (scandir (string-append cwd "/build"))) | |
3528 | ":" | |
3529 | (getenv "PYTHONPATH")))) | |
22d1060e RW |
3530 | ;; FIXME: Even when all tests pass, the check phase will fail. |
3531 | (system* "python" "-m" "rpy2.tests" "-v")))))) | |
482d9591 | 3532 | (propagated-inputs |
deee5dda RW |
3533 | `(("python-six" ,python-six) |
3534 | ("python-jinja2" ,python-jinja2) | |
3535 | ("python-pytz" ,python-pytz))) | |
c9b1b4f9 | 3536 | (inputs |
482d9591 | 3537 | `(("readline" ,readline) |
c9b1b4f9 RW |
3538 | ("icu4c" ,icu4c) |
3539 | ("pcre" ,pcre) | |
2d7c4ae3 | 3540 | ("r-minimal" ,r-minimal) |
deee5dda RW |
3541 | ("r-survival" ,r-survival) |
3542 | ("r-ggplot2" ,r-ggplot2) | |
3543 | ("r-rsqlite" ,r-rsqlite) | |
3544 | ("r-dplyr" ,r-dplyr) | |
3545 | ("r-dbplyr" ,r-dbplyr) | |
3546 | ("python-numpy" ,python-numpy))) | |
c9b1b4f9 | 3547 | (native-inputs |
f3b98f4f | 3548 | `(("zlib" ,zlib))) |
c9b1b4f9 RW |
3549 | (home-page "http://rpy.sourceforge.net/") |
3550 | (synopsis "Python interface to the R language") | |
3551 | (description "rpy2 is a redesign and rewrite of rpy. It is providing a | |
3552 | low-level interface to R from Python, a proposed high-level interface, | |
3553 | including wrappers to graphical libraries, as well as R-like structures and | |
3554 | functions.") | |
c92483bd RW |
3555 | ;; Any of these licenses can be picked for the R interface. The whole |
3556 | ;; project is released under GPLv2+ according to the license declaration | |
3557 | ;; in "setup.py". | |
3558 | (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+)))) | |
c9b1b4f9 | 3559 | |
bb986599 FB |
3560 | (define-public python-scipy |
3561 | (package | |
3562 | (name "python-scipy") | |
ba62f087 | 3563 | (version "1.0.0") |
bb986599 FB |
3564 | (source |
3565 | (origin | |
3566 | (method url-fetch) | |
09efef33 | 3567 | (uri (pypi-uri "scipy" version)) |
bb986599 FB |
3568 | (sha256 |
3569 | (base32 | |
ba62f087 | 3570 | "043djb3vyk6qripmyw30jhl0g8qza0fmar6wck10iv79l08izsl7")))) |
bb986599 | 3571 | (build-system python-build-system) |
dd86c0d1 | 3572 | (propagated-inputs |
bb986599 FB |
3573 | `(("python-numpy" ,python-numpy) |
3574 | ("python-matplotlib" ,python-matplotlib) | |
dd86c0d1 RW |
3575 | ("python-pyparsing" ,python-pyparsing))) |
3576 | (inputs | |
3577 | `(("lapack" ,lapack) | |
719b01c1 | 3578 | ("openblas" ,openblas))) |
bb986599 | 3579 | (native-inputs |
35093253 | 3580 | `(("python-cython" ,python-cython) |
ba62f087 | 3581 | ("python-pytest" ,python-pytest) |
dd86c0d1 | 3582 | ("python-sphinx" ,python-sphinx) |
5248d49e | 3583 | ("python-numpydoc" ,python-numpydoc) |
dd86c0d1 | 3584 | ("gfortran" ,gfortran) |
ba62f087 MB |
3585 | ("perl" ,perl) |
3586 | ("which" ,which))) | |
bb986599 FB |
3587 | (outputs '("out" "doc")) |
3588 | (arguments | |
3589 | `(#:phases | |
16ca6aaa | 3590 | (modify-phases %standard-phases |
16ca6aaa MB |
3591 | (add-before 'build 'configure-openblas |
3592 | (lambda* (#:key inputs #:allow-other-keys) | |
3593 | (call-with-output-file "site.cfg" | |
3594 | (lambda (port) | |
3595 | (format port | |
3596 | "[blas] | |
719b01c1 RW |
3597 | libraries = openblas |
3598 | library_dirs = ~a/lib | |
3599 | include_dirs = ~a/include | |
d548e6aa HG |
3600 | |
3601 | # backslash-n to make emacs happy | |
3602 | \n[atlas] | |
719b01c1 RW |
3603 | library_dirs = ~a/lib |
3604 | atlas_libs = openblas | |
3605 | " | |
16ca6aaa MB |
3606 | (assoc-ref inputs "openblas") |
3607 | (assoc-ref inputs "openblas") | |
3608 | (assoc-ref inputs "openblas")))) | |
db967b64 | 3609 | #t)) |
35093253 TD |
3610 | (add-after 'install 'install-doc |
3611 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3612 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
3613 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
3614 | (html (string-append doc "/html")) | |
ba62f087 MB |
3615 | (pyver ,(string-append "PYVER=" (version-major+minor |
3616 | (package-version python)))) | |
3617 | ;; By default it tries to run sphinx-build through the Python | |
3618 | ;; interpreter which won't work with our shell wrapper. | |
3619 | (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build")) | |
35093253 TD |
3620 | ;; Make installed package available for building the |
3621 | ;; documentation | |
3622 | (add-installed-pythonpath inputs outputs) | |
3623 | (with-directory-excursion "doc" | |
3624 | ;; Fix generation of images for mathematical expressions. | |
3625 | (substitute* (find-files "source" "conf\\.py") | |
3626 | (("pngmath_use_preview = True") | |
3627 | "pngmath_use_preview = False")) | |
3628 | (mkdir-p html) | |
ba62f087 | 3629 | (invoke "make" "html" pyver sphinxbuild) |
35093253 TD |
3630 | (with-directory-excursion "build/html" |
3631 | (for-each (lambda (file) | |
3632 | (let* ((dir (dirname file)) | |
3633 | (tgt-dir (string-append html "/" dir))) | |
3634 | (install-file file html))) | |
3635 | (find-files "." ".*"))))) | |
3636 | #t)) | |
ba62f087 MB |
3637 | ;; Tests can only be run after the library has been installed and not |
3638 | ;; within the source directory. | |
35093253 TD |
3639 | (delete 'check) |
3640 | (add-after 'install 'check | |
3641 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
d548e6aa | 3642 | (add-installed-pythonpath inputs outputs) |
35093253 | 3643 | (with-directory-excursion "/tmp" |
ba62f087 MB |
3644 | (invoke "python" "-c" |
3645 | "import scipy; scipy.test('full', verbose=2)"))))))) | |
9be5ecdf | 3646 | (home-page "https://www.scipy.org/") |
bb986599 FB |
3647 | (synopsis "The Scipy library provides efficient numerical routines") |
3648 | (description "The SciPy library is one of the core packages that make up | |
3649 | the SciPy stack. It provides many user-friendly and efficient numerical | |
3650 | routines such as routines for numerical integration and optimization.") | |
9200fe14 | 3651 | (properties `((python2-variant . ,(delay python2-scipy)))) |
3f641af0 | 3652 | (license license:bsd-3))) |
bb986599 | 3653 | |
764c077b | 3654 | (define-public python2-scipy |
35093253 TD |
3655 | (package-with-python2 |
3656 | (strip-python2-variant python-scipy))) | |
bb986599 | 3657 | |
73acc193 | 3658 | (define-public python-socksipy-branch |
3659 | (package | |
3660 | (name "python-socksipy-branch") | |
3661 | (version "1.01") | |
3662 | (source | |
3663 | (origin | |
3664 | (method url-fetch) | |
3665 | (uri (pypi-uri "SocksiPy-branch" version)) | |
3666 | (sha256 | |
3667 | (base32 | |
3668 | "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p")))) | |
3669 | (build-system python-build-system) | |
3670 | (arguments | |
3671 | `(#:tests? #f)) ; There are no tests | |
3672 | (home-page "https://code.google.com/archive/p/socksipy-branch/") | |
3673 | (synopsis "Python SOCKS module") | |
3674 | (description | |
3675 | "SocksiPy - A Python SOCKS client module. It provides a | |
3676 | socket-like interface that supports connections to any TCP | |
3677 | service through the use of a SOCKS4, SOCKS5 or HTTP proxy. | |
3678 | The original version was developed by Dan Haim, this is a | |
3679 | branch created by Mario Vilas to address some open issues, | |
3680 | as the original project seems to have been abandoned circa 2007.") | |
3681 | (license license:bsd-3))) | |
3682 | ||
3683 | (define-public python2-socksipy-branch | |
3684 | (package-with-python2 python-socksipy-branch)) | |
3685 | ||
4a093330 DM |
3686 | (define-public python-pycodestyle |
3687 | (package | |
3688 | (name "python-pycodestyle") | |
9b801661 | 3689 | (version "2.3.1") |
4a093330 DM |
3690 | (source |
3691 | (origin | |
3692 | (method url-fetch) | |
3693 | (uri (pypi-uri "pycodestyle" version)) | |
3694 | (sha256 | |
3695 | (base32 | |
9b801661 | 3696 | "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8")))) |
4a093330 DM |
3697 | (build-system python-build-system) |
3698 | (home-page "https://pycodestyle.readthedocs.io/") | |
3699 | (synopsis "Python style guide checker") | |
3700 | (description "@code{pycodestyle} (formerly pep8) is a tool to check | |
3701 | Python code against some of the style conventions in | |
3702 | @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.") | |
f210e944 | 3703 | (license license:expat))) |
4a093330 DM |
3704 | |
3705 | (define-public python2-pycodestyle | |
f210e944 | 3706 | (package-with-python2 python-pycodestyle)) |
b91912c4 DM |
3707 | |
3708 | (define-public python-orderedmultidict | |
3709 | (package | |
3710 | (name "python-orderedmultidict") | |
9e2802cb | 3711 | (version "0.7.11") |
b91912c4 DM |
3712 | (source |
3713 | (origin | |
3714 | (method url-fetch) | |
3715 | (uri (pypi-uri "orderedmultidict" version)) | |
3716 | (sha256 | |
3717 | (base32 | |
9e2802cb | 3718 | "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw")))) |
b91912c4 DM |
3719 | (build-system python-build-system) |
3720 | (arguments | |
3721 | `(#:phases | |
3722 | (modify-phases %standard-phases | |
3723 | (add-after 'unpack 'fix-tests | |
3724 | (lambda _ | |
3725 | ;; The package uses nosetest for running the tests. | |
3726 | ;; Adding this initfile allows to run the test suite | |
3727 | ;; without requiring nosetest. | |
3728 | (zero? (system* "touch" "tests/__init__.py"))))))) | |
3729 | (propagated-inputs | |
3730 | `(("python-six" ,python-six))) | |
3731 | (native-inputs | |
3732 | `(("python-pycodestyle" ,python-pycodestyle))) | |
3733 | (home-page "https://github.com/gruns/orderedmultidict") | |
3734 | (synopsis "Python Ordered Multivalue Dictionary - omdict") | |
3735 | (description "This package contains a library for ordered multivalue | |
3736 | dictionaries. A multivalue dictionary is a dictionary that can store | |
3737 | multiple values for the same key. An ordered multivalue dictionary is a | |
3738 | multivalue dictionary that retains the order of insertions and deletions.") | |
f210e944 | 3739 | (license license:unlicense))) |
af5a4602 | 3740 | |
b91912c4 | 3741 | (define-public python2-orderedmultidict |
f210e944 | 3742 | (package-with-python2 python-orderedmultidict)) |
af5a4602 | 3743 | |
138adbbe TD |
3744 | (define-public python-autopep8 |
3745 | (package | |
3746 | (name "python-autopep8") | |
8e483fb5 | 3747 | (version "1.3.2") |
138adbbe TD |
3748 | (source |
3749 | (origin | |
3750 | (method url-fetch) | |
3751 | (uri (pypi-uri "autopep8" version)) | |
3752 | (sha256 | |
3753 | (base32 | |
8e483fb5 | 3754 | "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky")))) |
138adbbe TD |
3755 | (build-system python-build-system) |
3756 | (propagated-inputs | |
8e483fb5 | 3757 | `(("python-pycodestyle" ,python-pycodestyle))) |
138adbbe TD |
3758 | (home-page "https://github.com/hhatto/autopep8") |
3759 | (synopsis "Format Python code according to the PEP 8 style guide") | |
3760 | (description | |
3761 | "@code{autopep8} automatically formats Python code to conform to | |
3762 | the PEP 8 style guide. It uses the pycodestyle utility to determine | |
3763 | what parts of the code needs to be formatted. @code{autopep8} is | |
3764 | capable of fixing most of the formatting issues that can be reported | |
3765 | by pycodestyle.") | |
3766 | (license (license:non-copyleft | |
3767 | "https://github.com/hhatto/autopep8/blob/master/LICENSE")))) | |
3768 | ||
3769 | (define-public python2-autopep8 | |
3770 | (package-with-python2 python-autopep8)) | |
3771 | ||
1671c07c EB |
3772 | (define-public python-distutils-extra |
3773 | (package | |
3774 | (name "python-distutils-extra") | |
3775 | (version "2.38") | |
3776 | (source | |
3777 | (origin | |
3778 | (method url-fetch) | |
3779 | (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/" | |
3780 | version "/+download/python-distutils-extra-" | |
3781 | version ".tar.gz")) | |
3782 | (sha256 | |
3783 | (base32 | |
3784 | "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x")))) | |
3785 | (build-system python-build-system) | |
1671c07c EB |
3786 | (home-page "https://launchpad.net/python-distutils-extra/") |
3787 | (synopsis "Enhancements to Python's distutils") | |
3788 | (description | |
3789 | "The python-distutils-extra module enables you to easily integrate | |
3790 | gettext support, themed icons, and scrollkeeper-based documentation into | |
3791 | Python's distutils.") | |
3f641af0 | 3792 | (license license:gpl2))) |
1671c07c EB |
3793 | |
3794 | (define-public python2-distutils-extra | |
3795 | (package-with-python2 python-distutils-extra)) | |
ea5456c8 EB |
3796 | |
3797 | (define-public python2-elib.intl | |
3798 | (package | |
3799 | (name "python2-elib.intl") | |
3800 | (version "0.0.3") | |
3801 | (source | |
3802 | (origin | |
3803 | ;; This project doesn't tag releases or publish tarballs, so we take | |
3804 | ;; source from a (semi-arbitrary, i.e. latest as of now) git commit. | |
3805 | (method git-fetch) | |
3806 | (uri (git-reference | |
3807 | (url "https://github.com/dieterv/elib.intl.git") | |
3808 | (commit "d09997cfef"))) | |
3809 | (sha256 | |
3810 | (base32 | |
3811 | "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d")))) | |
3812 | (build-system python-build-system) | |
ea5456c8 EB |
3813 | (arguments |
3814 | ;; incompatible with Python 3 (exception syntax) | |
3815 | `(#:python ,python-2 | |
b41a05ce | 3816 | #:tests? #f)) |
ea5456c8 EB |
3817 | (home-page "https://github.com/dieterv/elib.intl") |
3818 | (synopsis "Enhanced internationalization for Python") | |
3819 | (description | |
3820 | "The elib.intl module provides enhanced internationalization (I18N) | |
3821 | services for your Python modules and applications.") | |
3f641af0 | 3822 | (license license:lgpl3+))) |
ea5456c8 | 3823 | |
3a1f26ff KK |
3824 | (define-public python-olefile |
3825 | (package | |
3826 | (name "python-olefile") | |
3827 | (version "0.44") | |
3828 | (source | |
3829 | (origin | |
3830 | (method url-fetch) | |
3831 | (uri (string-append "https://github.com/decalage2/olefile/archive/v" | |
3832 | version ".tar.gz")) | |
3833 | (file-name (string-append name "-" version ".tar.gz")) | |
3834 | (sha256 | |
3835 | (base32 | |
3836 | "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj")))) | |
3837 | (build-system python-build-system) | |
3838 | (home-page | |
3839 | "https://www.decalage.info/python/olefileio") | |
3840 | (synopsis "Read and write Microsoft OLE2 files.") | |
3841 | (description | |
3842 | "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured | |
3843 | Storage or Compound Document, Microsoft Office). It is an improved version of | |
3844 | the OleFileIO module from PIL, the Python Image Library.") | |
3845 | (license license:bsd-3))) | |
3846 | ||
3847 | (define-public python2-olefile | |
3848 | (package-with-python2 python-olefile)) | |
3849 | ||
c937562e EB |
3850 | (define-public python-pillow |
3851 | (package | |
3852 | (name "python-pillow") | |
9e3a8ed0 | 3853 | (version "4.3.0") |
c937562e EB |
3854 | (source |
3855 | (origin | |
3856 | (method url-fetch) | |
f1d9231d | 3857 | (uri (pypi-uri "Pillow" version)) |
c937562e EB |
3858 | (sha256 |
3859 | (base32 | |
15b60fc3 KK |
3860 | "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59")) |
3861 | (patch-flags '("-p1" "--binary")) | |
3862 | (patches (search-patches "python-pillow-fix-failing-tests.patch")))) | |
c937562e EB |
3863 | (build-system python-build-system) |
3864 | (native-inputs | |
f3b98f4f | 3865 | `(("python-nose" ,python-nose))) |
c937562e | 3866 | (inputs |
5ff408d9 SB |
3867 | `(("freetype" ,freetype) |
3868 | ("lcms" ,lcms) | |
c937562e EB |
3869 | ("zlib" ,zlib) |
3870 | ("libjpeg" ,libjpeg) | |
3871 | ("openjpeg" ,openjpeg) | |
5ff408d9 SB |
3872 | ("libtiff" ,libtiff) |
3873 | ("libwebp" ,libwebp))) | |
9e3a8ed0 KK |
3874 | (propagated-inputs |
3875 | `(("python-olefile" ,python-olefile))) | |
c937562e | 3876 | (arguments |
e5358a6b | 3877 | `(#:phases (modify-phases %standard-phases |
e5358a6b LC |
3878 | (add-after |
3879 | 'install 'check-installed | |
6151120a | 3880 | (lambda* (#:key outputs inputs #:allow-other-keys) |
e5358a6b LC |
3881 | (begin |
3882 | (setenv "HOME" (getcwd)) | |
6151120a HG |
3883 | ;; Make installed package available for running the |
3884 | ;; tests | |
3885 | (add-installed-pythonpath inputs outputs) | |
e5358a6b LC |
3886 | (and (zero? (system* "python" "selftest.py" |
3887 | "--installed")) | |
3888 | (zero? (system* "python" "test-installed.py")))))) | |
3889 | (delete 'check)))) | |
c937562e EB |
3890 | (home-page "https://pypi.python.org/pypi/Pillow") |
3891 | (synopsis "Fork of the Python Imaging Library") | |
3892 | (description | |
3893 | "The Python Imaging Library adds image processing capabilities to your | |
3894 | Python interpreter. This library provides extensive file format support, an | |
3895 | efficient internal representation, and fairly powerful image processing | |
3896 | capabilities. The core image library is designed for fast access to data | |
3897 | stored in a few basic pixel formats. It should provide a solid foundation for | |
3898 | a general image processing tool.") | |
3f641af0 | 3899 | (license (license:x11-style |
c937562e EB |
3900 | "http://www.pythonware.com/products/pil/license.htm" |
3901 | "The PIL Software License")))) | |
3902 | ||
3903 | (define-public python2-pillow | |
3904 | (package-with-python2 python-pillow)) | |
bb986599 | 3905 | |
a415f036 FB |
3906 | (define-public python-pycparser |
3907 | (package | |
3908 | (name "python-pycparser") | |
5043b20d | 3909 | (version "2.17") |
a415f036 FB |
3910 | (source |
3911 | (origin | |
3912 | (method url-fetch) | |
38eb6919 | 3913 | (uri (pypi-uri "pycparser" version)) |
a415f036 FB |
3914 | (sha256 |
3915 | (base32 | |
5043b20d | 3916 | "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a")))) |
a415f036 FB |
3917 | (outputs '("out" "doc")) |
3918 | (build-system python-build-system) | |
3919 | (native-inputs | |
f3b98f4f | 3920 | `(("pkg-config" ,pkg-config))) |
a415f036 | 3921 | (arguments |
89b5c60e | 3922 | `(#:phases |
819939cb TGR |
3923 | (modify-phases %standard-phases |
3924 | (replace 'check | |
3925 | (lambda _ | |
3926 | (with-directory-excursion "tests" | |
3927 | (zero? (system* "python" "all_tests.py"))))) | |
3928 | (add-after 'install 'install-doc | |
3929 | (lambda* (#:key outputs #:allow-other-keys) | |
3930 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
3931 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
3932 | (examples (string-append doc "/examples"))) | |
3933 | (mkdir-p examples) | |
3934 | (for-each (lambda (file) | |
3935 | (copy-file (string-append "." file) | |
3936 | (string-append doc file))) | |
3937 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
3938 | (copy-recursively "examples" examples))))))) | |
a415f036 FB |
3939 | (home-page "https://github.com/eliben/pycparser") |
3940 | (synopsis "C parser in Python") | |
3941 | (description | |
3942 | "Pycparser is a complete parser of the C language, written in pure Python | |
3943 | using the PLY parsing library. It parses C code into an AST and can serve as | |
3944 | a front-end for C compilers or analysis tools.") | |
3f641af0 | 3945 | (license license:bsd-3))) |
a415f036 FB |
3946 | |
3947 | (define-public python2-pycparser | |
3948 | (package-with-python2 python-pycparser)) | |
57c3f716 | 3949 | |
6fa14469 FB |
3950 | (define-public python-xcffib |
3951 | (package | |
3952 | (name "python-xcffib") | |
8347c122 | 3953 | (version "0.5.1") |
6fa14469 FB |
3954 | (source |
3955 | (origin | |
3956 | (method url-fetch) | |
8347c122 | 3957 | (uri (pypi-uri "xcffib" version)) |
6fa14469 FB |
3958 | (sha256 |
3959 | (base32 | |
8347c122 | 3960 | "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60")))) |
6fa14469 FB |
3961 | (build-system python-build-system) |
3962 | (inputs | |
482d9591 | 3963 | `(("libxcb" ,libxcb))) |
6fa14469 | 3964 | (propagated-inputs |
482d9591 HG |
3965 | `(("python-cffi" ,python-cffi) ; used at run time |
3966 | ("python-six" ,python-six))) | |
6fa14469 | 3967 | (arguments |
e46bf223 | 3968 | `(;; FIXME: Tests need more work. See ".travis.yml" in the repository. |
e2816ac7 MB |
3969 | #:tests? #f |
3970 | #:phases | |
c8cd850c | 3971 | (modify-phases %standard-phases |
e46bf223 JMSG |
3972 | (add-after 'unpack 'fix-libxcb-path |
3973 | (lambda* (#:key inputs #:allow-other-keys) | |
3974 | (let ((libxcb (assoc-ref inputs "libxcb"))) | |
3975 | (substitute* '("xcffib/__init__.py") | |
3976 | (("^soname = \"") (string-append "soname = \"" libxcb "/lib/"))) | |
3977 | #t))) | |
c8cd850c MB |
3978 | (add-after 'install 'install-doc |
3979 | (lambda* (#:key outputs #:allow-other-keys) | |
3980 | (let ((doc (string-append (assoc-ref outputs "out") "/share" | |
3981 | "/doc/" ,name "-" ,version))) | |
3982 | (mkdir-p doc) | |
3983 | (copy-file "README.md" | |
3984 | (string-append doc "/README.md")) | |
3985 | #t)))))) | |
6fa14469 FB |
3986 | (home-page "https://github.com/tych0/xcffib") |
3987 | (synopsis "XCB Python bindings") | |
3988 | (description | |
3989 | "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds | |
3990 | support for Python 3 and PyPy. It is based on cffi.") | |
bd3fa666 | 3991 | (license license:expat))) |
6fa14469 FB |
3992 | |
3993 | (define-public python2-xcffib | |
3994 | (package-with-python2 python-xcffib)) | |
3995 | ||
9e099723 FB |
3996 | (define-public python-cairocffi |
3997 | (package | |
3998 | (name "python-cairocffi") | |
80f78e8f | 3999 | (version "0.8.0") |
9e099723 FB |
4000 | (source |
4001 | (origin | |
4002 | (method url-fetch) | |
4003 | ;; The archive on pypi is missing the 'utils' directory! | |
3015d455 | 4004 | (uri (string-append "https://github.com/Kozea/cairocffi/archive/v" |
9e099723 | 4005 | version ".tar.gz")) |
f586c877 | 4006 | (file-name (string-append name "-" version ".tar.gz")) |
9e099723 FB |
4007 | (sha256 |
4008 | (base32 | |
80f78e8f | 4009 | "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9")))) |
9e099723 FB |
4010 | (build-system python-build-system) |
4011 | (outputs '("out" "doc")) | |
4012 | (inputs | |
4013 | `(("gdk-pixbuf" ,gdk-pixbuf) | |
4014 | ("cairo" ,cairo))) | |
4015 | (native-inputs | |
4016 | `(("pkg-config" ,pkg-config) | |
4017 | ("python-sphinx" ,python-sphinx) | |
f3b98f4f | 4018 | ("python-docutils" ,python-docutils))) |
9e099723 FB |
4019 | (propagated-inputs |
4020 | `(("python-xcffib" ,python-xcffib))) ; used at run time | |
4021 | (arguments | |
a792e1aa MB |
4022 | `(;; FIXME: Tests cannot find 'libcairo.so.2'. |
4023 | #:tests? #f | |
4024 | #:phases | |
6734c7ba MB |
4025 | (modify-phases %standard-phases |
4026 | (add-after 'install 'install-doc | |
4027 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4028 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4029 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
4030 | (html (string-append doc "/html"))) | |
4031 | (setenv "LD_LIBRARY_PATH" | |
4032 | (string-append (assoc-ref inputs "cairo") "/lib" ":" | |
4033 | (assoc-ref inputs "gdk-pixbuf") "/lib")) | |
4034 | (setenv "LANG" "en_US.UTF-8") | |
4035 | (mkdir-p html) | |
4036 | (for-each (lambda (file) | |
4037 | (copy-file (string-append "." file) | |
4038 | (string-append doc file))) | |
4039 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
4040 | (system* "python" "setup.py" "build_sphinx") | |
4041 | (copy-recursively "docs/_build/html" html) | |
4042 | #t)))))) | |
3015d455 | 4043 | (home-page "https://github.com/Kozea/cairocffi") |
9e099723 FB |
4044 | (synopsis "Python bindings and object-oriented API for Cairo") |
4045 | (description | |
4046 | "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of | |
4047 | Python bindings and object-oriented API for cairo. Cairo is a 2D vector | |
4048 | graphics library with support for multiple backends including image buffers, | |
4049 | PNG, PostScript, PDF, and SVG file output.") | |
3f641af0 | 4050 | (license license:bsd-3))) |
9e099723 FB |
4051 | |
4052 | (define-public python2-cairocffi | |
4053 | (package-with-python2 python-cairocffi)) | |
4054 | ||
3cff95cb RW |
4055 | (define-public python-decorator |
4056 | (package | |
4057 | (name "python-decorator") | |
e55c46b8 | 4058 | (version "4.1.2") |
3cff95cb RW |
4059 | (source |
4060 | (origin | |
4061 | (method url-fetch) | |
e21338be | 4062 | (uri (pypi-uri "decorator" version)) |
3cff95cb | 4063 | (sha256 |
e55c46b8 | 4064 | (base32 "1d8npb11kxyi36mrvjdpcjij76l5zfyrz2f820brf0l0rcw4vdkw")))) |
3cff95cb RW |
4065 | (build-system python-build-system) |
4066 | (arguments '(#:tests? #f)) ; no test target | |
eb6e2e81 | 4067 | (home-page "https://pypi.python.org/pypi/decorator/") |
3cff95cb RW |
4068 | (synopsis "Python module to simplify usage of decorators") |
4069 | (description | |
4070 | "The aim of the decorator module is to simplify the usage of decorators | |
4071 | for the average programmer, and to popularize decorators usage giving examples | |
4072 | of useful decorators, such as memoize, tracing, redirecting_stdout, locked, | |
4073 | etc. The core of this module is a decorator factory.") | |
4074 | (license license:expat))) | |
4075 | ||
4076 | (define-public python2-decorator | |
4077 | (package-with-python2 python-decorator)) | |
4078 | ||
2c0499ad RW |
4079 | (define-public python-drmaa |
4080 | (package | |
4081 | (name "python-drmaa") | |
7c427932 | 4082 | (version "0.7.7") |
2c0499ad RW |
4083 | (source |
4084 | (origin | |
4085 | (method url-fetch) | |
d92621cf | 4086 | (uri (pypi-uri "drmaa" version)) |
2c0499ad | 4087 | (sha256 |
7c427932 | 4088 | (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx")))) |
2c0499ad RW |
4089 | (build-system python-build-system) |
4090 | ;; The test suite requires libdrmaa which is provided by the cluster | |
4091 | ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH | |
4092 | ;; should be set to the path of the libdrmaa library. | |
4093 | (arguments '(#:tests? #f)) | |
4094 | (native-inputs | |
f3b98f4f | 4095 | `(("python-nose" ,python-nose))) |
2c0499ad RW |
4096 | (home-page "https://pypi.python.org/pypi/drmaa") |
4097 | (synopsis "Python bindings for the DRMAA library") | |
4098 | (description | |
4099 | "A Python package for Distributed Resource Management (DRM) job | |
4100 | submission and control. This package is an implementation of the DRMAA 1.0 | |
4101 | Python language binding specification.") | |
3f641af0 | 4102 | (license license:bsd-3))) |
2c0499ad RW |
4103 | |
4104 | (define-public python2-drmaa | |
4105 | (package-with-python2 python-drmaa)) | |
4106 | ||
a70b03d4 TD |
4107 | (define-public python-grako |
4108 | (package | |
4109 | (name "python-grako") | |
4110 | (version "3.99.9") | |
4111 | (source | |
4112 | (origin | |
4113 | (method url-fetch) | |
4114 | (uri | |
4115 | (pypi-uri "grako" version ".zip")) | |
4116 | (sha256 | |
4117 | (base32 | |
4118 | "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw")))) | |
4119 | (build-system python-build-system) | |
4120 | (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive. | |
4121 | (native-inputs | |
4122 | `(("unzip" ,unzip) | |
928da609 | 4123 | ("python-pytest" ,python-pytest) |
a70b03d4 TD |
4124 | ("python-pytest-runner" ,python-pytest-runner))) |
4125 | (home-page "https://bitbucket.org/neogeny/grako") | |
4126 | (synopsis "EBNF parser generator") | |
4127 | (description | |
4128 | "Grako takes a grammar in a variation of EBNF as input, and outputs a | |
4129 | memoizing PEG/Packrat parser in Python.") | |
4130 | (license license:bsd-3))) | |
4131 | ||
4132 | (define-public python2-grako | |
4133 | (package-with-python2 python-grako)) | |
4134 | ||
d05c6da0 RW |
4135 | (define-public python-gridmap |
4136 | (package | |
4137 | (name "python-gridmap") | |
4138 | (version "0.13.0") | |
4139 | (source | |
4140 | (origin | |
4141 | (method url-fetch) | |
4142 | (uri (string-append | |
4143 | "https://github.com/pygridtools/gridmap/archive/v" | |
4144 | version ".tar.gz")) | |
4145 | (file-name (string-append name "-" version ".tar.gz")) | |
4146 | (sha256 | |
4147 | (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x")))) | |
4148 | (build-system python-build-system) | |
ad348f9f MB |
4149 | (arguments |
4150 | '(#:tests? #f)) ; FIXME: Requires python-cherrypy. | |
f22efa01 | 4151 | (propagated-inputs |
d05c6da0 RW |
4152 | `(("python-psutil" ,python-psutil) |
4153 | ("python-drmaa" ,python-drmaa) | |
4154 | ("python-pyzmq" ,python-pyzmq))) | |
d05c6da0 RW |
4155 | (home-page "https://github.com/pygridtools/gridmap") |
4156 | (synopsis "Create jobs on a cluster directly from Python") | |
4157 | (description | |
4158 | "Gridmap is a Python package to allow you to easily create jobs on the | |
4159 | cluster directly from Python. You can directly map Python functions onto the | |
4160 | cluster without needing to write any wrapper code yourself.") | |
3f641af0 | 4161 | (license license:gpl3+))) |
d05c6da0 RW |
4162 | |
4163 | (define-public python2-gridmap | |
4164 | (package-with-python2 python-gridmap)) | |
4165 | ||
84342e2f SR |
4166 | (define-public python-honcho |
4167 | (package | |
4168 | (name "python-honcho") | |
4169 | (version "1.0.1") | |
4170 | (source | |
4171 | (origin | |
4172 | (method url-fetch) | |
4173 | (uri (string-append | |
4174 | "https://github.com/nickstenning/honcho/archive/v" | |
4175 | version ".tar.gz")) | |
4176 | (file-name (string-append name "-" version ".tar.gz")) | |
4177 | (sha256 | |
4178 | (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j")))) | |
4179 | (build-system python-build-system) | |
4180 | (native-inputs | |
928da609 | 4181 | `(("python-pytest" ,python-pytest) |
84342e2f SR |
4182 | ("python-mock" ,python-mock) |
4183 | ("python-tox" ,python-tox) | |
4184 | ("which" ,which))) ;for tests | |
4185 | (propagated-inputs | |
4186 | `(("python-jinja2" ,python-jinja2))) | |
4187 | (arguments | |
4188 | `(#:phases | |
4189 | (modify-phases %standard-phases | |
4190 | (delete 'check) | |
4191 | (add-after 'install 'check | |
4192 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
4193 | ;; fix honcho path in testsuite | |
4194 | (substitute* "tests/conftest.py" | |
4195 | (("'honcho'") (string-append "'" (assoc-ref outputs "out") | |
4196 | "/bin/honcho" "'"))) | |
4197 | ;; It's easier to run tests after install. | |
4198 | ;; Make installed package available for running the tests | |
4199 | (add-installed-pythonpath inputs outputs) | |
4200 | (zero? (system* "py.test" "-v"))))))) | |
4201 | (home-page "https://github.com/nickstenning/honcho") | |
4202 | (synopsis "Manage Procfile-based applications") | |
4203 | (description | |
4204 | "A Procfile is a file which describes how to run an application | |
4205 | consisting of serveral processes. honcho starts all listed processes. | |
4206 | The output of all running processes is collected by honcho and | |
4207 | displayed.") | |
4208 | (license license:expat))) | |
4209 | ||
4210 | (define-public python2-honcho | |
4211 | (package-with-python2 python-honcho)) | |
4212 | ||
cb6d5c54 RW |
4213 | (define-public python-pexpect |
4214 | (package | |
4215 | (name "python-pexpect") | |
ed118043 | 4216 | (version "4.2.1") |
cb6d5c54 RW |
4217 | (source |
4218 | (origin | |
4219 | (method url-fetch) | |
ed118043 | 4220 | (uri (pypi-uri "pexpect" version)) |
cb6d5c54 | 4221 | (sha256 |
ed118043 | 4222 | (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx")))) |
cb6d5c54 RW |
4223 | (build-system python-build-system) |
4224 | (arguments | |
4225 | `(#:phases | |
4226 | (modify-phases %standard-phases | |
ed118043 MB |
4227 | (add-before 'check 'prepare-tests |
4228 | (lambda _ | |
4229 | (substitute* (find-files "tests") | |
4230 | (("/bin/ls") (which "ls")) | |
4231 | (("/bin/echo") (which "echo")) | |
4232 | (("/bin/which") (which "which")) | |
4233 | ;; Many tests try to use the /bin directory which | |
4234 | ;; is not present in the build environment. | |
4235 | ;; Use one that's non-empty and unlikely to change. | |
4236 | (("/bin'") "/dev'")) | |
4237 | ;; XXX: Socket connection test gets "Connection reset by peer". | |
4238 | ;; Why does it not work? Delete for now. | |
4239 | (delete-file "tests/test_socket.py") | |
4240 | #t)) | |
3ee9355e | 4241 | (replace 'check (lambda _ (zero? (system* "nosetests" "-v"))))))) |
cb6d5c54 | 4242 | (native-inputs |
ed118043 | 4243 | `(("python-nose" ,python-nose) |
928da609 | 4244 | ("python-pytest" ,python-pytest) |
ed118043 | 4245 | ("man-db" ,man-db) |
dc4f697f LC |
4246 | ("which" ,which) |
4247 | ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py' | |
ed118043 MB |
4248 | (propagated-inputs |
4249 | `(("python-ptyprocess" ,python-ptyprocess))) | |
cb6d5c54 RW |
4250 | (home-page "http://pexpect.readthedocs.org/") |
4251 | (synopsis "Controlling interactive console applications") | |
4252 | (description | |
4253 | "Pexpect is a pure Python module for spawning child applications; | |
4254 | controlling them; and responding to expected patterns in their output. | |
4255 | Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a | |
4256 | child application and control it as if a human were typing commands.") | |
3f641af0 | 4257 | (license license:isc))) |
cb6d5c54 RW |
4258 | |
4259 | (define-public python2-pexpect | |
4260 | (package-with-python2 python-pexpect)) | |
4261 | ||
229ad120 RW |
4262 | (define-public python-setuptools-scm |
4263 | (package | |
4264 | (name "python-setuptools-scm") | |
cf659519 | 4265 | (version "1.15.6") |
229ad120 RW |
4266 | (source (origin |
4267 | (method url-fetch) | |
383af6b0 | 4268 | (uri (pypi-uri "setuptools_scm" version)) |
229ad120 RW |
4269 | (sha256 |
4270 | (base32 | |
cf659519 | 4271 | "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9")))) |
229ad120 RW |
4272 | (build-system python-build-system) |
4273 | (home-page "https://github.com/pypa/setuptools_scm/") | |
4274 | (synopsis "Manage Python package versions in SCM metadata") | |
4275 | (description | |
383af6b0 | 4276 | "Setuptools_scm handles managing your Python package versions in |
229ad120 RW |
4277 | @dfn{software configuration management} (SCM) metadata instead of declaring |
4278 | them as the version argument or in a SCM managed file.") | |
4279 | (license license:expat))) | |
4280 | ||
4281 | (define-public python2-setuptools-scm | |
4282 | (package-with-python2 python-setuptools-scm)) | |
4283 | ||
b74270ee RW |
4284 | (define-public python-pathpy |
4285 | (package | |
4286 | (name "python-pathpy") | |
b8509387 | 4287 | (version "11.0") |
b74270ee RW |
4288 | (source |
4289 | (origin | |
4290 | (method url-fetch) | |
b8509387 | 4291 | (uri (pypi-uri "path.py" version)) |
b74270ee | 4292 | (sha256 |
b8509387 MB |
4293 | (base32 "12s84maimiz61980q065rjgi8ang6xw2wwm64m0lmfks51dlw4qn")))) |
4294 | ;; (outputs '("out" "doc")) | |
b74270ee RW |
4295 | (build-system python-build-system) |
4296 | (propagated-inputs | |
4297 | `(("python-appdirs" ,python-appdirs))) | |
4298 | (native-inputs | |
f3b98f4f | 4299 | `(("python-setuptools-scm" ,python-setuptools-scm) |
2887700e HG |
4300 | ("python-sphinx" ,python-sphinx) |
4301 | ("python-rst.linker" ,python-rst.linker) | |
b74270ee RW |
4302 | ("python-pytest" ,python-pytest) |
4303 | ("python-pytest-runner" ,python-pytest-runner))) | |
2887700e | 4304 | (arguments |
b8509387 MB |
4305 | ;; FIXME: Documentation and tests require "jaraco.packaging". |
4306 | `(#:tests? #f)) | |
4307 | ;; #:phases | |
4308 | ;; (modify-phases %standard-phases | |
4309 | ;; (add-after 'build 'build-doc | |
4310 | ;; (lambda _ | |
4311 | ;; (setenv "LANG" "en_US.UTF-8") | |
4312 | ;; (zero? (system* "python" "setup.py" "build_sphinx")))) | |
4313 | ;; (add-after 'install 'install-doc | |
4314 | ;; (lambda* (#:key outputs #:allow-other-keys) | |
4315 | ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4316 | ;; (doc (string-append data "/doc/" ,name "-" ,version)) | |
4317 | ;; (html (string-append doc "/html"))) | |
4318 | ;; (mkdir-p html) | |
4319 | ;; (for-each (lambda (file) | |
4320 | ;; (copy-file file (string-append doc "/" file))) | |
4321 | ;; '("README.rst" "CHANGES.rst")) | |
4322 | ;; (copy-recursively "build/sphinx/html" html))))))) | |
7bf837fd | 4323 | (home-page "https://github.com/jaraco/path.py") |
b74270ee RW |
4324 | (synopsis "Python module wrapper for built-in os.path") |
4325 | (description | |
4326 | "@code{path.py} implements path objects as first-class entities, allowing | |
4327 | common operations on files to be invoked on those path objects directly.") | |
4328 | (license license:expat))) | |
4329 | ||
4330 | (define-public python2-pathpy | |
4331 | (package-with-python2 python-pathpy)) | |
4332 | ||
cd6e5189 RW |
4333 | (define-public python-simplegeneric |
4334 | (package | |
4335 | (name "python-simplegeneric") | |
4336 | (version "0.8.1") | |
4337 | (source | |
4338 | (origin | |
4339 | (method url-fetch) | |
4340 | (uri (string-append "https://pypi.python.org/packages/source/s/" | |
4341 | "simplegeneric/simplegeneric-" version ".zip")) | |
4342 | (sha256 | |
4343 | (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw")))) | |
4344 | (build-system python-build-system) | |
4345 | (native-inputs | |
f3b98f4f | 4346 | `(("unzip" ,unzip))) |
cd6e5189 RW |
4347 | (home-page "http://cheeseshop.python.org/pypi/simplegeneric") |
4348 | (synopsis "Python module for simple generic functions") | |
4349 | (description | |
4350 | "The simplegeneric module lets you define simple single-dispatch generic | |
4351 | functions, akin to Python’s built-in generic functions like @code{len()}, | |
4352 | @code{iter()} and so on. However, instead of using specially-named methods, | |
4353 | these generic functions use simple lookup tables, akin to those used by | |
4354 | e.g. @code{pickle.dump()} and other generic functions found in the Python | |
4355 | standard library.") | |
3f641af0 | 4356 | (license license:zpl2.1))) |
cd6e5189 RW |
4357 | |
4358 | (define-public python2-simplegeneric | |
4359 | (package-with-python2 python-simplegeneric)) | |
4360 | ||
ddc7d8ed | 4361 | (define-public python-ipython-genutils |
c4abbac3 | 4362 | ;; TODO: This package is retired, check if can be removed, see description. |
ddc7d8ed RW |
4363 | (package |
4364 | (name "python-ipython-genutils") | |
4365 | (version "0.1.0") | |
4366 | (source | |
4367 | (origin | |
4368 | (method url-fetch) | |
4369 | (uri (string-append "https://pypi.python.org/packages/source/i/" | |
4370 | "ipython_genutils/ipython_genutils-" | |
4371 | version ".tar.gz")) | |
4372 | (sha256 | |
4373 | (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is")))) | |
4374 | (build-system python-build-system) | |
4375 | (arguments `(#:tests? #f)) ; no tests | |
3ca1545b | 4376 | (home-page "https://ipython.org") |
ddc7d8ed RW |
4377 | (synopsis "Vestigial utilities from IPython") |
4378 | (description | |
c4abbac3 HG |
4379 | "This package provides retired utilities from IPython. No packages |
4380 | outside IPython/Jupyter should depend on it. | |
4381 | ||
4382 | This package shouldn't exist. It contains some common utilities shared by | |
4383 | Jupyter and IPython projects during The Big Split. As soon as possible, those | |
4384 | packages will remove their dependency on this, and this package will go | |
4385 | away.") | |
3f641af0 | 4386 | (license license:bsd-3))) |
ddc7d8ed RW |
4387 | |
4388 | (define-public python2-ipython-genutils | |
4389 | (package-with-python2 python-ipython-genutils)) | |
4390 | ||
2b10eb48 RW |
4391 | (define-public python-traitlets |
4392 | (package | |
4393 | (name "python-traitlets") | |
a5ba1481 | 4394 | (version "4.2.0") |
2b10eb48 RW |
4395 | (source |
4396 | (origin | |
4397 | (method url-fetch) | |
cc0c4fde | 4398 | (uri (pypi-uri "traitlets" version)) |
2b10eb48 RW |
4399 | (sha256 |
4400 | (base32 | |
a5ba1481 | 4401 | "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4")))) |
2b10eb48 RW |
4402 | (build-system python-build-system) |
4403 | (arguments | |
4404 | `(#:phases | |
4405 | (modify-phases %standard-phases | |
4406 | (replace 'check (lambda _ (zero? (system* "nosetests"))))))) | |
4407 | (propagated-inputs | |
4408 | `(("python-ipython-genutils" ,python-ipython-genutils) | |
4409 | ("python-decorator" ,python-decorator))) | |
4410 | (native-inputs | |
cc0c4fde EF |
4411 | `(("python-mock" ,python-mock) |
4412 | ("python-nose" ,python-nose))) | |
3ca1545b | 4413 | (home-page "https://ipython.org") |
2b10eb48 RW |
4414 | (synopsis "Configuration system for Python applications") |
4415 | (description | |
4416 | "Traitlets is a framework that lets Python classes have attributes with | |
4417 | type checking, dynamically calculated default values, and ‘on change’ | |
4418 | callbacks. The package also includes a mechanism to use traitlets for | |
4419 | configuration, loading values from files or from command line arguments. This | |
4420 | is a distinct layer on top of traitlets, so you can use traitlets in your code | |
4421 | without using the configuration machinery.") | |
3f641af0 | 4422 | (license license:bsd-3))) |
2b10eb48 RW |
4423 | |
4424 | (define-public python2-traitlets | |
4425 | (package-with-python2 python-traitlets)) | |
4426 | ||
4263b06f RW |
4427 | (define-public python-jupyter-core |
4428 | (package | |
4429 | (name "python-jupyter-core") | |
45cc957c | 4430 | (version "4.2.1") |
4263b06f RW |
4431 | (source |
4432 | (origin | |
4433 | (method url-fetch) | |
4434 | (uri (string-append (pypi-uri "jupyter_core" version))) | |
4435 | (sha256 | |
4436 | (base32 | |
45cc957c | 4437 | "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9")))) |
4263b06f RW |
4438 | (build-system python-build-system) |
4439 | ;; FIXME: not sure how to run the tests | |
4440 | (arguments `(#:tests? #f)) | |
4441 | (propagated-inputs | |
4442 | `(("python-traitlets" ,python-traitlets))) | |
4443 | (home-page "http://jupyter.org/") | |
4444 | (synopsis "Jupyter base package") | |
4445 | (description | |
4446 | "Jupyter core is the base package on which Jupyter projects rely.") | |
4447 | (license license:bsd-3))) | |
4448 | ||
4449 | (define-public python2-jupyter-core | |
4450 | (package-with-python2 python-jupyter-core)) | |
4451 | ||
9ff01f2d RW |
4452 | (define-public python-jupyter-client |
4453 | (package | |
4454 | (name "python-jupyter-client") | |
4455 | (version "4.4.0") | |
4456 | (source | |
4457 | (origin | |
4458 | (method url-fetch) | |
4459 | (uri (pypi-uri "jupyter_client" version)) | |
4460 | (sha256 | |
4461 | (base32 | |
4462 | "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9")))) | |
4463 | (build-system python-build-system) | |
4464 | ;; Tests fail because of missing native python kernel which I assume is | |
4465 | ;; provided by the ipython package, which we cannot use because it would | |
4466 | ;; cause a dependency cycle. | |
4467 | (arguments `(#:tests? #f)) | |
4468 | (propagated-inputs | |
4469 | `(("python-pyzmq" ,python-pyzmq) | |
4470 | ("python-traitlets" ,python-traitlets) | |
4471 | ("python-jupyter-core" ,python-jupyter-core))) | |
4472 | (home-page "http://jupyter.org/") | |
4473 | (synopsis "Jupyter protocol implementation and client libraries") | |
4474 | (description | |
4475 | "The @code{jupyter_client} package contains the reference implementation | |
4476 | of the Jupyter protocol. It also provides client and kernel management APIs | |
4477 | for working with kernels, and the @code{jupyter kernelspec} entrypoint for | |
4478 | installing @code{kernelspec}s for use with Jupyter frontends.") | |
4479 | (license license:bsd-3))) | |
4480 | ||
4481 | (define-public python2-jupyter-client | |
4482 | (package-with-python2 python-jupyter-client)) | |
4483 | ||
ab526102 RW |
4484 | (define-public python-ipykernel |
4485 | (package | |
4486 | (name "python-ipykernel") | |
f165648e | 4487 | (version "4.5.2") |
ab526102 RW |
4488 | (source |
4489 | (origin | |
4490 | (method url-fetch) | |
4491 | (uri (pypi-uri "ipykernel" version)) | |
4492 | (sha256 | |
f165648e | 4493 | (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s")))) |
ab526102 RW |
4494 | (build-system python-build-system) |
4495 | ;; The tests load a submodule of IPython. However, IPython itself depends | |
4496 | ;; on ipykernel. | |
4497 | (arguments `(#:tests? #f)) | |
4498 | (propagated-inputs | |
4499 | ;; imported at runtime during connect | |
4500 | `(("python-jupyter-client" ,python-jupyter-client))) | |
3ca1545b | 4501 | (home-page "https://ipython.org") |
ab526102 RW |
4502 | (synopsis "IPython Kernel for Jupyter") |
4503 | (description | |
4504 | "This package provides the IPython kernel for Jupyter.") | |
4505 | (license license:bsd-3))) | |
4506 | ||
4507 | (define-public python2-ipykernel | |
4508 | (package-with-python2 python-ipykernel)) | |
4509 | ||
ae1ab9fe FB |
4510 | (define-public python-ipython |
4511 | (package | |
4512 | (name "python-ipython") | |
f160557b | 4513 | (version "5.5.0") |
ae1ab9fe FB |
4514 | (source |
4515 | (origin | |
fceac880 | 4516 | (method url-fetch) |
accd5f99 | 4517 | (uri (pypi-uri "ipython" version ".tar.gz")) |
fceac880 | 4518 | (sha256 |
f160557b | 4519 | (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6")))) |
ae1ab9fe FB |
4520 | (build-system python-build-system) |
4521 | (outputs '("out" "doc")) | |
3a0b1b9a FB |
4522 | (propagated-inputs |
4523 | `(("python-pyzmq" ,python-pyzmq) | |
fb25d348 | 4524 | ("python-prompt-toolkit" ,python-prompt-toolkit) |
accd5f99 | 4525 | ("python-terminado" ,python-terminado) |
ae1ab9fe | 4526 | ("python-matplotlib" ,python-matplotlib) |
5d26e542 | 4527 | ("python-numpy" ,python-numpy) |
ae1ab9fe | 4528 | ("python-numpydoc" ,python-numpydoc) |
3a0b1b9a | 4529 | ("python-jinja2" ,python-jinja2) |
ee8aab1f CB |
4530 | ("python-jupyter-console" |
4531 | ;; The python-ipython and python-jupyter-console require each | |
4532 | ;; other. To get the functionality in both packages working, strip | |
4533 | ;; down the python-jupyter-console package when using it as an input | |
4534 | ;; to python-ipython. | |
4535 | ,python-jupyter-console-minimal) | |
3a0b1b9a | 4536 | ("python-mistune" ,python-mistune) |
accd5f99 RW |
4537 | ("python-pexpect" ,python-pexpect) |
4538 | ("python-pickleshare" ,python-pickleshare) | |
4539 | ("python-simplegeneric" ,python-simplegeneric) | |
3a0b1b9a | 4540 | ("python-jsonschema" ,python-jsonschema) |
accd5f99 RW |
4541 | ("python-traitlets" ,python-traitlets) |
4542 | ("python-ipykernel" ,python-ipykernel) | |
fb25d348 | 4543 | ("python-nbformat" ,python-nbformat) |
accd5f99 RW |
4544 | ("python-pygments" ,python-pygments))) |
4545 | (inputs | |
4546 | `(("readline" ,readline) | |
4547 | ("which" ,which))) | |
ae1ab9fe | 4548 | (native-inputs |
fb25d348 TD |
4549 | `(("graphviz" ,graphviz) |
4550 | ("pkg-config" ,pkg-config) | |
accd5f99 RW |
4551 | ("python-requests" ,python-requests) ;; for tests |
4552 | ("python-testpath" ,python-testpath) | |
4553 | ("python-nose" ,python-nose) | |
ae1ab9fe | 4554 | ("python-sphinx" ,python-sphinx) |
fb25d348 | 4555 | ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme) |
2584beae RW |
4556 | ;; FIXME: It's possible that a smaller union would work just as well. |
4557 | ("texlive" ,(texlive-union (list texlive-fonts-amsfonts | |
4558 | texlive-fonts-ec | |
4559 | texlive-generic-ifxetex | |
4560 | texlive-generic-pdftex | |
4561 | texlive-latex-amsfonts | |
4562 | texlive-latex-capt-of | |
4563 | texlive-latex-cmap | |
4564 | texlive-latex-environ | |
4565 | texlive-latex-eqparbox | |
4566 | texlive-latex-etoolbox | |
4567 | texlive-latex-expdlist | |
4568 | texlive-latex-fancyhdr | |
4569 | texlive-latex-fancyvrb | |
4570 | texlive-latex-fncychap | |
4571 | texlive-latex-float | |
4572 | texlive-latex-framed | |
4573 | texlive-latex-geometry | |
4574 | texlive-latex-graphics | |
4575 | texlive-latex-hyperref | |
4576 | texlive-latex-mdwtools | |
4577 | texlive-latex-multirow | |
4578 | texlive-latex-oberdiek | |
4579 | texlive-latex-parskip | |
4580 | texlive-latex-preview | |
4581 | texlive-latex-tabulary | |
4582 | texlive-latex-threeparttable | |
4583 | texlive-latex-titlesec | |
4584 | texlive-latex-trimspaces | |
4585 | texlive-latex-ucs | |
4586 | texlive-latex-upquote | |
4587 | texlive-latex-url | |
4588 | texlive-latex-varwidth | |
4589 | texlive-latex-wrapfig))) | |
f3b98f4f | 4590 | ("texinfo" ,texinfo))) |
ae1ab9fe | 4591 | (arguments |
89b5c60e | 4592 | `(#:phases |
3a0b1b9a FB |
4593 | (modify-phases %standard-phases |
4594 | (add-after | |
4595 | 'install 'install-doc | |
4596 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4597 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4598 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
4599 | (html (string-append doc "/html")) | |
4600 | (man1 (string-append data "/man/man1")) | |
4601 | (info (string-append data "/info")) | |
fb25d348 TD |
4602 | (examples (string-append doc "/examples")) |
4603 | (python-arg (string-append "PYTHON=" (which "python")))) | |
afd3d931 | 4604 | (setenv "LANG" "en_US.utf8") |
eee5cd04 HG |
4605 | ;; Make installed package available for running the tests |
4606 | (add-installed-pythonpath inputs outputs) | |
3a0b1b9a | 4607 | (with-directory-excursion "docs" |
accd5f99 RW |
4608 | ;; FIXME: pdf fails to build |
4609 | ;;(system* "make" "pdf" "PAPER=a4") | |
fb25d348 TD |
4610 | (system* "make" python-arg "html") |
4611 | (system* "make" python-arg "info")) | |
3a0b1b9a FB |
4612 | (copy-recursively "docs/man" man1) |
4613 | (copy-recursively "examples" examples) | |
accd5f99 | 4614 | (copy-recursively "docs/build/html" html) |
3a0b1b9a FB |
4615 | ;; (copy-file "docs/build/latex/ipython.pdf" |
4616 | ;; (string-append doc "/ipython.pdf")) | |
4617 | (mkdir-p info) | |
4618 | (copy-file "docs/build/texinfo/ipython.info" | |
4619 | (string-append info "/ipython.info")) | |
4620 | (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))))) | |
4621 | ;; Tests can only be run after the library has been installed and not | |
4622 | ;; within the source directory. | |
4623 | (delete 'check) | |
4624 | (add-after | |
4625 | 'install 'check | |
eee5cd04 | 4626 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) |
3a0b1b9a FB |
4627 | (if tests? |
4628 | (with-directory-excursion "/tmp" | |
eee5cd04 HG |
4629 | ;; Make installed package available for running the tests |
4630 | (add-installed-pythonpath inputs outputs) | |
3a0b1b9a FB |
4631 | (setenv "HOME" "/tmp/") ;; required by a test |
4632 | (zero? (system* (string-append (assoc-ref outputs "out") | |
4633 | "/bin/iptest")))) | |
4634 | #t))) | |
4635 | (add-before | |
4636 | 'install 'fix-tests | |
4637 | (lambda* (#:key inputs #:allow-other-keys) | |
4638 | (substitute* "./IPython/utils/_process_posix.py" | |
4639 | (("/usr/bin/env', 'which") (which "which"))) | |
4640 | (substitute* "./IPython/core/tests/test_inputtransformer.py" | |
4641 | (("#!/usr/bin/env python") | |
4642 | (string-append "#!" (which "python")))) | |
4643 | ;; Disable 1 failing test | |
4644 | (substitute* "./IPython/core/tests/test_magic.py" | |
4645 | (("def test_dirops\\(\\):" all) | |
4646 | (string-append "@dec.skipif(True)\n" all)))))))) | |
3ca1545b | 4647 | (home-page "https://ipython.org") |
ae1ab9fe FB |
4648 | (synopsis "IPython is a tool for interactive computing in Python") |
4649 | (description | |
4650 | "IPython provides a rich architecture for interactive computing with: | |
4651 | Powerful interactive shells, a browser-based notebook, support for interactive | |
4652 | data visualization, embeddable interpreters and tools for parallel | |
4653 | computing.") | |
135ba811 EF |
4654 | (license license:bsd-3) |
4655 | (properties `((python2-variant . ,(delay python2-ipython)))))) | |
ae1ab9fe FB |
4656 | |
4657 | (define-public python2-ipython | |
135ba811 | 4658 | (let ((ipython (package-with-python2 (strip-python2-variant python-ipython)))) |
3a0b1b9a FB |
4659 | (package |
4660 | (inherit ipython) | |
3a0b1b9a | 4661 | ;; FIXME: add pyreadline once available. |
fb25d348 TD |
4662 | (propagated-inputs |
4663 | `(("python2-backports-shutil-get-terminal-size" | |
4664 | ,python2-backports-shutil-get-terminal-size) | |
4665 | ("python2-pathlib2" ,python2-pathlib2) | |
4666 | ,@(package-propagated-inputs ipython))) | |
e62600fe | 4667 | (native-inputs |
135ba811 | 4668 | `(("python2-mock" ,python2-mock) |
77a6932a | 4669 | ,@(package-native-inputs ipython)))))) |
03411993 | 4670 | |
e99f4211 MW |
4671 | (define-public python-urwid |
4672 | (package | |
4673 | (name "python-urwid") | |
51ff41f6 | 4674 | (version "1.3.1") |
e99f4211 MW |
4675 | (source |
4676 | (origin | |
4677 | (method url-fetch) | |
b97c1bfd | 4678 | (uri (pypi-uri "urwid" version)) |
e99f4211 MW |
4679 | (sha256 |
4680 | (base32 | |
51ff41f6 | 4681 | "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng")))) |
e99f4211 | 4682 | (build-system python-build-system) |
b97c1bfd LF |
4683 | (arguments |
4684 | `(#:phases | |
4685 | (modify-phases %standard-phases | |
4686 | ;; Disable failing test. Bug filed upstream: | |
4687 | ;; https://github.com/wardi/urwid/issues/164 | |
51ff41f6 | 4688 | ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3. |
b97c1bfd LF |
4689 | (add-after 'unpack 'disable-failing-test |
4690 | (lambda _ | |
4691 | (substitute* "urwid/tests/test_event_loops.py" | |
4692 | (("test_remove_watch_file") | |
4693 | "disable_remove_watch_file"))))))) | |
e99f4211 MW |
4694 | (home-page "http://urwid.org") |
4695 | (synopsis "Console user interface library for Python") | |
4696 | (description | |
4697 | "Urwid is a curses-based UI/widget library for Python. It includes many | |
4698 | features useful for text console applications.") | |
3f641af0 | 4699 | (license license:lgpl2.1+))) |
e99f4211 MW |
4700 | |
4701 | (define-public python2-urwid | |
e9379305 MC |
4702 | (let ((python2-urwid (package-with-python2 python-urwid))) |
4703 | (package | |
4704 | (inherit python2-urwid) | |
4705 | (arguments | |
4706 | (append | |
4fdab173 KK |
4707 | `(;; Explicitly using Python 2 is necessary due the argument list being |
4708 | ;; built from only the 'delete-test_vterm.py' phase and python-urwid's | |
4709 | ;; package arguments, which by default assumes the use of Python 3. | |
4710 | #:python ,python-2 | |
4711 | #:phases | |
e9379305 MC |
4712 | (modify-phases %standard-phases |
4713 | ;; Disable the vterm tests because of non-deterministic failures | |
4714 | ;; with Python 2. See https://github.com/urwid/urwid/issues/230. | |
4715 | (add-after 'unpack 'delete-test_vterm.py | |
4716 | (delete-file "urwid/tests/test_vterm.py")))) | |
4717 | (package-arguments python-urwid)))))) | |
d95a56c6 | 4718 | |
47d0b292 TS |
4719 | (define-public python-urwidtrees |
4720 | (package | |
4721 | (name "python-urwidtrees") | |
37ec4623 | 4722 | (version "1.0.2") |
47d0b292 TS |
4723 | (source |
4724 | (origin | |
4725 | (method url-fetch) | |
37ec4623 TS |
4726 | ;; package author intends on distributing via github rather than pypi: |
4727 | ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331 | |
4728 | (uri (string-append "https://github.com/pazz/urwidtrees/archive/" | |
4729 | version ".tar.gz")) | |
4730 | (file-name (string-append name "-" version ".tar.gz")) | |
47d0b292 TS |
4731 | (sha256 |
4732 | (base32 | |
37ec4623 | 4733 | "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh")))) |
47d0b292 TS |
4734 | (build-system python-build-system) |
4735 | (arguments | |
4736 | '(#:tests? #f)) ; no tests | |
f22efa01 | 4737 | (propagated-inputs `(("python-urwid" ,python-urwid))) |
47d0b292 TS |
4738 | (home-page "https://github.com/pazz/urwidtrees") |
4739 | (synopsis "Tree widgets for urwid") | |
4740 | (description "Urwidtrees is a Widget Container API for the @code{urwid} | |
4741 | toolkit. Use it to build trees of widgets.") | |
3f641af0 | 4742 | (license license:gpl3+))) |
47d0b292 TS |
4743 | |
4744 | (define-public python2-urwidtrees | |
4745 | (package-with-python2 python-urwidtrees)) | |
4746 | ||
d95a56c6 PAR |
4747 | (define-public python-dbus |
4748 | (package | |
4749 | (name "python-dbus") | |
4750 | (version "1.2.0") | |
4751 | (source | |
4752 | (origin | |
4753 | (method url-fetch) | |
4754 | (uri (string-append | |
5cc3096c | 4755 | "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-" |
d95a56c6 PAR |
4756 | version ".tar.gz")) |
4757 | (sha256 | |
4758 | (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71")))) | |
4759 | (build-system gnu-build-system) | |
6717c879 SB |
4760 | (arguments |
4761 | '(#:phases | |
4762 | (modify-phases %standard-phases | |
4763 | (add-before | |
4764 | 'check 'pre-check | |
4765 | (lambda _ | |
4766 | ;; XXX: For the missing '/etc/machine-id'. | |
4767 | (substitute* "test/run-test.sh" | |
4768 | (("DBUS_FATAL_WARNINGS=1") | |
4769 | "DBUS_FATAL_WARNINGS=0")) | |
4770 | #t))))) | |
d95a56c6 PAR |
4771 | (native-inputs |
4772 | `(("pkg-config" ,pkg-config))) | |
4773 | (inputs | |
4774 | `(("python" ,python) | |
2e88d113 | 4775 | ("dbus-glib" ,dbus-glib))) |
d95a56c6 PAR |
4776 | (synopsis "Python bindings for D-bus") |
4777 | (description "python-dbus provides bindings for libdbus, the reference | |
4778 | implementation of D-Bus.") | |
57e7d748 | 4779 | (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/") |
bd3fa666 | 4780 | (license license:expat))) |
b52af02b MW |
4781 | |
4782 | (define-public python2-dbus | |
4783 | (package (inherit python-dbus) | |
4784 | (name "python2-dbus") | |
4785 | (inputs `(("python" ,python-2) | |
4786 | ,@(alist-delete "python" | |
4787 | (package-inputs python-dbus) | |
4788 | equal?))) | |
4789 | ;; FIXME: on Python 2, the test_utf8 fails with: | |
4790 | ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)" | |
4791 | (arguments `(#:tests? #f)))) | |
a6ac8332 | 4792 | |
26b307e2 AE |
4793 | (define-public python-lxml |
4794 | (package | |
4795 | (name "python-lxml") | |
2054b522 | 4796 | (version "3.8.0") |
26b307e2 AE |
4797 | (source |
4798 | (origin | |
4799 | (method url-fetch) | |
97bbc480 | 4800 | (uri (pypi-uri "lxml" version)) |
26b307e2 | 4801 | (sha256 |
d58a3203 | 4802 | (base32 |
2054b522 | 4803 | "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk")))) |
03702173 | 4804 | (build-system python-build-system) |
26b307e2 AE |
4805 | (inputs |
4806 | `(("libxml2" ,libxml2) | |
f3b98f4f | 4807 | ("libxslt" ,libxslt))) |
26b307e2 AE |
4808 | (home-page "http://lxml.de/") |
4809 | (synopsis | |
4810 | "Python XML processing library") | |
4811 | (description | |
4812 | "The lxml XML toolkit is a Pythonic binding for the C libraries | |
4813 | libxml2 and libxslt.") | |
3f641af0 | 4814 | (license license:bsd-3))) ; and a few more, see LICENSES.txt |
03702173 | 4815 | |
26b307e2 AE |
4816 | (define-public python2-lxml |
4817 | (package-with-python2 python-lxml)) | |
03702173 | 4818 | |
b32a1e47 CAW |
4819 | ;; beautifulsoup4 has a totally different namespace than 3.x, |
4820 | ;; and pypi seems to put it under its own name, so I guess we should too | |
4821 | (define-public python-beautifulsoup4 | |
a0e41de4 | 4822 | (package |
b32a1e47 | 4823 | (name "python-beautifulsoup4") |
80e8d851 | 4824 | (version "4.5.3") |
a0e41de4 | 4825 | (source |
4826 | (origin | |
4827 | (method url-fetch) | |
b32a1e47 | 4828 | (uri (pypi-uri "beautifulsoup4" version)) |
a0e41de4 | 4829 | (sha256 |
4830 | (base32 | |
80e8d851 | 4831 | "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j")))) |
a0e41de4 | 4832 | (build-system python-build-system) |
5f37f0b6 LF |
4833 | (arguments |
4834 | `(#:phases | |
4835 | (modify-phases %standard-phases | |
4836 | ;; The Python 2 source is the definitive source of beautifulsoup4. We | |
4837 | ;; must use this conversion script when building with Python 3. The | |
4838 | ;; conversion script also runs the tests. | |
4839 | ;; For more information, see the file 'convert-py3k' in the source | |
4840 | ;; distribution. | |
4841 | (replace 'check | |
4842 | (lambda _ (zero? (system* "./convert-py3k"))))))) | |
b32a1e47 | 4843 | (home-page |
9be5ecdf | 4844 | "https://www.crummy.com/software/BeautifulSoup/bs4/") |
b32a1e47 CAW |
4845 | (synopsis |
4846 | "Python screen-scraping library") | |
a0e41de4 | 4847 | (description |
b32a1e47 CAW |
4848 | "Beautiful Soup is a Python library designed for rapidly setting up |
4849 | screen-scraping projects. It offers Pythonic idioms for navigating, | |
4850 | searching, and modifying a parse tree, providing a toolkit for | |
4851 | dissecting a document and extracting what you need. It automatically | |
4852 | converts incoming documents to Unicode and outgoing documents to UTF-8.") | |
ee94ca11 MB |
4853 | (license license:expat) |
4854 | (properties `((python2-variant . ,(delay python2-beautifulsoup4)))))) | |
a0e41de4 | 4855 | |
b32a1e47 CAW |
4856 | (define-public python2-beautifulsoup4 |
4857 | (package | |
4858 | (inherit (package-with-python2 | |
4859 | (strip-python2-variant python-beautifulsoup4))) | |
5f37f0b6 | 4860 | (arguments `(#:python ,python-2)))) |
a0e41de4 | 4861 | |
60357f99 AE |
4862 | (define-public python-netifaces |
4863 | (package | |
4864 | (name "python-netifaces") | |
a846f29d | 4865 | (version "0.10.6") |
60357f99 AE |
4866 | (source |
4867 | (origin | |
4868 | (method url-fetch) | |
a846f29d | 4869 | (uri (pypi-uri "netifaces" version)) |
60357f99 AE |
4870 | (sha256 |
4871 | (base32 | |
a846f29d | 4872 | "1q7bi5k2r955rlcpspx4salvkkpk28jky67fjbpz2dkdycisak8c")))) |
60357f99 | 4873 | (build-system python-build-system) |
a846f29d | 4874 | (home-page "https://github.com/al45tair/netifaces") |
60357f99 AE |
4875 | (synopsis |
4876 | "Python module for portable network interface information") | |
4877 | (description | |
4878 | "Netifaces is a Python module providing information on network | |
4879 | interfaces in an easy and portable manner.") | |
4880 | (license license:expat))) | |
4881 | ||
4882 | (define-public python2-netifaces | |
4883 | (package-with-python2 python-netifaces)) | |
92cb152b | 4884 | |
32f77c04 RW |
4885 | (define-public python-networkx |
4886 | (package | |
4887 | (name "python-networkx") | |
accfabf6 | 4888 | (version "2.1") |
32f77c04 RW |
4889 | (source |
4890 | (origin | |
4891 | (method url-fetch) | |
accfabf6 | 4892 | (uri (pypi-uri "networkx" version ".zip")) |
32f77c04 | 4893 | (sha256 |
accfabf6 | 4894 | (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4")))) |
32f77c04 RW |
4895 | (build-system python-build-system) |
4896 | ;; python-decorator is needed at runtime | |
4897 | (propagated-inputs | |
4898 | `(("python-decorator" ,python-decorator))) | |
4899 | (native-inputs | |
accfabf6 MB |
4900 | `(("python-nose" ,python-nose) |
4901 | ("unzip" ,unzip))) | |
32f77c04 RW |
4902 | (home-page "http://networkx.github.io/") |
4903 | (synopsis "Python module for creating and manipulating graphs and networks") | |
4904 | (description | |
4905 | "NetworkX is a Python package for the creation, manipulation, and study | |
4906 | of the structure, dynamics, and functions of complex networks.") | |
3f641af0 | 4907 | (license license:bsd-3))) |
32f77c04 RW |
4908 | |
4909 | (define-public python2-networkx | |
4910 | (package-with-python2 python-networkx)) | |
4911 | ||
75d342ff GB |
4912 | ;; Define new package, because the current version of python-colormath does |
4913 | ;; not build against 2.0. | |
4914 | (define-public python-networkx2 | |
4915 | (package (inherit python-networkx) | |
4916 | (name "python-networkx2") | |
4917 | (version "2.0") | |
4918 | (source | |
4919 | (origin | |
4920 | (method url-fetch) | |
4921 | (uri (pypi-uri "networkx" version ".zip")) | |
4922 | (sha256 | |
4923 | (base32 | |
4924 | "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd")) | |
4925 | (patches | |
4926 | (search-patches "python-networkx2-reproducible-build.patch")))))) | |
4927 | ||
4928 | (define-public python2-networkx2 | |
4929 | (package-with-python2 python-networkx2)) | |
4930 | ||
92cb152b RW |
4931 | (define-public snakemake |
4932 | (package | |
4933 | (name "snakemake") | |
0215f94e | 4934 | (version "4.4.0") |
92cb152b RW |
4935 | (source |
4936 | (origin | |
4937 | (method url-fetch) | |
7b93d866 | 4938 | (uri (pypi-uri "snakemake" version)) |
92cb152b | 4939 | (sha256 |
0215f94e | 4940 | (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv")))) |
92cb152b | 4941 | (build-system python-build-system) |
7b93d866 MB |
4942 | (arguments |
4943 | ;; TODO: Package missing test dependencies. | |
e61bc976 RW |
4944 | '(#:tests? #f |
4945 | #:phases | |
4946 | (modify-phases %standard-phases | |
4947 | ;; For cluster execution Snakemake will call Python. Since there is | |
4948 | ;; no suitable PYTHONPATH set, cluster execution will fail. We fix | |
4949 | ;; this by calling the snakemake wrapper instead. | |
4950 | (add-after 'unpack 'call-wrapper-not-wrapped-snakemake | |
4951 | (lambda* (#:key outputs #:allow-other-keys) | |
4952 | (substitute* "snakemake/executors.py" | |
4953 | (("\\{sys.executable\\} -m snakemake") | |
4954 | (string-append (assoc-ref outputs "out") | |
4955 | "/bin/snakemake"))) | |
4956 | #t))))) | |
4f9998c6 RW |
4957 | (propagated-inputs |
4958 | `(("python-wrapt" ,python-wrapt) | |
3414ce98 KM |
4959 | ("python-requests" ,python-requests) |
4960 | ("python-appdirs" ,python-appdirs) | |
4961 | ("python-configargparse" ,python-configargparse) | |
4962 | ("python-pyyaml" ,python-pyyaml) | |
4963 | ("python-ratelimiter" ,python-ratelimiter))) | |
7b93d866 | 4964 | (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home") |
92cb152b RW |
4965 | (synopsis "Python-based execution environment for make-like workflows") |
4966 | (description | |
4967 | "Snakemake aims to reduce the complexity of creating workflows by | |
4968 | providing a clean and modern domain specific specification language (DSL) in | |
4969 | Python style, together with a fast and comfortable execution environment.") | |
4970 | (license license:expat))) | |
a1920bc9 | 4971 | |
b3593688 | 4972 | (define-public python-pyqrcode |
4973 | (package | |
4974 | (name "python-pyqrcode") | |
4975 | (version "1.2.1") | |
4976 | (source | |
4977 | (origin | |
4978 | (method url-fetch) | |
4979 | (uri (pypi-uri "PyQRCode" version)) | |
4980 | (sha256 | |
4981 | (base32 | |
4982 | "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx")))) | |
4983 | (build-system python-build-system) | |
4984 | (home-page | |
4985 | "https://github.com/mnooner256/pyqrcode") | |
4986 | (synopsis "QR code generator") | |
4987 | (description | |
4988 | "Pyqrcode is a QR code generator written purely in Python with | |
4989 | SVG, EPS, PNG and terminal output.") | |
4990 | (license license:bsd-3))) | |
4991 | ||
35de1fbd RW |
4992 | (define-public python-seaborn |
4993 | (package | |
4994 | (name "python-seaborn") | |
ccc18762 | 4995 | (version "0.7.1") |
35de1fbd RW |
4996 | (source |
4997 | (origin | |
4998 | (method url-fetch) | |
fc899d4f | 4999 | (uri (pypi-uri "seaborn" version)) |
35de1fbd | 5000 | (sha256 |
ccc18762 | 5001 | (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs")))) |
35de1fbd | 5002 | (build-system python-build-system) |
6f976df6 MB |
5003 | (arguments |
5004 | '(#:tests? #f)) ; Tests requires a running X11 server. | |
35de1fbd RW |
5005 | (propagated-inputs |
5006 | `(("python-pandas" ,python-pandas) | |
5007 | ("python-matplotlib" ,python-matplotlib) | |
5008 | ("python-scipy" ,python-scipy))) | |
35de1fbd RW |
5009 | (home-page "http://stanford.edu/~mwaskom/software/seaborn/") |
5010 | (synopsis "Statistical data visualization") | |
5011 | (description | |
5012 | "Seaborn is a library for making attractive and informative statistical | |
5013 | graphics in Python. It is built on top of matplotlib and tightly integrated | |
5014 | with the PyData stack, including support for numpy and pandas data structures | |
5015 | and statistical routines from scipy and statsmodels.") | |
3f641af0 | 5016 | (license license:bsd-3) |
fc899d4f | 5017 | (properties `((python2-variant . ,(delay python2-seaborn)))))) |
35de1fbd RW |
5018 | |
5019 | (define-public python2-seaborn | |
fc899d4f EF |
5020 | (let ((base (package-with-python2 (strip-python2-variant python-seaborn)))) |
5021 | (package | |
5022 | (inherit base) | |
5023 | (propagated-inputs `(("python2-pytz" ,python2-pytz) | |
00e10c6e | 5024 | ,@(package-propagated-inputs base)))))) |
35de1fbd | 5025 | |
58a35665 MB |
5026 | (define-public python-mpmath |
5027 | (package | |
5028 | (name "python-mpmath") | |
5029 | (version "0.19") | |
5030 | (source (origin | |
5031 | (method url-fetch) | |
5032 | (uri (string-append "http://mpmath.org/files/mpmath-" | |
5033 | version ".tar.gz")) | |
5034 | (sha256 | |
5035 | (base32 | |
5036 | "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8")))) | |
5037 | (build-system python-build-system) | |
5038 | (arguments | |
5039 | '(#:phases | |
5040 | (modify-phases %standard-phases | |
5041 | (replace 'check | |
5042 | (lambda _ | |
5043 | (zero? | |
5044 | (system* "python" "mpmath/tests/runtests.py" "-local"))))))) | |
5045 | (home-page "http://mpmath.org") | |
5046 | (synopsis "Arbitrary-precision floating-point arithmetic in python") | |
5047 | (description | |
5048 | "@code{mpmath} can be used as an arbitrary-precision substitute for | |
5049 | Python's float/complex types and math/cmath modules, but also does much | |
5050 | more advanced mathematics.") | |
5051 | (license license:bsd-3))) | |
5052 | ||
5053 | (define-public python2-mpmath | |
5054 | (package-with-python2 python-mpmath)) | |
35de1fbd | 5055 | |
90fc547f RW |
5056 | (define-public python-sympy |
5057 | (package | |
5058 | (name "python-sympy") | |
e65acb31 | 5059 | (version "1.1.1") |
90fc547f RW |
5060 | (source |
5061 | (origin | |
5062 | (method url-fetch) | |
5063 | (uri (string-append | |
5064 | "https://github.com/sympy/sympy/releases/download/sympy-" | |
5065 | version "/sympy-" version ".tar.gz")) | |
5066 | (sha256 | |
e65acb31 | 5067 | (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc")))) |
90fc547f | 5068 | (build-system python-build-system) |
52f622ef MB |
5069 | (propagated-inputs |
5070 | `(("python-mpmath" ,python-mpmath))) | |
90fc547f RW |
5071 | (home-page "http://www.sympy.org/") |
5072 | (synopsis "Python library for symbolic mathematics") | |
5073 | (description | |
5074 | "SymPy is a Python library for symbolic mathematics. It aims to become a | |
5075 | full-featured computer algebra system (CAS) while keeping the code as simple | |
5076 | as possible in order to be comprehensible and easily extensible.") | |
3f641af0 | 5077 | (license license:bsd-3))) |
90fc547f RW |
5078 | |
5079 | (define-public python2-sympy | |
5080 | (package-with-python2 python-sympy)) | |
5081 | ||
e8c9b010 SR |
5082 | (define-public python-q |
5083 | (package | |
5084 | (name "python-q") | |
5085 | (version "2.6") | |
5086 | (source | |
5087 | (origin | |
5088 | (method url-fetch) | |
5089 | (uri (pypi-uri "q" version)) | |
5090 | (sha256 | |
5091 | (base32 | |
5092 | "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy")))) | |
5093 | (build-system python-build-system) | |
5094 | (home-page "https://github.com/zestyping/q") | |
5095 | (synopsis "Quick-and-dirty debugging output for tired programmers") | |
5096 | (description | |
5097 | "q is a Python module for \"print\" style of debugging Python code. It | |
5098 | provides convenient short API for print out of values, tracebacks, and | |
5099 | falling into the Python interpreter.") | |
f210e944 | 5100 | (license license:asl2.0))) |
e8c9b010 SR |
5101 | |
5102 | (define-public python2-q | |
f210e944 | 5103 | (package-with-python2 python-q)) |
e8c9b010 | 5104 | |
db62afa5 LC |
5105 | (define-public python2-xlib |
5106 | (package | |
5107 | (name "python2-xlib") | |
5108 | (version "0.14") | |
5109 | (source (origin | |
5110 | (method url-fetch) | |
de67e922 LF |
5111 | (uri (string-append "mirror://sourceforge/python-xlib/python-xlib" |
5112 | "/" version "/" | |
db62afa5 LC |
5113 | "python-xlib-" version ".tar.gz")) |
5114 | (sha256 | |
5115 | (base32 | |
5116 | "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7")))) | |
5117 | (build-system python-build-system) | |
5118 | (arguments | |
5119 | `(#:python ,python-2 ;Python 2 only | |
5120 | #:tests? #f)) ;no tests | |
db62afa5 LC |
5121 | (home-page "http://python-xlib.sourceforge.net/") |
5122 | (synopsis "Python X11 client library") | |
5123 | (description | |
5124 | "The Python X Library is intended to be a fully functional X client | |
5125 | library for Python programs. It is useful to implement low-level X clients. | |
5126 | It is written entirely in Python.") | |
3f641af0 | 5127 | (license license:gpl2+))) |
0234ca06 DT |
5128 | |
5129 | (define-public python-singledispatch | |
5130 | (package | |
5131 | (name "python-singledispatch") | |
5132 | (version "3.4.0.3") | |
5133 | (source | |
5134 | (origin | |
5135 | (method url-fetch) | |
bdb67d84 | 5136 | (uri (pypi-uri "singledispatch" version)) |
0234ca06 DT |
5137 | (sha256 |
5138 | (base32 | |
5139 | "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv")))) | |
5140 | (build-system python-build-system) | |
5e1c9d24 HG |
5141 | (native-inputs |
5142 | `(("python-six" ,python-six))) ; required for conversion, not at run-time | |
0234ca06 DT |
5143 | (home-page |
5144 | "http://docs.python.org/3/library/functools.html#functools.singledispatch") | |
5145 | (synopsis "Backport of singledispatch feature from Python 3.4") | |
5146 | (description | |
5147 | "This library brings functools.singledispatch from Python 3.4 to Python | |
5148 | 2.6-3.3.") | |
5149 | (license license:expat))) | |
5150 | ||
5151 | (define-public python2-singledispatch | |
5152 | (package-with-python2 python-singledispatch)) | |
feaae484 | 5153 | |
6b59fc10 EF |
5154 | ;; the python- version can be removed with python-3.5 |
5155 | (define-public python-backports-abc | |
5156 | (package | |
5157 | (name "python-backports-abc") | |
27f9148e | 5158 | (version "0.5") |
6b59fc10 EF |
5159 | (source |
5160 | (origin | |
5161 | (method url-fetch) | |
5162 | (uri (pypi-uri "backports_abc" version)) | |
5163 | (sha256 | |
5164 | (base32 | |
27f9148e | 5165 | "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3")))) |
6b59fc10 | 5166 | (build-system python-build-system) |
6b59fc10 | 5167 | (home-page "https://github.com/cython/backports_abc") |
66e07664 | 5168 | (synopsis "Backport of additions to the 'collections.abc' module") |
6b59fc10 EF |
5169 | (description |
5170 | "Python-backports-abc provides a backport of additions to the | |
5171 | 'collections.abc' module in Python-3.5.") | |
3f641af0 | 5172 | (license license:psfl))) |
6b59fc10 EF |
5173 | |
5174 | (define-public python2-backports-abc | |
5175 | (package-with-python2 python-backports-abc)) | |
5176 | ||
4ff9e868 OP |
5177 | (define-public python-backports-csv |
5178 | (package | |
5179 | (name "python-backports-csv") | |
5180 | (version "1.0.5") | |
5181 | (source | |
5182 | (origin | |
5183 | (method url-fetch) | |
5184 | (uri (pypi-uri "backports.csv" version)) | |
5185 | (sha256 | |
5186 | (base32 | |
5187 | "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc")))) | |
5188 | (build-system python-build-system) | |
5189 | (home-page "https://github.com/ryanhiebert/backports.csv") | |
5190 | (synopsis "Backport of Python 3's csv module for Python 2") | |
5191 | (description | |
5192 | "Provides a backport of Python 3's @code{csv} module for parsing | |
5193 | comma separated values. The API of the @code{csv} module in Python 2 | |
5194 | is drastically different from the @code{csv} module in Python 3. | |
5195 | This is due, for the most part, to the difference between str in | |
5196 | Python 2 and Python 3.") | |
5197 | (license license:psfl))) | |
5198 | ||
5199 | (define-public python2-backports-csv | |
5200 | (package-with-python2 python-backports-csv)) | |
5201 | ||
ec074213 TD |
5202 | (define-public python2-backports-shutil-get-terminal-size |
5203 | (package | |
5204 | (name "python2-backports-shutil-get-terminal-size") | |
5205 | (version "1.0.0") | |
5206 | (source | |
5207 | (origin | |
5208 | (method url-fetch) | |
5209 | (uri (pypi-uri "backports.shutil_get_terminal_size" version)) | |
5210 | (sha256 | |
5211 | (base32 | |
5212 | "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki")))) | |
5213 | (build-system python-build-system) | |
5214 | (arguments | |
c0446791 MB |
5215 | `(#:python ,python-2 |
5216 | #:phases | |
5217 | (modify-phases %standard-phases | |
5218 | (replace 'check | |
5219 | (lambda _ | |
5220 | (zero? (system* "py.test" "-v"))))))) | |
5221 | (native-inputs | |
5222 | `(("python2-pytest" ,python2-pytest))) | |
ec074213 TD |
5223 | (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size") |
5224 | (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}") | |
5225 | (description | |
5226 | "This package provides a backport of the @code{get_terminal_size | |
5227 | function} from Python 3.3's @code{shutil}. | |
5228 | Unlike the original version it is written in pure Python rather than C, | |
5229 | so it might be a tiny bit slower.") | |
5230 | (license license:expat))) | |
5231 | ||
feaae484 SB |
5232 | (define-public python-waf |
5233 | (package | |
5234 | (name "python-waf") | |
27bf00e6 | 5235 | (version "1.9.8") |
feaae484 SB |
5236 | (source (origin |
5237 | (method url-fetch) | |
bae67829 | 5238 | (uri (string-append "https://waf.io/" |
feaae484 SB |
5239 | "waf-" version ".tar.bz2")) |
5240 | (sha256 | |
5241 | (base32 | |
27bf00e6 | 5242 | "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q")))) |
feaae484 SB |
5243 | (build-system python-build-system) |
5244 | (arguments | |
5245 | '(#:phases | |
5246 | (modify-phases %standard-phases | |
5247 | (replace 'build | |
7dd55dfe EF |
5248 | (lambda _ |
5249 | (zero? (system* "python" "waf-light" "configure" "build")))) | |
feaae484 | 5250 | (replace 'check |
7dd55dfe EF |
5251 | (lambda _ |
5252 | (zero? (system* "python" "waf" "--version")))) | |
feaae484 | 5253 | (replace 'install |
7dd55dfe EF |
5254 | (lambda _ |
5255 | (copy-file "waf" %output)))))) | |
27bf00e6 | 5256 | (home-page "https://waf.io/") |
feaae484 SB |
5257 | (synopsis "Python-based build system") |
5258 | (description | |
5259 | "Waf is a Python-based framework for configuring, compiling and installing | |
5260 | applications.") | |
3f641af0 | 5261 | (license license:bsd-3))) |
feaae484 SB |
5262 | |
5263 | (define-public python2-waf | |
5264 | (package-with-python2 python-waf)) | |
45203542 RW |
5265 | |
5266 | (define-public python-pyzmq | |
5267 | (package | |
5268 | (name "python-pyzmq") | |
3655ee76 | 5269 | (version "15.1.0") |
45203542 RW |
5270 | (source |
5271 | (origin | |
5272 | (method url-fetch) | |
3655ee76 | 5273 | (uri (pypi-uri "pyzmq" version)) |
45203542 | 5274 | (sha256 |
3655ee76 | 5275 | (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx")))) |
45203542 RW |
5276 | (build-system python-build-system) |
5277 | (arguments | |
5278 | `(#:configure-flags | |
5279 | (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq"))) | |
5280 | ;; FIXME: You must build pyzmq with 'python setup.py build_ext | |
5281 | ;; --inplace' for 'python setup.py test' to work. | |
5282 | #:tests? #f)) | |
5283 | (inputs | |
5284 | `(("zeromq" ,zeromq))) | |
5285 | (native-inputs | |
5286 | `(("pkg-config" ,pkg-config) | |
f3b98f4f | 5287 | ("python-nose" ,python-nose))) |
7bf837fd | 5288 | (home-page "https://github.com/zeromq/pyzmq") |
45203542 RW |
5289 | (synopsis "Python bindings for 0MQ") |
5290 | (description | |
5291 | "PyZMQ is the official Python binding for the ZeroMQ messaging library.") | |
3f641af0 | 5292 | (license license:bsd-4))) |
45203542 RW |
5293 | |
5294 | (define-public python2-pyzmq | |
5295 | (package-with-python2 python-pyzmq)) | |
d889e6c4 CR |
5296 | |
5297 | (define-public python-pep8 | |
5298 | (package | |
5299 | (name "python-pep8") | |
db251311 | 5300 | (version "1.7.0") |
d889e6c4 CR |
5301 | (source |
5302 | (origin | |
5303 | (method url-fetch) | |
db251311 | 5304 | (uri (pypi-uri "pep8" version)) |
d889e6c4 CR |
5305 | (sha256 |
5306 | (base32 | |
db251311 | 5307 | "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1")))) |
d889e6c4 | 5308 | (build-system python-build-system) |
d889e6c4 CR |
5309 | (home-page "http://pep8.readthedocs.org/") |
5310 | (synopsis "Python style guide checker") | |
5311 | (description | |
5312 | "This tools checks Python code against some of the style conventions in | |
5313 | PEP 8.") | |
5314 | (license license:expat))) | |
5315 | ||
5316 | (define-public python2-pep8 | |
5317 | (package-with-python2 python-pep8)) | |
e31d7f44 CR |
5318 | |
5319 | (define-public python-pyflakes | |
5320 | (package | |
5321 | (name "python-pyflakes") | |
0098b950 | 5322 | (version "1.5.0") |
e31d7f44 CR |
5323 | (source |
5324 | (origin | |
5325 | (method url-fetch) | |
2abc3972 | 5326 | (uri (pypi-uri "pyflakes" version)) |
e31d7f44 CR |
5327 | (sha256 |
5328 | (base32 | |
0098b950 | 5329 | "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da")))) |
e31d7f44 | 5330 | (build-system python-build-system) |
e31d7f44 CR |
5331 | (home-page |
5332 | "https://github.com/pyflakes/pyflakes") | |
5333 | (synopsis "Passive checker of Python programs") | |
5334 | (description | |
5335 | "Pyflakes statically checks Python source code for common errors.") | |
5336 | (license license:expat))) | |
a59e017c | 5337 | |
7261d9eb CR |
5338 | (define-public python2-pyflakes |
5339 | (package-with-python2 python-pyflakes)) | |
5340 | ||
a59e017c CR |
5341 | (define-public python-mccabe |
5342 | (package | |
5343 | (name "python-mccabe") | |
31612e1c | 5344 | (version "0.6.1") |
a59e017c CR |
5345 | (source |
5346 | (origin | |
5347 | (method url-fetch) | |
c6ebd40d | 5348 | (uri (pypi-uri "mccabe" version)) |
a59e017c CR |
5349 | (sha256 |
5350 | (base32 | |
31612e1c | 5351 | "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx")))) |
a59e017c | 5352 | (build-system python-build-system) |
328bb95d | 5353 | (native-inputs |
92b2101a | 5354 | `(("python-pytest" ,python-pytest-bootstrap) |
f3b98f4f | 5355 | ("python-pytest-runner" ,python-pytest-runner))) |
a59e017c CR |
5356 | (home-page "https://github.com/flintwork/mccabe") |
5357 | (synopsis "McCabe checker, plugin for flake8") | |
5358 | (description | |
5359 | "This package provides a Flake8 plug-in to compute the McCabe cyclomatic | |
5360 | complexity of Python source code.") | |
7362371d | 5361 | (license license:expat))) |
a59e017c CR |
5362 | |
5363 | (define-public python2-mccabe | |
5364 | (package-with-python2 python-mccabe)) | |
e8df8f47 | 5365 | |
7477fbb1 CR |
5366 | (define-public python-mccabe-0.2.1 |
5367 | (package (inherit python-mccabe) | |
5368 | (version "0.2.1") | |
5369 | (source | |
5370 | (origin | |
5371 | (method url-fetch) | |
5372 | (uri (pypi-uri "mccabe" version)) | |
5373 | (sha256 | |
5374 | (base32 | |
f3b98f4f | 5375 | "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs")))))) |
7477fbb1 CR |
5376 | |
5377 | (define-public python2-mccabe-0.2.1 | |
5378 | (package-with-python2 python-mccabe-0.2.1)) | |
5379 | ||
e8df8f47 CR |
5380 | ;; Flake8 2.4.1 requires an older version of pep8. |
5381 | ;; This should be removed ASAP. | |
5382 | (define-public python-pep8-1.5.7 | |
5383 | (package (inherit python-pep8) | |
5384 | (version "1.5.7") | |
5385 | (source | |
5386 | (origin | |
5387 | (method url-fetch) | |
5388 | (uri (string-append | |
5389 | "https://pypi.python.org/packages/source/p/pep8/pep8-" | |
5390 | version | |
5391 | ".tar.gz")) | |
5392 | (sha256 | |
5393 | (base32 | |
73e3060d MB |
5394 | "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m")))) |
5395 | (arguments | |
5396 | ;; XXX Tests not compatible with Python 3.5. | |
5397 | '(#:tests? #f)))) | |
e8df8f47 CR |
5398 | |
5399 | (define-public python2-pep8-1.5.7 | |
5400 | (package-with-python2 python-pep8-1.5.7)) | |
5401 | ||
5402 | ;; Flake8 2.4.1 requires an older version of pyflakes. | |
5403 | ;; This should be removed ASAP. | |
5404 | (define-public python-pyflakes-0.8.1 | |
5405 | (package (inherit python-pyflakes) | |
5406 | (version "0.8.1") | |
5407 | (source | |
5408 | (origin | |
5409 | (method url-fetch) | |
5410 | (uri (string-append | |
5411 | "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-" | |
5412 | version | |
5413 | ".tar.gz")) | |
5414 | (sha256 | |
5415 | (base32 | |
0d84e1ef MB |
5416 | "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z")))) |
5417 | (arguments | |
5418 | ;; XXX Tests not compatible with Python 3.5. | |
5419 | '(#:tests? #f)))) | |
e8df8f47 CR |
5420 | |
5421 | (define-public python2-pyflakes-0.8.1 | |
7261d9eb | 5422 | (package-with-python2 python-pyflakes-0.8.1)) |
e8df8f47 CR |
5423 | |
5424 | (define-public python-flake8 | |
5425 | (package | |
5426 | (name "python-flake8") | |
a0fd9a3c | 5427 | (version "3.4.1") |
e8df8f47 CR |
5428 | (source |
5429 | (origin | |
5430 | (method url-fetch) | |
1b995533 | 5431 | (uri (pypi-uri "flake8" version)) |
e8df8f47 CR |
5432 | (sha256 |
5433 | (base32 | |
a0fd9a3c | 5434 | "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062")))) |
e8df8f47 | 5435 | (build-system python-build-system) |
a0fd9a3c MB |
5436 | (arguments |
5437 | `(#:phases | |
5438 | (modify-phases %standard-phases | |
5439 | (delete 'check) | |
5440 | (add-after 'install 'check | |
5441 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
5442 | (add-installed-pythonpath inputs outputs) | |
5443 | (zero? (system* "pytest" "-v"))))))) | |
482d9591 | 5444 | (propagated-inputs |
a0fd9a3c | 5445 | `(("python-pycodestyle" ,python-pycodestyle) |
43789136 | 5446 | ("python-pyflakes" ,python-pyflakes) |
a0fd9a3c MB |
5447 | ;; flake8 depends on a newer setuptools than provided by python. |
5448 | ("python-setuptools" ,python-setuptools) | |
482d9591 | 5449 | ("python-mccabe" ,python-mccabe))) |
328bb95d HG |
5450 | (native-inputs |
5451 | `(("python-mock" ,python-mock) ; TODO: only required for < 3.3 | |
a0fd9a3c MB |
5452 | ("python-pytest" ,python-pytest-bootstrap) |
5453 | ("python-pytest-runner" ,python-pytest-runner))) | |
e8df8f47 CR |
5454 | (home-page "https://gitlab.com/pycqa/flake8") |
5455 | (synopsis | |
5456 | "The modular source code checker: pep8, pyflakes and co") | |
5457 | (description | |
5458 | "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.") | |
a0fd9a3c | 5459 | (properties `((python2-variant . ,(delay python2-flake8)))) |
e8df8f47 CR |
5460 | (license license:expat))) |
5461 | ||
5462 | (define-public python2-flake8 | |
a0fd9a3c MB |
5463 | (let ((base (package-with-python2 (strip-python2-variant python-flake8)))) |
5464 | (package (inherit base) | |
5465 | (propagated-inputs | |
5466 | `(("python2-configparser" ,python2-configparser) | |
b7049b2e | 5467 | ("python2-enum" ,python2-enum) |
a0fd9a3c | 5468 | ,@(package-propagated-inputs base)))))) |
61b9ac53 | 5469 | |
6f6db026 MB |
5470 | ;; python-hacking requires flake8 <2.6.0. |
5471 | (define-public python-flake8-2.5 | |
5472 | (package | |
5473 | (inherit python-flake8) | |
5474 | (version "2.5.5") | |
5475 | (source (origin | |
5476 | (method url-fetch) | |
5477 | (uri (pypi-uri "flake8" version)) | |
5478 | (sha256 | |
5479 | (base32 | |
5480 | "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij")))) | |
5481 | (propagated-inputs | |
5482 | `(("python-pep8" ,python-pep8) | |
5483 | ,@(package-propagated-inputs python-flake8))) | |
5484 | (properties `((python2-variant . ,(delay python2-flake8-2.5)))))) | |
5485 | ||
5486 | (define-public python2-flake8-2.5 | |
5487 | (package | |
5488 | (inherit python2-flake8) | |
5489 | (version (package-version python-flake8-2.5)) | |
5490 | (source (origin | |
5491 | (inherit (package-source python-flake8-2.5)))) | |
5492 | (propagated-inputs | |
5493 | `(("python2-pep8" ,python2-pep8) | |
5494 | ,@(package-propagated-inputs python2-flake8))))) | |
5495 | ||
1f42d824 MFM |
5496 | (define-public python-flake8-polyfill |
5497 | (package | |
5498 | (name "python-flake8-polyfill") | |
8b7009de | 5499 | (version "1.0.2") |
1f42d824 MFM |
5500 | (source |
5501 | (origin | |
5502 | (method url-fetch) | |
5503 | (uri (pypi-uri "flake8-polyfill" version)) | |
5504 | (sha256 | |
5505 | (base32 | |
8b7009de | 5506 | "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4")))) |
1f42d824 | 5507 | (build-system python-build-system) |
2c1cad7a MB |
5508 | (arguments |
5509 | '(#:phases | |
5510 | (modify-phases %standard-phases | |
5511 | (replace 'check | |
5512 | (lambda _ | |
5513 | (setenv "PYTHONPATH" | |
5514 | (string-append (getcwd) "/build/lib:" | |
5515 | (getenv "PYTHONPATH"))) | |
5516 | (zero? (system* "py.test" "-v"))))))) | |
5517 | (native-inputs | |
5518 | `(("python-flake8" ,python-flake8) | |
5519 | ("python-mock" ,python-mock) | |
8b7009de | 5520 | ("python-pep8" ,python-pep8) |
2c1cad7a MB |
5521 | ("python-pycodestyle" ,python-pycodestyle) |
5522 | ("python-pytest" ,python-pytest))) | |
1f42d824 MFM |
5523 | (home-page "https://gitlab.com/pycqa/flake8-polyfill") |
5524 | (synopsis "Polyfill package for Flake8 plugins") | |
5525 | (description | |
5526 | "This package that provides some compatibility helpers for Flake8 | |
5527 | plugins that intend to support Flake8 2.x and 3.x simultaneously.") | |
5528 | (license license:expat))) | |
5529 | ||
5530 | (define-public python2-flake8-polyfill | |
5531 | (package-with-python2 python-flake8-polyfill)) | |
5532 | ||
61b9ac53 FB |
5533 | (define-public python-mistune |
5534 | (package | |
5535 | (name "python-mistune") | |
a684e38d | 5536 | (version "0.8.3") |
61b9ac53 FB |
5537 | (source |
5538 | (origin | |
5539 | (method url-fetch) | |
eff8d773 | 5540 | (uri (pypi-uri "mistune" version)) |
61b9ac53 FB |
5541 | (sha256 |
5542 | (base32 | |
a684e38d | 5543 | "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w")))) |
61b9ac53 | 5544 | (build-system python-build-system) |
328bb95d | 5545 | (native-inputs |
f3b98f4f | 5546 | `(("python-nose" ,python-nose) |
61b9ac53 FB |
5547 | ("python-cython" ,python-cython))) |
5548 | (home-page "https://github.com/lepture/mistune") | |
5549 | (synopsis "Markdown parser in pure Python") | |
5550 | (description "This package provides a fast markdown parser in pure | |
5551 | Python.") | |
3f641af0 | 5552 | (license license:bsd-3))) |
61b9ac53 FB |
5553 | |
5554 | (define-public python2-mistune | |
5555 | (package-with-python2 python-mistune)) | |
6d992d07 | 5556 | |
b9893908 EE |
5557 | (define-public python-markdown |
5558 | (package | |
5559 | (name "python-markdown") | |
4ffbe8c6 | 5560 | (version "2.6.8") |
b9893908 EE |
5561 | (source |
5562 | (origin | |
5563 | (method url-fetch) | |
5564 | (uri (pypi-uri "Markdown" version)) | |
5565 | (sha256 | |
5566 | (base32 | |
4ffbe8c6 | 5567 | "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a")))) |
b9893908 EE |
5568 | (build-system python-build-system) |
5569 | (arguments | |
5570 | `(#:phases | |
5571 | (modify-phases %standard-phases | |
5572 | (replace 'check | |
5573 | (lambda _ | |
5574 | (zero? (system* "python" "run-tests.py"))))))) | |
5575 | (native-inputs | |
5576 | `(("python-nose" ,python-nose) | |
5577 | ("python-pyyaml" ,python-pyyaml))) | |
5578 | (home-page "https://pythonhosted.org/Markdown/") | |
5579 | (synopsis "Python implementation of Markdown") | |
5580 | (description | |
5581 | "This package provides a Python implementation of John Gruber's | |
5582 | Markdown. The library features international input, various Markdown | |
5583 | extensions, and several HTML output formats. A command line wrapper | |
5584 | markdown_py is also provided to convert Markdown files to HTML.") | |
3f641af0 | 5585 | (license license:bsd-3))) |
b9893908 EE |
5586 | |
5587 | (define-public python2-markdown | |
5588 | (package-with-python2 python-markdown)) | |
5589 | ||
6d992d07 FB |
5590 | (define-public python-ptyprocess |
5591 | (package | |
5592 | (name "python-ptyprocess") | |
70fc93cb | 5593 | (version "0.5.1") |
6d992d07 FB |
5594 | (source |
5595 | (origin | |
5596 | (method url-fetch) | |
5597 | (uri (string-append | |
5598 | "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-" | |
5599 | version ".tar.gz")) | |
5600 | (sha256 | |
5601 | (base32 | |
70fc93cb | 5602 | "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05")))) |
6d992d07 | 5603 | (build-system python-build-system) |
328bb95d | 5604 | (native-inputs |
f3b98f4f | 5605 | `(("python-nose" ,python-nose))) |
6d992d07 FB |
5606 | (arguments |
5607 | `(#:phases | |
5608 | (modify-phases %standard-phases | |
5609 | (replace 'check | |
5610 | (lambda _ | |
5611 | (zero? (system* "nosetests"))))))) | |
5612 | (home-page "https://github.com/pexpect/ptyprocess") | |
5613 | (synopsis "Run a subprocess in a pseudo terminal") | |
5614 | (description | |
5615 | "This package provides a Python library used to launch a subprocess in a | |
5616 | pseudo terminal (pty), and interact with both the process and its pty.") | |
3f641af0 | 5617 | (license license:isc))) |
6d992d07 FB |
5618 | |
5619 | (define-public python2-ptyprocess | |
5620 | (package-with-python2 python-ptyprocess)) | |
4aadb1df | 5621 | |
df893a38 MB |
5622 | (define-public python-cram |
5623 | (package | |
5624 | (name "python-cram") | |
5625 | (version "0.7") | |
5626 | (home-page "https://bitheap.org/cram/") | |
5627 | (source (origin | |
5628 | (method url-fetch) | |
5629 | (uri (list (string-append home-page "cram-" | |
5630 | version ".tar.gz") | |
5631 | (pypi-uri "cram" version))) | |
5632 | (sha256 | |
5633 | (base32 | |
5634 | "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx")))) | |
5635 | (arguments | |
5636 | '(#:phases | |
5637 | (modify-phases %standard-phases | |
5638 | (add-after 'unpack 'patch-source | |
5639 | (lambda _ | |
5640 | (substitute* (find-files "cram" ".*\\.py$") | |
5641 | ;; Replace default shell path. | |
5642 | (("/bin/sh") (which "sh"))) | |
5643 | (substitute* (find-files "tests" ".*\\.t$") | |
5644 | (("md5") "md5sum") | |
5645 | (("/bin/bash") (which "bash")) | |
5646 | (("/bin/sh") (which "sh"))) | |
5647 | (substitute* "cram/_test.py" | |
5648 | ;; This hack works around a bug triggered by substituting | |
5649 | ;; the /bin/sh paths. "tests/usage.t" compares the output of | |
5650 | ;; "cram -h", which breaks the output at 80 characters. This | |
5651 | ;; causes the line showing the default shell to break into two | |
5652 | ;; lines, but the test expects a single line... | |
5653 | (("env\\['COLUMNS'\\] = '80'") | |
5654 | "env['COLUMNS'] = '160'")) | |
5655 | #t)) | |
5656 | (delete 'check) | |
5657 | (add-after 'install 'check | |
5658 | ;; The test phase uses the built library and executable. | |
5659 | ;; It's easier to run it after install since the build | |
5660 | ;; directory contains version-specific PATH. | |
5661 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
5662 | (add-installed-pythonpath inputs outputs) | |
5663 | (setenv "PATH" (string-append (getenv "PATH") ":" | |
5664 | (assoc-ref outputs "out") "/bin")) | |
5665 | (zero? (system* "make" "test"))))))) | |
5666 | (build-system python-build-system) | |
5667 | (native-inputs | |
5668 | `(("python-coverage" ,python-coverage) | |
5669 | ("which" ,which))) | |
5670 | (synopsis "Simple testing framework for command line applications") | |
5671 | (description | |
5672 | "Cram is a functional testing framework for command line applications. | |
5673 | Cram tests look like snippets of interactive shell sessions. Cram runs each | |
5674 | command and compares the command output in the test with the command’s actual | |
5675 | output.") | |
5676 | (license license:gpl2+))) | |
5677 | ||
5678 | (define-public python2-cram | |
5679 | (package-with-python2 python-cram)) | |
5680 | ||
789de5e2 | 5681 | (define-public python-straight-plugin |
5682 | (package | |
5683 | (name "python-straight-plugin") | |
5684 | (version "1.4.1") | |
5685 | (source | |
5686 | (origin | |
5687 | (method url-fetch) | |
5688 | (uri (pypi-uri "straight.plugin" version)) | |
5689 | (sha256 | |
5690 | (base32 | |
5691 | "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62")))) | |
5692 | (build-system python-build-system) | |
5693 | (home-page "https://github.com/ironfroggy/straight.plugin") | |
5694 | (synopsis "Simple namespaced plugin facility") | |
5695 | (description "Straight Plugin provides a type of plugin you can create from | |
5696 | almost any existing Python modules, and an easy way for outside developers to | |
5697 | add functionality and customization to your projects with their own plugins.") | |
5698 | (license license:expat))) | |
5699 | ||
5700 | (define-public python2-straight-plugin | |
5701 | (package-with-python2 python-straight-plugin)) | |
5702 | ||
d582eaac SB |
5703 | (define-public python-fonttools |
5704 | (package | |
5705 | (name "python-fonttools") | |
a4593cc9 | 5706 | (version "3.15.1") |
d582eaac SB |
5707 | (source (origin |
5708 | (method url-fetch) | |
a4593cc9 | 5709 | (uri (pypi-uri "fonttools" version ".zip")) |
d582eaac SB |
5710 | (sha256 |
5711 | (base32 | |
a4593cc9 | 5712 | "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d")))) |
d582eaac | 5713 | (build-system python-build-system) |
9e8c6a37 HG |
5714 | (arguments |
5715 | '(#:test-target "check" | |
5716 | #:phases | |
5717 | (modify-phases %standard-phases | |
5718 | (add-after 'unpack 'patch-setuppy | |
5719 | ;; Remove the undocumented "extra_path" argument, which adds an | |
5720 | ;; intervening directories between site-packages and the package | |
5721 | ;; directory. | |
5722 | (lambda _ | |
5723 | (substitute* "setup.py" | |
5724 | (("^[ \t]*extra_path *= *'FontTools',") "")) | |
5725 | #t))))) | |
a4593cc9 | 5726 | (native-inputs |
5727 | `(("unzip" ,unzip))) | |
7bf837fd | 5728 | (home-page "https://github.com/behdad/fonttools") |
d582eaac SB |
5729 | (synopsis "Tools to manipulate font files") |
5730 | (description | |
5731 | "FontTools/TTX is a library to manipulate font files from Python. It | |
9e8c6a37 | 5732 | supports reading and writing of TrueType/OpenType fonts, reading and writing |
d582eaac SB |
5733 | of AFM files, reading (and partially writing) of PS Type 1 fonts. The package |
5734 | also contains a tool called “TTX” which converts TrueType/OpenType fonts to and | |
5735 | from an XML-based format.") | |
3f641af0 DC |
5736 | (license (license:non-copyleft |
5737 | "file://LICENSE.txt" | |
5738 | "See LICENSE.txt in the distribution.")))) | |
d582eaac SB |
5739 | |
5740 | (define-public python2-fonttools | |
5741 | (package-with-python2 python-fonttools)) | |
75710da6 | 5742 | |
5faa5ce4 RW |
5743 | (define-public python-ly |
5744 | (package | |
5745 | (name "python-ly") | |
5135354f | 5746 | (version "0.9.4") |
5faa5ce4 RW |
5747 | (source |
5748 | (origin | |
5749 | (method url-fetch) | |
5135354f RW |
5750 | (uri (string-append "https://pypi.python.org/packages/57/4f/" |
5751 | "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9" | |
5752 | "/python-ly-" version ".tar.gz")) | |
5faa5ce4 RW |
5753 | (sha256 |
5754 | (base32 | |
5135354f | 5755 | "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62")))) |
5faa5ce4 | 5756 | (build-system python-build-system) |
972cf9be MB |
5757 | (arguments |
5758 | ;; FIXME: Some tests need network access. | |
5759 | '(#:tests? #f)) | |
5faa5ce4 RW |
5760 | (synopsis "Tool and library for manipulating LilyPond files") |
5761 | (description "This package provides a Python library to parse, manipulate | |
5762 | or create documents in LilyPond format. A command line program ly is also | |
5763 | provided that can be used to do various manipulations with LilyPond files.") | |
5764 | (home-page "https://pypi.python.org/pypi/python-ly") | |
3f641af0 | 5765 | (license license:gpl2+))) |
7e7b27d9 CR |
5766 | |
5767 | (define-public python-appdirs | |
5768 | (package | |
5769 | (name "python-appdirs") | |
543782e1 | 5770 | (version "1.4.3") |
7e7b27d9 CR |
5771 | (source |
5772 | (origin | |
5773 | (method url-fetch) | |
26b16fd9 | 5774 | (uri (pypi-uri "appdirs" version)) |
7e7b27d9 CR |
5775 | (sha256 |
5776 | (base32 | |
543782e1 | 5777 | "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y")))) |
7e7b27d9 | 5778 | (build-system python-build-system) |
7bf837fd | 5779 | (home-page "https://github.com/ActiveState/appdirs") |
7e7b27d9 CR |
5780 | (synopsis |
5781 | "Determine platform-specific dirs, e.g. a \"user data dir\"") | |
5782 | (description | |
5783 | "This module provides a portable way of finding out where user data | |
5784 | should be stored on various operating systems.") | |
5785 | (license license:expat))) | |
5786 | ||
5787 | (define-public python2-appdirs | |
5788 | (package-with-python2 python-appdirs)) | |
89b2e0b0 LF |
5789 | |
5790 | (define-public python-llfuse | |
5791 | (package | |
5792 | (name "python-llfuse") | |
127dc7c7 | 5793 | (version "1.3.2") |
89b2e0b0 LF |
5794 | (source (origin |
5795 | (method url-fetch) | |
127dc7c7 | 5796 | (uri (pypi-uri "llfuse" version ".tar.bz2")) |
89b2e0b0 LF |
5797 | (sha256 |
5798 | (base32 | |
127dc7c7 | 5799 | "0qxvnbz41bpvpc1vbi8qkhmpr9gj1qrrp5jdj085iqibd8l2l9cn")))) |
89b2e0b0 LF |
5800 | (build-system python-build-system) |
5801 | (inputs | |
5802 | `(("fuse" ,fuse) | |
5803 | ("attr" ,attr))) | |
5804 | (native-inputs | |
f3b98f4f | 5805 | `(("pkg-config" ,pkg-config))) |
89b2e0b0 LF |
5806 | (synopsis "Python bindings for FUSE") |
5807 | (description | |
5808 | "Python-LLFUSE is a set of Python bindings for the low level FUSE API.") | |
5809 | (home-page "https://bitbucket.org/nikratio/python-llfuse/") | |
3f641af0 | 5810 | (license license:lgpl2.0+) |
cd0569c4 | 5811 | (properties `((python2-variant . ,(delay python2-llfuse)))))) |
89b2e0b0 LF |
5812 | |
5813 | (define-public python2-llfuse | |
cd0569c4 LF |
5814 | (package (inherit (package-with-python2 |
5815 | (strip-python2-variant python-llfuse))) | |
5816 | (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))) | |
5817 | ||
5818 | ;; For attic-0.16 | |
5819 | (define-public python-llfuse-0.41 | |
5820 | (package (inherit python-llfuse) | |
229b3661 | 5821 | (version "0.41.1") |
cd0569c4 LF |
5822 | (source (origin |
5823 | (method url-fetch) | |
5824 | (uri (string-append | |
5825 | "https://bitbucket.org/nikratio/python-llfuse/downloads/" | |
5826 | "llfuse-" version ".tar.bz2")) | |
5827 | (sha256 | |
5828 | (base32 | |
229b3661 | 5829 | "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa")))) |
cd0569c4 LF |
5830 | ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat) |
5831 | ;; licensed. The rest of the package is licensed under LGPL2.0 or later. | |
3f641af0 | 5832 | (license (list license:expat license:lgpl2.0+)))) |
641c9871 LF |
5833 | |
5834 | (define-public python-msgpack | |
5835 | (package | |
5836 | (name "python-msgpack") | |
00756446 | 5837 | (version "0.5.6") |
641c9871 LF |
5838 | (source (origin |
5839 | (method url-fetch) | |
00756446 | 5840 | (uri (pypi-uri "msgpack" version)) |
641c9871 LF |
5841 | (sha256 |
5842 | (base32 | |
00756446 | 5843 | "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f")))) |
641c9871 | 5844 | (build-system python-build-system) |
24412398 MB |
5845 | (arguments |
5846 | `(#:modules ((guix build utils) | |
5847 | (guix build python-build-system) | |
5848 | (ice-9 ftw) | |
5849 | (srfi srfi-1) | |
5850 | (srfi srfi-26)) | |
5851 | #:phases | |
5852 | (modify-phases %standard-phases | |
5853 | (replace 'check | |
5854 | (lambda _ | |
5855 | (let ((cwd (getcwd))) | |
5856 | (setenv "PYTHONPATH" | |
5857 | (string-append cwd "/build/" | |
5858 | (find (cut string-prefix? "lib" <>) | |
5859 | (scandir (string-append cwd "/build"))) | |
5860 | ":" | |
5861 | (getenv "PYTHONPATH"))) | |
5862 | (invoke "pytest" "-v" "test"))))))) | |
5863 | (native-inputs | |
5864 | `(("python-pytest" ,python-pytest))) | |
641c9871 LF |
5865 | (synopsis "MessagePack (de)serializer") |
5866 | (description "MessagePack is a fast, compact binary serialization format, | |
5867 | suitable for similar data to JSON. This package provides CPython bindings for | |
5868 | reading and writing MessagePack data.") | |
00756446 | 5869 | (home-page "https://pypi.python.org/pypi/msgpack/") |
f210e944 | 5870 | (license license:asl2.0))) |
bd74be7b | 5871 | |
acb59d99 LF |
5872 | ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with |
5873 | ;; release 0.5. Some packages like borg still call it by the old name for now. | |
5874 | ;; <https://bugs.gnu.org/30662> | |
5875 | (define-public python-msgpack-transitional | |
5876 | (package | |
5877 | (inherit python-msgpack) | |
5878 | (arguments | |
5879 | (substitute-keyword-arguments (package-arguments python-msgpack) | |
5880 | ((#:phases phases) | |
5881 | `(modify-phases ,phases | |
5882 | (add-after 'unpack 'configure-transitional | |
5883 | (lambda _ | |
5884 | ;; Keep using the old name. | |
5885 | (substitute* "setup.py" | |
5886 | (("TRANSITIONAL = False") | |
5887 | "TRANSITIONAL = 1")) | |
5888 | #t)))))))) | |
5889 | ||
bd74be7b | 5890 | (define-public python2-msgpack |
f210e944 | 5891 | (package-with-python2 python-msgpack)) |
641c9871 | 5892 | |
6e5e39f4 CR |
5893 | (define-public python-netaddr |
5894 | (package | |
5895 | (name "python-netaddr") | |
e121be1e | 5896 | (version "0.7.19") |
6e5e39f4 CR |
5897 | (source |
5898 | (origin | |
5899 | (method url-fetch) | |
576c0e29 | 5900 | (uri (pypi-uri "netaddr" version)) |
6e5e39f4 CR |
5901 | (sha256 |
5902 | (base32 | |
e121be1e | 5903 | "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq")))) |
6e5e39f4 CR |
5904 | (build-system python-build-system) |
5905 | (arguments `(#:tests? #f)) ;; No tests. | |
6e5e39f4 CR |
5906 | (home-page "https://github.com/drkjam/netaddr/") |
5907 | (synopsis "Pythonic manipulation of network addresses") | |
5908 | (description | |
5909 | "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI | |
5910 | and MAC network addresses.") | |
3f641af0 | 5911 | (license license:bsd-3))) |
6e5e39f4 CR |
5912 | |
5913 | (define-public python2-netaddr | |
5914 | (package-with-python2 python-netaddr)) | |
8c692a52 CR |
5915 | |
5916 | (define-public python-wrapt | |
5917 | (package | |
5918 | (name "python-wrapt") | |
836de07a | 5919 | (version "1.10.11") |
8c692a52 CR |
5920 | (source |
5921 | (origin | |
5922 | (method url-fetch) | |
d25bee26 | 5923 | (uri (pypi-uri "wrapt" version)) |
8c692a52 CR |
5924 | (sha256 |
5925 | (base32 | |
836de07a | 5926 | "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl")))) |
8c692a52 CR |
5927 | (build-system python-build-system) |
5928 | (arguments | |
5929 | ;; Tests are not included in the tarball, they are only available in the | |
5930 | ;; git repository. | |
5931 | `(#:tests? #f)) | |
8c692a52 CR |
5932 | (home-page "https://github.com/GrahamDumpleton/wrapt") |
5933 | (synopsis "Module for decorators, wrappers and monkey patching") | |
5934 | (description | |
5935 | "The aim of the wrapt module is to provide a transparent object proxy for | |
5936 | Python, which can be used as the basis for the construction of function | |
5937 | wrappers and decorator functions.") | |
3f641af0 | 5938 | (license license:bsd-2))) |
8c692a52 CR |
5939 | |
5940 | (define-public python2-wrapt | |
5941 | (package-with-python2 python-wrapt)) | |
b85c85be | 5942 | |
02a8a187 BW |
5943 | (define-public python-xlrd |
5944 | (package | |
5945 | (name "python-xlrd") | |
c2ad4d70 | 5946 | (version "1.0.0") |
02a8a187 BW |
5947 | (source (origin |
5948 | (method url-fetch) | |
e775f48e | 5949 | (uri (pypi-uri "xlrd" version)) |
02a8a187 BW |
5950 | (sha256 |
5951 | (base32 | |
c2ad4d70 | 5952 | "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g")))) |
02a8a187 BW |
5953 | (build-system python-build-system) |
5954 | (arguments | |
5955 | `(#:phases | |
5956 | (modify-phases %standard-phases | |
c2ad4d70 | 5957 | ;; Current test in setup.py does not work as of 1.0.0, so use nose to |
02a8a187 BW |
5958 | ;; run tests instead for now. |
5959 | (replace 'check (lambda _ (zero? (system* "nosetests"))))))) | |
f3b98f4f | 5960 | (native-inputs `(("python-nose" ,python-nose))) |
02a8a187 BW |
5961 | (home-page "http://www.python-excel.org/") |
5962 | (synopsis "Library for extracting data from Excel files") | |
5963 | (description "This packages provides a library to extract data from | |
c598e35c | 5964 | spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and |
02a8a187 BW |
5965 | @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is |
5966 | Unicode-aware. It is not intended as an end-user tool.") | |
3f641af0 | 5967 | (license license:bsd-3))) |
02a8a187 BW |
5968 | |
5969 | (define-public python2-xlrd | |
5970 | (package-with-python2 python-xlrd)) | |
5971 | ||
350ba0a3 CR |
5972 | (define-public python-prettytable |
5973 | (package | |
5974 | (name "python-prettytable") | |
5975 | (version "0.7.2") | |
5976 | (source | |
5977 | (origin | |
5978 | (method url-fetch) | |
5979 | (uri (string-append | |
5980 | "https://pypi.python.org/packages/source/P/PrettyTable/" | |
5981 | "prettytable-" version ".tar.bz2")) | |
5982 | (sha256 | |
5983 | (base32 | |
5984 | "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45")))) | |
5985 | (build-system python-build-system) | |
350ba0a3 CR |
5986 | (home-page "http://code.google.com/p/prettytable/") |
5987 | (synopsis "Display tabular data in an ASCII table format") | |
5988 | (description | |
5989 | "A library designed to represent tabular data in visually appealing ASCII | |
5990 | tables. PrettyTable allows for selection of which columns are to be printed, | |
5991 | independent alignment of columns (left or right justified or centred) and | |
5992 | printing of sub-tables by specifying a row range.") | |
3f641af0 | 5993 | (license license:bsd-3))) |
350ba0a3 CR |
5994 | |
5995 | (define-public python2-prettytable | |
5996 | (package-with-python2 python-prettytable)) | |
7a8ac75a | 5997 | |
9f8ee3fe RW |
5998 | (define-public python-tables |
5999 | (package | |
6000 | (name "python-tables") | |
6001 | (version "3.2.2") | |
6002 | (source | |
6003 | (origin | |
6004 | (method url-fetch) | |
6005 | (uri (pypi-uri "tables" version)) | |
6006 | (sha256 | |
6007 | (base32 | |
bac23672 HG |
6008 | "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m")) |
6009 | (modules '((guix build utils))) | |
6010 | (snippet | |
6011 | '(begin | |
6012 | ;; Remove pre-compiled .pyc files from source. | |
6013 | (for-each delete-file-recursively | |
6014 | (find-files "." "__pycache__" #:directories? #t)) | |
6015 | (for-each delete-file (find-files "." "\\.pyc$")) | |
6016 | #t)))) | |
9f8ee3fe RW |
6017 | (build-system python-build-system) |
6018 | (arguments | |
6019 | `(;; FIXME: python-build-system does not pass configure-flags to "build" | |
6020 | ;; or "check", so we must override the build and check phases. | |
6021 | #:phases | |
6022 | (modify-phases %standard-phases | |
6023 | (add-after 'unpack 'use-gcc | |
6024 | (lambda _ | |
6025 | (substitute* "setup.py" | |
6026 | (("compiler = new_compiler\\(\\)" line) | |
6027 | (string-append line | |
6028 | "\ncompiler.set_executables(compiler='gcc'," | |
6029 | "compiler_so='gcc'," | |
6030 | "linker_exe='gcc'," | |
6031 | "linker_so='gcc -shared')"))) | |
6032 | #t)) | |
6033 | (replace 'build | |
6034 | (lambda* (#:key inputs #:allow-other-keys) | |
6035 | (zero? (system* "python" "setup.py" "build" | |
6036 | (string-append "--hdf5=" | |
6037 | (assoc-ref inputs "hdf5")))))) | |
6038 | (replace 'check | |
6039 | (lambda* (#:key inputs #:allow-other-keys) | |
6040 | (zero? (system* "python" "setup.py" "check" | |
6041 | (string-append "--hdf5=" | |
6042 | (assoc-ref inputs "hdf5"))))))))) | |
6043 | (propagated-inputs | |
6044 | `(("python-numexpr" ,python-numexpr) | |
6045 | ("python-numpy" ,python-numpy))) | |
6046 | (native-inputs | |
f3b98f4f | 6047 | `(("python-cython" ,python-cython) |
9f8ee3fe RW |
6048 | ("pkg-config" ,pkg-config))) |
6049 | (inputs | |
6050 | `(("hdf5" ,hdf5) | |
6051 | ("bzip2" ,bzip2) | |
6052 | ("zlib" ,zlib))) | |
6053 | (home-page "http://www.pytables.org/") | |
6054 | (synopsis "Hierarchical datasets for Python") | |
6055 | (description "PyTables is a package for managing hierarchical datasets and | |
d1e4ad1b | 6056 | designed to efficiently cope with extremely large amounts of data.") |
3f641af0 | 6057 | (license license:bsd-3))) |
9f8ee3fe RW |
6058 | |
6059 | (define-public python2-tables | |
6060 | (package-with-python2 python-tables)) | |
6061 | ||
7a8ac75a RW |
6062 | (define-public python-pyasn1 |
6063 | (package | |
6064 | (name "python-pyasn1") | |
5e0ddfba | 6065 | (version "0.2.3") |
7a8ac75a RW |
6066 | (source |
6067 | (origin | |
6068 | (method url-fetch) | |
caa0edb3 | 6069 | (uri (pypi-uri "pyasn1" version)) |
7a8ac75a RW |
6070 | (sha256 |
6071 | (base32 | |
5e0ddfba | 6072 | "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k")))) |
7a8ac75a RW |
6073 | (build-system python-build-system) |
6074 | (home-page "http://pyasn1.sourceforge.net/") | |
6075 | (synopsis "ASN.1 types and codecs") | |
6076 | (description | |
6077 | "This is an implementation of ASN.1 types and codecs in Python. It is | |
6078 | suitable for a wide range of protocols based on the ASN.1 specification.") | |
3f641af0 | 6079 | (license license:bsd-2))) |
7a8ac75a RW |
6080 | |
6081 | (define-public python2-pyasn1 | |
6082 | (package-with-python2 python-pyasn1)) | |
9a49a535 | 6083 | |
5988c299 EF |
6084 | (define-public python-pyasn1-modules |
6085 | (package | |
6086 | (name "python-pyasn1-modules") | |
6087 | (version "0.0.8") | |
6088 | (source | |
6089 | (origin | |
6090 | (method url-fetch) | |
6091 | (uri (pypi-uri "pyasn1-modules" version)) | |
6092 | (sha256 | |
6093 | (base32 | |
6094 | "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh")))) | |
6095 | (build-system python-build-system) | |
5988c299 EF |
6096 | (propagated-inputs |
6097 | `(("python-pyasn1" ,python-pyasn1))) | |
3b3b60d0 | 6098 | (home-page "https://sourceforge.net/projects/pyasn1/") |
5988c299 EF |
6099 | (synopsis "ASN.1 codec implementations") |
6100 | (description | |
6101 | "Pyasn1-modules is a collection of Python modules providing ASN.1 types and | |
6102 | implementations of ASN.1-based codecs and protocols.") | |
3f641af0 | 6103 | (license license:bsd-3))) |
5988c299 EF |
6104 | |
6105 | (define-public python2-pyasn1-modules | |
6106 | (package-with-python2 python-pyasn1-modules)) | |
6107 | ||
520af157 | 6108 | (define-public python-ipaddress |
9a49a535 | 6109 | (package |
520af157 | 6110 | (name "python-ipaddress") |
36e0d9db | 6111 | (version "1.0.18") |
520af157 DC |
6112 | (source (origin |
6113 | (method url-fetch) | |
6114 | (uri (pypi-uri "ipaddress" version)) | |
6115 | (sha256 | |
6116 | (base32 | |
36e0d9db | 6117 | "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax")))) |
9a49a535 | 6118 | (build-system python-build-system) |
9a49a535 RW |
6119 | (home-page "https://github.com/phihag/ipaddress") |
6120 | (synopsis "IP address manipulation library") | |
6121 | (description | |
520af157 DC |
6122 | "This package provides a fast, lightweight IPv4/IPv6 manipulation library |
6123 | in Python. This library is used to create, poke at, and manipulate IPv4 and | |
6124 | IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress | |
6125 | module to older versions of Python.") | |
f210e944 | 6126 | (license license:psfl))) |
520af157 DC |
6127 | |
6128 | (define-public python2-ipaddress | |
f210e944 | 6129 | (package-with-python2 python-ipaddress)) |
3f00e078 | 6130 | |
4a238186 HG |
6131 | (define-public python2-ipaddr |
6132 | (package | |
6133 | (name "python2-ipaddr") | |
6134 | (version "2.1.11") | |
6135 | (source | |
6136 | (origin | |
6137 | (method url-fetch) | |
6138 | (uri (pypi-uri "ipaddr" version)) | |
6139 | (sha256 | |
6140 | (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v")))) | |
6141 | (build-system python-build-system) | |
6142 | (arguments | |
6143 | `(#:python ,python-2 ;version 2 only | |
6144 | #:phases | |
6145 | (modify-phases %standard-phases | |
6146 | (replace 'check | |
6147 | (lambda* _ | |
6148 | (zero? (system* "python" "ipaddr_test.py"))))))) | |
6149 | (home-page "https://github.com/google/ipaddr-py") | |
6150 | (synopsis "IP address manipulation library") | |
6151 | (description | |
6152 | "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and | |
6153 | IPv6 addresses and networks. | |
6154 | ||
6155 | For new implementations you may prefer to use the standard module | |
6156 | @code{ipaddress}, which was introduced in Python 3.3 and backported to older | |
6157 | versions of Python.") | |
3f641af0 | 6158 | (license license:asl2.0))) |
4a238186 | 6159 | |
3f00e078 RW |
6160 | (define-public python-idna |
6161 | (package | |
6162 | (name "python-idna") | |
0ee12dc9 | 6163 | (version "2.6") |
3f00e078 RW |
6164 | (source |
6165 | (origin | |
6166 | (method url-fetch) | |
37c04f91 | 6167 | (uri (pypi-uri "idna" version)) |
3f00e078 RW |
6168 | (sha256 |
6169 | (base32 | |
0ee12dc9 | 6170 | "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic")))) |
3f00e078 | 6171 | (build-system python-build-system) |
3f00e078 RW |
6172 | (home-page "https://github.com/kjd/idna") |
6173 | (synopsis "Internationalized domain names in applications") | |
6174 | (description | |
6175 | "This is a library to support the Internationalised Domain Names in | |
6176 | Applications (IDNA) protocol as specified in RFC 5891. This version of the | |
6177 | protocol is often referred to as “IDNA2008” and can produce different results | |
6178 | from the earlier standard from 2003. The library is also intended to act as a | |
6179 | suitable drop-in replacement for the “encodings.idna” module that comes with | |
6180 | the Python standard library but currently only supports the older 2003 | |
6181 | specification.") | |
3f641af0 | 6182 | (license license:bsd-4))) |
3f00e078 RW |
6183 | |
6184 | (define-public python2-idna | |
6185 | (package-with-python2 python-idna)) | |
5af999b8 | 6186 | |
36ebf972 | 6187 | (define-public python-pretend |
5af999b8 | 6188 | (package |
36ebf972 RW |
6189 | (name "python-pretend") |
6190 | (version "1.0.8") | |
5af999b8 RW |
6191 | (source |
6192 | (origin | |
6193 | (method url-fetch) | |
36ebf972 RW |
6194 | (uri (string-append "https://pypi.python.org/packages/source/p/" |
6195 | "pretend/pretend-" version ".tar.gz")) | |
5af999b8 RW |
6196 | (sha256 |
6197 | (base32 | |
36ebf972 | 6198 | "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk")))) |
5af999b8 | 6199 | (build-system python-build-system) |
36ebf972 RW |
6200 | (home-page "https://github.com/alex/pretend") |
6201 | (synopsis "Library for stubbing in Python") | |
5af999b8 | 6202 | (description |
36ebf972 RW |
6203 | "Pretend is a library to make stubbing with Python easier. Stubbing is a |
6204 | technique for writing tests. You may hear the term mixed up with mocks, | |
6205 | fakes, or doubles. Basically, a stub is an object that returns pre-canned | |
6206 | responses, rather than doing any computation.") | |
3f641af0 | 6207 | (license license:bsd-3))) |
5af999b8 | 6208 | |
36ebf972 RW |
6209 | (define-public python2-pretend |
6210 | (package-with-python2 python-pretend)) | |
643725a1 CR |
6211 | |
6212 | (define-public python-pip | |
6213 | (package | |
6214 | (name "python-pip") | |
392c26b0 | 6215 | (version "9.0.1") |
643725a1 CR |
6216 | (source |
6217 | (origin | |
6218 | (method url-fetch) | |
6fb54e3b | 6219 | (uri (pypi-uri "pip" version)) |
643725a1 CR |
6220 | (sha256 |
6221 | (base32 | |
392c26b0 | 6222 | "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9")))) |
643725a1 | 6223 | (build-system python-build-system) |
392c26b0 MC |
6224 | (arguments |
6225 | '(#:tests? #f)) ; there are no tests in the pypi archive. | |
643725a1 | 6226 | (home-page "https://pip.pypa.io/") |
392c26b0 | 6227 | (synopsis "Package manager for Python software") |
643725a1 | 6228 | (description |
392c26b0 | 6229 | "Pip is a package manager for Python software, that finds packages on the |
643725a1 CR |
6230 | Python Package Index (PyPI).") |
6231 | (license license:expat))) | |
6232 | ||
6233 | (define-public python2-pip | |
6234 | (package-with-python2 python-pip)) | |
d8c4998f LC |
6235 | |
6236 | (define-public python-tlsh | |
6237 | (package | |
6238 | (name "python-tlsh") | |
99b00dc7 | 6239 | (version "3.4.4") |
d8c4998f LC |
6240 | (home-page "https://github.com/trendmicro/tlsh") |
6241 | (source (origin | |
99b00dc7 EF |
6242 | (method url-fetch) |
6243 | (uri (string-append "https://github.com/trendmicro/tlsh/archive/v" | |
6244 | version ".tar.gz")) | |
d8c4998f LC |
6245 | (sha256 |
6246 | (base32 | |
99b00dc7 EF |
6247 | "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r")) |
6248 | (file-name (string-append name "-" version ".tar.gz")))) | |
d8c4998f LC |
6249 | (build-system cmake-build-system) |
6250 | (arguments | |
6251 | '(#:out-of-source? #f | |
6252 | #:phases (modify-phases %standard-phases | |
6253 | (replace | |
6254 | 'install | |
6255 | (lambda* (#:key outputs #:allow-other-keys) | |
6256 | ;; Build and install the Python bindings. The underlying | |
6257 | ;; C++ library is apparently not meant to be installed. | |
6258 | (let ((out (assoc-ref outputs "out"))) | |
6259 | (with-directory-excursion "py_ext" | |
6260 | (and (system* "python" "setup.py" "build") | |
6261 | (system* "python" "setup.py" "install" | |
6262 | (string-append "--prefix=" out)))))))))) | |
6263 | (inputs `(("python" ,python-wrapper))) ;for the bindings | |
6264 | (synopsis "Fuzzy matching library for Python") | |
6265 | (description | |
6266 | "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library. | |
6267 | Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash | |
6268 | value which can be used for similarity comparisons. Similar objects have | |
6269 | similar hash values, which allows for the detection of similar objects by | |
6270 | comparing their hash values. The byte stream should have a sufficient amount | |
6271 | of complexity; for example, a byte stream of identical bytes will not generate | |
6272 | a hash value.") | |
3f641af0 | 6273 | (license license:asl2.0))) |
d8c4998f LC |
6274 | |
6275 | (define-public python2-tlsh | |
6276 | (package | |
6277 | (inherit python-tlsh) | |
6278 | (name "python2-tlsh") | |
6279 | (inputs `(("python" ,python-2))))) | |
d96034ed | 6280 | |
67f66812 BW |
6281 | (define-public python-termcolor |
6282 | (package | |
6283 | (name "python-termcolor") | |
6284 | (version "1.1.0") | |
6285 | (source | |
6286 | (origin | |
6287 | (method url-fetch) | |
a5e8f597 | 6288 | (uri (pypi-uri "termcolor" version)) |
67f66812 BW |
6289 | (sha256 |
6290 | (base32 | |
6291 | "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x")))) | |
6292 | (build-system python-build-system) | |
6293 | (arguments | |
6294 | ;; There are no tests. | |
6295 | `(#:tests? #f)) | |
9be5ecdf | 6296 | (home-page "https://pypi.python.org/pypi/termcolor") |
67f66812 BW |
6297 | (synopsis "ANSII Color formatting for terminal output") |
6298 | (description | |
6299 | "This package provides ANSII Color formatting for output in terminals.") | |
6300 | (license license:expat))) | |
6301 | ||
6302 | (define-public python2-termcolor | |
6303 | (package-with-python2 python-termcolor)) | |
6304 | ||
d96034ed LC |
6305 | (define-public python-libarchive-c |
6306 | (package | |
6307 | (name "python-libarchive-c") | |
03fd001c | 6308 | (version "2.2") |
d96034ed LC |
6309 | (source (origin |
6310 | (method url-fetch) | |
03fd001c | 6311 | (uri (pypi-uri "libarchive-c" version)) |
d96034ed LC |
6312 | (sha256 |
6313 | (base32 | |
03fd001c | 6314 | "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x")))) |
d96034ed LC |
6315 | (build-system python-build-system) |
6316 | (arguments | |
6317 | '(#:phases (modify-phases %standard-phases | |
6318 | (add-before | |
6319 | 'build 'reference-libarchive | |
6320 | (lambda* (#:key inputs #:allow-other-keys) | |
6321 | ;; Retain the absolute file name of libarchive.so. | |
6322 | (let ((libarchive (assoc-ref inputs "libarchive"))) | |
6323 | (substitute* "libarchive/ffi.py" | |
6324 | (("find_library\\('archive'\\)") | |
6325 | (string-append "'" libarchive | |
b41a05ce | 6326 | "/lib/libarchive.so'"))))))))) |
d96034ed | 6327 | (inputs |
f3b98f4f | 6328 | `(("libarchive" ,libarchive))) |
d96034ed LC |
6329 | (home-page "https://github.com/Changaco/python-libarchive-c") |
6330 | (synopsis "Python interface to libarchive") | |
6331 | (description | |
6332 | "This package provides Python bindings to libarchive, a C library to | |
6333 | access possibly compressed archives in many different formats. It uses | |
6334 | Python's @code{ctypes} foreign function interface (FFI).") | |
3f641af0 | 6335 | (license license:lgpl2.0+))) |
d96034ed LC |
6336 | |
6337 | (define-public python2-libarchive-c | |
6338 | (package-with-python2 python-libarchive-c)) | |
5e1c9367 LC |
6339 | |
6340 | (define-public python-file | |
6341 | (package | |
6342 | (inherit file) | |
6343 | (name "python-file") | |
6344 | (build-system python-build-system) | |
6345 | (arguments | |
6346 | '(#:tests? #f ;no tests | |
00bf74be | 6347 | #:configure-flags '("--single-version-externally-managed" "--root=/") |
5e1c9367 LC |
6348 | #:phases (modify-phases %standard-phases |
6349 | (add-before 'build 'change-directory | |
6350 | (lambda _ | |
6351 | (chdir "python") | |
6352 | #t)) | |
6353 | (add-before 'build 'set-library-file-name | |
6354 | (lambda* (#:key inputs #:allow-other-keys) | |
6355 | (let ((file (assoc-ref inputs "file"))) | |
6356 | (substitute* "magic.py" | |
6357 | (("find_library\\('magic'\\)") | |
6358 | (string-append "'" file "/lib/libmagic.so'"))) | |
6359 | #t)))))) | |
6360 | (inputs `(("file" ,file))) | |
6361 | (self-native-input? #f) | |
daeeea71 CM |
6362 | (synopsis "Python bindings to the libmagic file type guesser. Note that |
6363 | this module and the python-magic module both provide a \"magic.py\" file; | |
6364 | these two modules, which are different and were developed separately, both | |
f210e944 | 6365 | serve the same purpose: provide Python bindings for libmagic."))) |
5e1c9367 LC |
6366 | |
6367 | (define-public python2-file | |
f210e944 | 6368 | (package-with-python2 python-file)) |
85d4aeac LC |
6369 | |
6370 | (define-public python-debian | |
6371 | (package | |
6372 | (name "python-debian") | |
02d7f337 | 6373 | (version "0.1.28") |
85d4aeac LC |
6374 | (source |
6375 | (origin | |
6376 | (method url-fetch) | |
5e217a8b | 6377 | (uri (pypi-uri name version)) |
85d4aeac LC |
6378 | (sha256 |
6379 | (base32 | |
02d7f337 | 6380 | "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y")))) |
85d4aeac | 6381 | (build-system python-build-system) |
f22efa01 | 6382 | (propagated-inputs |
85d4aeac | 6383 | `(("python-six" ,python-six))) |
85d4aeac LC |
6384 | (home-page "http://packages.debian.org/sid/python-debian") |
6385 | (synopsis "Debian package related modules") | |
6386 | (description | |
5c7bdc9a LC |
6387 | ;; XXX: Use @enumerate instead of @itemize to work around |
6388 | ;; <http://bugs.gnu.org/21772>. | |
85d4aeac LC |
6389 | "This package provides Python modules that abstract many formats of |
6390 | Debian-related files, such as: | |
6391 | ||
5c7bdc9a | 6392 | @enumerate |
85d4aeac LC |
6393 | @item Debtags information; |
6394 | @item @file{debian/changelog} files; | |
6395 | @item packages files, pdiffs; | |
6396 | @item control files of single or multiple RFC822-style paragraphs---e.g. | |
6397 | @file{debian/control}, @file{.changes}, @file{.dsc}; | |
6398 | @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to | |
6399 | contained files and meta-information. | |
5c7bdc9a | 6400 | @end enumerate\n") |
85d4aeac LC |
6401 | |
6402 | ;; Modules are either GPLv2+ or GPLv3+. | |
3f641af0 | 6403 | (license license:gpl3+))) |
85d4aeac LC |
6404 | |
6405 | (define-public python2-debian | |
6406 | (package-with-python2 python-debian)) | |
816a6538 | 6407 | |
2d321bb2 RW |
6408 | (define-public python-nbformat |
6409 | (package | |
6410 | (name "python-nbformat") | |
ae7f246c | 6411 | (version "4.3.0") |
2d321bb2 RW |
6412 | (source |
6413 | (origin | |
6414 | (method url-fetch) | |
6415 | (uri (pypi-uri "nbformat" version)) | |
6416 | (sha256 | |
6417 | (base32 | |
ae7f246c | 6418 | "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz")))) |
2d321bb2 RW |
6419 | (build-system python-build-system) |
6420 | (arguments `(#:tests? #f)) ; no test target | |
6421 | (propagated-inputs | |
6422 | `(("python-ipython-genutils" ,python-ipython-genutils) | |
6423 | ("python-jsonschema" ,python-jsonschema) | |
6424 | ("python-jupyter-core" ,python-jupyter-core) | |
6425 | ("python-traitlets" ,python-traitlets))) | |
2d321bb2 RW |
6426 | (home-page "http://jupyter.org") |
6427 | (synopsis "Jupyter Notebook format") | |
6428 | (description "This package provides the reference implementation of the | |
6429 | Jupyter Notebook format and Python APIs for working with notebooks.") | |
6430 | (license license:bsd-3))) | |
6431 | ||
6432 | (define-public python2-nbformat | |
6433 | (package-with-python2 python-nbformat)) | |
6434 | ||
55436048 RW |
6435 | (define-public python-bleach |
6436 | (package | |
6437 | (name "python-bleach") | |
6438 | (version "1.4.3") | |
6439 | (source | |
6440 | (origin | |
6441 | (method url-fetch) | |
6442 | (uri (pypi-uri "bleach" version)) | |
6443 | (sha256 | |
6444 | (base32 | |
6445 | "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj")))) | |
6446 | (build-system python-build-system) | |
6447 | (propagated-inputs | |
6448 | `(("python-html5lib" ,python-html5lib-0.9) | |
55436048 RW |
6449 | ("python-six" ,python-six))) |
6450 | (native-inputs | |
6451 | `(("python-nose" ,python-nose))) | |
7bf837fd | 6452 | (home-page "https://github.com/jsocol/bleach") |
55436048 RW |
6453 | (synopsis "Whitelist-based HTML-sanitizing tool") |
6454 | (description "Bleach is an easy whitelist-based HTML-sanitizing tool.") | |
6455 | (license license:asl2.0))) | |
6456 | ||
6457 | (define-public python2-bleach | |
6458 | (package-with-python2 python-bleach)) | |
6459 | ||
60590a3a RW |
6460 | (define-public python-entrypoints |
6461 | (package | |
6462 | (name "python-entrypoints") | |
6463 | (version "0.2.2") | |
6464 | (source | |
6465 | (origin | |
6466 | (method url-fetch) | |
6467 | (uri (string-append "https://github.com/takluyver/entrypoints/archive/" | |
6468 | version ".tar.gz")) | |
6469 | (file-name (string-append name "-" version ".tar.gz")) | |
6470 | (sha256 | |
6471 | (base32 | |
6472 | "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5")))) | |
6473 | (build-system python-build-system) | |
6474 | ;; The package does not come with a setup.py file, so we have to generate | |
6475 | ;; one ourselves. | |
6476 | (arguments | |
6477 | `(#:tests? #f | |
6478 | #:phases | |
6479 | (modify-phases %standard-phases | |
6480 | (add-after 'unpack 'create-setup.py | |
6481 | (lambda _ | |
6482 | (call-with-output-file "setup.py" | |
6483 | (lambda (port) | |
6484 | (format port "\ | |
6485 | from setuptools import setup | |
6486 | setup(name='entrypoints', version='~a', py_modules=['entrypoints']) | |
6487 | " ,version)))))))) | |
6488 | (home-page "https://github.com/takluyver/entrypoints") | |
6489 | (synopsis "Discover and load entry points from installed Python packages") | |
6490 | (description "Entry points are a way for Python packages to advertise | |
6491 | objects with some common interface. The most common examples are | |
6492 | @code{console_scripts} entry points, which define shell commands by | |
6493 | identifying a Python function to run. The @code{entrypoints} module contains | |
6494 | functions to find and load entry points.") | |
6495 | (license license:expat))) | |
6496 | ||
6497 | (define-public python2-entrypoints | |
6498 | (package-with-python2 python-entrypoints)) | |
6499 | ||
c60898a8 RW |
6500 | (define-public python-nbconvert |
6501 | (package | |
6502 | (name "python-nbconvert") | |
6503 | (version "5.0.0b1") | |
6504 | (source | |
6505 | (origin | |
6506 | (method url-fetch) | |
6507 | (uri (pypi-uri "nbconvert" version)) | |
6508 | (sha256 | |
6509 | (base32 | |
6510 | "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp")))) | |
6511 | (build-system python-build-system) | |
497355dc MB |
6512 | (arguments |
6513 | `(;; The "bdist_egg" target is disabled by default, causing the installation | |
6514 | ;; to fail. | |
6515 | #:configure-flags (list "bdist_egg") | |
6516 | ;; FIXME: 5 failures, 40 errors. | |
6517 | #:tests? #f)) | |
6518 | ;; #:phases | |
6519 | ;; (modify-phases %standard-phases | |
6520 | ;; (replace 'check | |
6521 | ;; (lambda _ | |
6522 | ;; (zero? (system* "py.test" "-v"))))) | |
6523 | (native-inputs | |
6524 | `(("python-pytest" ,python-pytest))) | |
c60898a8 RW |
6525 | (propagated-inputs |
6526 | `(("python-bleach" ,python-bleach) | |
6527 | ("python-entrypoints" ,python-entrypoints) | |
6528 | ("python-jinja2" ,python-jinja2) | |
6529 | ("python-jupyter-core" ,python-jupyter-core) | |
6530 | ("python-mistune" ,python-mistune) | |
6531 | ("python-nbformat" ,python-nbformat) | |
6532 | ("python-pygments" ,python-pygments) | |
c60898a8 RW |
6533 | ("python-traitlets" ,python-traitlets))) |
6534 | (home-page "http://jupyter.org") | |
6535 | (synopsis "Converting Jupyter Notebooks") | |
6536 | (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts | |
6537 | notebooks to various other formats via Jinja templates. It allows you to | |
6538 | convert an @code{.ipynb} notebook file into various static formats including: | |
6539 | ||
6540 | @enumerate | |
6541 | @item HTML | |
6542 | @item LaTeX | |
6543 | @item PDF | |
6544 | @item Reveal JS | |
6545 | @item Markdown (md) | |
6546 | @item ReStructured Text (rst) | |
6547 | @item executable script | |
6548 | @end enumerate\n") | |
6549 | (license license:bsd-3))) | |
6550 | ||
6551 | (define-public python2-nbconvert | |
6552 | (package-with-python2 python-nbconvert)) | |
6553 | ||
a0d62280 RW |
6554 | (define-public python-notebook |
6555 | (package | |
6556 | (name "python-notebook") | |
6557 | (version "4.2.3") | |
6558 | (source (origin | |
6559 | (method url-fetch) | |
6560 | (uri (pypi-uri "notebook" version)) | |
6561 | (sha256 | |
6562 | (base32 | |
6563 | "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r")))) | |
6564 | (build-system python-build-system) | |
6565 | (arguments | |
6566 | `(#:phases | |
6567 | (modify-phases %standard-phases | |
6568 | (replace 'check | |
6569 | (lambda _ | |
6570 | ;; HOME must be set for tests | |
6571 | (setenv "HOME" "/tmp") | |
6572 | (zero? (system* "nosetests"))))))) | |
6573 | (propagated-inputs | |
6574 | `(("python-jupyter-core" ,python-jupyter-core) | |
6575 | ("python-nbformat" ,python-nbformat) | |
6576 | ("python-nbconvert" ,python-nbconvert) | |
6577 | ("python-ipython" ,python-ipython))) | |
6578 | (native-inputs | |
6579 | `(("python-nose" ,python-nose) | |
6580 | ("python-sphinx" ,python-sphinx) | |
6581 | ("python-requests" ,python-requests))) | |
6582 | (home-page "http://jupyter.org/") | |
6583 | (synopsis "Web-based notebook environment for interactive computing") | |
6584 | (description | |
6585 | "The Jupyter HTML notebook is a web-based notebook environment for | |
6586 | interactive computing.") | |
3a735ecf | 6587 | (properties `((python2-variant . ,(delay python2-notebook)))) |
a0d62280 RW |
6588 | (license license:bsd-3))) |
6589 | ||
6590 | (define-public python2-notebook | |
3a735ecf HG |
6591 | (let ((base (package-with-python2 |
6592 | (strip-python2-variant python-notebook)))) | |
6593 | (package (inherit base) | |
6594 | (native-inputs | |
6595 | `(("python2-mock" ,python2-mock) | |
6596 | ,@(package-native-inputs base))) | |
6597 | (arguments | |
6598 | (substitute-keyword-arguments (package-arguments base) | |
6599 | ((#:phases phases) | |
6600 | `(modify-phases ,phases | |
6601 | (add-before 'check 'disable-test-case | |
6602 | ;; The test requires network access to localhost. Curiously it | |
6603 | ;; fails with Python 2 only. Simply make the test-case return | |
6604 | ;; immediately. | |
6605 | (lambda _ | |
6606 | (substitute* | |
6607 | "notebook/services/nbconvert/tests/test_nbconvert_api.py" | |
6608 | (("formats = self.nbconvert_api") "return #"))))))))))) | |
a0d62280 | 6609 | |
d55724ed RW |
6610 | (define-public python-widgetsnbextension |
6611 | (package | |
6612 | (name "python-widgetsnbextension") | |
6613 | (version "1.2.6") | |
6614 | (source | |
6615 | (origin | |
6616 | (method url-fetch) | |
6617 | (uri (pypi-uri "widgetsnbextension" version)) | |
6618 | (sha256 | |
6619 | (base32 | |
6620 | "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666")))) | |
6621 | (build-system python-build-system) | |
6622 | (propagated-inputs | |
6623 | `(("python-notebook" ,python-notebook))) | |
6624 | (native-inputs | |
58f5fae7 MB |
6625 | `(("python-certifi" ,python-certifi) |
6626 | ("python-nose" ,python-nose))) | |
3ca1545b | 6627 | (home-page "https://ipython.org") |
d55724ed RW |
6628 | (synopsis "IPython HTML widgets for Jupyter") |
6629 | (description "This package provides interactive HTML widgets for Jupyter | |
6630 | notebooks.") | |
6631 | (license license:bsd-3))) | |
6632 | ||
6633 | (define-public python2-widgetsnbextension | |
6634 | (package-with-python2 python-widgetsnbextension)) | |
6635 | ||
4fe2e344 RW |
6636 | (define-public python-ipywidgets |
6637 | (package | |
6638 | (name "python-ipywidgets") | |
6639 | (version "5.2.2") | |
6640 | (source | |
6641 | (origin | |
6642 | (method url-fetch) | |
6643 | (uri (pypi-uri "ipywidgets" version)) | |
6644 | (sha256 | |
6645 | (base32 | |
6646 | "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms")))) | |
6647 | (build-system python-build-system) | |
6648 | ;; FIXME: it's not clear how to run the tests. | |
6649 | (arguments `(#:tests? #f)) | |
6650 | (propagated-inputs | |
6651 | `(("python-ipykernel" ,python-ipykernel) | |
6652 | ("python-ipython" ,python-ipython) | |
4fe2e344 RW |
6653 | ("python-traitlets" ,python-traitlets) |
6654 | ("python-widgetsnbextension" ,python-widgetsnbextension))) | |
3ca1545b | 6655 | (home-page "https://ipython.org") |
4fe2e344 RW |
6656 | (synopsis "IPython HTML widgets for Jupyter") |
6657 | (description "Ipywidgets are interactive HTML widgets for Jupyter | |
6658 | notebooks and the IPython kernel. Notebooks come alive when interactive | |
6659 | widgets are used. Users gain control of their data and can visualize changes | |
6660 | in the data.") | |
6661 | (license license:bsd-3))) | |
6662 | ||
6663 | (define-public python2-ipywidgets | |
6664 | (package-with-python2 python-ipywidgets)) | |
6665 | ||
8ceebf8f RW |
6666 | (define-public python-jupyter-console |
6667 | (package | |
6668 | (name "python-jupyter-console") | |
6669 | (version "5.0.0") | |
6670 | (source | |
6671 | (origin | |
6672 | (method url-fetch) | |
6673 | (uri (pypi-uri "jupyter_console" version)) | |
6674 | (sha256 | |
6675 | (base32 | |
6676 | "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx")))) | |
6677 | (build-system python-build-system) | |
6678 | ;; FIXME: it's not clear how to run the tests. | |
6679 | (arguments `(#:tests? #f)) | |
6680 | (propagated-inputs | |
6681 | `(("python-ipykernel" ,python-ipykernel) | |
6682 | ("python-ipython" ,python-ipython) | |
6683 | ("python-jupyter-client" ,python-jupyter-client) | |
6684 | ("python-prompt-toolkit" ,python-prompt-toolkit) | |
f3b98f4f | 6685 | ("python-pygments" ,python-pygments))) |
8ceebf8f RW |
6686 | (home-page "https://jupyter.org") |
6687 | (synopsis "Jupyter terminal console") | |
6688 | (description "This package provides a terminal-based console frontend for | |
6689 | Jupyter kernels. It also allows for console-based interaction with non-Python | |
6690 | Jupyter kernels such as IJulia and IRKernel.") | |
6691 | (license license:bsd-3))) | |
6692 | ||
6693 | (define-public python2-jupyter-console | |
6694 | (package-with-python2 python-jupyter-console)) | |
6695 | ||
ee8aab1f CB |
6696 | ;; The python-ipython and python-jupyter-console require each other. To get |
6697 | ;; the functionality in both packages working, strip down the | |
6698 | ;; python-jupyter-console package when using it as an input to python-ipython. | |
6699 | (define python-jupyter-console-minimal | |
2ad52086 | 6700 | (package |
ee8aab1f | 6701 | (inherit python-jupyter-console) |
a5e3d59b | 6702 | (name "python-jupyter-console-minimal") |
66b3aadb | 6703 | (arguments |
ee8aab1f CB |
6704 | (substitute-keyword-arguments |
6705 | (package-arguments python-jupyter-console) | |
6706 | ((#:phases phases) | |
6707 | `(modify-phases ,phases | |
6708 | (add-after 'install 'delete-bin | |
6709 | (lambda* (#:key outputs #:allow-other-keys) | |
6710 | ;; Delete the bin files, to avoid conflicts in profiles | |
6711 | ;; where python-ipython and python-jupyter-console are | |
6712 | ;; both present. | |
6713 | (delete-file-recursively | |
6714 | (string-append | |
6715 | (assoc-ref outputs "out") "/bin")))))))) | |
6716 | ;; Remove the python-ipython propagated input, to avoid the cycle | |
2ad52086 | 6717 | (propagated-inputs |
ee8aab1f CB |
6718 | (alist-delete |
6719 | "python-ipython" | |
6720 | (package-propagated-inputs python-jupyter-console))))) | |
f404b5ea | 6721 | |
c27ae827 | 6722 | (define-public jupyter |
f404b5ea | 6723 | (package |
c27ae827 RW |
6724 | (name "jupyter") |
6725 | (version "1.0.0") | |
f404b5ea LF |
6726 | (source |
6727 | (origin | |
6728 | (method url-fetch) | |
c27ae827 | 6729 | (uri (pypi-uri "jupyter" version)) |
f404b5ea LF |
6730 | (sha256 |
6731 | (base32 | |
c27ae827 | 6732 | "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r")))) |
f404b5ea | 6733 | (build-system python-build-system) |
c27ae827 RW |
6734 | ;; FIXME: it's not clear how to run the tests. |
6735 | (arguments `(#:tests? #f)) | |
d27f176a | 6736 | (propagated-inputs |
c27ae827 RW |
6737 | `(("python-ipykernel" ,python-ipykernel) |
6738 | ("python-ipywidgets" ,python-ipywidgets) | |
6739 | ("python-jupyter-console" ,python-jupyter-console) | |
6740 | ("python-nbconvert" ,python-nbconvert) | |
f3b98f4f | 6741 | ("python-notebook" ,python-notebook))) |
c27ae827 RW |
6742 | (home-page "http://jupyter.org") |
6743 | (synopsis "Web application for interactive documents") | |
6744 | (description | |
6745 | "The Jupyter Notebook is a web application that allows you to create and | |
6746 | share documents that contain live code, equations, visualizations and | |
6747 | explanatory text. Uses include: data cleaning and transformation, numerical | |
6748 | simulation, statistical modeling, machine learning and much more.") | |
6749 | (license license:bsd-3))) | |
d4b77f36 | 6750 | |
816a6538 | 6751 | (define-public python-chardet |
d4b77f36 | 6752 | (package |
816a6538 | 6753 | (name "python-chardet") |
a54cb3ce | 6754 | (version "3.0.4") |
d4b77f36 LF |
6755 | (source |
6756 | (origin | |
6757 | (method url-fetch) | |
ef7dd2e2 | 6758 | (uri (pypi-uri "chardet" version)) |
d4b77f36 LF |
6759 | (sha256 |
6760 | (base32 | |
a54cb3ce | 6761 | "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4")))) |
a74f9b12 | 6762 | (native-inputs |
a54cb3ce CR |
6763 | `(("python-hypothesis" ,python-hypothesis) |
6764 | ("python-pytest" ,python-pytest) | |
6765 | ("python-pytest-runner" ,python-pytest-runner))) | |
816a6538 | 6766 | (build-system python-build-system) |
816a6538 LC |
6767 | (home-page "https://github.com/chardet/chardet") |
6768 | (synopsis "Universal encoding detector for Python 2 and 3") | |
6769 | (description | |
6770 | "This package provides @code{chardet}, a Python module that can | |
6771 | automatically detect a wide range of file encodings.") | |
3f641af0 | 6772 | (license license:lgpl2.1+))) |
d4b77f36 | 6773 | |
816a6538 LC |
6774 | (define-public python2-chardet |
6775 | (package-with-python2 python-chardet)) | |
a6b61b27 | 6776 | |
1872f1bb | 6777 | (define-public python-docopt |
a6b61b27 | 6778 | (package |
1872f1bb KM |
6779 | (name "python-docopt") |
6780 | (version "0.6.2") | |
a6b61b27 LF |
6781 | (source |
6782 | (origin | |
6783 | (method url-fetch) | |
1872f1bb KM |
6784 | ;; The release on PyPI does not include tests. |
6785 | (uri (string-append | |
6786 | "https://github.com/docopt/docopt/archive/" | |
6787 | version ".tar.gz")) | |
6788 | (file-name (string-append name "-" version ".tar.gz")) | |
a6b61b27 LF |
6789 | (sha256 |
6790 | (base32 | |
1872f1bb | 6791 | "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1")))) |
a6b61b27 | 6792 | (build-system python-build-system) |
a6b61b27 | 6793 | (native-inputs |
f3b98f4f | 6794 | `(("python-pytest" ,python-pytest))) |
1872f1bb | 6795 | (arguments |
dc1d3cde KK |
6796 | `(#:phases |
6797 | (modify-phases %standard-phases | |
6798 | (replace 'check | |
6799 | (lambda _ (zero? (system* "py.test"))))))) | |
1872f1bb KM |
6800 | (home-page "http://docopt.org") |
6801 | (synopsis "Command-line interface description language for Python") | |
6802 | (description "This library allows the user to define a command-line | |
6803 | interface from a program's help message rather than specifying it | |
6804 | programatically with command-line parsers like @code{getopt} and | |
6805 | @code{argparse}.") | |
6806 | (license license:expat))) | |
a6b61b27 | 6807 | |
1872f1bb KM |
6808 | (define-public python2-docopt |
6809 | (package-with-python2 python-docopt)) | |
3859ac12 | 6810 | |
1ae44b80 | 6811 | (define-public python-pythondialog |
b5f218be | 6812 | (package |
1ae44b80 | 6813 | (name "python-pythondialog") |
42c4b246 | 6814 | (version "3.4.0") |
b5f218be LF |
6815 | (source |
6816 | (origin | |
6817 | (method url-fetch) | |
1ae44b80 | 6818 | (uri (pypi-uri "pythondialog" version)) |
b5f218be LF |
6819 | (sha256 |
6820 | (base32 | |
1ae44b80 | 6821 | "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c")))) |
b5f218be LF |
6822 | (build-system python-build-system) |
6823 | (arguments | |
6824 | `(#:phases | |
6825 | (modify-phases %standard-phases | |
6826 | (add-after 'unpack 'patch-path | |
6827 | (lambda* (#:key inputs #:allow-other-keys) | |
6828 | (let* ((dialog (assoc-ref inputs "dialog"))) | |
6829 | ;; Since this library really wants to grovel the search path, we | |
6830 | ;; must hardcode dialog's store path into it. | |
6831 | (substitute* "dialog.py" | |
6832 | (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)") | |
6833 | (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\""))) | |
6834 | #t)))) | |
b5f218be LF |
6835 | #:tests? #f)) ; no test suite |
6836 | (propagated-inputs | |
6837 | `(("dialog" ,dialog))) | |
6838 | (home-page "http://pythondialog.sourceforge.net/") | |
6839 | (synopsis "Python interface to the UNIX dialog utility") | |
6840 | (description "A Python wrapper for the dialog utility. Its purpose is to | |
6841 | provide an easy to use, pythonic and comprehensive Python interface to dialog. | |
6842 | This allows one to make simple text-mode user interfaces on Unix-like systems") | |
3f641af0 | 6843 | (license license:lgpl2.1) |
1ae44b80 LF |
6844 | (properties `((python2-variant . ,(delay python2-pythondialog)))))) |
6845 | ||
6846 | (define-public python2-pythondialog | |
6847 | (let ((base (package-with-python2 (strip-python2-variant python-pythondialog)))) | |
6848 | (package | |
6849 | (inherit base) | |
6850 | (version (package-version python-pythondialog)) | |
6851 | (source (origin | |
6852 | (method url-fetch) | |
6853 | (uri (pypi-uri "python2-pythondialog" version)) | |
6854 | (sha256 | |
6855 | (base32 | |
6856 | "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9"))))))) | |
b5f218be | 6857 | |
99fffa8a LF |
6858 | (define-public python-configobj |
6859 | (package | |
6860 | (name "python-configobj") | |
6861 | (version "5.0.6") | |
6862 | (source (origin | |
6863 | (method url-fetch) | |
6864 | (uri (string-append | |
6865 | "https://pypi.python.org/packages/source/c/configobj/" | |
6866 | "configobj-" version ".tar.gz")) | |
6867 | (sha256 | |
6868 | (base32 | |
6869 | "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2")) | |
6870 | ;; Patch setup.py so it looks for python-setuptools, which is | |
6871 | ;; required to parse the keyword 'install_requires' in setup.py. | |
fc1adab1 | 6872 | (patches (search-patches "python-configobj-setuptools.patch")))) |
99fffa8a | 6873 | (build-system python-build-system) |
861f70c9 | 6874 | (propagated-inputs |
f3b98f4f | 6875 | `(("python-six" ,python-six))) |
99fffa8a LF |
6876 | (synopsis "Config file reading, writing and validation") |
6877 | (description "ConfigObj is a simple but powerful config file reader and | |
6878 | writer: an ini file round tripper. Its main feature is that it is very easy to | |
6879 | use, with a straightforward programmer’s interface and a simple syntax for | |
6880 | config files.") | |
6881 | (home-page "https://github.com/DiffSK/configobj") | |
3f641af0 | 6882 | (license license:bsd-3))) |
99fffa8a LF |
6883 | |
6884 | (define-public python2-configobj | |
6885 | (package-with-python2 python-configobj)) | |
79e8a291 LF |
6886 | |
6887 | (define-public python-configargparse | |
6888 | (package | |
6889 | (name "python-configargparse") | |
b89e3c77 | 6890 | (version "0.12.0") |
79e8a291 LF |
6891 | (source (origin |
6892 | (method url-fetch) | |
6893 | (uri (string-append | |
b89e3c77 | 6894 | "https://pypi.io/packages/source/C/ConfigArgParse/" |
79e8a291 LF |
6895 | "ConfigArgParse-" version ".tar.gz")) |
6896 | (sha256 | |
6897 | (base32 | |
b89e3c77 | 6898 | "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98")))) |
79e8a291 | 6899 | (build-system python-build-system) |
b89e3c77 KM |
6900 | (native-inputs |
6901 | `(("python-pyyaml" ,python-pyyaml))) | |
79e8a291 | 6902 | (arguments |
b89e3c77 KM |
6903 | `(#:phases |
6904 | (modify-phases %standard-phases | |
6905 | (replace 'check | |
6906 | (lambda _ | |
6907 | ;; Bypass setuptools-shim because one test relies on "setup.py" | |
6908 | ;; being the first argument passed to the python call. | |
6909 | ;; | |
6910 | ;; NOTE: Many tests do not run because they rely on Python's | |
6911 | ;; built-in test.test_argparse, but we remove the unit tests from | |
6912 | ;; our Python installation. | |
6913 | (zero? (system* "python" "setup.py" "test"))))))) | |
79e8a291 LF |
6914 | (synopsis "Replacement for argparse") |
6915 | (description "A drop-in replacement for argparse that allows options to also | |
6916 | be set via config files and/or environment variables.") | |
6917 | (home-page "https://github.com/bw2/ConfigArgParse") | |
6918 | (license license:expat))) | |
6919 | ||
6920 | (define-public python2-configargparse | |
6921 | (package-with-python2 python-configargparse)) | |
ab41f979 | 6922 | |
03f964a5 CM |
6923 | (define-public python-contextlib2 |
6924 | (package | |
6925 | (name "python-contextlib2") | |
6926 | (version "0.4.0") | |
6927 | (source | |
6928 | (origin | |
6929 | (method url-fetch) | |
6930 | (uri (pypi-uri "contextlib2" version)) | |
6931 | (sha256 | |
6932 | (base32 | |
6933 | "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am")))) | |
6934 | (build-system python-build-system) | |
6935 | (arguments | |
6936 | `(#:phases | |
6937 | (modify-phases %standard-phases | |
6938 | (replace 'check | |
6939 | (lambda _ (zero? | |
6940 | (system* | |
b3546174 | 6941 | "python" "test_contextlib2.py" "-v"))))))) |
03f964a5 CM |
6942 | (home-page "http://contextlib2.readthedocs.org/") |
6943 | (synopsis "Tools for decorators and context managers") | |
6944 | (description "This module is primarily a backport of the Python | |
6945 | 3.2 contextlib to earlier Python versions. Like contextlib, it | |
6946 | provides utilities for common tasks involving decorators and context | |
6947 | managers. It also contains additional features that are not part of | |
6948 | the standard library.") | |
3f641af0 | 6949 | (license license:psfl))) |
03f964a5 CM |
6950 | |
6951 | (define-public python2-contextlib2 | |
6952 | (package-with-python2 python-contextlib2)) | |
210bf497 DT |
6953 | |
6954 | (define-public python-texttable | |
6955 | (package | |
6956 | (name "python-texttable") | |
4c4d4df3 | 6957 | (version "0.8.7") |
210bf497 DT |
6958 | (source |
6959 | (origin | |
6960 | (method url-fetch) | |
6961 | (uri (pypi-uri "texttable" version)) | |
6962 | (sha256 | |
6963 | (base32 | |
4c4d4df3 | 6964 | "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a")))) |
210bf497 DT |
6965 | (build-system python-build-system) |
6966 | (arguments '(#:tests? #f)) ; no tests | |
6967 | (home-page "https://github.com/foutaise/texttable/") | |
6968 | (synopsis "Python module for creating simple ASCII tables") | |
6969 | (description "Texttable is a Python module for creating simple ASCII | |
6970 | tables.") | |
3f641af0 | 6971 | (license license:lgpl2.1+))) |
210bf497 DT |
6972 | |
6973 | (define-public python2-texttable | |
6974 | (package-with-python2 python-texttable)) | |
67c52bb3 | 6975 | |
5c6eea2a LF |
6976 | (define-public python-atomicwrites |
6977 | (package | |
6978 | (name "python-atomicwrites") | |
c56ad5e2 | 6979 | (version "1.1.5") |
5c6eea2a LF |
6980 | (source (origin |
6981 | (method url-fetch) | |
6982 | (uri (pypi-uri "atomicwrites" version)) | |
6983 | (sha256 | |
6984 | (base32 | |
c56ad5e2 | 6985 | "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214")))) |
5c6eea2a LF |
6986 | (build-system python-build-system) |
6987 | (synopsis "Atomic file writes in Python") | |
6988 | (description "Library for atomic file writes using platform dependent tools | |
8f65585b | 6989 | for atomic file system operations.") |
5c6eea2a | 6990 | (home-page "https://github.com/untitaker/python-atomicwrites") |
f210e944 | 6991 | (license license:expat))) |
9bb6d184 LF |
6992 | |
6993 | (define-public python2-atomicwrites | |
f210e944 | 6994 | (package-with-python2 python-atomicwrites)) |
561bb3cb | 6995 | |
d1deb90b LF |
6996 | (define-public python-click-threading |
6997 | (package | |
6998 | (name "python-click-threading") | |
8f25c2e4 | 6999 | (version "0.4.4") |
d1deb90b LF |
7000 | (source (origin |
7001 | (method url-fetch) | |
19ecdbed | 7002 | (uri (pypi-uri "click-threading" version)) |
d1deb90b LF |
7003 | (sha256 |
7004 | (base32 | |
8f25c2e4 | 7005 | "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j")))) |
d1deb90b LF |
7006 | (build-system python-build-system) |
7007 | (propagated-inputs | |
7008 | `(("python-click" ,python-click))) | |
7009 | (synopsis "Utilities for multithreading in Click") | |
7010 | (description "This package provides utilities for multithreading in Click | |
7011 | applications.") | |
7012 | (home-page "https://github.com/click-contrib/click-threading") | |
7013 | (license license:expat))) | |
7b17cab9 LF |
7014 | |
7015 | (define-public python-click-log | |
7016 | (package | |
7017 | (name "python-click-log") | |
8cbbea15 | 7018 | (version "0.2.1") |
7b17cab9 LF |
7019 | (source (origin |
7020 | (method url-fetch) | |
7021 | (uri (pypi-uri "click-log" version)) | |
7022 | (sha256 | |
7023 | (base32 | |
8cbbea15 | 7024 | "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9")))) |
7b17cab9 LF |
7025 | (build-system python-build-system) |
7026 | (propagated-inputs | |
7027 | `(("python-click" ,python-click))) | |
7028 | (synopsis "Logging for click applications") | |
7029 | (description "This package provides a Python library for logging Click | |
7030 | applications.") | |
7031 | (home-page "https://github.com/click-contrib/click-log") | |
7032 | (license license:expat))) | |
7b3a4ee4 LF |
7033 | |
7034 | (define-public python-apipkg | |
7035 | (package | |
7036 | (name "python-apipkg") | |
7037 | (version "1.4") | |
7038 | (source (origin | |
7039 | (method url-fetch) | |
7040 | (uri (pypi-uri "apipkg" version)) | |
7041 | (sha256 | |
7042 | (base32 | |
7043 | "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f")))) | |
7044 | (build-system python-build-system) | |
328bb95d | 7045 | (native-inputs |
7b3a4ee4 LF |
7046 | `(("python-pytest" ,python-pytest))) |
7047 | (synopsis "Namespace control and lazy-import mechanism") | |
7048 | (description "With apipkg you can control the exported namespace of a Python | |
7049 | package and greatly reduce the number of imports for your users. It is a small | |
7050 | pure Python module that works on virtually all Python versions.") | |
7051 | (home-page "https://bitbucket.org/hpk42/apipkg") | |
f210e944 | 7052 | (license license:expat))) |
e08739c3 CAW |
7053 | |
7054 | (define-public python2-apipkg | |
f210e944 | 7055 | (package-with-python2 python-apipkg)) |
848964fe LF |
7056 | |
7057 | (define-public python-execnet | |
7058 | (package | |
7059 | (name "python-execnet") | |
7060 | (version "1.4.1") | |
7061 | (source (origin | |
7062 | (method url-fetch) | |
7063 | (uri (pypi-uri "execnet" version)) | |
7064 | (sha256 | |
7065 | (base32 | |
7066 | "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn")))) | |
7067 | (build-system python-build-system) | |
ca0eee9d LF |
7068 | (arguments |
7069 | `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed | |
7070 | ;; The two test failures are caused by the lack of an `ssh` executable. | |
7071 | ;; The test suite can be run with pytest after the 'install' phase. | |
7072 | #:tests? #f)) | |
848964fe | 7073 | (native-inputs |
ca0eee9d LF |
7074 | `(("python-pytest" ,python-pytest) |
7075 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
f22efa01 | 7076 | (propagated-inputs |
848964fe LF |
7077 | `(("python-apipkg" ,python-apipkg))) |
7078 | (synopsis "Rapid multi-Python deployment") | |
7079 | (description "Execnet provides a share-nothing model with | |
7080 | channel-send/receive communication for distributing execution across many | |
7081 | Python interpreters across version, platform and network barriers. It has a | |
d1e4ad1b | 7082 | minimal and fast API targeting the following uses: |
848964fe LF |
7083 | @enumerate |
7084 | @item distribute tasks to (many) local or remote CPUs | |
7085 | @item write and deploy hybrid multi-process applications | |
7086 | @item write scripts to administer multiple environments | |
7087 | @end enumerate") | |
7088 | (home-page "http://codespeak.net/execnet/") | |
f210e944 | 7089 | (license license:expat))) |
16c84f90 CAW |
7090 | |
7091 | (define-public python2-execnet | |
f210e944 | 7092 | (package-with-python2 python-execnet)) |
6720dbb4 | 7093 | |
5c299bf0 LF |
7094 | (define-public python-icalendar |
7095 | (package | |
7096 | (name "python-icalendar") | |
5c4fd604 | 7097 | (version "4.0.1") |
5c299bf0 LF |
7098 | (source (origin |
7099 | (method url-fetch) | |
7100 | (uri (pypi-uri "icalendar" version)) | |
7101 | (sha256 | |
7102 | (base32 | |
5c4fd604 | 7103 | "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8")))) |
5c299bf0 LF |
7104 | (build-system python-build-system) |
7105 | (propagated-inputs | |
22d7360b | 7106 | `(("python-dateutil" ,python-dateutil) |
5c299bf0 LF |
7107 | ("python-pytz" ,python-pytz))) |
7108 | (synopsis "Python library for parsing iCalendar files") | |
7109 | (description "The icalendar package is a parser/generator of iCalendar | |
7110 | files for use with Python.") | |
7111 | (home-page "https://github.com/collective/icalendar") | |
3f641af0 | 7112 | (license license:bsd-2))) |
6bbbb53e LF |
7113 | |
7114 | (define-public python-sphinxcontrib-newsfeed | |
7115 | (package | |
7116 | (name "python-sphinxcontrib-newsfeed") | |
7117 | (version "0.1.4") | |
7118 | (source (origin | |
7119 | (method url-fetch) | |
7120 | (uri (pypi-uri "sphinxcontrib-newsfeed" version)) | |
7121 | (sha256 | |
7122 | (base32 | |
7123 | "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p")))) | |
3d2a544c | 7124 | (arguments '(#:tests? #f)) ; No tests. |
6bbbb53e LF |
7125 | (build-system python-build-system) |
7126 | (propagated-inputs | |
251ed7f2 | 7127 | `(("python-sphinx" ,python-sphinx))) |
6bbbb53e LF |
7128 | (synopsis "News Feed extension for Sphinx") |
7129 | (description "Sphinxcontrib-newsfeed is an extension for adding a simple | |
7130 | Blog, News or Announcements section to a Sphinx website.") | |
7131 | (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed") | |
3f641af0 | 7132 | (license license:bsd-2))) |
2216e15c SB |
7133 | |
7134 | (define-public python-args | |
7135 | (package | |
7136 | (name "python-args") | |
7137 | (version "0.1.0") | |
7138 | (source (origin | |
7139 | (method url-fetch) | |
7140 | (uri (pypi-uri "args" version)) | |
7141 | (sha256 | |
7142 | (base32 | |
7143 | "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7")))) | |
7144 | (build-system python-build-system) | |
2216e15c SB |
7145 | (home-page "https://github.com/kennethreitz/args") |
7146 | (synopsis "Command-line argument parser") | |
7147 | (description | |
7148 | "This library provides a Python module to parse command-line arguments.") | |
3f641af0 | 7149 | (license license:bsd-3))) |
2216e15c SB |
7150 | |
7151 | (define-public python2-args | |
7152 | (package-with-python2 python-args)) | |
c06a3de9 SB |
7153 | |
7154 | (define-public python-clint | |
7155 | (package | |
7156 | (name "python-clint") | |
7157 | (version "0.5.1") | |
7158 | (source (origin | |
7159 | (method url-fetch) | |
7160 | (uri (pypi-uri "clint" version)) | |
7161 | (sha256 | |
7162 | (base32 | |
7163 | "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5")))) | |
7164 | (build-system python-build-system) | |
6145b604 MB |
7165 | (arguments |
7166 | '(#:phases | |
7167 | (modify-phases %standard-phases | |
7168 | (replace 'check | |
7169 | (lambda _ | |
7170 | (zero? (system* "py.test" "-v"))))))) | |
7171 | (native-inputs | |
7172 | `(("python-pytest" ,python-pytest))) | |
f22efa01 | 7173 | (propagated-inputs |
f3b98f4f | 7174 | `(("python-args" ,python-args))) |
c06a3de9 SB |
7175 | (home-page "https://github.com/kennethreitz/clint") |
7176 | (synopsis "Command-line interface tools") | |
7177 | (description | |
7178 | "Clint is a Python module filled with a set of tools for developing | |
7179 | command-line applications, including tools for colored and indented | |
7180 | output, progress bar display, and pipes.") | |
3f641af0 | 7181 | (license license:isc))) |
c06a3de9 SB |
7182 | |
7183 | (define-public python2-clint | |
7184 | (package-with-python2 python-clint)) | |
4ecdeef8 SB |
7185 | |
7186 | (define-public python-astor | |
7187 | (package | |
7188 | (name "python-astor") | |
7189 | (version "0.5") | |
7190 | (source (origin | |
7191 | (method url-fetch) | |
7192 | (uri (pypi-uri "astor" version)) | |
7193 | (sha256 | |
7194 | (base32 | |
7195 | "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa")))) | |
7196 | (build-system python-build-system) | |
4ecdeef8 SB |
7197 | (home-page "https://github.com/berkerpeksag/astor") |
7198 | (synopsis "Read and write Python ASTs") | |
7199 | (description | |
7200 | "Astor is designed to allow easy manipulation of Python source via the | |
7201 | Abstract Syntax Tree.") | |
3f641af0 | 7202 | (license license:bsd-3))) |
4ecdeef8 SB |
7203 | |
7204 | (define-public python2-astor | |
7205 | (package-with-python2 python-astor)) | |
e224b7d0 SB |
7206 | |
7207 | (define-public python-rply | |
7208 | (package | |
7209 | (name "python-rply") | |
7210 | (version "0.7.4") | |
7211 | (source (origin | |
7212 | (method url-fetch) | |
7213 | (uri (pypi-uri "rply" version)) | |
7214 | (sha256 | |
7215 | (base32 | |
7216 | "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj")))) | |
7217 | (build-system python-build-system) | |
f22efa01 | 7218 | (propagated-inputs |
f3b98f4f | 7219 | `(("python-appdirs" ,python-appdirs))) |
e224b7d0 SB |
7220 | (home-page "https://github.com/alex/rply") |
7221 | (synopsis "Parser generator for Python") | |
7222 | (description | |
7223 | "This package provides a pure Python based parser generator, that also | |
7224 | works with RPython. It is a more-or-less direct port of David Bazzley's PLY, | |
7225 | with a new public API, and RPython support.") | |
3f641af0 | 7226 | (license license:bsd-3))) |
e224b7d0 SB |
7227 | |
7228 | (define-public python2-rply | |
7229 | (package-with-python2 python-rply)) | |
c3e919d7 SB |
7230 | |
7231 | (define-public python-hy | |
7232 | (package | |
7233 | (name "python-hy") | |
ad3c61fc | 7234 | (version "0.13.0") |
c3e919d7 SB |
7235 | (source (origin |
7236 | (method url-fetch) | |
7237 | (uri (pypi-uri "hy" version)) | |
7238 | (sha256 | |
7239 | (base32 | |
ad3c61fc | 7240 | "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8")))) |
c3e919d7 | 7241 | (build-system python-build-system) |
15c37077 MB |
7242 | (arguments |
7243 | '(#:phases | |
7244 | (modify-phases %standard-phases | |
7245 | (replace 'check | |
7246 | (lambda _ | |
7247 | ;; Tests require write access to HOME. | |
7248 | (setenv "HOME" "/tmp") | |
7249 | (zero? (system* "nosetests"))))))) | |
7250 | (native-inputs | |
7251 | `(("python-coverage" ,python-coverage) | |
7252 | ("python-nose" ,python-nose))) | |
f22efa01 | 7253 | (propagated-inputs |
c3e919d7 SB |
7254 | `(("python-astor" ,python-astor) |
7255 | ("python-clint" ,python-clint) | |
f3b98f4f | 7256 | ("python-rply" ,python-rply))) |
c3e919d7 SB |
7257 | (home-page "http://hylang.org/") |
7258 | (synopsis "Lisp frontend to Python") | |
7259 | (description | |
7260 | "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms | |
7261 | its Lisp code into the Python Abstract Syntax Tree, you have the whole world of | |
7262 | Python at your fingertips, in Lisp form.") | |
7263 | (license license:expat))) | |
81f7f297 | 7264 | |
c3e919d7 SB |
7265 | (define-public python2-hy |
7266 | (package-with-python2 python-hy)) | |
81f7f297 | 7267 | |
1abe448d EF |
7268 | (define-public python2-functools32 |
7269 | (package | |
7270 | (name "python2-functools32") | |
7271 | (version "3.2.3-2") | |
7272 | (source | |
7273 | (origin | |
7274 | (method url-fetch) | |
7275 | (uri (pypi-uri "functools32" version)) | |
7276 | (sha256 | |
7277 | (base32 | |
7278 | "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn")))) | |
7279 | (build-system python-build-system) | |
7280 | (arguments | |
7281 | `(#:python ,python-2 | |
7282 | #:tests? #f)) ; no test target | |
1abe448d EF |
7283 | (home-page "https://github.com/MiCHiLU/python-functools32") |
7284 | (synopsis | |
7285 | "Backport of the functools module from Python 3.2.3") | |
7286 | (description | |
7287 | "This package is a backport of the @code{functools} module from Python | |
7288 | 3.2.3 for use with older versions of Python and PyPy.") | |
7289 | (license license:expat))) | |
7290 | ||
550bd98b MB |
7291 | (define-public python2-subprocess32 |
7292 | (package | |
7293 | (name "python2-subprocess32") | |
7294 | (version "3.2.7") | |
7295 | (source (origin | |
7296 | (method url-fetch) | |
7297 | (uri (pypi-uri "subprocess32" version)) | |
7298 | (sha256 | |
7299 | (base32 | |
7300 | "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y")) | |
7301 | (patches | |
7302 | (search-patches "python2-subprocess32-disable-input-test.patch")))) | |
7303 | (build-system python-build-system) | |
7304 | (arguments | |
7305 | `(#:python ,python-2 | |
20c295f9 LF |
7306 | ;; The test suite fails with Python > 2.7.13: |
7307 | ;; import test.support | |
7308 | ;; ImportError: No module named support | |
7309 | #:tests? #f | |
550bd98b MB |
7310 | #:phases |
7311 | (modify-phases %standard-phases | |
7312 | (add-after 'unpack 'patch-/bin/sh | |
7313 | (lambda _ | |
7314 | (substitute* '("subprocess32.py" | |
7315 | "test_subprocess32.py") | |
7316 | (("/bin/sh") (which "sh"))) | |
20c295f9 | 7317 | #t))))) |
550bd98b MB |
7318 | (home-page "https://github.com/google/python-subprocess32") |
7319 | (synopsis "Backport of the subprocess module from Python 3.2") | |
7320 | (description | |
7321 | "This is a backport of the @code{subprocess} standard library module | |
7322 | from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some | |
7323 | new features. On POSIX systems it is guaranteed to be reliable when used | |
7324 | in threaded applications. It includes timeout support from Python 3.3 but | |
7325 | otherwise matches 3.2’s API.") | |
7326 | (license license:psfl))) | |
7327 | ||
877889f3 | 7328 | (define-public python2-futures |
7a5b944e | 7329 | (package |
877889f3 | 7330 | (name "python2-futures") |
e17a1248 | 7331 | (version "3.0.5") |
7a5b944e EF |
7332 | (source |
7333 | (origin | |
7334 | (method url-fetch) | |
7335 | (uri (pypi-uri "futures" version)) | |
7336 | (sha256 | |
7337 | (base32 | |
e17a1248 | 7338 | "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5")))) |
7a5b944e | 7339 | (build-system python-build-system) |
877889f3 | 7340 | (arguments `(#:python ,python-2)) |
7a5b944e EF |
7341 | (home-page "https://github.com/agronholm/pythonfutures") |
7342 | (synopsis | |
7343 | "Backport of the concurrent.futures package from Python 3.2") | |
7344 | (description | |
7345 | "The concurrent.futures module provides a high-level interface for | |
7346 | asynchronously executing callables. This package backports the | |
7347 | concurrent.futures package from Python 3.2") | |
3f641af0 | 7348 | (license license:bsd-3))) |
7a5b944e | 7349 | |
5cb2fe44 EF |
7350 | (define-public python-promise |
7351 | (package | |
7352 | (name "python-promise") | |
7353 | (version "0.4.2") | |
7354 | (source | |
7355 | (origin | |
7356 | (method url-fetch) | |
7357 | (uri (pypi-uri "promise" version)) | |
7358 | (sha256 | |
7359 | (base32 | |
7360 | "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h")))) | |
7361 | (build-system python-build-system) | |
7362 | ;; Tests wants python-futures, which is a python2 only program, and | |
7363 | ;; can't be found by python-promise at test time. | |
7364 | (arguments `(#:tests? #f)) | |
7365 | (home-page "https://github.com/syrusakbary/promise") | |
7366 | (synopsis "Promises/A+ implementation for Python") | |
7367 | (description | |
7368 | "Promises/A+ implementation for Python") | |
7369 | (properties `((python2-variant . ,(delay python2-promise)))) | |
7370 | (license license:expat))) | |
7371 | ||
7372 | (define-public python2-promise | |
7373 | (let ((promise (package-with-python2 | |
7374 | (strip-python2-variant python-promise)))) | |
7375 | (package (inherit promise) | |
7376 | (arguments (substitute-keyword-arguments (package-arguments promise) | |
7377 | ((#:tests? _) #t))) | |
7378 | (native-inputs | |
7379 | `(("python2-futures" ,python2-futures) | |
7380 | ("python2-pytest" ,python2-pytest) | |
5cb2fe44 EF |
7381 | ,@(package-native-inputs promise)))))) |
7382 | ||
2b2f2fc1 DT |
7383 | (define-public python-colorama |
7384 | (package | |
7385 | (name "python-colorama") | |
f92576f9 | 7386 | (version "0.3.7") |
2b2f2fc1 DT |
7387 | (source |
7388 | (origin | |
7389 | (method url-fetch) | |
7390 | (uri (pypi-uri "colorama" version)) | |
7391 | (sha256 | |
7392 | (base32 | |
f92576f9 | 7393 | "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0")))) |
2b2f2fc1 | 7394 | (build-system python-build-system) |
46e110cc | 7395 | (synopsis "Colored terminal text rendering for Python") |
2b2f2fc1 DT |
7396 | (description "Colorama is a Python library for rendering colored terminal |
7397 | text.") | |
7398 | (home-page "https://pypi.python.org/pypi/colorama") | |
3f641af0 | 7399 | (license license:bsd-3))) |
2b2f2fc1 DT |
7400 | |
7401 | (define-public python2-colorama | |
7402 | (package-with-python2 python-colorama)) | |
f5bcec6e DT |
7403 | |
7404 | (define-public python-rsa | |
7405 | (package | |
7406 | (name "python-rsa") | |
ecd68c53 | 7407 | (version "3.4.2") |
f5bcec6e DT |
7408 | (source |
7409 | (origin | |
7410 | (method url-fetch) | |
7411 | (uri (pypi-uri "rsa" version)) | |
7412 | (sha256 | |
7413 | (base32 | |
ecd68c53 | 7414 | "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5")))) |
f5bcec6e | 7415 | (build-system python-build-system) |
f22efa01 | 7416 | (propagated-inputs |
f3b98f4f | 7417 | `(("python-pyasn1" ,python-pyasn1))) |
f5bcec6e DT |
7418 | (synopsis "Pure-Python RSA implementation") |
7419 | (description "Python-RSA is a pure-Python RSA implementation. It supports | |
7420 | encryption and decryption, signing and verifying signatures, and key | |
7421 | generation according to PKCS#1 version 1.5. It can be used as a Python | |
7422 | library as well as on the command line.") | |
9be5ecdf | 7423 | (home-page "https://stuvel.eu/rsa") |
3f641af0 | 7424 | (license license:asl2.0))) |
f5bcec6e DT |
7425 | |
7426 | (define-public python2-rsa | |
7427 | (package-with-python2 python-rsa)) | |
c0aacfa5 DT |
7428 | |
7429 | (define-public python-pluggy | |
7430 | (package | |
7431 | (name "python-pluggy") | |
7432 | (version "0.3.1") | |
7433 | (source | |
7434 | (origin | |
7435 | (method url-fetch) | |
7436 | (uri (pypi-uri "pluggy" version)) | |
7437 | (sha256 | |
7438 | (base32 | |
7439 | "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m")))) | |
7440 | (build-system python-build-system) | |
c0aacfa5 DT |
7441 | (synopsis "Plugin and hook calling mechanism for Python") |
7442 | (description "Pluggy is an extraction of the plugin manager as used by | |
7443 | Pytest but stripped of Pytest specific details.") | |
7444 | (home-page "https://pypi.python.org/pypi/pluggy") | |
7445 | (license license:expat))) | |
7446 | ||
7447 | (define-public python2-pluggy | |
7448 | (package-with-python2 python-pluggy)) | |
a4af21ca DT |
7449 | |
7450 | (define-public python-tox | |
7451 | (package | |
7452 | (name "python-tox") | |
9bb7c05e | 7453 | (version "2.8.1") |
a4af21ca DT |
7454 | (source |
7455 | (origin | |
7456 | (method url-fetch) | |
7457 | (uri (pypi-uri "tox" version)) | |
7458 | (sha256 | |
7459 | (base32 | |
9bb7c05e | 7460 | "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny")))) |
a4af21ca DT |
7461 | (build-system python-build-system) |
7462 | (arguments | |
7ba07edf HG |
7463 | ;; FIXME: Tests require pytest-timeout, which itself requires |
7464 | ;; pytest>=2.8.0 for installation. | |
a4af21ca | 7465 | '(#:tests? #f)) |
482d9591 HG |
7466 | (propagated-inputs |
7467 | `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0 | |
a4af21ca | 7468 | ("python-py" ,python-py) |
482d9591 | 7469 | ("python-virtualenv" ,python-virtualenv))) |
328bb95d | 7470 | (native-inputs |
7ba07edf | 7471 | `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout) |
c98f9c52 CR |
7472 | ("python-pytest" ,python-pytest) ; >= 2.3.5 |
7473 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
a4af21ca DT |
7474 | (home-page "http://tox.testrun.org/") |
7475 | (synopsis "Virtualenv-based automation of test activities") | |
7476 | (description "Tox is a generic virtualenv management and test command line | |
7477 | tool. It can be used to check that a package installs correctly with | |
7478 | different Python versions and interpreters, or run tests in each type of | |
7479 | supported environment, or act as a frontend to continuous integration | |
7480 | servers.") | |
7481 | (license license:expat))) | |
7482 | ||
7483 | (define-public python2-tox | |
7484 | (package-with-python2 python-tox)) | |
ba9da248 DT |
7485 | |
7486 | (define-public python-jmespath | |
7487 | (package | |
7488 | (name "python-jmespath") | |
7489 | (version "0.9.0") | |
7490 | (source | |
7491 | (origin | |
7492 | (method url-fetch) | |
7493 | (uri (pypi-uri "jmespath" version)) | |
7494 | (sha256 | |
7495 | (base32 | |
7496 | "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8")))) | |
7497 | (build-system python-build-system) | |
52a75a83 MB |
7498 | (native-inputs |
7499 | `(("python-nose" ,python-nose))) | |
ba9da248 DT |
7500 | (synopsis "JSON Matching Expressions") |
7501 | (description "JMESPath (pronounced “james path”) is a Python library that | |
7502 | allows one to declaratively specify how to extract elements from a JSON | |
7503 | document.") | |
7504 | (home-page "https://github.com/jmespath/jmespath.py") | |
7505 | (license license:expat))) | |
7506 | ||
7507 | (define-public python2-jmespath | |
7508 | (package-with-python2 python-jmespath)) | |
935fcd5c DT |
7509 | |
7510 | (define-public python-botocore | |
7511 | (package | |
7512 | (name "python-botocore") | |
6ca86ed7 | 7513 | (version "1.8.43") |
935fcd5c DT |
7514 | (source |
7515 | (origin | |
7516 | (method url-fetch) | |
7517 | (uri (pypi-uri "botocore" version)) | |
7518 | (sha256 | |
7519 | (base32 | |
6ca86ed7 | 7520 | "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg")))) |
935fcd5c | 7521 | (build-system python-build-system) |
877fdac9 MB |
7522 | (arguments |
7523 | ;; FIXME: Many tests are failing. | |
7524 | '(#:tests? #f)) | |
482d9591 | 7525 | (propagated-inputs |
22d7360b | 7526 | `(("python-dateutil" ,python-dateutil) |
935fcd5c | 7527 | ("python-docutils" ,python-docutils) |
482d9591 | 7528 | ("python-jmespath" ,python-jmespath))) |
8fa6890b | 7529 | (native-inputs |
482d9591 | 7530 | `(("python-mock" ,python-mock) |
935fcd5c | 7531 | ("python-nose" ,python-nose) |
482d9591 | 7532 | ("behave" ,behave) |
935fcd5c | 7533 | ("python-tox" ,python-tox) |
482d9591 | 7534 | ("python-wheel" ,python-wheel))) |
935fcd5c DT |
7535 | (home-page "https://github.com/boto/botocore") |
7536 | (synopsis "Low-level interface to AWS") | |
7537 | (description "Botocore is a Python library that provides a low-level | |
7538 | interface to the Amazon Web Services (AWS) API.") | |
3f641af0 | 7539 | (license license:asl2.0))) |
935fcd5c DT |
7540 | |
7541 | (define-public python2-botocore | |
7542 | (package-with-python2 python-botocore)) | |
f861b8b8 | 7543 | |
7637de23 | 7544 | (define-public python-xdo |
0bdc1671 | 7545 | (package |
7637de23 | 7546 | (name "python-xdo") |
e871c332 | 7547 | (version "0.3") |
0bdc1671 CAW |
7548 | (source (origin |
7549 | (method url-fetch) | |
7550 | (uri (string-append | |
7551 | "http://http.debian.net/debian/pool/main/p/python-xdo/" | |
7552 | "python-xdo_" version ".orig.tar.gz")) | |
7553 | (sha256 | |
7554 | (base32 | |
e871c332 | 7555 | "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0")))) |
0bdc1671 CAW |
7556 | (build-system python-build-system) |
7557 | (arguments | |
736cfc10 SB |
7558 | '(#:phases |
7559 | (modify-phases %standard-phases | |
7560 | (add-before 'install 'patch-libxdo-path | |
7561 | ;; Hardcode the path of dynamically loaded libxdo library. | |
7562 | (lambda* (#:key inputs #:allow-other-keys) | |
7563 | (let ((libxdo (string-append | |
7564 | (assoc-ref inputs "xdotool") | |
7565 | "/lib/libxdo.so"))) | |
7566 | (substitute* "xdo/_xdo.py" | |
7567 | (("find_library\\(\"xdo\"\\)") | |
7568 | (simple-format #f "\"~a\"" libxdo))) | |
7569 | #t)))) | |
7570 | #:tests? #f)) ; no tests provided | |
0b5e0863 SB |
7571 | (propagated-inputs |
7572 | `(("python-six" ,python-six))) | |
0bdc1671 CAW |
7573 | (inputs |
7574 | `(("xdotool" ,xdotool) | |
7575 | ("libX11" ,libx11))) | |
7576 | (home-page "https://tracker.debian.org/pkg/python-xdo") | |
7577 | (synopsis "Python library for simulating X11 keyboard/mouse input") | |
7578 | (description "Provides bindings to libxdo for manipulating X11 via simulated | |
7579 | input. (Note that this is mostly a legacy library; you may wish to look at | |
7580 | python-xdo for newer bindings.)") | |
3f641af0 | 7581 | (license license:bsd-3))) |
0bdc1671 | 7582 | |
7637de23 LF |
7583 | (define-public python2-xdo |
7584 | (package-with-python2 python-xdo)) | |
7585 | ||
50aaec25 DT |
7586 | (define-public python-mako |
7587 | (package | |
7588 | (name "python-mako") | |
3753f2e6 | 7589 | (version "1.0.6") |
50aaec25 DT |
7590 | (source |
7591 | (origin | |
7592 | (method url-fetch) | |
7593 | (uri (pypi-uri "Mako" version)) | |
7594 | (sha256 | |
7595 | (base32 | |
3753f2e6 | 7596 | "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8")))) |
50aaec25 | 7597 | (build-system python-build-system) |
482d9591 HG |
7598 | (propagated-inputs |
7599 | `(("python-markupsafe" ,python-markupsafe))) | |
50aaec25 | 7600 | (native-inputs |
482d9591 | 7601 | `(("python-mock" ,python-mock) |
e435af5c MB |
7602 | ("python-nose" ,python-nose) |
7603 | ("python-pytest" ,python-pytest))) | |
50aaec25 DT |
7604 | (home-page "http://www.makotemplates.org/") |
7605 | (synopsis "Templating language for Python") | |
7606 | (description "Mako is a templating language for Python that compiles | |
7607 | templates into Python modules.") | |
f210e944 | 7608 | (license license:expat))) |
50aaec25 DT |
7609 | |
7610 | (define-public python2-mako | |
f210e944 | 7611 | (package-with-python2 python-mako)) |
ae00a41f CAW |
7612 | |
7613 | (define-public python-waitress | |
7614 | (package | |
7615 | (name "python-waitress") | |
26176bee | 7616 | (version "1.1.0") |
ae00a41f CAW |
7617 | (source |
7618 | (origin | |
7619 | (method url-fetch) | |
7620 | (uri (pypi-uri "waitress" version)) | |
26176bee | 7621 | (patches (search-patches "python-waitress-fix-tests.patch")) |
ae00a41f CAW |
7622 | (sha256 |
7623 | (base32 | |
26176bee | 7624 | "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k")))) |
ae00a41f CAW |
7625 | (build-system python-build-system) |
7626 | (home-page "https://github.com/Pylons/waitress") | |
7627 | (synopsis "Waitress WSGI server") | |
7628 | (description "Waitress is meant to be a production-quality pure-Python WSGI | |
7629 | server with very acceptable performance.") | |
f210e944 | 7630 | (license license:zpl2.1))) |
ae00a41f CAW |
7631 | |
7632 | (define-public python2-waitress | |
f210e944 | 7633 | (package-with-python2 python-waitress)) |
778a284b | 7634 | |
1cf53652 CAW |
7635 | (define-public python-pyquery |
7636 | (package | |
7637 | (name "python-pyquery") | |
ab0c3429 | 7638 | (version "1.2.17") |
1cf53652 CAW |
7639 | (source |
7640 | (origin | |
7641 | (method url-fetch) | |
7642 | (uri (pypi-uri "pyquery" version)) | |
7643 | (sha256 | |
7644 | (base32 | |
ab0c3429 | 7645 | "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a")))) |
1cf53652 | 7646 | (build-system python-build-system) |
2ddbfa8c LF |
7647 | (native-inputs |
7648 | `(("python-webob" ,python-webob) | |
7649 | ("python-webtest" ,python-webtest))) | |
1cf53652 CAW |
7650 | (propagated-inputs |
7651 | `(("python-lxml" ,python-lxml) | |
7652 | ("python-cssselect" ,python-cssselect))) | |
7653 | (home-page "https://github.com/gawel/pyquery") | |
7654 | (synopsis "Make jQuery-like queries on xml documents") | |
7655 | (description "pyquery allows you to make jQuery queries on xml documents. | |
7656 | The API is as much as possible the similar to jQuery. pyquery uses lxml for | |
7657 | fast xml and html manipulation.") | |
f210e944 | 7658 | (license license:bsd-3))) |
1cf53652 CAW |
7659 | |
7660 | (define-public python2-pyquery | |
f210e944 | 7661 | (package-with-python2 python-pyquery)) |
aa6313d6 | 7662 | |
4cb122cd CAW |
7663 | (define-public python-anyjson |
7664 | (package | |
7665 | (name "python-anyjson") | |
7666 | (version "0.3.3") | |
7667 | (source | |
7668 | (origin | |
7669 | (method url-fetch) | |
7670 | (uri (pypi-uri "anyjson" version)) | |
7671 | (sha256 | |
7672 | (base32 | |
7673 | "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p")))) | |
7674 | (build-system python-build-system) | |
7675 | (arguments | |
7676 | `(;; We could possibly get tests working, but on Python 3 it's not so easy. | |
7677 | ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or | |
7678 | ;; whatever) so this transformation needs to be done before the tests | |
7679 | ;; can be run. Maybe we could add a build step to transform beforehand | |
7680 | ;; but it could be annoying/difficult. | |
7681 | ;; We can enable tests for the Python 2 version, though, and do below. | |
7682 | #:tests? #f)) | |
9be5ecdf | 7683 | (home-page "https://bitbucket.org/runeh/anyjson/") |
4cb122cd CAW |
7684 | (synopsis |
7685 | "Wraps best available JSON implementation in a common interface") | |
7686 | (description | |
7687 | "Anyjson loads whichever is the fastest JSON module installed | |
7688 | and provides a uniform API regardless of which JSON implementation is used.") | |
3f641af0 | 7689 | (license license:bsd-3) |
4cb122cd CAW |
7690 | (properties `((python2-variant . ,(delay python2-anyjson)))))) |
7691 | ||
7692 | (define-public python2-anyjson | |
7693 | (let ((anyjson (package-with-python2 | |
7694 | (strip-python2-variant python-anyjson)))) | |
7695 | (package | |
7696 | (inherit anyjson) | |
7697 | (arguments `(;; Unlike the python 3 variant, we do run tests. See above! | |
7698 | #:tests? #t | |
7699 | ,@(package-arguments anyjson))) | |
00e10c6e | 7700 | (native-inputs `(("python2-nose" ,python2-nose)))))) |
8dfceab7 CAW |
7701 | |
7702 | (define-public python-amqp | |
7703 | (package | |
7704 | (name "python-amqp") | |
7705 | (version "1.4.9") | |
7706 | (source | |
7707 | (origin | |
7708 | (method url-fetch) | |
7709 | (uri (pypi-uri "amqp" version)) | |
7710 | (sha256 | |
7711 | (base32 | |
7712 | "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid")))) | |
7713 | (build-system python-build-system) | |
7714 | (native-inputs | |
7715 | `(("python-nose" ,python-nose) | |
7716 | ("python-mock" ,python-mock))) | |
7bf837fd | 7717 | (home-page "https://github.com/celery/py-amqp") |
8dfceab7 CAW |
7718 | (synopsis |
7719 | "Low-level AMQP client for Python (fork of amqplib)") | |
7720 | (description | |
7721 | "This is a fork of amqplib which was originally written by Barry Pederson. | |
7722 | It is maintained by the Celery project, and used by kombu as a pure python | |
7723 | alternative when librabbitmq is not available.") | |
3f641af0 | 7724 | (license license:lgpl2.1+) |
8dfceab7 CAW |
7725 | (properties `((python2-variant . ,(delay python2-amqp)))))) |
7726 | ||
7727 | (define-public python2-amqp | |
7728 | (let ((amqp (package-with-python2 | |
7729 | (strip-python2-variant python-amqp)))) | |
7730 | (package | |
7731 | (inherit amqp) | |
7732 | (arguments `(;; Tries to run coverage tests with nose-cover3, which seems | |
7733 | ;; unmaintained. Weirdly, does not do this on the python 3 | |
7734 | ;; version? | |
7735 | #:tests? #f | |
00e10c6e | 7736 | ,@(package-arguments amqp)))))) |
7d387305 | 7737 | |
220ed20b RW |
7738 | (define-public python-txamqp |
7739 | (package | |
7740 | (name "python-txamqp") | |
7741 | (version "0.8.0") | |
7742 | (source | |
7743 | (origin | |
7744 | (method url-fetch) | |
7745 | (uri (pypi-uri "txAMQP" version)) | |
7746 | (sha256 | |
7747 | (base32 | |
7748 | "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr")))) | |
7749 | (build-system python-build-system) | |
7750 | (propagated-inputs | |
7751 | `(("python-six" ,python-six) | |
7752 | ("python-twisted" ,python-twisted))) | |
7753 | (home-page "https://github.com/txamqp/txamqp") | |
7754 | (synopsis "Communicate with AMQP peers and brokers using Twisted") | |
7755 | (description | |
7756 | "This package provides a Python library for communicating with AMQP peers | |
7757 | and brokers using the asynchronous networking framework Twisted. It contains | |
7758 | all the necessary code to connect, send and receive messages to/from an | |
7759 | AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It | |
7760 | also includes support for using Thrift RPC over AMQP in Twisted | |
7761 | applications.") | |
7762 | (license license:asl2.0))) | |
7763 | ||
7764 | (define-public python2-txamqp | |
7765 | (package-with-python2 python-txamqp)) | |
7766 | ||
7d387305 CAW |
7767 | (define-public python-kombu |
7768 | (package | |
7769 | (name "python-kombu") | |
0cb59822 | 7770 | (version "3.0.37") |
7d387305 CAW |
7771 | (source |
7772 | (origin | |
7773 | (method url-fetch) | |
7774 | (uri (pypi-uri "kombu" version)) | |
7775 | (sha256 | |
7776 | (base32 | |
0cb59822 | 7777 | "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70")))) |
7d387305 CAW |
7778 | (build-system python-build-system) |
7779 | (native-inputs | |
7780 | `(("python-mock" ,python-mock) | |
7781 | ("python-nose" ,python-nose))) | |
7782 | (propagated-inputs | |
7783 | `(("python-anyjson" ,python-anyjson) | |
0cb59822 LF |
7784 | ("python-amqp" ,python-amqp) |
7785 | ("python-redis" ,python-redis))) | |
7d387305 CAW |
7786 | (home-page "http://kombu.readthedocs.org") |
7787 | (synopsis "Message passing library for Python") | |
7788 | (description "The aim of Kombu is to make messaging in Python as easy as | |
7789 | possible by providing an idiomatic high-level interface for the AMQ protocol, | |
7790 | and also provide proven and tested solutions to common messaging problems. | |
7791 | AMQP is the Advanced Message Queuing Protocol, an open standard protocol for | |
7792 | message orientation, queuing, routing, reliability and security, for which the | |
7793 | RabbitMQ messaging server is the most popular implementation.") | |
3f641af0 | 7794 | (license license:bsd-3) |
7d387305 CAW |
7795 | (properties `((python2-variant . ,(delay python2-kombu)))))) |
7796 | ||
7797 | (define-public python2-kombu | |
7798 | (let ((kombu (package-with-python2 | |
7799 | (strip-python2-variant python-kombu)))) | |
7800 | (package | |
7801 | (inherit kombu) | |
752eb9e0 MB |
7802 | (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2. |
7803 | ;; It works fine on the python3 variant. | |
7804 | #:tests? #f | |
7805 | ,@(package-arguments kombu))) | |
328bb95d HG |
7806 | (native-inputs `(("python2-unittest2" ,python2-unittest2) |
7807 | ,@(package-native-inputs kombu)))))) | |
b6f0b9fb CAW |
7808 | |
7809 | (define-public python-billiard | |
7810 | (package | |
7811 | (name "python-billiard") | |
a6bb9e44 | 7812 | (version "3.3.0.23") |
b6f0b9fb CAW |
7813 | (source |
7814 | (origin | |
7815 | (method url-fetch) | |
7816 | (uri (pypi-uri "billiard" version)) | |
7817 | (sha256 | |
7818 | (base32 | |
a6bb9e44 | 7819 | "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9")))) |
b6f0b9fb CAW |
7820 | (build-system python-build-system) |
7821 | (native-inputs | |
7822 | `(("python-nose" ,python-nose))) | |
7bf837fd | 7823 | (home-page "https://github.com/celery/billiard") |
b6f0b9fb CAW |
7824 | (synopsis |
7825 | "Python multiprocessing fork with improvements and bugfixes") | |
7826 | (description | |
7827 | "Billiard is a fork of the Python 2.7 multiprocessing package. The | |
7828 | multiprocessing package itself is a renamed and updated version of R Oudkerk's | |
7829 | pyprocessing package. This standalone variant is intended to be compatible with | |
7830 | Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.") | |
3f641af0 | 7831 | (license license:bsd-3) |
b6f0b9fb CAW |
7832 | (properties `((python2-variant . ,(delay python2-billiard)))))) |
7833 | ||
7834 | (define-public python2-billiard | |
7835 | (let ((billiard (package-with-python2 | |
7836 | (strip-python2-variant python-billiard)))) | |
7837 | (package | |
7838 | (inherit billiard) | |
00e10c6e | 7839 | (native-inputs `(("python2-unittest2" ,python2-unittest2) |
b6f0b9fb CAW |
7840 | ("python2-mock" ,python2-mock) |
7841 | ,@(package-native-inputs billiard)))))) | |
22df6419 CAW |
7842 | |
7843 | (define-public python-celery | |
7844 | (package | |
7845 | (name "python-celery") | |
9ebe87fe | 7846 | (version "3.1.24") |
22df6419 CAW |
7847 | (source |
7848 | (origin | |
7849 | (method url-fetch) | |
7850 | (uri (pypi-uri "celery" version)) | |
7851 | (sha256 | |
7852 | (base32 | |
9ebe87fe | 7853 | "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r")))) |
22df6419 | 7854 | (build-system python-build-system) |
9ebe87fe LF |
7855 | (arguments |
7856 | `(#:phases | |
7857 | (modify-phases %standard-phases | |
7858 | ;; These tests break with Python 3.5: | |
7859 | ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295 | |
7860 | (replace 'check | |
7861 | (lambda _ | |
7862 | (zero? | |
7863 | (system* "nosetests" "--exclude=^test_safe_to_remove.*"))))))) | |
22df6419 CAW |
7864 | (native-inputs |
7865 | `(("python-nose" ,python-nose))) | |
f22efa01 | 7866 | (propagated-inputs |
22df6419 CAW |
7867 | `(("python-pytz" ,python-pytz) |
7868 | ("python-billiard" ,python-billiard) | |
7869 | ("python-kombu" ,python-kombu))) | |
7870 | (home-page "http://celeryproject.org") | |
7871 | (synopsis "Distributed Task Queue") | |
7872 | (description "Celery is an asynchronous task queue/job queue based on | |
7873 | distributed message passing. It is focused on real-time operation, but | |
7874 | supports scheduling as well. The execution units, called tasks, are executed | |
7875 | concurrently on a single or more worker servers using multiprocessing, | |
7876 | Eventlet, or gevent. Tasks can execute asynchronously (in the background) or | |
7877 | synchronously (wait until ready).") | |
3f641af0 | 7878 | (license license:bsd-3) |
22df6419 CAW |
7879 | (properties `((python2-variant . ,(delay python2-celery)))))) |
7880 | ||
7881 | (define-public python2-celery | |
7882 | (let ((celery (package-with-python2 | |
7883 | (strip-python2-variant python-celery)))) | |
7884 | (package | |
7885 | (inherit celery) | |
00e10c6e | 7886 | (native-inputs `(("python2-unittest2" ,python2-unittest2) |
22df6419 CAW |
7887 | ("python2-mock" ,python2-mock) |
7888 | ,@(package-native-inputs celery)))))) | |
97e32948 CAW |
7889 | |
7890 | (define-public python-translitcodec | |
7891 | (package | |
7892 | (name "python-translitcodec") | |
7893 | (version "0.4.0") | |
7894 | (source | |
7895 | (origin | |
7896 | (method url-fetch) | |
7897 | (uri (pypi-uri "translitcodec" version)) | |
7898 | (sha256 | |
7899 | (base32 | |
7900 | "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki")))) | |
7901 | (build-system python-build-system) | |
7902 | (arguments | |
7903 | `(#:tests? #f)) ; no tests provided | |
7904 | (home-page | |
7905 | "https://github.com/claudep/translitcodec") | |
7906 | (synopsis | |
7907 | "Unicode to 8-bit charset transliteration codec") | |
7908 | (description | |
7909 | "This package contains codecs for transliterating ISO 10646 texts into | |
7910 | best-effort representations using smaller coded character sets (ASCII, | |
7911 | ISO 8859, etc.).") | |
f210e944 | 7912 | (license license:expat))) |
97e32948 CAW |
7913 | |
7914 | (define-public python2-translitcodec | |
f210e944 | 7915 | (package-with-python2 python-translitcodec)) |
0c3b90d4 CAW |
7916 | |
7917 | (define-public python-editor | |
7918 | (package | |
7919 | (name "python-editor") | |
7920 | (version "0.5") | |
7921 | (source | |
7922 | (origin | |
7923 | (method url-fetch) | |
7924 | (uri (pypi-uri "python-editor" version)) | |
7925 | (sha256 | |
7926 | (base32 | |
7927 | "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n")))) | |
7928 | (build-system python-build-system) | |
7929 | (home-page | |
7930 | "https://github.com/fmoo/python-editor") | |
7931 | (synopsis | |
7932 | "Programmatically open an editor, capture the result") | |
7933 | (description | |
7934 | "python-editor is a library that provides the editor module for | |
7935 | programmatically interfacing with your system's $EDITOR.") | |
f210e944 | 7936 | (license license:asl2.0))) |
0c3b90d4 CAW |
7937 | |
7938 | (define-public python2-editor | |
f210e944 | 7939 | (package-with-python2 python-editor)) |
3276517c LF |
7940 | |
7941 | (define-public python-sphinxcontrib-programoutput | |
7942 | (package | |
7943 | (name "python-sphinxcontrib-programoutput") | |
b9ce9eca | 7944 | (version "0.10") |
3276517c LF |
7945 | (source (origin |
7946 | (method url-fetch) | |
7947 | (uri (pypi-uri "sphinxcontrib-programoutput" version)) | |
7948 | (sha256 | |
7949 | (base32 | |
b9ce9eca | 7950 | "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx")))) |
3276517c | 7951 | (build-system python-build-system) |
e2cb140e MB |
7952 | (arguments |
7953 | ;; FIXME: Many tests are failing and the upstream is gone. | |
7954 | '(#:tests? #f)) | |
3276517c | 7955 | (propagated-inputs |
a0a09859 | 7956 | `(("python-sphinx" ,python-sphinx))) |
3276517c LF |
7957 | (synopsis "Sphinx extension to include program output") |
7958 | (description "A Sphinx extension to literally insert the output of arbitrary | |
7959 | commands into documents, helping you to keep your command examples up to date.") | |
7960 | (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput") | |
f210e944 | 7961 | (license license:bsd-2))) |
3276517c LF |
7962 | |
7963 | (define-public python2-sphinxcontrib-programoutput | |
f210e944 | 7964 | (package-with-python2 python-sphinxcontrib-programoutput)) |
548d7165 LF |
7965 | |
7966 | (define-public python-sphinx-repoze-autointerface | |
7967 | (package | |
7968 | (name "python-sphinx-repoze-autointerface") | |
328ae341 | 7969 | (version "0.8") |
548d7165 LF |
7970 | (source (origin |
7971 | (method url-fetch) | |
7972 | (uri (pypi-uri "repoze.sphinx.autointerface" version)) | |
7973 | (sha256 | |
7974 | (base32 | |
328ae341 | 7975 | "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f")))) |
548d7165 | 7976 | (build-system python-build-system) |
5b3c3d4b | 7977 | (arguments '(#:tests? #f)) ; No tests. |
548d7165 | 7978 | (propagated-inputs |
47c7dc4a | 7979 | `(("python-sphinx" ,python-sphinx) |
548d7165 LF |
7980 | ("python-zope-interface" ,python-zope-interface))) |
7981 | (synopsis "Auto-generate Sphinx API docs from Zope interfaces") | |
7982 | (description "This package defines an extension for the Sphinx documentation | |
7983 | system. The extension allows generation of API documentation by | |
7984 | introspection of @code{zope.interface} instances in code.") | |
7985 | (home-page "https://github.com/repoze/repoze.sphinx.autointerface") | |
3f641af0 | 7986 | (license license:repoze))) |
548d7165 LF |
7987 | |
7988 | (define-public python2-sphinx-repoze-autointerface | |
7989 | (package-with-python2 python-sphinx-repoze-autointerface)) | |
b31fbea5 | 7990 | |
eed1a61f LF |
7991 | (define-public python-vobject |
7992 | (package | |
7993 | (name "python-vobject") | |
e00a5909 | 7994 | (version "0.9.5") |
eed1a61f LF |
7995 | (source (origin |
7996 | (method url-fetch) | |
7997 | (uri (pypi-uri "vobject" version)) | |
7998 | (sha256 | |
7999 | (base32 | |
e00a5909 | 8000 | "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg")))) |
eed1a61f | 8001 | (build-system python-build-system) |
a9871b7b LF |
8002 | (arguments |
8003 | '(;; The test suite relies on some non-portable Windows interfaces. | |
8004 | #:tests? #f)) | |
f22efa01 | 8005 | (propagated-inputs |
22d7360b | 8006 | `(("python-dateutil" ,python-dateutil) |
eed1a61f LF |
8007 | ("python-pyicu" ,python-pyicu))) |
8008 | (synopsis "Parse and generate vCard and vCalendar files") | |
8009 | (description "Vobject is intended to be a full featured Python package for | |
8010 | parsing and generating vCard and vCalendar files. Currently, iCalendar files | |
8011 | are supported and well tested. vCard 3.0 files are supported, and all data | |
8012 | should be imported, but only a few components are understood in a sophisticated | |
8013 | way.") | |
8014 | (home-page "http://eventable.github.io/vobject/") | |
f210e944 | 8015 | (license license:asl2.0))) |
eed1a61f LF |
8016 | |
8017 | (define-public python2-vobject | |
f210e944 | 8018 | (package-with-python2 python-vobject)) |
cedac813 LF |
8019 | |
8020 | (define-public python-munkres | |
8021 | (package | |
8022 | (name "python-munkres") | |
38e81a2c | 8023 | (version "1.0.8") |
cedac813 LF |
8024 | (source (origin |
8025 | (method url-fetch) | |
8026 | (uri (pypi-uri "munkres" version)) | |
8027 | (sha256 | |
8028 | (base32 | |
38e81a2c | 8029 | "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq")))) |
cedac813 LF |
8030 | (build-system python-build-system) |
8031 | (arguments | |
8032 | '(#:tests? #f)) ; no test suite | |
8033 | (home-page "http://software.clapper.org/munkres/") | |
8034 | (synopsis "Implementation of the Munkres algorithm") | |
8035 | (description "The Munkres module provides an implementation of the Munkres | |
8036 | algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), | |
1b2f753d LC |
8037 | useful for solving the Assignment Problem.") |
8038 | (license license:bsd-3))) | |
0efde7d6 | 8039 | |
1b2f753d LC |
8040 | (define-public python2-munkres |
8041 | (package-with-python2 python-munkres)) | |
76b94885 | 8042 | |
b7afd018 RW |
8043 | (define-public python-whoosh |
8044 | (package | |
8045 | (name "python-whoosh") | |
8046 | (version "2.7.4") | |
8047 | (source | |
8048 | (origin | |
8049 | (method url-fetch) | |
8050 | (uri (pypi-uri "Whoosh" version)) | |
8051 | (sha256 | |
8052 | (base32 | |
8053 | "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw")))) | |
8054 | (build-system python-build-system) | |
8055 | (native-inputs | |
f3b98f4f | 8056 | `(("python-pytest" ,python-pytest))) |
9be5ecdf | 8057 | (home-page "https://bitbucket.org/mchaput/whoosh") |
b7afd018 RW |
8058 | (synopsis "Full text indexing, search, and spell checking library") |
8059 | (description | |
8060 | "Whoosh is a fast, pure-Python full text indexing, search, and spell | |
8061 | checking library.") | |
8062 | (license license:bsd-2))) | |
8063 | ||
8064 | (define-public python2-whoosh | |
8065 | (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh)))) | |
8066 | (package (inherit whoosh) | |
8067 | (propagated-inputs | |
8068 | `(("python2-backport-ssl-match-hostname" | |
8069 | ,python2-backport-ssl-match-hostname) | |
8070 | ,@(package-propagated-inputs whoosh)))))) | |
8071 | ||
76b94885 LF |
8072 | (define-public python-pathlib |
8073 | (package | |
8074 | (name "python-pathlib") | |
8075 | (version "1.0.1") | |
8076 | (source (origin | |
8077 | (method url-fetch) | |
8078 | (uri (pypi-uri "pathlib" version)) | |
8079 | (sha256 | |
8080 | (base32 | |
8081 | "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39")))) | |
8082 | (build-system python-build-system) | |
92a312dc RW |
8083 | ;; The tests depend on the internal "test" module, which does not provide |
8084 | ;; a stable interface. | |
8085 | (arguments `(#:tests? #f)) | |
76b94885 | 8086 | (home-page "https://pathlib.readthedocs.org/") |
8f65585b JD |
8087 | (synopsis "Object-oriented file system paths") |
8088 | (description "Pathlib offers a set of classes to handle file system paths. | |
76b94885 LF |
8089 | It offers the following advantages over using string objects: |
8090 | ||
8091 | @enumerate | |
8092 | @item No more cumbersome use of os and os.path functions. Everything can | |
8093 | be done easily through operators, attribute accesses, and method calls. | |
8094 | @item Embodies the semantics of different path types. For example, | |
8095 | comparing Windows paths ignores casing. | |
8096 | @item Well-defined semantics, eliminating any inconsistencies or | |
8097 | ambiguities (forward vs. backward slashes, etc.). | |
7a8894e8 HG |
8098 | @end enumerate |
8099 | ||
8100 | Note: In Python 3.4, pathlib is now part of the standard library. For other | |
8101 | Python versions please consider python-pathlib2 instead, which tracks the | |
8102 | standard library module. This module (python-pathlib) isn't maintained | |
8103 | anymore.") | |
76b94885 LF |
8104 | (license license:expat))) |
8105 | ||
8106 | (define-public python2-pathlib | |
8107 | (package-with-python2 python-pathlib)) | |
25a7db0a | 8108 | |
b7703c81 HG |
8109 | (define-public python2-pathlib2 |
8110 | (package | |
8111 | (name "python2-pathlib2") | |
ea3f45a5 | 8112 | (version "2.3.0") |
b7703c81 HG |
8113 | (source (origin |
8114 | (method url-fetch) | |
8115 | (uri (pypi-uri "pathlib2" version)) | |
8116 | (sha256 | |
8117 | (base32 | |
ea3f45a5 | 8118 | "1cx5gs2v9j2vnzmcrbq5l8fq2mwrr1h6pyf1sjdji2w1bavm09fk")))) |
b7703c81 | 8119 | (build-system python-build-system) |
49a531f5 HG |
8120 | ;; We only need the the Python 2 variant, since for Python 3 our minimum |
8121 | ;; version is 3.4 which already includes this package as part of the | |
8122 | ;; standard library. | |
b7703c81 HG |
8123 | (arguments |
8124 | `(#:python ,python-2)) | |
76397e12 | 8125 | (propagated-inputs |
ea3f45a5 MB |
8126 | `(("python2-scandir" ,python2-scandir) |
8127 | ("python2-six" ,python2-six))) | |
9be5ecdf | 8128 | (home-page "https://pypi.python.org/pypi/pathlib2/") |
b7703c81 HG |
8129 | (synopsis "Object-oriented file system paths - backport of standard |
8130 | pathlib module") | |
8131 | (description "The goal of pathlib2 is to provide a backport of standard | |
8132 | pathlib module which tracks the standard library module, so all the newest | |
8133 | features of the standard pathlib can be used also on older Python versions. | |
8134 | ||
8135 | Pathlib offers a set of classes to handle file system paths. It offers the | |
8136 | following advantages over using string objects: | |
8137 | ||
8138 | @enumerate | |
8139 | @item No more cumbersome use of os and os.path functions. Everything can | |
8140 | be done easily through operators, attribute accesses, and method calls. | |
8141 | @item Embodies the semantics of different path types. For example, | |
8142 | comparing Windows paths ignores casing. | |
8143 | @item Well-defined semantics, eliminating any inconsistencies or | |
8144 | ambiguities (forward vs. backward slashes, etc.). | |
8145 | @end enumerate") | |
8146 | (license license:expat))) | |
8147 | ||
25a7db0a LF |
8148 | (define-public python-jellyfish |
8149 | (package | |
8150 | (name "python-jellyfish") | |
8c4964dd | 8151 | (version "0.5.6") |
25a7db0a LF |
8152 | (source (origin |
8153 | (method url-fetch) | |
8154 | (uri (pypi-uri "jellyfish" version)) | |
8155 | (sha256 | |
8156 | (base32 | |
8c4964dd | 8157 | "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8")))) |
25a7db0a LF |
8158 | (build-system python-build-system) |
8159 | (native-inputs | |
8160 | `(("python-pytest" ,python-pytest))) | |
8161 | (home-page "https://github.com/jamesturk/jellyfish") | |
8162 | (synopsis "Approximate and phonetic matching of strings") | |
8163 | (description "Jellyfish uses a variety of string comparison and phonetic | |
8164 | encoding algorithms to do fuzzy string matching.") | |
3f641af0 | 8165 | (license license:bsd-2) |
25a7db0a LF |
8166 | (properties `((python2-variant . ,(delay python2-jellyfish)))))) |
8167 | ||
8168 | (define-public python2-jellyfish | |
8169 | (let ((jellyfish (package-with-python2 | |
8170 | (strip-python2-variant python-jellyfish)))) | |
8171 | (package (inherit jellyfish) | |
00e10c6e | 8172 | (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv) |
25a7db0a | 8173 | ,@(package-native-inputs jellyfish)))))) |
13edb0e5 LF |
8174 | |
8175 | (define-public python2-unicodecsv | |
8176 | (package | |
8177 | (name "python2-unicodecsv") | |
8178 | (version "0.14.1") | |
8179 | (source (origin | |
8180 | (method url-fetch) | |
8181 | ;; The test suite is not included in the PyPi release. | |
8182 | ;; https://github.com/jdunck/python-unicodecsv/issues/19 | |
8183 | (uri (string-append "https://github.com/jdunck/python-unicodecsv/" | |
8184 | "archive/" version ".tar.gz")) | |
8185 | (file-name (string-append name "-" version ".tar.gz")) | |
8186 | (sha256 | |
8187 | (base32 | |
8188 | "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w")))) | |
8189 | (build-system python-build-system) | |
8190 | (arguments | |
8191 | `(;; It supports Python 3, but Python 3 can already do Unicode CSV. | |
8192 | #:python ,python-2)) | |
8193 | (native-inputs | |
f3b98f4f | 8194 | `(("python2-unittest2" ,python2-unittest2))) |
13edb0e5 LF |
8195 | (home-page "https://github.com/jdunck/python-unicodecsv") |
8196 | (synopsis "Unicode CSV module for Python 2") | |
8197 | (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV | |
8198 | module, adding support for Unicode strings.") | |
3f641af0 | 8199 | (license license:bsd-2))) |
064503aa LF |
8200 | |
8201 | (define-public python-rarfile | |
8202 | (package | |
8203 | (name "python-rarfile") | |
67824447 | 8204 | (version "2.8") |
064503aa LF |
8205 | (source (origin |
8206 | (method url-fetch) | |
8207 | (uri (pypi-uri "rarfile" version)) | |
8208 | (sha256 | |
8209 | (base32 | |
67824447 | 8210 | "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra")))) |
064503aa LF |
8211 | (build-system python-build-system) |
8212 | (arguments | |
8213 | '(#:phases | |
8214 | (modify-phases %standard-phases | |
8215 | (replace 'check | |
8216 | ;; Many tests fail, but the installation proceeds. | |
8217 | (lambda _ (zero? (system* "make" "-C" "test" "test"))))))) | |
8218 | (native-inputs | |
8219 | `(("which" ,which))) ; required for tests | |
8220 | (propagated-inputs | |
8221 | `(("libarchive" ,libarchive))) | |
8222 | (home-page "https://github.com/markokr/rarfile") | |
8223 | (synopsis "RAR archive reader for Python") | |
8224 | (description "This is Python module for RAR archive reading. The interface | |
8225 | is made as zipfile like as possible.") | |
3f641af0 | 8226 | (license license:isc))) |
064503aa LF |
8227 | |
8228 | (define-public python2-rarfile | |
8229 | (package-with-python2 python-rarfile)) | |
daeeea71 CM |
8230 | |
8231 | (define-public python-magic | |
8232 | (package | |
8233 | (name "python-magic") | |
ce4c9b73 | 8234 | (version "0.4.15") |
daeeea71 CM |
8235 | (source |
8236 | (origin | |
8237 | (method url-fetch) | |
ce4c9b73 | 8238 | (uri (pypi-uri "python-magic" version)) |
daeeea71 CM |
8239 | (sha256 |
8240 | (base32 | |
ce4c9b73 | 8241 | "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk")) |
daeeea71 CM |
8242 | (file-name (string-append name "-" version "-checkout")))) |
8243 | (build-system python-build-system) | |
8244 | (arguments | |
8245 | ;; The tests are unreliable, so don't run them. The tests fail | |
8246 | ;; under Python3 because they were written for Python2 and | |
8247 | ;; contain import statements that do not work in Python3. One of | |
8248 | ;; the tests fails under Python2 because its assertions are | |
8249 | ;; overly stringent; it relies on comparing output strings which | |
8250 | ;; are brittle and can change depending on the version of | |
8251 | ;; libmagic being used and the system on which the test is | |
8252 | ;; running. In my case, under GuixSD 0.10.0, only one test | |
8253 | ;; failed, and it seems to have failed only because the version | |
8254 | ;; of libmagic that is packaged in Guix outputs a slightly | |
8255 | ;; different (but not wrong) string than the one that the test | |
8256 | ;; expected. | |
8257 | '(#:tests? #f | |
8258 | #:phases (modify-phases %standard-phases | |
ce4c9b73 AP |
8259 | ;; Replace a specific method call with a hard-coded |
8260 | ;; path to the necessary libmagic.so file in the | |
8261 | ;; store. If we don't do this, then the method call | |
8262 | ;; will fail to find the libmagic.so file, which in | |
8263 | ;; turn will cause any application using | |
8264 | ;; python-magic to fail. | |
8265 | (add-before 'build 'hard-code-path-to-libmagic | |
8266 | (lambda* (#:key inputs #:allow-other-keys) | |
8267 | (let ((file (assoc-ref inputs "file"))) | |
8268 | (substitute* "magic.py" | |
8269 | (("ctypes.util.find_library\\('magic'\\)") | |
8270 | (string-append "'" file "/lib/libmagic.so'"))) | |
8271 | #t))) | |
8272 | (add-before 'install 'disable-egg-compression | |
8273 | (lambda _ | |
8274 | (let ((port (open-file "setup.cfg" "a"))) | |
8275 | (display "\n[easy_install]\nzip_ok = 0\n" | |
8276 | port) | |
8277 | (close-port port) | |
8278 | #t)))))) | |
daeeea71 CM |
8279 | (inputs |
8280 | ;; python-magic needs to be able to find libmagic.so. | |
8281 | `(("file" ,file))) | |
ce4c9b73 AP |
8282 | (home-page |
8283 | "https://github.com/ahupp/python-magic") | |
8284 | (synopsis | |
8285 | "File type identification using libmagic") | |
daeeea71 CM |
8286 | (description |
8287 | "This module uses ctypes to access the libmagic file type | |
8288 | identification library. It makes use of the local magic database and | |
8289 | supports both textual and MIME-type output. Note that this module and | |
8290 | the python-file module both provide a \"magic.py\" file; these two | |
8291 | modules, which are different and were developed separately, both serve | |
8292 | the same purpose: to provide Python bindings for libmagic.") | |
8293 | (license license:expat))) | |
8294 | ||
8295 | (define-public python2-magic | |
8296 | (package-with-python2 python-magic)) | |
12af303f CM |
8297 | |
8298 | (define-public python2-s3cmd | |
8299 | (package | |
8300 | (name "python2-s3cmd") | |
8301 | (version "1.6.1") | |
8302 | (source | |
8303 | (origin | |
8304 | (method url-fetch) | |
de67e922 | 8305 | (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/" |
12af303f CM |
8306 | "s3cmd-" version ".tar.gz")) |
8307 | (sha256 | |
8308 | (base32 | |
8309 | "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6")))) | |
8310 | (build-system python-build-system) | |
8311 | (arguments | |
8312 | ;; s3cmd is written for python2 only and contains no tests. | |
8313 | `(#:python ,python-2 | |
8314 | #:tests? #f)) | |
f22efa01 | 8315 | (propagated-inputs |
12af303f CM |
8316 | `(("python2-dateutil" ,python2-dateutil) |
8317 | ;; The python-file package also provides a magic.py module. | |
8318 | ;; This is an unfortunate state of affairs; however, s3cmd | |
8319 | ;; fails to install if it cannot find specifically the | |
8320 | ;; python-magic package. Thus we include it, instead of using | |
8321 | ;; python-file. Ironically, s3cmd sometimes works better | |
8322 | ;; without libmagic bindings at all: | |
8323 | ;; https://github.com/s3tools/s3cmd/issues/198 | |
8324 | ("python2-magic" ,python2-magic))) | |
8325 | (home-page "http://s3tools.org/s3cmd") | |
8326 | (synopsis "Command line tool for S3-compatible storage services") | |
8327 | (description | |
8328 | "S3cmd is a command line tool for uploading, retrieving and managing data | |
8329 | in storage services that are compatible with the Amazon Simple Storage | |
8330 | Service (S3) protocol, including S3 itself. It supports rsync-like backup, | |
8331 | GnuPG encryption, and more. It also supports management of Amazon's | |
8332 | CloudFront content delivery network.") | |
3f641af0 | 8333 | (license license:gpl2+))) |
4323a5f0 AE |
8334 | |
8335 | (define-public python-pkgconfig | |
8336 | (package | |
8337 | (name "python-pkgconfig") | |
8338 | (version "1.1.0") | |
8339 | (source | |
8340 | (origin | |
8341 | (method url-fetch) | |
8342 | (uri (pypi-uri "pkgconfig" version)) | |
8343 | (sha256 | |
8344 | (base32 | |
8345 | "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh")))) | |
8346 | (build-system python-build-system) | |
8347 | (native-inputs | |
f3b98f4f | 8348 | `(("python-nose" ,python-nose))) |
4323a5f0 AE |
8349 | (inputs |
8350 | `(("pkg-config" ,pkg-config))) | |
8351 | (arguments | |
8352 | `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3, | |
8353 | ;; and on Python 2 they need the dl module deprecated since Python 2.6. | |
8354 | #:tests? #f | |
4323a5f0 AE |
8355 | ;; Hard-code the path to pkg-config. |
8356 | #:phases | |
8357 | (modify-phases %standard-phases | |
8358 | (add-before | |
8359 | 'build 'patch | |
8360 | (lambda _ | |
8361 | (substitute* "pkgconfig/pkgconfig.py" | |
8362 | (("cmd = 'pkg-config") | |
8363 | (string-append "cmd = '" (which "pkg-config")))) | |
8364 | #t))))) | |
7bf837fd | 8365 | (home-page "https://github.com/matze/pkgconfig") |
4323a5f0 AE |
8366 | (synopsis "Python interface for pkg-config") |
8367 | (description "This module provides a Python interface to pkg-config. It | |
8368 | can be used to find all pkg-config packages, check if a package exists, | |
8369 | check if a package meets certain version requirements, query CFLAGS and | |
8370 | LDFLAGS and parse the output to build extensions with setup.py.") | |
a0c6a36b | 8371 | (license license:expat))) |
4323a5f0 AE |
8372 | |
8373 | (define-public python2-pkgconfig | |
8374 | (package-with-python2 python-pkgconfig)) | |
8375 | ||
2e697322 BW |
8376 | (define-public python-bz2file |
8377 | (package | |
8378 | (name "python-bz2file") | |
8379 | (version "0.98") | |
8380 | (source | |
8381 | (origin | |
8382 | (method url-fetch) | |
8383 | (uri (pypi-uri "bz2file" version)) | |
8384 | (sha256 | |
8385 | (base32 | |
8386 | "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4")))) | |
8387 | (build-system python-build-system) | |
8388 | (arguments | |
124df723 | 8389 | `(#:tests? #f)) ; Tests use deprecated python modules. |
2e697322 BW |
8390 | (home-page "https://github.com/nvawda/bz2file") |
8391 | (synopsis "Read and write bzip2-compressed files") | |
8392 | (description | |
8393 | "Bz2file is a Python library for reading and writing bzip2-compressed | |
8394 | files. It contains a drop-in replacement for the I/O interface in the | |
8395 | standard library's @code{bz2} module, including features from the latest | |
8396 | development version of CPython that are not available in older releases.") | |
3f641af0 | 8397 | (license license:asl2.0) |
2e697322 BW |
8398 | (properties `((python2-variant . ,(delay python2-bz2file)))))) |
8399 | ||
8400 | (define-public python2-bz2file | |
8401 | (let ((base (package-with-python2 | |
8402 | (strip-python2-variant python-bz2file)))) | |
8403 | (package | |
8404 | (inherit base) | |
124df723 | 8405 | (arguments |
752bb447 BW |
8406 | `(#:python ,python-2 |
8407 | #:phases | |
124df723 BW |
8408 | (modify-phases %standard-phases |
8409 | ;; 'python setup.py test' does not work as of 0.98. | |
8410 | ;; There is only the one test file, so we run it directly. | |
8411 | (replace 'check | |
8412 | (lambda _ (zero? (system* "python" | |
8413 | "test_bz2file.py")))))))))) | |
2e697322 | 8414 | |
da4ac1aa BW |
8415 | (define-public python-future |
8416 | (package | |
8417 | (name "python-future") | |
c522f57e | 8418 | (version "0.16.0") |
da4ac1aa BW |
8419 | (source |
8420 | (origin | |
8421 | (method url-fetch) | |
8422 | (uri (pypi-uri "future" version)) | |
8423 | (sha256 | |
8424 | (base32 | |
c522f57e | 8425 | "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773")))) |
da4ac1aa BW |
8426 | (build-system python-build-system) |
8427 | ;; Many tests connect to the network or are otherwise flawed. | |
8428 | ;; https://github.com/PythonCharmers/python-future/issues/210 | |
8429 | (arguments | |
8430 | `(#:tests? #f)) | |
8431 | (home-page "http://python-future.org") | |
8432 | (synopsis "Single-source support for Python 3 and 2") | |
8433 | (description | |
8434 | "@code{python-future} is the missing compatibility layer between Python 2 and | |
8435 | Python 3. It allows you to use a single, clean Python 3.x-compatible codebase | |
8436 | to support both Python 2 and Python 3 with minimal overhead.") | |
f210e944 | 8437 | (license license:expat))) |
da4ac1aa BW |
8438 | |
8439 | (define-public python2-future | |
f210e944 | 8440 | (package-with-python2 python-future)) |
da4ac1aa | 8441 | |
8e451885 AE |
8442 | (define-public python-cysignals |
8443 | (package | |
8444 | (name "python-cysignals") | |
8445 | (version "1.1.0") | |
8446 | (source | |
8447 | (origin | |
8448 | (method url-fetch) | |
8449 | (uri (pypi-uri "cysignals" version ".tar.bz2")) | |
8450 | (sha256 | |
8451 | (base32 | |
8452 | "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6")))) | |
8453 | (build-system python-build-system) | |
8454 | (native-inputs | |
8455 | `(("python-cython" ,python-cython) | |
8e451885 AE |
8456 | ("python-sphinx" ,python-sphinx))) |
8457 | (inputs | |
8458 | `(("pari-gp" ,pari-gp))) | |
8459 | (arguments | |
8460 | `(#:modules ((guix build python-build-system) | |
8461 | ((guix build gnu-build-system) #:prefix gnu:) | |
8462 | (guix build utils)) | |
8463 | ;; FIXME: Tests are executed after installation and currently fail | |
8464 | ;; when not installing into standard locations; the author is working | |
8465 | ;; on a fix. | |
8466 | #:tests? #f | |
8467 | #:phases | |
8468 | (modify-phases %standard-phases | |
8469 | (add-before | |
8470 | 'build 'configure | |
8471 | (assoc-ref gnu:%standard-phases 'configure))))) | |
8472 | (home-page | |
8473 | "https://github.com/sagemath/cysignals") | |
8474 | (synopsis | |
8475 | "Handling of interrupts and signals for Cython") | |
8476 | (description | |
8477 | "The cysignals package provides mechanisms to handle interrupts (and | |
8478 | other signals and errors) in Cython code, using two related approaches, | |
8479 | for mixed Cython/Python code or external C libraries and pure Cython code, | |
8480 | respectively.") | |
3f641af0 | 8481 | (license license:lgpl3+))) |
8e451885 AE |
8482 | |
8483 | (define-public python2-cysignals | |
8484 | (package-with-python2 python-cysignals)) | |
8485 | ||
63bcec71 DM |
8486 | (define-public python2-shedskin |
8487 | (package | |
8488 | (name "python2-shedskin") | |
8489 | (version "0.9.4") | |
8490 | (source | |
8491 | (origin | |
8492 | (method url-fetch) | |
8493 | (uri (string-append "https://github.com/shedskin/shedskin/" | |
8494 | "releases/download/v" version | |
8495 | "/shedskin-" version ".tgz")) | |
8496 | (sha256 | |
8497 | (base32 | |
8498 | "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41")))) | |
8499 | (build-system python-build-system) | |
8500 | (arguments | |
8501 | `(#:python ,python-2 | |
8502 | #:phases (modify-phases %standard-phases | |
8503 | (add-after 'unpack 'fix-resulting-include-libs | |
8504 | (lambda* (#:key inputs #:allow-other-keys) | |
8505 | (let ((libgc (assoc-ref inputs "libgc")) | |
8506 | (pcre (assoc-ref inputs "pcre"))) | |
8507 | (substitute* "shedskin/makefile.py" | |
8508 | (("variable == 'CCFLAGS':[ ]*") | |
8509 | (string-append "variable == 'CCFLAGS':\n" | |
8510 | " line += ' -I " pcre "/include" | |
8511 | " -I " libgc "/include'")) | |
8512 | (("variable == 'LFLAGS':[ ]*") | |
8513 | (string-append "variable == 'LFLAGS':\n" | |
8514 | " line += ' -L" pcre "/lib" | |
8515 | " -L " libgc "/lib'"))) | |
8516 | #t)))))) | |
63bcec71 DM |
8517 | (inputs `(("pcre" ,pcre) |
8518 | ("libgc" ,libgc))) | |
8519 | (home-page "https://shedskin.github.io/") | |
8520 | (synopsis "Experimental Python-2 to C++ Compiler") | |
8521 | (description (string-append "This is an experimental compiler for a subset of | |
8522 | Python. It generates C++ code and a Makefile.")) | |
3f641af0 | 8523 | (license (list license:gpl3 license:bsd-3 license:expat)))) |
88bb4197 LG |
8524 | |
8525 | (define-public python2-rope | |
8526 | (package | |
8527 | (name "python2-rope") | |
8528 | (version "0.10.3") | |
8529 | (source | |
8530 | (origin | |
8531 | (method url-fetch) | |
8532 | (uri (pypi-uri "rope" version)) | |
8533 | (sha256 | |
8534 | (base32 | |
8535 | "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb")))) | |
8536 | (arguments | |
8537 | ;; Rope is currently python-2 only. | |
8538 | ;; https://github.com/python-rope/rope/issues/57 | |
8539 | `(#:python ,python-2)) | |
8540 | (build-system python-build-system) | |
8541 | (native-inputs | |
f3b98f4f | 8542 | `(("python2-unittest2" ,python2-unittest2))) |
88bb4197 LG |
8543 | (home-page "https://github.com/python-rope/rope") |
8544 | (synopsis "Refactoring library for Python") | |
8545 | (description "Rope is a refactoring library for Python. It facilitates | |
8546 | the renaming, moving and extracting of attributes, functions, modules, fields | |
8547 | and parameters in Python 2 source code. These refactorings can also be applied | |
d1e4ad1b | 8548 | to occurrences in strings and comments.") |
3f641af0 | 8549 | (license license:gpl2))) |
6ba8ca17 TČ |
8550 | |
8551 | (define-public python-py3status | |
8552 | (package | |
8553 | (name "python-py3status") | |
d2262d70 | 8554 | (version "3.1") |
6ba8ca17 TČ |
8555 | (source |
8556 | (origin | |
8557 | (method url-fetch) | |
8558 | (uri (pypi-uri "py3status" version)) | |
8559 | (sha256 | |
8560 | (base32 | |
d2262d70 | 8561 | "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds")))) |
6ba8ca17 | 8562 | (build-system python-build-system) |
3eabcc78 TČ |
8563 | (inputs |
8564 | `(("file" ,file))) | |
8653c1d5 | 8565 | (arguments |
3eabcc78 TČ |
8566 | '(#:phases |
8567 | (modify-phases %standard-phases | |
8568 | ;; 'file' is used for detection of configuration file encoding | |
8569 | ;; let's make link the dependency to particular input | |
8570 | (add-before 'build 'patch-file-path | |
8571 | (lambda* (#:key inputs #:allow-other-keys) | |
8572 | (let ((file-path (assoc-ref inputs "file"))) | |
8573 | (substitute* "py3status/parse_config.py" | |
8574 | (("check_output\\(\\['file'") | |
8575 | (string-append "check_output(['" file-path "/bin/file'"))) | |
8576 | #t)))) | |
8577 | #:tests? #f)) ; TODO: Requires many libraries not in Guix. | |
6ba8ca17 TČ |
8578 | (home-page "https://github.com/ultrabug/py3status") |
8579 | (synopsis "Extensible i3status wrapper written in Python") | |
8580 | (description "py3status is an i3status wrapper which extends i3status | |
8581 | functionality in a modular way, allowing you to extend your panel with your | |
8582 | own code, responding to click events and updating clock every second.") | |
3f641af0 | 8583 | (license license:bsd-3))) |
b8fdbca3 HG |
8584 | |
8585 | (define-public python-tblib | |
8586 | (package | |
8587 | (name "python-tblib") | |
8588 | (version "1.3.0") | |
8589 | (source (origin | |
8590 | (method url-fetch) | |
8591 | (uri (pypi-uri "tblib" version)) | |
8592 | (sha256 (base32 | |
8593 | "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi")))) | |
8594 | (build-system python-build-system) | |
8595 | (arguments | |
8596 | `(#:phases | |
8597 | (modify-phases %standard-phases | |
8598 | (replace 'check | |
8599 | (lambda _ | |
8600 | ;; Upstream runs tests after installation and the package itself | |
8601 | ;; resides in a subdirectory. Extend PYTHONPATH so it will be | |
8602 | ;; found. | |
8603 | (setenv "PYTHONPATH" | |
8604 | (string-append (getcwd) "/build/lib:" | |
8605 | (getenv "PYTHONPATH"))) | |
8606 | (zero? (system* "py.test" "-vv" "tests" "README.rst"))))))) | |
8607 | (native-inputs | |
8608 | `(("python-pytest" ,python-pytest) | |
b8fdbca3 HG |
8609 | ("python-six" ,python-six))) |
8610 | (home-page "https://github.com/ionelmc/python-tblib") | |
8611 | (synopsis "Traceback serialization library") | |
8612 | (description | |
8613 | "Traceback serialization allows you to: | |
8614 | ||
8615 | @enumerate | |
8616 | @item Pickle tracebacks and raise exceptions with pickled tracebacks in | |
8617 | different processes. This allows better error handling when running code over | |
8618 | multiple processes (imagine multiprocessing, billiard, futures, celery etc). | |
8619 | ||
8620 | @item Parse traceback strings and raise with the parsed tracebacks. | |
9657aeb1 | 8621 | @end enumerate\n") |
3f641af0 | 8622 | (license license:bsd-3))) |
b8fdbca3 HG |
8623 | |
8624 | (define-public python2-tblib | |
8625 | (package-with-python2 python-tblib)) | |
1a024de4 | 8626 | |
68b9d242 SB |
8627 | (define-public python-greenlet |
8628 | (package | |
8629 | (name "python-greenlet") | |
1f89fb16 | 8630 | (version "0.4.11") |
68b9d242 SB |
8631 | (source (origin |
8632 | (method url-fetch) | |
8633 | (uri (pypi-uri "greenlet" version)) | |
8634 | (sha256 | |
8635 | (base32 | |
1f89fb16 | 8636 | "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h")))) |
68b9d242 | 8637 | (build-system python-build-system) |
68b9d242 SB |
8638 | (home-page "https://greenlet.readthedocs.io/") |
8639 | (synopsis "Lightweight in-process concurrent programming") | |
8640 | (description | |
8641 | "Greenlet package is a spin-off of Stackless, a version of CPython | |
8642 | that supports micro-threads called \"tasklets\". Tasklets run | |
8643 | pseudo-concurrently (typically in a single or a few OS-level threads) and | |
8644 | are synchronized with data exchanges on \"channels\".") | |
3f641af0 | 8645 | (license (list license:psfl license:expat)))) |
68b9d242 SB |
8646 | |
8647 | (define-public python2-greenlet | |
8648 | (package-with-python2 python-greenlet)) | |
d79a343b SB |
8649 | |
8650 | (define-public python-gevent | |
8651 | (package | |
8652 | (name "python-gevent") | |
fcaab9c0 | 8653 | (version "1.2.2") |
d79a343b SB |
8654 | (source (origin |
8655 | (method url-fetch) | |
8656 | (uri (pypi-uri "gevent" version)) | |
8657 | (sha256 | |
8658 | (base32 | |
fcaab9c0 | 8659 | "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7")) |
d79a343b SB |
8660 | (modules '((guix build utils))) |
8661 | (snippet | |
8662 | '(begin | |
8663 | ;; unbunding libev and c-ares | |
fcaab9c0 MB |
8664 | (delete-file-recursively "deps") |
8665 | #t)))) | |
d79a343b | 8666 | (build-system python-build-system) |
fcaab9c0 MB |
8667 | (arguments |
8668 | `(#:modules ((ice-9 ftw) | |
8669 | (srfi srfi-26) | |
8670 | (guix build utils) | |
8671 | (guix build python-build-system)) | |
8672 | #:phases (modify-phases %standard-phases | |
8673 | (add-after 'unpack 'unpack-libev | |
8674 | (lambda* (#:key inputs #:allow-other-keys) | |
8675 | (mkdir-p "deps/libev") | |
8676 | ;; FIXME: gevent requires building libev, even though | |
8677 | ;; it only links against the proper one. | |
8678 | (invoke "tar" "-xf" (assoc-ref inputs "libev-source") | |
8679 | "--strip-components=1" "-C" "deps/libev"))) | |
8680 | (add-before 'patch-source-shebangs 'patch-hard-coded-paths | |
8681 | (lambda _ | |
8682 | (substitute* "src/gevent/subprocess.py" | |
8683 | (("/bin/sh") (which "sh"))) | |
8684 | (for-each (lambda (file) | |
8685 | (substitute* file | |
8686 | (("/bin/sh") (which "sh")) | |
8687 | (("/bin/true") (which "true")))) | |
8688 | (find-files "src/greentest" "\\.py$")) | |
8689 | #t)) | |
8690 | (add-before 'build 'do-not-use-bundled-sources | |
8691 | (lambda _ | |
8692 | (setenv "CONFIG_SHELL" (which "bash")) | |
8693 | (setenv "LIBEV_EMBED" "false") | |
8694 | (setenv "CARES_EMBED" "false") | |
8695 | (setenv "EMBED" "false") | |
8696 | #t)) | |
8697 | (replace 'check | |
8698 | (lambda _ | |
8699 | ;; Make sure the build directory is on PYTHONPATH. | |
8700 | (setenv "PYTHONPATH" | |
8701 | (string-append | |
8702 | (getenv "PYTHONPATH") ":" | |
8703 | (getcwd) "/build/" | |
8704 | (car (scandir "build" (cut string-prefix? "lib." <>))))) | |
8705 | (with-directory-excursion "src/greentest" | |
8706 | ;; XXX: Many tests require network access. Instead we only | |
8707 | ;; run known-good tests. Unfortunately we cannot use | |
8708 | ;; recursion here since this directory also contains | |
8709 | ;; Python-version-specific subfolders. | |
8710 | (apply invoke "python" "testrunner.py" "--config" | |
8711 | "known_failures.py" | |
8712 | (scandir "." (cut regexp-exec | |
8713 | (make-regexp "test_+(subprocess|core)") | |
8714 | <>))))))))) | |
d79a343b SB |
8715 | (propagated-inputs |
8716 | `(("python-greenlet" ,python-greenlet))) | |
8717 | (native-inputs | |
fcaab9c0 MB |
8718 | `(("libev-source" ,(package-source libev)) |
8719 | ("python-six" ,python-six))) | |
d79a343b SB |
8720 | (inputs |
8721 | `(("c-ares" ,c-ares) | |
8722 | ("libev" ,libev))) | |
8723 | (home-page "http://www.gevent.org/") | |
8724 | (synopsis "Coroutine-based network library") | |
8725 | (description | |
8726 | "gevent is a coroutine-based Python networking library that uses greenlet | |
8727 | to provide a high-level synchronous API on top of the libev event loop.") | |
8728 | (license license:expat))) | |
8729 | ||
8730 | (define-public python2-gevent | |
8731 | (package-with-python2 python-gevent)) | |
da3aeeb6 | 8732 | |
b585e361 DM |
8733 | (define-public python-fastimport |
8734 | (package | |
8735 | (name "python-fastimport") | |
8736 | (version "0.9.6") | |
8737 | (source | |
8738 | (origin | |
8739 | (method url-fetch) | |
8740 | (uri (pypi-uri "fastimport" version)) | |
8741 | (sha256 | |
8742 | (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43")))) | |
8743 | (build-system python-build-system) | |
8744 | (home-page "https://github.com/jelmer/python-fastimport") | |
8745 | (synopsis "VCS fastimport parser and generator in Python") | |
8746 | (description "This package provides a parser for and generator of the Git | |
8747 | @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport} | |
8748 | format.") | |
8749 | (license license:gpl2+))) | |
8750 | ||
8751 | (define-public python2-fastimport | |
8752 | (package-with-python2 python-fastimport)) | |
8753 | ||
da3aeeb6 SB |
8754 | (define-public python-twisted |
8755 | (package | |
8756 | (name "python-twisted") | |
c1578ad0 | 8757 | (version "17.1.0") |
da3aeeb6 SB |
8758 | (source (origin |
8759 | (method url-fetch) | |
8ea8e8d3 | 8760 | (uri (pypi-uri "Twisted" version ".tar.bz2")) |
da3aeeb6 SB |
8761 | (sha256 |
8762 | (base32 | |
c1578ad0 | 8763 | "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv")))) |
da3aeeb6 | 8764 | (build-system python-build-system) |
a960e73f MB |
8765 | (arguments |
8766 | '(#:tests? #f)) ; FIXME: Some tests are failing. | |
8767 | ;; #:phases | |
8768 | ;; (modify-phases %standard-phases | |
8769 | ;; (replace 'check | |
8770 | ;; (lambda _ | |
8771 | ;; (zero? (system* "./bin/trial" "twisted"))))) | |
45912170 | 8772 | (propagated-inputs |
c1578ad0 TS |
8773 | `(("python-zope-interface" ,python-zope-interface) |
8774 | ("python-incremental" ,python-incremental) | |
8775 | ("python-constantly" ,python-constantly) | |
8776 | ("python-automat" ,python-automat))) | |
da3aeeb6 SB |
8777 | (home-page "https://twistedmatrix.com/") |
8778 | (synopsis "Asynchronous networking framework written in Python") | |
8779 | (description | |
8780 | "Twisted is an extensible framework for Python programming, with special | |
8781 | focus on event-based network programming and multiprotocol integration.") | |
8782 | (license license:expat))) | |
8783 | ||
8784 | (define-public python2-twisted | |
8785 | (package-with-python2 python-twisted)) | |
d0b6fed6 | 8786 | |
4d3fa5a4 EF |
8787 | (define-public python-pika |
8788 | (package | |
8789 | (name "python-pika") | |
8790 | (version "0.10.0") | |
8791 | (source | |
8792 | (origin | |
8793 | (method url-fetch) | |
8794 | (uri (pypi-uri "pika" version)) | |
8795 | (sha256 | |
8796 | (base32 | |
8797 | "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj")))) | |
8798 | (build-system python-build-system) | |
8799 | (native-inputs | |
269d9172 LF |
8800 | `(("python-pyev" ,python-pyev) |
8801 | ("python-tornado" ,python-tornado) | |
8802 | ("python-twisted" ,python-twisted))) | |
4d3fa5a4 EF |
8803 | (home-page "https://pika.readthedocs.org") |
8804 | (synopsis "Pure Python AMQP Client Library") | |
8805 | (description | |
8806 | "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing | |
8807 | Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying | |
8808 | network support library.") | |
8809 | (license license:bsd-3))) | |
8810 | ||
8811 | (define-public python2-pika | |
8812 | (package-with-python2 python-pika)) | |
8813 | ||
d0b6fed6 DM |
8814 | (define-public python-ply |
8815 | (package | |
8816 | (name "python-ply") | |
9e8401a5 | 8817 | (version "3.10") |
d0b6fed6 DM |
8818 | (source |
8819 | (origin | |
8820 | (method url-fetch) | |
234ade2d | 8821 | (uri (pypi-uri "ply" version)) |
d0b6fed6 DM |
8822 | (sha256 |
8823 | (base32 | |
9e8401a5 | 8824 | "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn")))) |
d0b6fed6 DM |
8825 | (build-system python-build-system) |
8826 | (home-page "http://www.dabeaz.com/ply/") | |
8827 | (synopsis "Python Lex & Yacc") | |
8828 | (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python. | |
8829 | It uses LR parsing and does extensive error checking.") | |
f210e944 | 8830 | (license license:bsd-3))) |
d0b6fed6 DM |
8831 | |
8832 | (define-public python2-ply | |
f210e944 | 8833 | (package-with-python2 python-ply)) |
d951bd54 SB |
8834 | |
8835 | (define-public python-tabulate | |
8836 | (package | |
8837 | (name "python-tabulate") | |
e6ace98d | 8838 | (version "0.7.7") |
d951bd54 SB |
8839 | (source (origin |
8840 | (method url-fetch) | |
8841 | (uri (pypi-uri "tabulate" version)) | |
8842 | (sha256 | |
8843 | (base32 | |
fe2ba3a8 | 8844 | "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843")))) |
d951bd54 | 8845 | (build-system python-build-system) |
fe2ba3a8 MB |
8846 | (arguments |
8847 | ;; FIXME: The pypi release tarball is missing a 'test/common.py' | |
8848 | ;; and the latest release is not tagged in the upstream repository. | |
8849 | '(#:tests? #f)) | |
d951bd54 SB |
8850 | (home-page "https://bitbucket.org/astanin/python-tabulate") |
8851 | (synopsis "Pretty-print tabular data") | |
8852 | (description | |
8853 | "Tabulate is a library and command-line utility to pretty-print tabular | |
8854 | data in Python.") | |
8855 | (license license:expat))) | |
8856 | ||
8857 | (define-public python2-tabulate | |
8858 | (package-with-python2 python-tabulate)) | |
1c4c8a33 SB |
8859 | |
8860 | (define-public python-kazoo | |
8861 | (package | |
8862 | (name "python-kazoo") | |
8863 | (version "2.2.1") | |
8864 | (source | |
8865 | (origin | |
8866 | (method url-fetch) | |
8867 | (uri (pypi-uri "kazoo" version)) | |
8868 | (sha256 | |
8869 | (base32 | |
8870 | "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj")))) | |
8871 | (build-system python-build-system) | |
8872 | (arguments '(#:tests? #f)) ; XXX: needs zookeeper | |
c18899e8 SB |
8873 | (propagated-inputs |
8874 | `(("python-six" ,python-six))) | |
1c4c8a33 SB |
8875 | (home-page "https://kazoo.readthedocs.org") |
8876 | (synopsis "High-level Zookeeper client library") | |
8877 | (description | |
8878 | "Kazoo is a Python client library for the Apache Zookeeper distributed | |
8879 | application service. It is designed to be easy to use and to avoid common | |
8880 | programming errors.") | |
3f641af0 | 8881 | (license license:asl2.0))) |
1c4c8a33 SB |
8882 | |
8883 | (define-public python2-kazoo | |
8884 | (package-with-python2 python-kazoo)) | |
45dda35e SB |
8885 | |
8886 | (define-public python-pykafka | |
8887 | (package | |
8888 | (name "python-pykafka") | |
8889 | (version "2.4.0") | |
8890 | (source (origin | |
8891 | (method url-fetch) | |
c6bccf71 EF |
8892 | (uri (string-append |
8893 | "https://pypi.python.org/packages/8b/3e/" | |
8894 | "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/" | |
8895 | "pykafka-" version ".tar.gz")) | |
45dda35e SB |
8896 | (sha256 |
8897 | (base32 | |
8898 | "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv")))) | |
8899 | (build-system python-build-system) | |
8900 | (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc. | |
c8fa3d9b | 8901 | (propagated-inputs |
45dda35e SB |
8902 | `(("python-gevent" ,python-gevent) |
8903 | ("python-kazoo" ,python-kazoo) | |
45dda35e SB |
8904 | ("python-tabulate" ,python-tabulate))) |
8905 | (inputs | |
8906 | `(("librdkafka" ,librdkafka))) | |
8907 | (home-page "https://pykafka.readthedocs.io/") | |
8908 | (synopsis "Apache Kafka client for Python") | |
8909 | (description | |
8910 | "PyKafka is a client for the Apache Kafka distributed messaging system. | |
8911 | It includes Python implementations of Kafka producers and consumers, which | |
8912 | are optionally backed by a C extension built on librdkafka.") | |
3f641af0 | 8913 | (license license:asl2.0))) |
45dda35e SB |
8914 | |
8915 | (define-public python2-pykafka | |
8916 | (package-with-python2 python-pykafka)) | |
a44fd439 DM |
8917 | |
8918 | (define-public python-wcwidth | |
8919 | (package | |
8920 | (name "python-wcwidth") | |
9e59478f | 8921 | (version "0.1.7") |
a44fd439 DM |
8922 | (source |
8923 | (origin | |
8924 | (method url-fetch) | |
9e59478f | 8925 | (uri (pypi-uri "wcwidth" version)) |
a44fd439 DM |
8926 | (sha256 |
8927 | (base32 | |
9e59478f | 8928 | "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx")))) |
a44fd439 DM |
8929 | (build-system python-build-system) |
8930 | (home-page "https://github.com/jquast/wcwidth") | |
66e07664 | 8931 | (synopsis "Measure number of terminal column cells of wide-character codes") |
a44fd439 DM |
8932 | (description "Wcwidth measures the number of terminal column cells of |
8933 | wide-character codes. It is useful for those implementing a terminal emulator, | |
8934 | or programs that carefully produce output to be interpreted by one. It is a | |
8935 | Python implementation of the @code{wcwidth} and @code{wcswidth} C functions | |
8936 | specified in POSIX.1-2001 and POSIX.1-2008.") | |
f210e944 | 8937 | (license license:expat))) |
a44fd439 DM |
8938 | |
8939 | (define-public python2-wcwidth | |
f210e944 | 8940 | (package-with-python2 python-wcwidth)) |
0de78c95 DP |
8941 | |
8942 | (define-public python2-jsonrpclib | |
8943 | (package | |
8944 | (name "python2-jsonrpclib") | |
8945 | (version "0.1.7") | |
8946 | (source (origin | |
8947 | (method url-fetch) | |
8948 | (uri (string-append | |
8949 | "https://pypi.python.org/packages/source/j/jsonrpclib/" | |
8950 | "jsonrpclib-" version ".tar.gz")) | |
8951 | (sha256 | |
8952 | (base32 | |
8953 | "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z")))) | |
8954 | (build-system python-build-system) | |
0de78c95 DP |
8955 | (arguments |
8956 | `(#:tests? #f | |
8957 | #:python ,python-2)) | |
8958 | (home-page "https://github.com/joshmarshall/jsonrpclib/") | |
8959 | (synopsis "Implementation of JSON-RPC specification for Python") | |
8960 | (description | |
8961 | "This library is an implementation of the JSON-RPC specification. | |
8962 | It supports both the original 1.0 specification, as well as the | |
8963 | new (proposed) 2.0 spec, which includes batch submission, keyword arguments, | |
8964 | etc.") | |
3f641af0 | 8965 | (license license:asl2.0))) |
9250b0f3 SB |
8966 | |
8967 | (define-public python-chai | |
8968 | (package | |
8969 | (name "python-chai") | |
8970 | (version "1.1.1") | |
8971 | (source (origin | |
8972 | (method url-fetch) | |
8973 | (uri (pypi-uri "chai" version)) | |
8974 | (sha256 | |
8975 | (base32 | |
8976 | "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl")))) | |
8977 | (build-system python-build-system) | |
9250b0f3 SB |
8978 | (home-page "https://github.com/agoragames/chai") |
8979 | (synopsis "Mocking framework for Python") | |
8980 | (description | |
8981 | "Chai provides an api for mocking, stubbing and spying your python | |
8982 | objects, patterned after the Mocha library for Ruby.") | |
3f641af0 | 8983 | (license license:bsd-3))) |
9250b0f3 SB |
8984 | |
8985 | (define-public python2-chai | |
8986 | (package-with-python2 python-chai)) | |
8987 | ||
1f2b62a4 SB |
8988 | (define-public python-inflection |
8989 | (package | |
8990 | (name "python-inflection") | |
8991 | (version "0.3.1") | |
8992 | (source | |
8993 | (origin (method url-fetch) | |
8994 | (uri (pypi-uri "inflection" version)) | |
8995 | (sha256 | |
8996 | (base32 | |
8997 | "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq")))) | |
8998 | (build-system python-build-system) | |
e9127525 MB |
8999 | (native-inputs |
9000 | `(("python-pytest" ,python-pytest))) | |
7bf837fd | 9001 | (home-page "https://github.com/jpvanhal/inflection") |
1f2b62a4 SB |
9002 | (synopsis "Python string transformation library") |
9003 | (description | |
9004 | "Inflection is a string transformation library. It singularizes | |
9005 | and pluralizes English words, and transforms strings from CamelCase to | |
9006 | underscored string.") | |
9007 | (license license:expat))) | |
9008 | ||
9009 | (define-public python2-inflection | |
9010 | (package-with-python2 python-inflection)) | |
9011 | ||
18995566 SB |
9012 | (define-public python-pylev |
9013 | (package | |
9014 | (name "python-pylev") | |
9015 | (version "1.3.0") | |
9016 | (source (origin | |
9017 | (method url-fetch) | |
9018 | (uri (pypi-uri "pylev" version)) | |
9019 | (sha256 | |
9020 | (base32 | |
9021 | "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86")))) | |
9022 | (build-system python-build-system) | |
7bf837fd | 9023 | (home-page "https://github.com/toastdriven/pylev") |
18995566 SB |
9024 | (synopsis "Levenshtein distance implementation in Python") |
9025 | (description "Pure Python Levenshtein implementation, based off the | |
9026 | Wikipedia code samples at | |
9027 | @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.") | |
3f641af0 | 9028 | (license license:bsd-3))) |
18995566 SB |
9029 | |
9030 | (define-public python2-pylev | |
9031 | (package-with-python2 python-pylev)) | |
9032 | ||
f5deff7a SB |
9033 | (define-public python-cleo |
9034 | (package | |
9035 | (name "python-cleo") | |
5eebe8dc | 9036 | (version "0.6.1") |
f5deff7a SB |
9037 | (source (origin |
9038 | (method url-fetch) | |
9039 | (uri (pypi-uri "cleo" version)) | |
9040 | (sha256 | |
9041 | (base32 | |
5eebe8dc | 9042 | "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7")))) |
f5deff7a SB |
9043 | (build-system python-build-system) |
9044 | (native-inputs | |
f3b98f4f | 9045 | `(;; For testing |
f5deff7a | 9046 | ("python-mock" ,python-mock) |
5eebe8dc | 9047 | ("python-pytest-mock" ,python-pytest-mock) |
f5deff7a | 9048 | ("python-pytest" ,python-pytest))) |
9403150a | 9049 | (propagated-inputs |
5eebe8dc BW |
9050 | `(("python-backpack" ,python-backpack) |
9051 | ("python-pastel" ,python-pastel) | |
9403150a | 9052 | ("python-pylev" ,python-pylev))) |
f5deff7a SB |
9053 | (home-page "https://github.com/sdispater/cleo") |
9054 | (synopsis "Command-line arguments library for Python") | |
9055 | (description | |
9056 | "Cleo allows you to create command-line commands with signature in | |
9057 | docstring and colored output.") | |
9058 | (license license:expat))) | |
9059 | ||
9060 | (define-public python2-cleo | |
9061 | (package-with-python2 python-cleo)) | |
9062 | ||
77cadb43 SB |
9063 | (define-public python-lazy-object-proxy |
9064 | (package | |
9065 | (name "python-lazy-object-proxy") | |
9066 | (version "1.2.2") | |
9067 | (source (origin | |
9068 | (method url-fetch) | |
9069 | (uri (pypi-uri "lazy-object-proxy" version)) | |
9070 | (sha256 | |
9071 | (base32 | |
9072 | "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x")))) | |
9073 | (build-system python-build-system) | |
77cadb43 SB |
9074 | (home-page "https://github.com/ionelmc/python-lazy-object-proxy") |
9075 | (synopsis "Lazy object proxy for python") | |
9076 | (description | |
9077 | "Lazy object proxy is an object that wraps a callable but defers the call | |
9078 | until the object is actually required, and caches the result of said call.") | |
3f641af0 | 9079 | (license license:bsd-2))) |
77cadb43 SB |
9080 | |
9081 | (define-public python2-lazy-object-proxy | |
9082 | (package-with-python2 python-lazy-object-proxy)) | |
9083 | ||
5477e05f SB |
9084 | (define-public python-dnspython |
9085 | (package | |
9086 | (name "python-dnspython") | |
6c514128 | 9087 | (version "1.15.0") |
5477e05f SB |
9088 | (source (origin |
9089 | (method url-fetch) | |
9090 | (uri (string-append "http://www.dnspython.org/kits/" | |
9091 | version "/dnspython-" version ".tar.gz")) | |
9092 | (sha256 | |
9093 | (base32 | |
6c514128 | 9094 | "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i")))) |
5477e05f SB |
9095 | (build-system python-build-system) |
9096 | (arguments '(#:tests? #f)) ; XXX: requires internet access | |
5477e05f SB |
9097 | (home-page "http://www.dnspython.org") |
9098 | (synopsis "DNS toolkit for Python") | |
9099 | (description | |
9100 | "dnspython is a DNS toolkit for Python. It supports almost all record | |
9101 | types. It can be used for queries, zone transfers, and dynamic updates. | |
9102 | It supports TSIG authenticated messages and EDNS0.") | |
9103 | (license license:expat))) | |
9104 | ||
9105 | (define-public python2-dnspython | |
9106 | (package-with-python2 python-dnspython)) | |
9107 | ||
22711e25 SB |
9108 | (define-public python-email-validator |
9109 | (package | |
9110 | (name "python-email-validator") | |
b165c215 | 9111 | (version "1.0.2") |
22711e25 SB |
9112 | (source |
9113 | (origin (method url-fetch) | |
9114 | (uri (pypi-uri "email_validator" version)) | |
9115 | (sha256 | |
9116 | (base32 | |
b165c215 | 9117 | "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6")))) |
22711e25 SB |
9118 | (build-system python-build-system) |
9119 | (arguments | |
9120 | '(#:phases | |
9121 | (modify-phases %standard-phases | |
9122 | (add-before 'build 'use-dnspython | |
9123 | (lambda _ | |
9124 | (substitute* "setup.py" | |
9125 | (("dnspython3") "dnspython")) | |
9126 | #t))))) | |
d42560bd | 9127 | (propagated-inputs |
22711e25 | 9128 | `(("python-dnspython" ,python-dnspython) |
d42560bd | 9129 | ("python-idna" ,python-idna))) |
22711e25 SB |
9130 | (home-page "https://github.com/JoshData/python-email-validator") |
9131 | (synopsis "Email address validation library for Python") | |
9132 | (description | |
9133 | "This library validates email address syntax and deliverability.") | |
3f641af0 | 9134 | (license license:cc0))) |
22711e25 SB |
9135 | |
9136 | (define-public python2-email-validator | |
9137 | (package-with-python2 python-email-validator)) | |
9138 | ||
8987d91e SB |
9139 | (define-public python-ukpostcodeparser |
9140 | (package | |
9141 | (name "python-ukpostcodeparser") | |
9142 | (version "1.0.3") | |
9143 | (source (origin | |
9144 | (method url-fetch) | |
9145 | (uri (pypi-uri "UkPostcodeParser" version)) | |
9146 | (sha256 | |
9147 | (base32 | |
9148 | "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd")))) | |
9149 | (build-system python-build-system) | |
8987d91e SB |
9150 | (home-page "https://github.com/hamstah/ukpostcodeparser") |
9151 | (synopsis "UK Postcode parser for Python") | |
9152 | (description | |
9153 | "This library provides the @code{parse_uk_postcode} function for | |
9154 | parsing UK postcodes.") | |
9155 | (license license:expat))) | |
9156 | ||
9157 | (define-public python2-ukpostcodeparser | |
9158 | (package-with-python2 python-ukpostcodeparser)) | |
ea92ae01 | 9159 | |
ce7911dd MB |
9160 | (define-public python-faker |
9161 | (package | |
9162 | (name "python-faker") | |
9163 | (version "0.7.9") | |
9164 | (source (origin | |
9165 | (method url-fetch) | |
9166 | (uri (pypi-uri "Faker" version)) | |
9167 | (sha256 | |
9168 | (base32 | |
9169 | "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm")) | |
9170 | (patches | |
9171 | (search-patches "python-faker-fix-build-32bit.patch")) | |
9172 | (modules '((guix build utils))) | |
9173 | (snippet | |
9174 | '(begin | |
9175 | (for-each delete-file (find-files "." "\\.pyc$")) | |
9176 | #t)))) | |
9177 | (build-system python-build-system) | |
9178 | (arguments | |
9179 | '(#:phases | |
9180 | (modify-phases %standard-phases | |
9181 | (replace 'check | |
9182 | (lambda _ | |
9183 | (zero? (system* "python" "-m" "unittest" "-v" "tests"))))))) | |
9184 | (native-inputs | |
9185 | `(;; For testing | |
9186 | ("python-email-validator" ,python-email-validator) | |
9187 | ("python-mock" ,python-mock) | |
9188 | ("python-ukpostcodeparser" ,python-ukpostcodeparser))) | |
9189 | (propagated-inputs | |
9190 | `(("python-dateutil" ,python-dateutil) | |
9191 | ("python-six" ,python-six))) | |
9192 | (home-page "https://github.com/joke2k/faker") | |
9193 | (synopsis "Python package that generates fake data") | |
9194 | (description | |
9195 | "Faker is a Python package that generates fake data such as names, | |
9196 | addresses, and phone numbers.") | |
9197 | (license license:expat) | |
9198 | (properties `((python2-variant . ,(delay python2-faker)))))) | |
9199 | ||
9200 | (define-public python2-faker | |
9201 | (let ((base (package-with-python2 (strip-python2-variant | |
9202 | python-faker)))) | |
9203 | (package | |
9204 | (inherit base) | |
9205 | (propagated-inputs | |
9206 | `(("python2-ipaddress" ,python2-ipaddress) | |
9207 | ,@(package-propagated-inputs base)))))) | |
9208 | ||
b49504fd SB |
9209 | (define-public python-pyaml |
9210 | (package | |
9211 | (name "python-pyaml") | |
963926bc | 9212 | (version "17.7.2") |
b49504fd SB |
9213 | (source (origin |
9214 | (method url-fetch) | |
9215 | (uri (pypi-uri "pyaml" version)) | |
9216 | (sha256 | |
9217 | (base32 | |
963926bc | 9218 | "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2")))) |
b49504fd | 9219 | (build-system python-build-system) |
f620311a MB |
9220 | (native-inputs |
9221 | `(("python-unidecode" ,python-unidecode))) | |
b49504fd SB |
9222 | (propagated-inputs |
9223 | `(("python-pyyaml" ,python-pyyaml))) | |
9224 | (home-page "https://github.com/mk-fg/pretty-yaml") | |
9225 | (synopsis "YAML pretty-print library for Python") | |
9226 | (description | |
9227 | "pyaml is a PyYAML based python module to produce pretty and readable | |
9228 | YAML-serialized data.") | |
3f641af0 | 9229 | (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))) |
b49504fd SB |
9230 | |
9231 | (define-public python2-pyaml | |
9232 | (package-with-python2 python-pyaml)) | |
9233 | ||
04fb4516 BW |
9234 | (define-public python-backpack |
9235 | (package | |
9236 | (name "python-backpack") | |
9237 | (version "0.1") | |
9238 | (source | |
9239 | (origin | |
9240 | (method url-fetch) | |
9241 | (uri (pypi-uri "backpack" version)) | |
9242 | (sha256 | |
9243 | (base32 | |
9244 | "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1")))) | |
9245 | (build-system python-build-system) | |
9246 | (native-inputs | |
9247 | `(("python-pytest" ,python-pytest) | |
9248 | ("python-nose" ,python-nose))) | |
9249 | (propagated-inputs | |
9250 | `(("python-simplejson" ,python-simplejson))) | |
9251 | (home-page "https://github.com/sdispater/backpack") | |
9252 | (synopsis "Utilities for working with Python collections") | |
9253 | (description "Backpack provides some useful utilities for working with | |
9254 | collections of data.") | |
9255 | (license license:expat))) | |
9256 | ||
9257 | (define-public python2-backpack | |
9258 | (package-with-python2 python-backpack)) | |
9259 | ||
f4155188 DM |
9260 | (define-public python-prompt-toolkit |
9261 | (package | |
9262 | (name "python-prompt-toolkit") | |
b46ea394 | 9263 | (version "1.0.15") |
f4155188 DM |
9264 | (source |
9265 | (origin | |
9266 | (method url-fetch) | |
d15e2ef0 | 9267 | (uri (pypi-uri "prompt_toolkit" version ".tar.gz")) |
f4155188 DM |
9268 | (sha256 |
9269 | (base32 | |
b46ea394 | 9270 | "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5")))) |
f4155188 | 9271 | (build-system python-build-system) |
bae18710 LF |
9272 | (arguments |
9273 | '(#:tests? #f)) ; The test suite uses some Windows-specific data types. | |
f22efa01 HG |
9274 | (propagated-inputs |
9275 | `(("python-wcwidth" ,python-wcwidth) | |
2c199b55 | 9276 | ("python-six" ,python-six) |
f22efa01 | 9277 | ("python-pygments" ,python-pygments))) |
f4155188 DM |
9278 | (home-page "https://github.com/jonathanslenders/python-prompt-toolkit") |
9279 | (synopsis "Library for building command line interfaces in Python") | |
9280 | (description | |
9281 | "Prompt-Toolkit is a library for building interactive command line | |
9282 | interfaces in Python. It's like GNU Readline but it also features syntax | |
9283 | highlighting while typing, out-of-the-box multi-line input editing, advanced | |
9284 | code completion, incremental search, support for Chinese double-width | |
9285 | characters, mouse support, and auto suggestions.") | |
f210e944 | 9286 | (license license:bsd-3))) |
f4155188 DM |
9287 | |
9288 | (define-public python2-prompt-toolkit | |
f210e944 | 9289 | (package-with-python2 python-prompt-toolkit)) |
a502dfbf DM |
9290 | |
9291 | (define-public python-jedi | |
9292 | (package | |
9293 | (name "python-jedi") | |
9294 | (version "0.9.0") | |
9295 | (source | |
9296 | (origin | |
9297 | (method url-fetch) | |
9298 | (uri (pypi-uri "jedi" version)) | |
9299 | (sha256 | |
9300 | (base32 | |
9301 | "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v")))) | |
9302 | (build-system python-build-system) | |
bfce8a34 MB |
9303 | (arguments |
9304 | ;; FIXME: One test fails (use "py.test" instead of 'setup.py test'). | |
9305 | '(#:tests? #f)) | |
9306 | (native-inputs | |
9307 | `(("python-pytest" ,python-pytest))) | |
a502dfbf DM |
9308 | (home-page "https://github.com/davidhalter/jedi") |
9309 | (synopsis | |
9310 | "Autocompletion for Python that can be used for text editors") | |
9311 | (description | |
9312 | "Jedi is an autocompletion tool for Python that can be used for text editors.") | |
f210e944 | 9313 | (license license:expat))) |
a502dfbf DM |
9314 | |
9315 | (define-public python2-jedi | |
f210e944 | 9316 | (package-with-python2 python-jedi)) |
c2f0dc6e DM |
9317 | |
9318 | (define-public ptpython | |
9319 | (package | |
9320 | (name "ptpython") | |
9321 | (version "0.34") | |
9322 | (source (origin | |
9323 | (method url-fetch) | |
9324 | (uri (pypi-uri "ptpython" version)) | |
9325 | (sha256 | |
9326 | (base32 | |
9327 | "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13")))) | |
9328 | (build-system python-build-system) | |
32955348 MB |
9329 | (arguments |
9330 | '(#:tests? #f)) ; FIXME: No tests in pypi tarball. | |
f22efa01 | 9331 | (propagated-inputs |
c2f0dc6e DM |
9332 | `(("python-docopt" ,python-docopt) |
9333 | ("python-jedi" ,python-jedi) | |
9334 | ("python-prompt-toolkit" ,python-prompt-toolkit) | |
f3b98f4f | 9335 | ("python-pygments" ,python-pygments))) |
c2f0dc6e DM |
9336 | (home-page "https://github.com/jonathanslenders/ptpython") |
9337 | (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features") | |
9338 | (description | |
9339 | "ptpython is a Python read-eval-print loop with IDE-like features. | |
9340 | It supports syntax highlighting, multiline editing, autocompletion, mouse, | |
9341 | color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters | |
9342 | etc.") | |
3f641af0 | 9343 | (license license:bsd-3) |
c2f0dc6e DM |
9344 | (properties `((python2-variant . ,(delay ptpython-2)))))) |
9345 | ||
9346 | (define-public ptpython-2 | |
9347 | (let ((base (package-with-python2 (strip-python2-variant ptpython)))) | |
9348 | (package | |
9349 | (inherit base) | |
9350 | (name "ptpython2")))) | |
b227f0be | 9351 | |
9352 | (define-public python-stem | |
9353 | (package | |
9354 | (name "python-stem") | |
a9c0a133 | 9355 | (version "1.6.0") |
b227f0be | 9356 | (source |
9357 | (origin | |
9358 | (method url-fetch) | |
c976b319 | 9359 | (uri (pypi-uri "stem" version)) |
b227f0be | 9360 | (sha256 |
9361 | (base32 | |
a9c0a133 | 9362 | "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp")))) |
b227f0be | 9363 | (build-system python-build-system) |
9364 | (arguments | |
9365 | `(#:phases | |
9366 | (modify-phases %standard-phases | |
a9c0a133 TGR |
9367 | (add-before 'check 'fix-test-environment |
9368 | (lambda _ | |
9369 | ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory: | |
9370 | ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'. | |
9371 | (with-output-to-file ".gitignore" | |
9372 | (lambda _ (format #t "%"))) | |
9373 | #t)) | |
b227f0be | 9374 | (replace 'check |
9375 | (lambda _ | |
66b89ee2 TGR |
9376 | (invoke "./run_tests.py" "--unit") |
9377 | #t))))) | |
b227f0be | 9378 | (native-inputs |
9379 | `(("python-mock" ,python-mock) | |
9380 | ("python-pep8" ,python-pep8) | |
9381 | ("python-pyflakes" ,python-pyflakes))) | |
b227f0be | 9382 | (home-page "https://stem.torproject.org/") |
9383 | (synopsis | |
9384 | "Python controller library that allows applications to interact with Tor") | |
9385 | (description | |
9386 | "Stem is a Python controller library for Tor. With it you can use Tor's | |
9387 | control protocol to script against the Tor process and read descriptor data | |
9388 | relays publish about themselves.") | |
3f641af0 | 9389 | (license license:lgpl3))) |
b227f0be | 9390 | |
9391 | (define-public python2-stem | |
9392 | (package-with-python2 python-stem)) | |
517a6c0c DM |
9393 | |
9394 | (define-public python-pyserial | |
9395 | (package | |
9396 | (name "python-pyserial") | |
9397 | (version "3.1.1") | |
9398 | (source | |
9399 | (origin | |
9400 | (method url-fetch) | |
9401 | (uri (pypi-uri "pyserial" version)) | |
9402 | (sha256 | |
9403 | (base32 | |
9404 | "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn")))) | |
9405 | (build-system python-build-system) | |
0a702009 MB |
9406 | (arguments |
9407 | '(#:tests? #f)) ; FIXME: 3/49 tests are failing. | |
9408 | ;; #:phases | |
9409 | ;; (modify-phases %standard-phases | |
9410 | ;; (replace 'check | |
9411 | ;; (lambda _ | |
9412 | ;; (zero? (system* "python" "test/run_all_tests.py" "loop://"))))))) | |
517a6c0c DM |
9413 | (home-page |
9414 | "https://github.com/pyserial/pyserial") | |
9415 | (synopsis "Python Serial Port Bindings") | |
9416 | (description "@code{pyserial} provide serial port bindings for Python. It | |
9417 | supports different byte sizes, stop bits, parity and flow control with RTS/CTS | |
9418 | and/or Xon/Xoff. The port is accessed in RAW mode.") | |
f210e944 | 9419 | (license license:bsd-3))) |
517a6c0c DM |
9420 | |
9421 | (define-public python2-pyserial | |
f210e944 | 9422 | (package-with-python2 python-pyserial)) |
6eb7af2a DJ |
9423 | |
9424 | (define-public python-kivy | |
9425 | (package | |
9426 | (name "python-kivy") | |
e81e154c | 9427 | (version "1.10.0") |
6eb7af2a DJ |
9428 | (source |
9429 | (origin | |
9430 | (method url-fetch) | |
e81e154c | 9431 | (uri (pypi-uri "Kivy" version)) |
6eb7af2a DJ |
9432 | (file-name (string-append name "-" version ".tar.gz")) |
9433 | (sha256 | |
9434 | (base32 | |
e81e154c | 9435 | "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98")))) |
6eb7af2a DJ |
9436 | (build-system python-build-system) |
9437 | (arguments | |
9438 | `(#:tests? #f ; Tests require many optional packages | |
9439 | #:phases | |
9440 | (modify-phases %standard-phases | |
6eb7af2a DJ |
9441 | (add-after 'patch-generated-file-shebangs 'set-sdl-paths |
9442 | (lambda* (#:key inputs #:allow-other-keys) | |
9443 | (setenv "KIVY_SDL2_PATH" | |
9444 | (string-append (assoc-ref inputs "sdl-union") | |
9445 | "/include/SDL2")) | |
9446 | #t))))) | |
9447 | (native-inputs | |
3b6502e2 DM |
9448 | `(("git" ,git) |
9449 | ("pkg-config" ,pkg-config) | |
f2516de2 | 9450 | ("python-cython" ,python-cython))) |
6eb7af2a | 9451 | (inputs |
f2516de2 | 9452 | `(("gstreamer" ,gstreamer) |
6eb7af2a DJ |
9453 | ("mesa" ,mesa) |
9454 | ("sdl-union" | |
9455 | ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) | |
9456 | (home-page "http://kivy.org") | |
9457 | (synopsis | |
9458 | "Multitouch application framework") | |
9459 | (description | |
9460 | "A software library for rapid development of | |
9461 | hardware-accelerated multitouch applications.") | |
9462 | (license license:expat))) | |
9463 | ||
9464 | (define-public python2-kivy | |
9465 | (package-with-python2 python-kivy)) | |
9466 | ||
9467 | (define-public python-kivy-next | |
9468 | (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe") | |
9469 | (revision "1")) | |
9470 | (package (inherit python-kivy) | |
9471 | (name "python-kivy-next") | |
d80a71eb | 9472 | (version (string-append "1.9.1-" revision "." |
6eb7af2a DJ |
9473 | (string-take commit 7))) |
9474 | (source | |
9475 | (origin | |
9476 | (method git-fetch) | |
9477 | (uri (git-reference | |
9478 | (url "https://github.com/kivy/kivy") | |
9479 | (commit commit))) | |
9480 | (file-name (string-append name "-" version "-checkout")) | |
9481 | (sha256 | |
9482 | (base32 | |
9483 | "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p"))))))) | |
9484 | ||
9485 | (define-public python2-kivy-next | |
9486 | (package-with-python2 python-kivy-next)) | |
8794bd8b DC |
9487 | |
9488 | (define-public python-binaryornot | |
9489 | (package | |
9490 | (name "python-binaryornot") | |
9491 | (version "0.4.0") | |
9492 | (source (origin | |
9493 | (method url-fetch) | |
9494 | (uri (pypi-uri "binaryornot" version)) | |
9495 | (sha256 | |
9496 | (base32 | |
9497 | "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb")))) | |
9498 | (build-system python-build-system) | |
f22efa01 | 9499 | (propagated-inputs |
8794bd8b DC |
9500 | `(("python-chardet" ,python-chardet) |
9501 | ("python-hypothesis" ,python-hypothesis))) | |
9502 | (home-page "https://github.com/audreyr/binaryornot") | |
9503 | (synopsis "Package to check if a file is binary or text") | |
9504 | (description "Ultra-lightweight pure Python package to check if a file is | |
9505 | binary or text.") | |
9506 | (license license:bsd-3) | |
9507 | (properties `((python2-variant . ,(delay python2-binaryornot)))))) | |
9508 | ||
9509 | (define-public python2-binaryornot | |
9510 | (let ((base (package-with-python2 (strip-python2-variant python-binaryornot)))) | |
9511 | (package (inherit base) | |
f22efa01 | 9512 | (propagated-inputs |
8794bd8b | 9513 | `(("python2-enum34" ,python2-enum34) |
f22efa01 | 9514 | ,@(package-propagated-inputs base)))))) |
a9ac982a DC |
9515 | |
9516 | (define-public python-nltk | |
9517 | (package | |
9518 | (name "python-nltk") | |
9519 | (version "3.2.1") | |
9520 | (source (origin | |
9521 | (method url-fetch) | |
9522 | (uri (pypi-uri "nltk" version)) | |
9523 | (sha256 | |
9524 | (base32 | |
9525 | "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym")))) | |
9526 | (build-system python-build-system) | |
59f12985 LF |
9527 | (arguments |
9528 | '(;; The tests require some extra resources to be downloaded. | |
9529 | ;; TODO Try packaging these resources. | |
9530 | #:tests? #f)) | |
a9ac982a DC |
9531 | (home-page "http://nltk.org/") |
9532 | (synopsis "Natural Language Toolkit") | |
9533 | (description "It provides interfaces to over 50 corpora and lexical | |
9534 | resources such as WordNet, along with a suite of text processing libraries | |
9535 | for classification, tokenization, stemming, tagging, parsing, and semantic | |
9536 | reasoning, wrappers for natural language processing libraries.") | |
f210e944 | 9537 | (license license:asl2.0))) |
a9ac982a DC |
9538 | |
9539 | (define-public python2-nltk | |
f210e944 | 9540 | (package-with-python2 python-nltk)) |
691cd90d DC |
9541 | |
9542 | (define-public python-pymongo | |
9543 | (package | |
9544 | (name "python-pymongo") | |
9545 | (version "3.3.0") | |
9546 | (source (origin | |
9547 | (method url-fetch) | |
9548 | (uri (pypi-uri "pymongo" version)) | |
9549 | (sha256 | |
9550 | (base32 | |
9551 | "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x")))) | |
9552 | (build-system python-build-system) | |
f22efa01 | 9553 | (propagated-inputs |
691cd90d | 9554 | `(("python-certifi" ,python-certifi))) |
7bf837fd | 9555 | (home-page "https://github.com/mongodb/mongo-python-driver") |
691cd90d DC |
9556 | (synopsis "Python driver for MongoDB") |
9557 | (description "Python driver for MongoDB.") | |
f210e944 | 9558 | (license license:asl2.0))) |
691cd90d DC |
9559 | |
9560 | (define-public python2-pymongo | |
f210e944 | 9561 | (package-with-python2 python-pymongo)) |
6a6c9d43 DC |
9562 | |
9563 | (define-public python-sh | |
9564 | (package | |
9565 | (name "python-sh") | |
9566 | (version "1.11") | |
9567 | (source (origin | |
9568 | (method url-fetch) | |
9569 | (uri (pypi-uri "sh" version)) | |
9570 | (sha256 | |
9571 | (base32 | |
9572 | "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr")))) | |
9573 | (build-system python-build-system) | |
9574 | (arguments | |
9575 | `(#:tests? #f)) ; no tests | |
9576 | (home-page "https://github.com/amoffat/sh") | |
9577 | (synopsis "Python subprocess interface") | |
9578 | (description "Abstracts process invocation by providing a function | |
9579 | interface for programs.") | |
f210e944 | 9580 | (license license:expat))) |
6a6c9d43 DC |
9581 | |
9582 | (define-public python2-sh | |
f210e944 | 9583 | (package-with-python2 python-sh)) |
05b59190 | 9584 | |
25702397 EF |
9585 | (define-public python-consul |
9586 | (package | |
9587 | (name "python-consul") | |
9588 | (version "0.6.1") | |
9589 | (source | |
9590 | (origin | |
9591 | (method url-fetch) | |
9592 | (uri (pypi-uri "python-consul" version)) | |
9593 | (sha256 | |
9594 | (base32 | |
9595 | "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8")))) | |
9596 | (build-system python-build-system) | |
aebd91bb LF |
9597 | (arguments |
9598 | '(#:tests? #f)) ; The tests are not distributed | |
fd1d6de7 HG |
9599 | (propagated-inputs |
9600 | `(("python-requests" ,python-requests) | |
25702397 EF |
9601 | ("python-six" ,python-six))) |
9602 | (home-page "https://github.com/cablehead/python-consul") | |
9603 | (synopsis "Python client for Consul") | |
9604 | (description | |
9605 | "Python client for @url{http://www.consul.io/,Consul}, a tool for service | |
9606 | discovery, monitoring and configuration.") | |
9607 | (license license:expat))) | |
9608 | ||
9609 | (define-public python2-consul | |
f210e944 | 9610 | (package-with-python2 python-consul)) |
25702397 | 9611 | |
05b59190 DC |
9612 | (define-public python-schematics |
9613 | (package | |
9614 | (name "python-schematics") | |
9615 | (version "1.1.1") | |
9616 | (source | |
9617 | (origin | |
9618 | (method url-fetch) | |
9619 | (uri (string-append | |
9620 | "https://github.com/schematics/schematics/archive/v" version ".tar.gz")) | |
9621 | (file-name (string-append name "-" version ".tar.gz")) | |
9622 | (sha256 | |
9623 | (base32 | |
9624 | "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l")))) | |
9625 | (build-system python-build-system) | |
f22efa01 | 9626 | (propagated-inputs |
05b59190 DC |
9627 | `(("python-six" ,python-six))) |
9628 | (arguments | |
9629 | `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed | |
9630 | ; version requirements (eg python-coveralls) | |
9631 | (home-page "https://github.com/schematics/schematics") | |
9632 | (synopsis "Python Data Structures for Humans") | |
9633 | (description "Python Data Structures for Humans.") | |
f210e944 | 9634 | (license license:bsd-3))) |
05b59190 DC |
9635 | |
9636 | (define-public python2-schematics | |
f210e944 | 9637 | (package-with-python2 python-schematics)) |
d6907ff7 | 9638 | |
dddcb25c MB |
9639 | (define-public python-odfpy |
9640 | (package | |
9641 | (name "python-odfpy") | |
9642 | (version "1.3.3") | |
9643 | (source (origin | |
9644 | (method url-fetch) | |
9645 | (uri (pypi-uri "odfpy" version)) | |
9646 | (sha256 | |
9647 | (base32 | |
9648 | "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw")))) | |
9649 | (arguments | |
9650 | `(#:modules ((srfi srfi-1) | |
9651 | (guix build python-build-system) | |
9652 | (guix build utils)) | |
9653 | #:phases | |
9654 | (modify-phases %standard-phases | |
9655 | (replace 'check | |
9656 | ;; The test runner invokes python2 and python3 for test*.py. | |
9657 | ;; To avoid having both in inputs, we replicate it here. | |
9658 | (lambda _ | |
9659 | (every (lambda (test-file) | |
9660 | (zero? (system* "python" test-file))) | |
9661 | (find-files "tests" "^test.*\\.py$"))))))) | |
9662 | (build-system python-build-system) | |
9663 | (home-page "https://github.com/eea/odfpy") | |
9664 | (synopsis "Python API and tools to manipulate OpenDocument files") | |
9665 | (description "Collection of libraries and utility programs written in | |
9666 | Python to manipulate OpenDocument 1.2 files.") | |
9667 | (license | |
9668 | ;; The software is mainly dual GPL2+ and ASL2.0, but includes a | |
9669 | ;; number of files with other licenses. | |
9670 | (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0)))) | |
df94a6b5 | 9671 | |
dddcb25c MB |
9672 | (define-public python2-odfpy |
9673 | (package-with-python2 python-odfpy)) | |
5467ea62 MB |
9674 | |
9675 | (define-public python-natsort | |
9676 | (package | |
9677 | (name "python-natsort") | |
a06cd95a | 9678 | (version "5.0.2") |
5467ea62 MB |
9679 | (source (origin |
9680 | (method url-fetch) | |
9681 | (uri (pypi-uri "natsort" version)) | |
9682 | (sha256 | |
9683 | (base32 | |
a06cd95a | 9684 | "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn")))) |
5467ea62 MB |
9685 | (build-system python-build-system) |
9686 | (arguments | |
9687 | `(#:phases | |
9688 | (modify-phases %standard-phases | |
9689 | (add-before 'check 'set-cachedir | |
9690 | ;; Tests require write access to $HOME by default | |
9691 | (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))))) | |
9692 | (native-inputs | |
9693 | `(("python-hypothesis" ,python-hypothesis) | |
9694 | ("python-pytest-cache" ,python-pytest-cache) | |
9695 | ("python-pytest-cov" ,python-pytest-cov) | |
9696 | ("python-pytest-flakes" ,python-pytest-flakes) | |
9697 | ("python-pytest-pep8" ,python-pytest-pep8))) | |
9698 | (propagated-inputs ; TODO: Add python-fastnumbers. | |
9699 | `(("python-pyicu" ,python-pyicu))) | |
9700 | (home-page "https://github.com/SethMMorton/natsort") | |
9701 | (synopsis "Natural sorting for python and shell") | |
9702 | (description | |
9703 | "Natsort lets you apply natural sorting on lists instead of | |
9704 | lexicographical. If you use the built-in @code{sorted} method in python | |
9705 | on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be | |
9706 | returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a | |
9707 | function @code{natsorted} that identifies numbers and sorts them separately | |
9708 | from strings. It can also sort version numbers, real numbers, mixed types | |
9709 | and more, and comes with a shell command @command{natsort} that exposes this | |
9710 | functionality in the command line.") | |
9711 | (license license:expat) | |
9712 | (properties `((python2-variant . ,(delay python2-natsort)))))) | |
9713 | ||
9714 | (define-public python2-natsort | |
9715 | (let ((base (package-with-python2 (strip-python2-variant python-natsort)))) | |
9716 | (package (inherit base) | |
9717 | (native-inputs | |
00e10c6e | 9718 | `(("python2-pathlib" ,python2-pathlib) |
5467ea62 MB |
9719 | ("python2-mock" ,python2-mock) |
9720 | ("python2-enum34" ,python2-enum34) | |
9721 | ,@(package-native-inputs base)))))) | |
4efb9c54 SR |
9722 | |
9723 | (define-public python-glances | |
9724 | (package | |
9725 | (name "python-glances") | |
9726 | (version "2.7.1") | |
9727 | (source | |
9728 | (origin | |
9729 | (method url-fetch) | |
9730 | (uri (pypi-uri "Glances" version)) | |
9731 | (sha256 | |
9732 | (base32 | |
9733 | "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg")))) | |
9734 | (build-system python-build-system) | |
f22efa01 | 9735 | (propagated-inputs |
4efb9c54 SR |
9736 | `(("python-psutil" ,python-psutil))) |
9737 | (home-page | |
9738 | "https://github.com/nicolargo/glances") | |
9739 | (synopsis | |
9740 | "A cross-platform curses-based monitoring tool") | |
9741 | (description | |
9742 | "Glances is a curses-based monitoring tool for a wide variety of platforms. | |
9743 | Glances uses the PsUtil library to get information from your system. It monitors | |
9744 | CPU, load, memory, network bandwidth, disk I/O, disk use, and more.") | |
f210e944 | 9745 | (license license:lgpl3+))) |
4efb9c54 SR |
9746 | |
9747 | (define-public python2-glances | |
f210e944 | 9748 | (package-with-python2 python-glances)) |
05b7a593 EF |
9749 | |
9750 | (define-public python-graphql-core | |
9751 | (package | |
9752 | (name "python-graphql-core") | |
9753 | (version "0.5.3") | |
9754 | (source | |
9755 | (origin | |
9756 | (method url-fetch) | |
9757 | (uri (pypi-uri "graphql-core" version)) | |
9758 | (sha256 | |
9759 | (base32 | |
9760 | "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0")))) | |
9761 | (build-system python-build-system) | |
9762 | (arguments | |
326f8285 LF |
9763 | `(#:tests? #f ; Tests require the unpackaged pytest-benchmark. |
9764 | #:phases | |
05b7a593 EF |
9765 | (modify-phases %standard-phases |
9766 | (add-after 'unpack 'patch-hardcoded-version | |
9767 | (lambda _ (substitute* | |
9768 | "setup.py" | |
9769 | (("'gevent==1.1rc1'") "'gevent'")) | |
9770 | #t))))) | |
9771 | (native-inputs | |
9772 | `(("python-gevent" ,python-gevent) | |
9773 | ("python-mock" ,python-mock) | |
9774 | ("python-pytest-mock" ,python-pytest-mock))) | |
f22efa01 | 9775 | (propagated-inputs |
05b7a593 EF |
9776 | `(("python-promise" ,python-promise) |
9777 | ("python-six" ,python-six))) | |
9778 | (home-page "https://github.com/graphql-python/graphql-core") | |
9779 | (synopsis "GraphQL implementation for Python") | |
9780 | (description | |
9781 | "GraphQL implementation for Python. GraphQL is a data query language and | |
9782 | runtime designed and used to request and deliver data to mobile and web apps. | |
9783 | This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js} | |
9784 | to Python.") | |
05b7a593 EF |
9785 | (license license:expat))) |
9786 | ||
9787 | (define-public python2-graphql-core | |
f210e944 | 9788 | (package-with-python2 python-graphql-core)) |
7ee51575 EF |
9789 | |
9790 | (define-public python-graphql-relay | |
9791 | (package | |
9792 | (name "python-graphql-relay") | |
b13a5b4d | 9793 | (version "0.4.5") |
7ee51575 EF |
9794 | (source |
9795 | (origin | |
9796 | (method url-fetch) | |
9797 | (uri (pypi-uri "graphql-relay" version)) | |
9798 | (sha256 | |
9799 | (base32 | |
b13a5b4d | 9800 | "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7")))) |
7ee51575 | 9801 | (build-system python-build-system) |
dce2ad69 LF |
9802 | (arguments |
9803 | '(#:tests? #f)) ; The tests are not distributed | |
f22efa01 | 9804 | (propagated-inputs |
7ee51575 EF |
9805 | `(("python-graphql-core" ,python-graphql-core) |
9806 | ("python-promise" ,python-promise) | |
9807 | ("python-six" ,python-six))) | |
9808 | (home-page "https://github.com/graphql-python/graphql-relay-py") | |
9809 | (synopsis "Relay implementation for Python") | |
9810 | (description | |
9811 | "This is a library to allow the easy creation of Relay-compliant servers | |
9812 | using the GraphQL Python reference implementation of a GraphQL server. It | |
9813 | should be noted that the code is a exact port of the original | |
9814 | @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation} | |
9815 | from Facebook.") | |
7ee51575 EF |
9816 | (license license:expat))) |
9817 | ||
9818 | (define-public python2-graphql-relay | |
f210e944 | 9819 | (package-with-python2 python-graphql-relay)) |
ddc63a56 EF |
9820 | |
9821 | (define-public python-graphene | |
9822 | (package | |
9823 | (name "python-graphene") | |
9824 | (version "0.10.2") | |
9825 | (source | |
9826 | (origin | |
9827 | (method url-fetch) | |
9828 | (uri (pypi-uri "graphene" version)) | |
9829 | (sha256 | |
9830 | (base32 | |
9831 | "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q")))) | |
9832 | (build-system python-build-system) | |
f22efa01 | 9833 | (propagated-inputs |
ddc63a56 EF |
9834 | `(("python-graphql-core" ,python-graphql-core) |
9835 | ("python-graphql-relay" ,python-graphql-relay) | |
9836 | ("python-iso8601" ,python-iso8601) | |
9837 | ("python-promise" ,python-promise) | |
9838 | ("python-six" ,python-six))) | |
2b1b2799 TGR |
9839 | (arguments |
9840 | `(#:tests? #f)) ; no tests/ in the PyPI tarball | |
ddc63a56 EF |
9841 | (home-page "http://graphene-python.org/") |
9842 | (synopsis "GraphQL Framework for Python") | |
9843 | (description | |
9844 | "Graphene is a Python library for building GraphQL schemas/types. | |
9845 | A GraphQL schema describes your data model, and provides a GraphQL server | |
9846 | with an associated set of resolve methods that know how to fetch data.") | |
9847 | (properties `((python2-variant . ,(delay python2-graphene)))) | |
9848 | (license license:expat))) | |
9849 | ||
9850 | (define-public python2-graphene | |
9851 | (let ((base (package-with-python2 | |
9852 | (strip-python2-variant python-graphene)))) | |
9853 | (package (inherit base) | |
9854 | (native-inputs | |
00e10c6e | 9855 | `(("python2-sqlalchemy" ,python2-sqlalchemy) |
ddc63a56 | 9856 | ,@(package-native-inputs base)))))) |
d488d5d6 EF |
9857 | |
9858 | (define-public python-nautilus | |
9859 | (package | |
9860 | (name "python-nautilus") | |
9861 | (version "0.4.9") | |
9862 | (source | |
9863 | (origin | |
9864 | (method url-fetch) | |
9865 | (uri (pypi-uri "nautilus" version)) | |
9866 | (sha256 | |
9867 | (base32 | |
9868 | "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p")))) | |
9869 | (build-system python-build-system) | |
9870 | (arguments `(#:tests? #f)) ; fails to import test modules | |
f22efa01 | 9871 | (propagated-inputs |
d488d5d6 EF |
9872 | `(("python-bcrypt" ,python-bcrypt) |
9873 | ("python-click" ,python-click) | |
9874 | ("python-consul" ,python-consul) | |
d488d5d6 EF |
9875 | ("python-graphene" ,python-graphene) |
9876 | ("python-jinja2" ,python-jinja2) | |
d488d5d6 EF |
9877 | ("python-peewee" ,python-peewee) |
9878 | ("python-pika" ,python-pika) | |
d488d5d6 EF |
9879 | ("python-tornado" ,python-tornado) |
9880 | ("python-wtforms" ,python-wtforms))) | |
38ceb106 HG |
9881 | (native-inputs |
9882 | `(("python-nose2" ,python-nose2))) | |
d488d5d6 EF |
9883 | (home-page "https://github.com/AlecAivazis/nautilus") |
9884 | (synopsis "Library for creating microservice applications") | |
9885 | (description | |
9886 | "Nautilus is a framework for flux based microservices that looks to | |
9887 | provide extendible implementations of common aspects of a cloud so that you can | |
9888 | focus on building massively scalable web applications.") | |
9889 | (license license:expat))) | |
94cffc63 | 9890 | |
89cd988b DM |
9891 | (define-public python-snowballstemmer |
9892 | (package | |
9893 | (name "python-snowballstemmer") | |
9894 | (version "1.2.1") | |
9895 | (source (origin | |
1bd858cc MB |
9896 | (method url-fetch) |
9897 | (uri (pypi-uri "snowballstemmer" version)) | |
9898 | (sha256 | |
9899 | (base32 | |
9900 | "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi")))) | |
89cd988b DM |
9901 | (build-system python-build-system) |
9902 | (arguments | |
9903 | `(;; No tests exist | |
9904 | #:tests? #f)) | |
9905 | (home-page "https://github.com/shibukawa/snowball_py") | |
9906 | (synopsis "Snowball stemming library collection for Python") | |
9907 | (description "This package provides 16 word stemmer algorithms generated | |
9908 | from Snowball algorithms. It includes the 15 original ones plus the Poerter | |
9909 | English stemmer.") | |
9910 | (license license:bsd-3))) | |
9911 | ||
9912 | (define-public python2-snowballstemmer | |
9913 | (package-with-python2 python-snowballstemmer)) | |
9914 | ||
754bfd70 DM |
9915 | (define-public python-sphinx-cloud-sptheme |
9916 | (package | |
9917 | (name "python-sphinx-cloud-sptheme") | |
5095bc7d | 9918 | (version "1.8.0") |
754bfd70 | 9919 | (source (origin |
1bd858cc MB |
9920 | (method url-fetch) |
9921 | (uri (pypi-uri "cloud_sptheme" version)) | |
9922 | (sha256 | |
9923 | (base32 | |
5095bc7d | 9924 | "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd")))) |
1bd858cc | 9925 | (build-system python-build-system) |
a31e2f1a MB |
9926 | ;; FIXME: The 'pypi' release archive does not contain tests. |
9927 | (arguments '(#:tests? #f)) | |
1bd858cc MB |
9928 | (native-inputs |
9929 | `(("python-sphinx" ,python-sphinx))) | |
9930 | (home-page "https://bitbucket.org/ecollins/cloud_sptheme") | |
9931 | (synopsis "'Cloud' theme for Sphinx documenter") | |
9932 | (description "This package contains the \"Cloud\" theme for Sphinx and some | |
754bfd70 | 9933 | related extensions.") |
1bd858cc | 9934 | (license license:bsd-3))) |
754bfd70 DM |
9935 | |
9936 | (define-public python2-sphinx-cloud-sptheme | |
9937 | (package-with-python2 python-sphinx-cloud-sptheme)) | |
9938 | ||
807a5b32 DM |
9939 | (define-public python-sphinx-alabaster-theme |
9940 | (package | |
9941 | (name "python-sphinx-alabaster-theme") | |
9942 | (version "0.7.9") | |
1bd858cc MB |
9943 | (source (origin |
9944 | (method url-fetch) | |
9945 | (uri (pypi-uri "alabaster" version)) | |
9946 | (sha256 | |
9947 | (base32 | |
9948 | "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7")))) | |
807a5b32 DM |
9949 | (build-system python-build-system) |
9950 | (propagated-inputs | |
9951 | `(("python-pygments" ,python-pygments))) | |
9952 | (home-page "https://alabaster.readthedocs.io/") | |
9953 | (synopsis "Configurable sidebar-enabled Sphinx theme") | |
9954 | (description "Alabaster is a visually (c)lean, responsive, configurable | |
9955 | theme for the Sphinx documentation system. It's the default theme of Sphinx.") | |
9956 | (license license:bsd-3))) | |
9957 | ||
9958 | (define-public python2-sphinx-alabaster-theme | |
9959 | (package-with-python2 python-sphinx-alabaster-theme)) | |
9960 | ||
8ab59181 HG |
9961 | (define-public python-setproctitle |
9962 | (package | |
9963 | (name "python-setproctitle") | |
9964 | (version "1.1.10") | |
9965 | (source | |
9966 | (origin | |
9967 | (method url-fetch) | |
9968 | (uri (pypi-uri "setproctitle" version)) | |
9969 | (sha256 | |
9970 | (base32 | |
9971 | "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2")))) | |
9972 | (build-system python-build-system) | |
9973 | (arguments | |
9974 | '(#:phases | |
9975 | (modify-phases %standard-phases | |
9976 | (add-before 'check 'patch-Makefile | |
9977 | ;; Stricly this is only required for the python2 variant. | |
9978 | ;; But adding a phase in an inherited package seems to be | |
9979 | ;; cumbersum. So we patch even for python3. | |
9980 | (lambda _ | |
9981 | (let ((nose (assoc-ref %build-inputs "python2-nose"))) | |
9982 | (when nose | |
9983 | (substitute* "Makefile" | |
9984 | (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ") | |
9985 | (string-append nose "/bin/nosetests ")))) | |
9986 | #t))) | |
9987 | (replace 'check | |
9988 | (lambda _ | |
9989 | (setenv "PYTHON" (or (which "python3") (which "python"))) | |
9990 | (setenv "PYCONFIG" (or (which "python3-config") | |
9991 | (which "python-config"))) | |
9992 | (setenv "CC" "gcc") | |
9993 | ;; No need to extend PYTHONPATH to find the built package, since | |
9994 | ;; the Makefile will build anyway | |
9995 | (zero? (system* "make" "check"))))))) | |
9996 | (native-inputs | |
9997 | `(("procps" ,procps))) ; required for tests | |
9998 | (home-page | |
9999 | "https://github.com/dvarrazzo/py-setproctitle") | |
10000 | (synopsis | |
10001 | "Setproctitle implementation for Python to customize the process title") | |
10002 | (description "The library allows a process to change its title (as displayed | |
10003 | by system tools such as ps and top). | |
10004 | ||
10005 | Changing the title is mostly useful in multi-process systems, for | |
10006 | example when a master process is forked: changing the children's title | |
10007 | allows to identify the task each process is busy with. The technique | |
10008 | is used by PostgreSQL and the OpenSSH Server for example.") | |
10009 | (license license:bsd-3) | |
10010 | (properties `((python2-variant . ,(delay python2-setproctitle)))))) | |
10011 | ||
10012 | (define-public python2-setproctitle | |
10013 | (let ((base (package-with-python2 | |
10014 | (strip-python2-variant python-setproctitle)))) | |
10015 | (package | |
10016 | (inherit base) | |
10017 | (native-inputs `(("python2-nose" ,python2-nose) | |
10018 | ,@(package-native-inputs base)))))) | |
162e42d8 HG |
10019 | |
10020 | (define-public python-validictory | |
10021 | (package | |
10022 | (name "python-validictory") | |
10023 | (version "1.0.1") | |
10024 | (source | |
10025 | (origin | |
10026 | (method url-fetch) | |
10027 | (uri (pypi-uri "validictory" version)) | |
10028 | (sha256 | |
10029 | (base32 | |
10030 | "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q")))) | |
10031 | (build-system python-build-system) | |
10032 | (arguments | |
10033 | '(#:phases | |
10034 | (modify-phases %standard-phases | |
10035 | (add-after 'unpack 'bootstrap | |
10036 | ;; Move the tests out of the package directory to avoid | |
10037 | ;; packaging them. | |
10038 | (lambda* _ | |
10039 | (rename-file "validictory/tests" "tests") | |
10040 | (delete-file "tests/__init__.py"))) | |
10041 | (replace 'check | |
10042 | (lambda _ | |
10043 | ;; Extend PYTHONPATH so the built package will be found. | |
10044 | (setenv "PYTHONPATH" | |
10045 | (string-append (getcwd) "/build/lib:" | |
10046 | (getenv "PYTHONPATH"))) | |
10047 | (zero? (system* "py.test" "-vv" ))))))) | |
10048 | (native-inputs | |
10049 | `(("python-pytest" ,python-pytest))) | |
10050 | (home-page | |
10051 | "https://github.com/jamesturk/validictory") | |
10052 | (synopsis "General purpose Python data validator") | |
10053 | (description "It allows validation of arbitrary Python data structures. | |
10054 | ||
10055 | The schema format is based on the JSON Schema | |
10056 | proposal (http://json-schema.org), so combined with json the library is also | |
10057 | useful as a validator for JSON data.") | |
f210e944 | 10058 | (license license:expat))) |
162e42d8 HG |
10059 | |
10060 | (define-public python2-validictory | |
f210e944 | 10061 | (package-with-python2 python-validictory)) |
0990edfe | 10062 | |
329b4b3b LF |
10063 | (define-public python-pyev |
10064 | (package | |
10065 | (name "python-pyev") | |
10066 | (version "0.9.0") | |
10067 | (source | |
10068 | (origin | |
10069 | (method url-fetch) | |
10070 | (uri (pypi-uri "pyev" version)) | |
10071 | (sha256 | |
10072 | (base32 | |
10073 | "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx")))) | |
10074 | (build-system python-build-system) | |
10075 | (arguments | |
10076 | `(#:tests? #f ; no test suite | |
10077 | #:phases | |
10078 | (modify-phases %standard-phases | |
10079 | (add-after 'unpack 'patch | |
10080 | (lambda* (#:key inputs #:allow-other-keys) | |
10081 | (let ((libev (string-append (assoc-ref inputs "libev") | |
10082 | "/lib/libev.so.4"))) | |
10083 | (substitute* "setup.py" | |
10084 | (("libev_dll_name = find_library\\(\\\"ev\\\"\\)") | |
10085 | (string-append "libev_dll_name = \"" libev "\""))))))))) | |
10086 | (inputs | |
10087 | `(("libev" ,libev))) | |
10088 | (home-page "http://pythonhosted.org/pyev/") | |
10089 | (synopsis "Python libev interface") | |
10090 | (description "Pyev provides a Python interface to libev.") | |
10091 | (license license:gpl3))) | |
10092 | ||
10093 | (define-public python2-pyev | |
10094 | (package-with-python2 python-pyev)) | |
1ed21519 | 10095 | |
45b4f127 | 10096 | (define-public python-imagesize |
1ed21519 | 10097 | (package |
45b4f127 DM |
10098 | (name "python-imagesize") |
10099 | (version "0.7.1") | |
1ed21519 DM |
10100 | (source |
10101 | (origin | |
45b4f127 DM |
10102 | (method url-fetch) |
10103 | (uri (pypi-uri "imagesize" version)) | |
1ed21519 DM |
10104 | (sha256 |
10105 | (base32 | |
45b4f127 | 10106 | "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha")))) |
1ed21519 | 10107 | (build-system python-build-system) |
9422c98a LF |
10108 | (arguments |
10109 | '(;; Test files are not distributed on PyPi: | |
10110 | ;; https://github.com/shibukawa/imagesize_py/issues/7 | |
10111 | #:tests? #f)) | |
45b4f127 DM |
10112 | (home-page "https://github.com/shibukawa/imagesize_py") |
10113 | (synopsis "Gets image size of files in variaous formats in Python") | |
10114 | (description | |
10115 | "This package allows determination of image size from | |
10116 | PNG, JPEG, JPEG2000 and GIF files in pure Python.") | |
f210e944 | 10117 | (license license:expat))) |
1ed21519 | 10118 | |
45b4f127 | 10119 | (define-public python2-imagesize |
f210e944 | 10120 | (package-with-python2 python-imagesize)) |
444a79b6 | 10121 | |
e2fca490 | 10122 | (define-public python-termstyle |
444a79b6 | 10123 | (package |
e2fca490 DM |
10124 | (name "python-termstyle") |
10125 | (version "0.1.11") | |
444a79b6 | 10126 | (source |
e2fca490 DM |
10127 | (origin |
10128 | (method url-fetch) | |
10129 | (uri (pypi-uri "termstyle" version)) | |
10130 | (sha256 | |
10131 | (base32 | |
10132 | "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g")))) | |
444a79b6 | 10133 | (build-system python-build-system) |
7917a135 MB |
10134 | (arguments |
10135 | '(#:phases | |
10136 | (modify-phases %standard-phases | |
10137 | (replace 'check | |
10138 | (lambda _ | |
10139 | (zero? (system* "python" "test3.py"))))))) | |
7bf837fd | 10140 | (home-page "https://github.com/gfxmonk/termstyle") |
e2fca490 DM |
10141 | (synopsis "Console text coloring for Python") |
10142 | (description "This package provides console text coloring for Python.") | |
10143 | (license license:bsd-3))) | |
6c2e82bc TGR |
10144 | |
10145 | (define-public python-argcomplete | |
10146 | (package | |
10147 | (name "python-argcomplete") | |
10148 | (version "1.7.0") | |
10149 | (source | |
10150 | (origin | |
10151 | (method url-fetch) | |
10152 | (uri (pypi-uri "argcomplete" version)) | |
10153 | (sha256 | |
10154 | (base32 | |
10155 | "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x")))) | |
10156 | (build-system python-build-system) | |
80ce42bd MB |
10157 | (native-inputs |
10158 | `(("python-pexpect" ,python-pexpect) | |
240d3cef LC |
10159 | ("tcsh" ,tcsh) |
10160 | ("bash-full" ,bash))) ;full Bash for 'test_file_completion' | |
6c2e82bc TGR |
10161 | (home-page "https://github.com/kislyuk/argcomplete") |
10162 | (synopsis "Shell tab completion for Python argparse") | |
10163 | (description "argcomplete provides extensible command line tab completion | |
10164 | of arguments and options for Python scripts using @code{argparse}. It's | |
10165 | particularly useful for programs with many options or sub-parsers that can | |
10166 | dynamically suggest completions; for example, when browsing resources over the | |
10167 | network.") | |
10168 | (license license:asl2.0))) | |
10169 | ||
10170 | (define-public python2-argcomplete | |
10171 | (package-with-python2 python-argcomplete)) | |
361a2fcf TGR |
10172 | |
10173 | (define-public python-xopen | |
10174 | (package | |
10175 | (name "python-xopen") | |
62a4b952 | 10176 | (version "0.3.2") |
361a2fcf TGR |
10177 | (source |
10178 | (origin | |
10179 | (method url-fetch) | |
10180 | (uri (pypi-uri "xopen" version)) | |
10181 | (sha256 | |
10182 | (base32 | |
62a4b952 | 10183 | "0bzjmn3rl1cd3d2q39cjwnkhaspk2b0hfj3rl64pclm44ihg5fb6")) |
361a2fcf TGR |
10184 | (file-name (string-append name "-" version ".tar.gz")))) |
10185 | (build-system python-build-system) | |
10186 | (home-page "https://github.com/marcelm/xopen/") | |
10187 | (synopsis "Open compressed files transparently") | |
10188 | (description "This module provides an @code{xopen} function that works like | |
10189 | Python's built-in @code{open} function, but can also deal with compressed files. | |
10190 | Supported compression formats are gzip, bzip2 and, xz, and are automatically | |
10191 | recognized by their file extensions. The focus is on being as efficient as | |
10192 | possible on all supported Python versions.") | |
10193 | (license license:expat))) | |
10194 | ||
10195 | (define-public python2-xopen | |
10196 | (package-with-python2 python-xopen)) | |
8d67610b DM |
10197 | |
10198 | (define-public python2-cheetah | |
10199 | (package | |
10200 | (name "python2-cheetah") | |
10201 | (version "2.4.4") | |
10202 | (source | |
10203 | (origin | |
10204 | (method url-fetch) | |
10205 | (uri (pypi-uri "Cheetah" version)) | |
10206 | (sha256 | |
10207 | (base32 | |
10208 | "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y")))) | |
10209 | (build-system python-build-system) | |
10210 | (arguments | |
10211 | `(#:python ,python-2)) | |
10212 | (propagated-inputs | |
10213 | `(("python2-markdown" ,python2-markdown))) | |
10214 | (home-page "https://pythonhosted.org/Cheetah/") | |
10215 | (synopsis "Template engine") | |
10216 | (description "Cheetah is a text-based template engine and Python code | |
10217 | generator. | |
10218 | ||
10219 | Cheetah can be used as a standalone templating utility or referenced as | |
10220 | a library from other Python applications. It has many potential uses, | |
10221 | but web developers looking for a viable alternative to ASP, JSP, PHP and | |
10222 | PSP are expected to be its principle user group. | |
10223 | ||
10224 | Features: | |
10225 | @enumerate | |
10226 | @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other | |
10227 | text-based format. | |
10228 | @item Cleanly separates content, graphic design, and program code. | |
10229 | @item Blends the power and flexibility of Python with a simple template language | |
10230 | that non-programmers can understand. | |
10231 | @item Gives template writers full access to any Python data structure, module, | |
10232 | function, object, or method in their templates. | |
10233 | @item Makes code reuse easy by providing an object-orientated interface to | |
10234 | templates that is accessible from Python code or other Cheetah templates. | |
10235 | One template can subclass another and selectively reimplement sections of it. | |
10236 | @item Provides a simple, yet powerful, caching mechanism that can dramatically | |
10237 | improve the performance of a dynamic website. | |
10238 | @item Compiles templates into optimized, yet readable, Python code. | |
10239 | @end enumerate") | |
10240 | (license (license:x11-style "file://LICENSE")))) | |
916aafa4 | 10241 | |
d83d8722 DM |
10242 | (define-public python-dulwich |
10243 | (package | |
10244 | (name "python-dulwich") | |
bef02e9e | 10245 | (version "0.18.6") |
d83d8722 DM |
10246 | (source |
10247 | (origin | |
10248 | (method url-fetch) | |
10249 | (uri (list (string-append "https://www.dulwich.io/releases/" | |
10250 | "dulwich-" version ".tar.gz") | |
10251 | (pypi-uri "dulwich" version))) | |
10252 | (sha256 | |
bef02e9e LF |
10253 | (base32 |
10254 | "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q")))) | |
d83d8722 DM |
10255 | (build-system python-build-system) |
10256 | (arguments | |
10257 | `(#:phases | |
10258 | (modify-phases %standard-phases | |
10259 | (add-before 'check 'fix-tests | |
10260 | (lambda* (#:key inputs #:allow-other-keys) | |
10261 | ;; The tests use Popen with a custom environment which doesn't | |
10262 | ;; include PATH. | |
10263 | (substitute* "dulwich/tests/compat/utils.py" | |
10264 | (("'git'") (string-append "'" | |
10265 | (which "git") | |
10266 | "'"))) | |
10267 | (substitute* '("dulwich/tests/test_repository.py" | |
10268 | "dulwich/tests/test_hooks.py") | |
10269 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
10270 | (setenv "TEST_RUNNER" "unittest") | |
10271 | (setenv "PYTHONHASHSEED" "random") | |
10272 | #t))))) | |
10273 | (propagated-inputs | |
10274 | `(("python-fastimport" ,python-fastimport))) | |
10275 | (native-inputs | |
10276 | `(("python-mock" ,python-mock) | |
10277 | ("python-geventhttpclient" ,python-geventhttpclient) | |
10278 | ("git" ,git))) | |
10279 | (home-page "https://www.dulwich.io/") | |
10280 | (synopsis "Git implementation in Python") | |
10281 | (description "Dulwich is an implementation of the Git file formats and | |
10282 | protocols written in pure Python.") | |
10283 | ;; Can be used with either license. | |
10284 | (license (list license:asl2.0 license:gpl2+)))) | |
10285 | ||
10286 | (define-public python2-dulwich | |
10287 | (package-with-python2 python-dulwich)) | |
424b1ae7 | 10288 | |
916aafa4 CZ |
10289 | (define-public python-pbkdf2 |
10290 | (package | |
10291 | (name "python-pbkdf2") | |
10292 | (version "1.3") | |
10293 | (source | |
10294 | (origin | |
10295 | (method url-fetch) | |
10296 | (uri (pypi-uri "pbkdf2" version)) | |
10297 | (sha256 | |
10298 | (base32 | |
10299 | "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc")))) | |
10300 | (build-system python-build-system) | |
fffcd8b8 MB |
10301 | (arguments |
10302 | '(#:phases | |
10303 | (modify-phases %standard-phases | |
10304 | (replace 'check | |
10305 | (lambda _ | |
10306 | (setenv "PYTHONPATH" | |
10307 | (string-append (getcwd) "/build/lib:" | |
10308 | (getenv "PYTHONPATH"))) | |
10309 | (zero? (system* "python" "test/test_pbkdf2.py"))))))) | |
916aafa4 CZ |
10310 | (propagated-inputs |
10311 | `(("python-pycrypto" ,python-pycrypto))) ; optional | |
9be5ecdf | 10312 | (home-page "https://www.dlitz.net/software/python-pbkdf2/") |
916aafa4 CZ |
10313 | (synopsis "Password-based key derivation") |
10314 | (description "This module implements the password-based key derivation | |
10315 | function, PBKDF2, specified in RSA PKCS#5 v2.0. | |
10316 | ||
10317 | PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which | |
10318 | is part of the RSA Public Key Cryptography Standards series. The provided | |
10319 | implementation takes a password or a passphrase and a salt value (and | |
10320 | optionally a iteration count, a digest module, and a MAC module) and provides | |
10321 | a file-like object from which an arbitrarly-sized key can be read.") | |
10322 | (license license:expat))) | |
10323 | ||
10324 | (define-public python2-pbkdf2 | |
10325 | (package-with-python2 python-pbkdf2)) | |
cba84a38 CZ |
10326 | |
10327 | (define-public python-qrcode | |
10328 | (package | |
10329 | (name "python-qrcode") | |
10330 | (version "5.3") | |
10331 | (source | |
10332 | (origin | |
10333 | (method url-fetch) | |
10334 | (uri (pypi-uri "qrcode" version)) | |
10335 | (sha256 | |
10336 | (base32 | |
10337 | "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1")))) | |
10338 | (build-system python-build-system) | |
6925cd78 MB |
10339 | (arguments |
10340 | ;; FIXME: Tests require packaging 'pymaging'. | |
10341 | '(#:tests? #f)) | |
cba84a38 CZ |
10342 | (propagated-inputs |
10343 | `(("python-lxml" ,python-lxml) ; for SVG output | |
10344 | ("python-pillow" ,python-pillow) ; for PNG output | |
10345 | ("python-six" ,python-six))) | |
10346 | (home-page "https://github.com/lincolnloop/python-qrcode") | |
10347 | (synopsis "QR Code image generator") | |
10348 | (description "This package provides a pure Python QR Code generator | |
10349 | module. It uses the Python Imaging Library (PIL) to allow for the generation | |
10350 | of QR Codes. | |
10351 | ||
10352 | In addition this package provides a command line tool to generate QR codes and | |
10353 | either write these QR codes to a file or do the output as ascii art at the | |
10354 | console.") | |
10355 | (license license:bsd-3))) | |
10356 | ||
10357 | (define-public python2-qrcode | |
10358 | (package-with-python2 python-qrcode)) | |
af7caada | 10359 | |
1a917fc9 MFM |
10360 | (define-public python-rst2ansi |
10361 | (package | |
10362 | (name "python-rst2ansi") | |
10363 | (version "0.1.5") | |
10364 | (source | |
10365 | (origin | |
10366 | (method url-fetch) | |
10367 | (uri (pypi-uri "rst2ansi" version)) | |
10368 | (sha256 | |
10369 | (base32 | |
10370 | "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv")))) | |
10371 | (build-system python-build-system) | |
10372 | (propagated-inputs | |
10373 | `(("python-docutils" ,python-docutils))) | |
10374 | (home-page "https://github.com/Snaipe/python-rst-to-ansi") | |
10375 | (synopsis "Convert RST to ANSI-decorated console output") | |
10376 | (description | |
10377 | "Python module dedicated to rendering RST (reStructuredText) documents | |
10378 | to ansi-escaped strings suitable for display in a terminal.") | |
10379 | (license license:expat))) | |
2f4623db | 10380 | |
ca0e62bf SR |
10381 | (define-public python-ansi2html |
10382 | (package | |
10383 | (name "python-ansi2html") | |
10384 | (version "1.2.0") | |
10385 | (source | |
10386 | (origin | |
10387 | (method url-fetch) | |
10388 | (uri (pypi-uri "ansi2html" version)) | |
10389 | (sha256 | |
10390 | (base32 | |
10391 | "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y")))) | |
10392 | (build-system python-build-system) | |
10393 | (native-inputs | |
10394 | `(("python-mock" ,python-mock) | |
10395 | ("python-nose" ,python-nose))) | |
10396 | (propagated-inputs | |
10397 | `(("python-six" ,python-six))) | |
9be5ecdf | 10398 | (home-page "https://github.com/ralphbean/ansi2html") |
ca0e62bf SR |
10399 | (synopsis "Convert ANSI-decorated console output to HTML") |
10400 | (description | |
10401 | "@command{ansi2html} is a Python library and command line utility for | |
10402 | convering text with ANSI color codes to HTML or LaTeX.") | |
10403 | (license license:gpl3+))) | |
10404 | ||
10405 | (define-public python2-ansi2html | |
10406 | (package-with-python2 python-ansi2html)) | |
10407 | ||
2f4623db MFM |
10408 | (define-public python-ddt |
10409 | (package | |
10410 | (name "python-ddt") | |
338e2852 | 10411 | (version "1.1.2") |
2f4623db MFM |
10412 | (source |
10413 | (origin | |
10414 | (method url-fetch) | |
10415 | (uri (pypi-uri "ddt" version)) | |
10416 | (sha256 | |
10417 | (base32 | |
338e2852 | 10418 | "1wqkmz0yhanly8sif5vb02p2iik7mwxwph8ywph2kbb8ws8szdpx")))) |
2f4623db MFM |
10419 | (build-system python-build-system) |
10420 | (native-inputs | |
10421 | `(("python-mock" ,python-mock) | |
10422 | ("python-nose" ,python-nose))) | |
10423 | (propagated-inputs | |
10424 | `(("python-six" ,python-six) | |
10425 | ("python-pyyaml" ,python-pyyaml))) | |
10426 | (home-page "https://github.com/txels/ddt") | |
10427 | (synopsis "Data-Driven Tests") | |
10428 | (description | |
ef20a6f0 TGR |
10429 | "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by |
10430 | running it with different test data, and make it appear as multiple test | |
10431 | cases.") | |
2f4623db MFM |
10432 | (license license:expat))) |
10433 | ||
10434 | (define-public python2-ddt | |
10435 | (package-with-python2 python-ddt)) | |
2299b137 MFM |
10436 | |
10437 | (define-public python-pycosat | |
10438 | (package | |
10439 | (name "python-pycosat") | |
10440 | (version "0.6.1") | |
10441 | (source | |
10442 | (origin | |
10443 | (method url-fetch) | |
10444 | (uri (pypi-uri "pycosat" version)) | |
10445 | (sha256 | |
10446 | (base32 | |
10447 | "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l")))) | |
10448 | ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/ | |
10449 | (build-system python-build-system) | |
10450 | (home-page "https://github.com/ContinuumIO/pycosat") | |
10451 | (synopsis "Bindings to picosat (a SAT solver)") | |
10452 | (description | |
10453 | "This package provides efficient Python bindings to @code{picosat} on | |
10454 | the C level. When importing pycosat, the @code{picosat} solver becomes part | |
10455 | of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability | |
10456 | Problem} (SAT) solver.") | |
10457 | (license license:expat))) | |
10458 | ||
10459 | (define-public python2-pycosat | |
10460 | (package-with-python2 python-pycosat)) | |
8fd68504 MFM |
10461 | |
10462 | (define-public python2-ruamel.ordereddict | |
10463 | (package | |
10464 | (name "python2-ruamel.ordereddict") | |
10465 | (version "0.4.9") | |
10466 | (source | |
10467 | (origin | |
10468 | (method url-fetch) | |
10469 | (uri (pypi-uri "ruamel.ordereddict" version)) | |
10470 | (sha256 | |
10471 | (base32 | |
10472 | "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h")))) | |
10473 | (build-system python-build-system) | |
10474 | (arguments | |
10475 | `(#:python ,python-2 | |
10476 | #:phases | |
10477 | (modify-phases %standard-phases | |
10478 | (delete 'check) | |
10479 | (add-after 'install 'check | |
10480 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
10481 | (add-installed-pythonpath inputs outputs) | |
10482 | (zero? (system* "python" "test/testordereddict.py"))))))) | |
10483 | (home-page "https://bitbucket.org/ruamel/ordereddict") | |
10484 | (synopsis "Version of dict that keeps keys in insertion order") | |
10485 | (description | |
10486 | "This is an implementation of an ordered dictionary with @dfn{Key | |
10487 | Insertion Order} (KIO: updates of values do not affect the position of the | |
10488 | key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is | |
10489 | removed and put at the back). The standard library module @code{OrderedDict}, | |
10490 | implemented later, implements a subset of @code{ordereddict} functionality. | |
10491 | Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted | |
10492 | Order} (KSO, no sorting function can be specified, but a transform can be | |
10493 | specified to apply on the key before comparison (e.g. @code{string.lower})).") | |
10494 | (license license:expat))) | |
d8768e31 EB |
10495 | |
10496 | (define-public python-pypeg2 | |
10497 | (package | |
10498 | (name "python-pypeg2") | |
10499 | (version "2.15.2") | |
10500 | (source | |
10501 | (origin | |
10502 | (method url-fetch) | |
10503 | (uri (pypi-uri "pyPEG2" version)) | |
10504 | (sha256 | |
10505 | (base32 | |
10506 | "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b")))) | |
10507 | (build-system python-build-system) | |
10508 | (propagated-inputs `(("python-lxml" ,python-lxml))) | |
10509 | (arguments | |
10510 | ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35 | |
10511 | '(#:tests? #f)) | |
10512 | (home-page "https://fdik.org/pyPEG/") | |
10513 | (synopsis "Parsering Expression Grammars in Python") | |
10514 | (description "PyPEG is an intrinsic parser interpreter framework for | |
10515 | Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can | |
10516 | parse many formal languages.") | |
10517 | (license license:gpl2))) | |
33e9490c | 10518 | |
0cd83b4e TS |
10519 | (define-public python-incremental |
10520 | (package | |
10521 | (name "python-incremental") | |
10522 | (version "17.5.0") | |
10523 | (source | |
10524 | (origin | |
10525 | (method url-fetch) | |
10526 | (uri (pypi-uri "incremental" version)) | |
10527 | (sha256 | |
10528 | (base32 | |
10529 | "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv")))) | |
10530 | (build-system python-build-system) | |
10531 | (home-page "https://github.com/hawkowl/incremental") | |
10532 | (synopsis "Library for versioning Python projects") | |
10533 | (description "Incremental is a small library that versions your Python | |
10534 | projects.") | |
10535 | (license license:expat))) | |
10536 | ||
10537 | (define-public python2-incremental | |
10538 | (package-with-python2 python-incremental)) | |
10539 | ||
96cb5ca1 TS |
10540 | (define-public python-automat |
10541 | (package | |
10542 | (name "python-automat") | |
10543 | (version "0.6.0") | |
10544 | (source (origin | |
10545 | (method url-fetch) | |
10546 | (uri (pypi-uri "Automat" version)) | |
10547 | (sha256 | |
10548 | (base32 | |
10549 | "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw")))) | |
10550 | (build-system python-build-system) | |
10551 | ;; We disable the tests because they require python-twisted, while | |
10552 | ;; python-twisted depends on python-automat. Twisted is optional, but the | |
10553 | ;; tests fail if it is not available. Also see | |
10554 | ;; <https://github.com/glyph/automat/issues/71>. | |
10555 | (arguments '(#:tests? #f)) | |
10556 | (native-inputs | |
10557 | `(("python-m2r" ,python-m2r) | |
10558 | ("python-setuptools-scm" ,python-setuptools-scm) | |
10559 | ("python-graphviz" ,python-graphviz))) | |
10560 | (propagated-inputs | |
10561 | `(("python-six" ,python-six) | |
10562 | ("python-attrs" ,python-attrs))) | |
10563 | (home-page "https://github.com/glyph/Automat") | |
10564 | (synopsis "Self-service finite-state machines") | |
10565 | (description "Automat is a library for concise, idiomatic Python | |
10566 | expression of finite-state automata (particularly deterministic finite-state | |
10567 | transducers).") | |
10568 | (license license:expat))) | |
10569 | ||
10570 | (define-public python2-automat | |
10571 | (package-with-python2 python-automat)) | |
10572 | ||
fd8ff99a TS |
10573 | (define-public python-m2r |
10574 | (package | |
10575 | (name "python-m2r") | |
10576 | (version "0.1.12") | |
10577 | (source (origin | |
10578 | (method url-fetch) | |
10579 | (uri (pypi-uri "m2r" version)) | |
10580 | (sha256 | |
10581 | (base32 | |
10582 | "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd")))) | |
10583 | (build-system python-build-system) | |
10584 | (propagated-inputs | |
10585 | `(("python-docutils" ,python-docutils) | |
10586 | ("python-mistune" ,python-mistune))) | |
10587 | (native-inputs | |
10588 | `(("python-pygments" ,python-pygments) | |
10589 | ("python-mock" ,python-mock))) | |
10590 | (home-page "https://github.com/miyakogi/m2r") | |
10591 | (synopsis "Markdown to reStructuredText converter") | |
10592 | (description "M2R converts a markdown file including reST markups to valid | |
10593 | reST format.") | |
10594 | (license license:expat))) | |
10595 | ||
10596 | (define-public python2-m2r | |
10597 | (package-with-python2 python-m2r)) | |
10598 | ||
9074bac1 TS |
10599 | (define-public python-constantly |
10600 | (package | |
10601 | (name "python-constantly") | |
10602 | (version "15.1.0") | |
10603 | (source (origin | |
10604 | (method url-fetch) | |
10605 | (uri (pypi-uri "constantly" version)) | |
10606 | (sha256 | |
10607 | (base32 | |
10608 | "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq")))) | |
10609 | (build-system python-build-system) | |
10610 | (home-page "https://github.com/twisted/constantly") | |
10611 | (synopsis "Symbolic constants in Python") | |
10612 | (description "Constantly is a Python library that provides symbolic | |
10613 | constant support. It includes collections and constants with text, numeric, | |
10614 | and bit flag values.") | |
10615 | (license license:expat))) | |
10616 | ||
10617 | (define-public python2-constantly | |
10618 | (package-with-python2 python-constantly)) | |
10619 | ||
bb3b4b4e TS |
10620 | (define-public python-attrs |
10621 | (package | |
10622 | (name "python-attrs") | |
10623 | (version "17.2.0") | |
10624 | (source (origin | |
10625 | (method url-fetch) | |
10626 | (uri (pypi-uri "attrs" version)) | |
10627 | (sha256 | |
10628 | (base32 | |
10629 | "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax")))) | |
10630 | (build-system python-build-system) | |
10631 | (native-inputs | |
10632 | `(("python-pytest" ,python-pytest) | |
10633 | ("python-hypothesis" ,python-hypothesis) | |
10634 | ("python-zope-interface" ,python-zope-interface) | |
10635 | ("python-six" ,python-six))) | |
10636 | (home-page "https://github.com/python-attrs/attrs/") | |
10637 | (synopsis "Attributes without boilerplate") | |
10638 | (description "@code{attrs} is a Python package with class decorators that | |
10639 | ease the chores of implementing the most common attribute-related object | |
10640 | protocols.") | |
10641 | (license license:expat))) | |
10642 | ||
10643 | (define-public python2-attrs | |
10644 | (package-with-python2 python-attrs)) | |
10645 | ||
33e9490c AI |
10646 | (define-public python2-cliapp |
10647 | (package | |
10648 | (name "python2-cliapp") | |
f6c58215 | 10649 | (version "1.20170823") |
33e9490c AI |
10650 | (source |
10651 | (origin | |
10652 | (method url-fetch) | |
10653 | (uri (string-append | |
10654 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-" | |
10655 | version ".tar.gz")) | |
10656 | (sha256 | |
10657 | (base32 | |
f6c58215 | 10658 | "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq")))) |
33e9490c AI |
10659 | (build-system python-build-system) |
10660 | (arguments | |
689042e5 AI |
10661 | `(#:python ,python-2 |
10662 | #:phases | |
10663 | (modify-phases %standard-phases | |
10664 | ;; check phase needs to be run before the build phase. If not, | |
10665 | ;; coverage-test-runner looks for tests for the built source files, | |
10666 | ;; and fails. | |
10667 | (delete 'check) | |
10668 | (add-before 'build 'check | |
10669 | (lambda _ | |
10670 | ;; Disable python3 tests | |
10671 | (substitute* "check" | |
10672 | (("python3") "# python3")) | |
10673 | (zero? (system* "./check"))))))) | |
10674 | (native-inputs | |
10675 | `(("python2-coverage-test-runner" ,python2-coverage-test-runner) | |
10676 | ("python2-pep8" ,python2-pep8))) | |
33e9490c AI |
10677 | (propagated-inputs |
10678 | `(("python2-pyaml" ,python2-pyaml))) | |
10679 | (home-page "https://liw.fi/cliapp/") | |
10680 | (synopsis "Python framework for command line programs") | |
10681 | (description "@code{python2-cliapp} is a python framework for | |
10682 | command line programs. It contains the typical stuff such programs | |
10683 | need to do, such as parsing the command line for options, and | |
10684 | iterating over input files.") | |
10685 | (license license:gpl2+))) | |
10686 | ||
77e99411 AI |
10687 | (define-public python2-ttystatus |
10688 | (package | |
10689 | (name "python2-ttystatus") | |
2d6da794 | 10690 | (version "0.35") |
77e99411 AI |
10691 | (source |
10692 | (origin | |
10693 | (method url-fetch) | |
10694 | (uri (string-append | |
10695 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-" | |
10696 | version ".tar.gz")) | |
10697 | (sha256 | |
10698 | (base32 | |
2d6da794 | 10699 | "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6")))) |
77e99411 | 10700 | (build-system python-build-system) |
f6180862 AI |
10701 | (native-inputs |
10702 | `(("python2-coverage-test-runner" ,python2-coverage-test-runner) | |
10703 | ("python2-pep8" ,python2-pep8))) | |
77e99411 | 10704 | (arguments |
f6180862 AI |
10705 | `(#:python ,python-2 |
10706 | #:phases | |
10707 | (modify-phases %standard-phases | |
10708 | ;; check phase needs to be run before the build phase. If not, | |
10709 | ;; coverage-test-runner looks for tests for the built source files, | |
10710 | ;; and fails. | |
10711 | (delete 'check) | |
10712 | (add-before 'build 'check | |
10713 | (lambda _ | |
10714 | (zero? (system* "make" "check"))))))) | |
77e99411 AI |
10715 | (home-page "https://liw.fi/ttystatus/") |
10716 | (synopsis "Python library for showing progress reporting and | |
10717 | status updates on terminals") | |
10718 | (description "@code{python2-ttystatus} is a python library for | |
10719 | showing progress reporting and status updates on terminals, for | |
10720 | command line programs. Output is automatically adapted to the width | |
10721 | of the terminal: truncated if it does not fit, and resized if the | |
10722 | terminal size changes.") | |
10723 | (license license:gpl3+))) | |
c220f0b4 AI |
10724 | |
10725 | (define-public python2-tracing | |
10726 | (package | |
10727 | (name "python2-tracing") | |
10728 | (version "0.10") | |
10729 | (source | |
10730 | (origin | |
10731 | (method url-fetch) | |
10732 | (uri (string-append | |
10733 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-" | |
10734 | version ".tar.gz")) | |
10735 | (sha256 | |
10736 | (base32 | |
10737 | "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw")))) | |
10738 | (build-system python-build-system) | |
10739 | (arguments | |
10740 | `(#:python ,python-2)) | |
10741 | (home-page "https://liw.fi/tracing/") | |
10742 | (synopsis "Python debug logging helper") | |
10743 | (description "@code{python2-tracing} is a python library for | |
10744 | logging debug messages. It provides a way to turn debugging messages | |
10745 | on and off, based on the filename they occur in. It is much faster | |
10746 | than using @code{logging.Filter} to accomplish the same thing, which | |
10747 | matters when code is run in production mode. The actual logging still | |
10748 | happens using the @code{logging} library.") | |
10749 | (license license:gpl3+))) | |
b6b2ca5d AI |
10750 | |
10751 | (define-public python2-larch | |
10752 | (package | |
10753 | (name "python2-larch") | |
10754 | (version "1.20151025") | |
10755 | (source | |
10756 | (origin | |
10757 | (method url-fetch) | |
10758 | (uri (string-append | |
10759 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-" | |
10760 | version ".tar.gz")) | |
a0596a2f AI |
10761 | (patches (search-patches |
10762 | "python2-larch-coverage-4.0a6-compatibility.patch")) | |
b6b2ca5d AI |
10763 | (sha256 |
10764 | (base32 | |
10765 | "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663")))) | |
10766 | (build-system python-build-system) | |
10767 | (arguments | |
a0596a2f AI |
10768 | `(#:python ,python-2 |
10769 | #:phases | |
10770 | (modify-phases %standard-phases | |
10771 | ;; check phase needs to be run before the build phase. If not, | |
10772 | ;; coverage-test-runner looks for tests for the built source files, | |
10773 | ;; and fails. | |
10774 | (delete 'check) | |
10775 | (add-before 'build 'check | |
10776 | (lambda _ | |
10777 | (zero? (system* "make" "check"))))))) | |
10778 | (native-inputs | |
10779 | `(("cmdtest" ,cmdtest) | |
10780 | ("python2-coverage-test-runner" ,python2-coverage-test-runner))) | |
b6b2ca5d AI |
10781 | (propagated-inputs |
10782 | `(("python2-tracing" ,python2-tracing))) | |
10783 | (home-page "https://liw.fi/larch/") | |
10784 | (synopsis "Python copy-on-write B-tree library") | |
10785 | (description "@code{python2-larch} is an implementation of | |
10786 | particular kind of B-tree, based on research by Ohad Rodeh. See | |
10787 | @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details | |
10788 | on the data structure. | |
10789 | ||
10790 | The distinctive feature of this B-tree is that a node is never | |
10791 | (conceptually) modified. Instead, all updates are done by | |
10792 | copy-on-write. This makes it easy to clone a tree, and modify only the | |
10793 | clone, while other processes access the original tree.") | |
10794 | (license license:gpl3+))) | |
35db2d3c | 10795 | |
d5ef113c AI |
10796 | (define-public python-astroid |
10797 | (package | |
10798 | (name "python-astroid") | |
de2f56cf | 10799 | (version "1.5.3") |
d5ef113c AI |
10800 | (source |
10801 | (origin | |
10802 | (method url-fetch) | |
10803 | (uri (string-append | |
10804 | "https://github.com/PyCQA/astroid/archive/astroid-" | |
10805 | version ".tar.gz")) | |
10806 | (sha256 | |
10807 | (base32 | |
de2f56cf | 10808 | "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn")))) |
d5ef113c AI |
10809 | (build-system python-build-system) |
10810 | (propagated-inputs | |
10811 | `(("python-lazy-object-proxy" ,python-lazy-object-proxy) | |
10812 | ("python-six" ,python-six) | |
10813 | ("python-wrapt" ,python-wrapt))) | |
10814 | (arguments | |
10815 | `(#:phases | |
10816 | (modify-phases %standard-phases | |
10817 | (replace 'check | |
10818 | (lambda _ | |
10819 | (zero? (system* "python" "-m" "unittest" "discover" | |
10820 | "-p" "unittest*.py"))))))) | |
10821 | (home-page "https://github.com/PyCQA/astroid") | |
10822 | (synopsis "Common base representation of python source code for pylint and | |
10823 | other projects") | |
10824 | (description "@code{python-astroid} provides a common base representation | |
10825 | of python source code for projects such as pychecker, pyreverse, pylint, etc. | |
10826 | ||
10827 | It provides a compatible representation which comes from the _ast module. It | |
10828 | rebuilds the tree generated by the builtin _ast module by recursively walking | |
10829 | down the AST and building an extended ast. The new node classes have | |
10830 | additional methods and attributes for different usages. They include some | |
10831 | support for static inference and local name scopes. Furthermore, astroid | |
10832 | builds partial trees by inspecting living objects.") | |
de2f56cf MB |
10833 | (license license:lgpl2.1+) |
10834 | (properties `((python2-variant . ,(delay python2-astroid)))))) | |
d5ef113c AI |
10835 | |
10836 | (define-public python2-astroid | |
de2f56cf MB |
10837 | (let ((base (package-with-python2 |
10838 | (strip-python2-variant python-astroid)))) | |
10839 | (package (inherit base) | |
10840 | (propagated-inputs | |
10841 | `(("python2-backports-functools-lru-cache" | |
10842 | ,python2-backports-functools-lru-cache) | |
10843 | ("python2-enum34" ,python2-enum34) | |
10844 | ("python2-singledispatch" ,python2-singledispatch) | |
10845 | ,@(package-propagated-inputs base)))))) | |
6ba0af79 AI |
10846 | |
10847 | (define-public python-isort | |
10848 | (package | |
10849 | (name "python-isort") | |
10850 | (version "4.2.5") | |
10851 | (source | |
10852 | (origin | |
10853 | (method url-fetch) | |
10854 | (uri (string-append | |
10855 | "https://github.com/timothycrosley/isort/archive/" | |
10856 | version ".tar.gz")) | |
10857 | (file-name (string-append name "-" version ".tar.gz")) | |
10858 | (sha256 | |
10859 | (base32 | |
10860 | "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh")))) | |
10861 | (build-system python-build-system) | |
10862 | (native-inputs | |
10863 | `(("python-mock" ,python-mock) | |
10864 | ("python-pytest" ,python-pytest))) | |
10865 | (home-page "https://github.com/timothycrosley/isort") | |
10866 | (synopsis "Python utility/library to sort python imports") | |
10867 | (description "@code{python-isort} is a python utility/library to sort | |
10868 | imports alphabetically, and automatically separated into sections. It | |
10869 | provides a command line utility, a python library and plugins for various | |
10870 | editors.") | |
10871 | (license license:expat))) | |
10872 | ||
10873 | (define-public python2-isort | |
10874 | (package-with-python2 python-isort)) | |
965a083e AI |
10875 | |
10876 | (define-public python2-backports-functools-lru-cache | |
10877 | (package | |
10878 | (name "python2-backports-functools-lru-cache") | |
10879 | (version "1.3") | |
10880 | (source | |
10881 | (origin | |
10882 | (method url-fetch) | |
10883 | ;; only the pypi tarballs contain the necessary metadata | |
10884 | (uri (pypi-uri "backports.functools_lru_cache" version)) | |
10885 | (sha256 | |
10886 | (base32 | |
10887 | "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4")))) | |
10888 | (build-system python-build-system) | |
10889 | (native-inputs | |
10890 | `(("python2-setuptools-scm" ,python2-setuptools-scm))) | |
10891 | (arguments | |
10892 | `(#:python ,python-2)) | |
10893 | (home-page "https://github.com/jaraco/backports.functools_lru_cache") | |
10894 | (synopsis "Backport of functools.lru_cache from Python 3.3") | |
10895 | (description "@code{python2-backports-functools-lru-cache} is a backport | |
10896 | of @code{functools.lru_cache} from python 3.3.") | |
10897 | (license license:expat))) | |
23db3fc6 AI |
10898 | |
10899 | (define-public python-configparser | |
10900 | (package | |
10901 | (name "python-configparser") | |
10902 | (version "3.5.0") | |
10903 | (source | |
10904 | (origin | |
10905 | (method url-fetch) | |
10906 | (uri (string-append | |
10907 | "https://bitbucket.org/ambv/configparser/get/" | |
10908 | version ".tar.bz2")) | |
10909 | (file-name (string-append name "-" version ".tar.gz")) | |
10910 | (sha256 | |
10911 | (base32 | |
10912 | "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa")))) | |
10913 | (build-system python-build-system) | |
10914 | (home-page "http://docs.python.org/py3k/library/configparser.html") | |
10915 | (synopsis "Backport of configparser from python 3.5") | |
10916 | (description "@code{python-configparser} is a backport of | |
10917 | @code{configparser} from Python 3.5 so that it can be used directly | |
10918 | in other versions.") | |
10919 | (license license:expat))) | |
10920 | ||
10921 | (define-public python2-configparser | |
10922 | (package-with-python2 python-configparser)) | |
61550ded | 10923 | |
eec21d4b MFM |
10924 | (define-public python-mando |
10925 | (package | |
50c84dd5 MB |
10926 | (name "python-mando") |
10927 | (version "0.6.4") | |
10928 | (source (origin | |
10929 | (method url-fetch) | |
10930 | (uri (pypi-uri "mando" version)) | |
10931 | (sha256 | |
10932 | (base32 | |
10933 | "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr")))) | |
10934 | (build-system python-build-system) | |
10935 | (propagated-inputs | |
10936 | `(("python-rst2ansi" ,python-rst2ansi) | |
10937 | ("python-six" ,python-six))) | |
10938 | (native-inputs | |
10939 | `(("python-pytest" ,python-pytest))) | |
10940 | (home-page "https://mando.readthedocs.org/") | |
10941 | (synopsis | |
10942 | "Wrapper around argparse, allowing creation of complete CLI applications") | |
10943 | (description | |
10944 | "This package is a wrapper around argparse, allowing you to write complete CLI | |
10945 | applications in seconds while maintaining all the flexibility.") | |
10946 | (license license:expat))) | |
eec21d4b MFM |
10947 | |
10948 | (define-public python2-mando | |
10949 | (package-with-python2 python-mando)) | |
b98d4ec0 | 10950 | |
16fe516e BS |
10951 | (define-public python-fudge |
10952 | (package | |
10953 | (name "python-fudge") | |
10954 | ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2 | |
10955 | ;; package, which is currently the only use of this package. | |
10956 | (version "0.9.6") | |
10957 | (source | |
10958 | (origin | |
10959 | (method url-fetch) | |
10960 | (uri (pypi-uri "fudge" version)) | |
10961 | (sha256 | |
10962 | (base32 | |
10963 | "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l")))) | |
10964 | (build-system python-build-system) | |
10965 | (arguments | |
10966 | `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package. | |
10967 | (home-page "https://github.com/fudge-py/fudge") | |
10968 | (synopsis "Replace real objects with fakes/mocks/stubs while testing") | |
10969 | (description | |
10970 | "Fudge is a Python module for using fake objects (mocks and stubs) to | |
10971 | test real ones. | |
10972 | ||
10973 | In readable Python code, you declare the methods available on your fake object | |
10974 | and how they should be called. Then you inject that into your application and | |
10975 | start testing. This declarative approach means you don’t have to record and | |
10976 | playback actions and you don’t have to inspect your fakes after running code. | |
10977 | If the fake object was used incorrectly then you’ll see an informative | |
10978 | exception message with a traceback that points to the culprit.") | |
10979 | (license license:expat))) | |
10980 | ||
10981 | (define-public python2-fudge | |
10982 | (package-with-python2 python-fudge)) | |
f3f8d159 | 10983 | |
7e16478f DM |
10984 | (define-public python-mwclient |
10985 | (package | |
10986 | (name "python-mwclient") | |
10987 | (version "0.8.4") | |
10988 | (source | |
10989 | (origin | |
10990 | (method url-fetch) | |
10991 | ;; The PyPI version wouldn't contain tests. | |
10992 | (uri (string-append "https://github.com/mwclient/mwclient/archive/" | |
10993 | "v" version ".tar.gz")) | |
10994 | (sha256 | |
10995 | (base32 | |
10996 | "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv")))) | |
10997 | (build-system python-build-system) | |
10998 | (propagated-inputs | |
10999 | `(("python-requests" ,python-requests) | |
11000 | ("python-requests-oauthlib" | |
11001 | ,python-requests-oauthlib) | |
11002 | ("python-six" ,python-six))) | |
11003 | (native-inputs | |
11004 | `(("python-mock" ,python-mock) | |
11005 | ("python-pytest" ,python-pytest) | |
11006 | ("python-pytest-pep8" ,python-pytest-pep8) | |
11007 | ("python-pytest-cache" ,python-pytest-cache) | |
11008 | ("python-pytest-cov" ,python-pytest-cov) | |
11009 | ("python-responses" ,python-responses))) | |
11010 | (home-page "https://github.com/btongminh/mwclient") | |
11011 | (synopsis "MediaWiki API client") | |
11012 | (description "This package provides a MediaWiki API client.") | |
11013 | (license license:expat))) | |
11014 | ||
11015 | (define-public python2-mwclient | |
11016 | (package-with-python2 python-mwclient)) | |
59a97288 | 11017 | |
75805449 JL |
11018 | (define-public python-utils |
11019 | (package | |
11020 | (name "python-utils") | |
11021 | (version "2.1.0") | |
11022 | (source (origin | |
11023 | (method url-fetch) | |
11024 | (uri (pypi-uri "python-utils" version)) | |
11025 | (sha256 | |
11026 | (base32 | |
11027 | "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p")))) | |
11028 | (build-system python-build-system) | |
11029 | (native-inputs | |
11030 | `(("pytest-runner" ,python-pytest-runner) | |
11031 | ("pytest" ,python-pytest) | |
11032 | ("six" ,python-six))) | |
11033 | (home-page "https://github.com/WoLpH/python-utils") | |
11034 | (synopsis "Convenient utilities not included with the standard Python install") | |
11035 | (description | |
11036 | "Python Utils is a collection of small Python functions and classes which | |
11037 | make common patterns shorter and easier.") | |
709a5a93 | 11038 | (license license:bsd-2))) |
4c066b72 | 11039 | |
75805449 JL |
11040 | (define-public python2-utils |
11041 | (package-with-python2 python-utils)) | |
709a5a93 | 11042 | |
4c066b72 JL |
11043 | (define-public python-sphinx-me |
11044 | (package | |
11045 | (name "python-sphinx-me") | |
11046 | (version "0.3") | |
11047 | (source | |
11048 | (origin | |
11049 | (method url-fetch) | |
11050 | (uri (pypi-uri "sphinx-me" version)) | |
11051 | (sha256 | |
11052 | (base32 | |
11053 | "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq")))) | |
11054 | (build-system python-build-system) | |
11055 | (home-page "https://github.com/stephenmcd/sphinx-me") | |
11056 | (synopsis "Create a Sphinx documentation shell") | |
11057 | (description | |
11058 | "Create a Sphinx documentation shell for your project and include the | |
11059 | README file as the documentation index. It handles extracting the required | |
11060 | meta data such as the project name, author and version from your project for | |
11061 | use in your Sphinx docs.") | |
11062 | (license license:bsd-2))) | |
11063 | ||
11064 | (define-public python2-sphinx-me | |
11065 | (package-with-python2 python-sphinx-me)) | |
03ded2fd | 11066 | |
186d4f8d JL |
11067 | (define-public python-diff-match-patch |
11068 | (package | |
11069 | (name "python-diff-match-patch") | |
11070 | (version "20121119") | |
11071 | (source | |
11072 | (origin | |
11073 | (method url-fetch) | |
11074 | (uri (pypi-uri "diff-match-patch" version)) | |
11075 | (sha256 | |
11076 | (base32 | |
11077 | "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx")))) | |
11078 | (build-system python-build-system) | |
11079 | (home-page "https://code.google.com/p/google-diff-match-patch") | |
11080 | (synopsis "Synchronize plain text") | |
11081 | (description "Diff Match and Patch libraries offer robust algorithms to | |
11082 | perform the operations required for synchronizing plain text.") | |
11083 | (license license:asl2.0))) | |
11084 | ||
11085 | (define-public python2-diff-match-patch | |
11086 | (package-with-python2 python-diff-match-patch)) | |
d15a4791 JL |
11087 | |
11088 | (define-public python-dirsync | |
11089 | (package | |
11090 | (name "python-dirsync") | |
11091 | (version "2.2.2") | |
11092 | (source | |
11093 | (origin | |
11094 | (method url-fetch) | |
11095 | (uri (pypi-uri "dirsync" version ".zip")) | |
11096 | (sha256 | |
11097 | (base32 | |
11098 | "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2")))) | |
11099 | (build-system python-build-system) | |
11100 | (native-inputs | |
11101 | `(("unzip" ,unzip))) | |
11102 | (propagated-inputs | |
11103 | `(("six" ,python-six))) | |
11104 | (home-page "https://bitbucket.org/tkhyn/dirsync") | |
11105 | (synopsis "Advanced directory tree synchronisation tool") | |
11106 | (description "Advanced directory tree synchronisation tool.") | |
11107 | (license license:expat))) | |
11108 | ||
11109 | (define-public python2-dirsync | |
11110 | (package-with-python2 python-dirsync)) | |
1b16f1ec | 11111 | |
a17ccbbb JL |
11112 | (define-public python-levenshtein |
11113 | (package | |
11114 | (name "python-levenshtein") | |
11115 | (version "0.12.0") | |
11116 | (source | |
11117 | (origin | |
11118 | (method url-fetch) | |
11119 | (uri (pypi-uri "python-Levenshtein" version)) | |
11120 | (sha256 | |
11121 | (base32 | |
11122 | "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3")))) | |
11123 | (build-system python-build-system) | |
11124 | (home-page "https://github.com/ztane/python-Levenshtein") | |
11125 | (synopsis "Fast computation of Levenshtein distance and string similarity") | |
11126 | (description | |
11127 | "The Levenshtein Python C extension module contains functions for fast computation of | |
11128 | @enumerate | |
11129 | @item Levenshtein (edit) distance, and edit operations | |
11130 | @item string similarity | |
11131 | @item approximate median strings, and generally string averaging | |
11132 | @item string sequence and set similarity | |
11133 | @end enumerate | |
11134 | It supports both normal and Unicode strings.") | |
11135 | (license license:gpl2+))) | |
11136 | ||
11137 | (define-public python2-levenshtein | |
11138 | (package-with-python2 python-levenshtein)) | |
38a370d2 JL |
11139 | |
11140 | (define-public python-scandir | |
11141 | (package | |
11142 | (name "python-scandir") | |
71a2d417 | 11143 | (version "1.7") |
38a370d2 JL |
11144 | (source |
11145 | (origin | |
11146 | (method url-fetch) | |
11147 | (uri (pypi-uri "scandir" version)) | |
11148 | (sha256 | |
71a2d417 | 11149 | (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj")))) |
38a370d2 | 11150 | (build-system python-build-system) |
cb723be5 MB |
11151 | (arguments |
11152 | `(#:phases (modify-phases %standard-phases | |
11153 | (replace 'check | |
11154 | (lambda _ | |
11155 | (invoke "python" "test/run_tests.py")))))) | |
38a370d2 JL |
11156 | (home-page "https://github.com/benhoyt/scandir") |
11157 | (synopsis "Directory iteration function") | |
11158 | (description | |
11159 | "Directory iteration function like os.listdir(), except that instead of | |
11160 | returning a list of bare filenames, it yields DirEntry objects that include | |
11161 | file type and stat information along with the name. Using scandir() increases | |
11162 | the speed of os.walk() by 2-20 times (depending on the platform and file | |
71a2d417 MB |
11163 | system) by avoiding unnecessary calls to os.stat() in most cases. |
11164 | ||
11165 | This package is part of the Python standard library since version 3.5.") | |
38a370d2 JL |
11166 | (license license:bsd-3))) |
11167 | ||
11168 | (define-public python2-scandir | |
11169 | (package-with-python2 python-scandir)) | |
18c25460 JL |
11170 | |
11171 | (define-public python2-stemming | |
11172 | (package | |
11173 | (name "python2-stemming") | |
11174 | (version "1.0.1") | |
11175 | (source | |
11176 | (origin | |
11177 | (method url-fetch) | |
11178 | (uri (pypi-uri "stemming" version)) | |
11179 | (sha256 | |
11180 | (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr")))) | |
11181 | (build-system python-build-system) | |
11182 | (arguments | |
11183 | `(#:python ,python-2)) | |
11184 | (home-page "https://bitbucket.org/mchaput/stemming/overview") | |
11185 | (synopsis "Python implementations of various stemming algorithms") | |
11186 | (description | |
11187 | "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins | |
11188 | stemming algorithms for English. These implementations are straightforward and | |
11189 | efficient, unlike some Python versions of the same algorithms available on the | |
11190 | Web. This package is an extraction of the stemming code included in the Whoosh | |
11191 | search engine.") | |
11192 | (license license:public-domain))) | |
54153b85 JL |
11193 | |
11194 | (define-public python-factory-boy | |
11195 | (package | |
11196 | (name "python-factory-boy") | |
11197 | (version "2.8.1") | |
11198 | (source | |
11199 | (origin | |
11200 | (method url-fetch) | |
11201 | (uri (pypi-uri "factory_boy" version)) | |
11202 | (sha256 | |
11203 | (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56")))) | |
11204 | (build-system python-build-system) | |
11205 | (arguments | |
11206 | ;; Tests are not included in the tarball. | |
11207 | `(#:tests? #f)) | |
11208 | (propagated-inputs | |
11209 | `(("faker" ,python-faker))) | |
11210 | (home-page "https://github.com/benhoyt/scandir") | |
11211 | (synopsis "Versatile test fixtures replacement") | |
11212 | (description | |
11213 | "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl. | |
11214 | ||
11215 | As a fixtures replacement tool, it aims to replace static, hard to maintain | |
11216 | fixtures with easy-to-use factories for complex object. | |
11217 | ||
11218 | Instead of building an exhaustive test setup with every possible combination | |
11219 | of corner cases, factory_boy allows you to use objects customized for the | |
11220 | current test, while only declaring the test-specific fields") | |
11221 | (license license:expat))) | |
11222 | ||
11223 | (define-public python2-factory-boy | |
11224 | (package-with-python2 python-factory-boy)) | |
5f25fd69 JL |
11225 | |
11226 | (define-public python-translate-toolkit | |
11227 | (package | |
11228 | (name "python-translate-toolkit") | |
11229 | (version "2.1.0") | |
11230 | (source | |
11231 | (origin | |
11232 | (method url-fetch) | |
11233 | (uri (pypi-uri "translate-toolkit" version ".tar.bz2")) | |
11234 | (sha256 | |
11235 | (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq")))) | |
11236 | (build-system python-build-system) | |
11237 | (native-inputs | |
11238 | `(("python-pytest" ,python-pytest) | |
11239 | ("python-sphinx" ,python-sphinx))) | |
11240 | (propagated-inputs | |
11241 | `(("python-babel" ,python-babel) | |
11242 | ("python-beautifulsoup4" ,python-beautifulsoup4) | |
11243 | ("python-chardet" ,python-chardet) | |
11244 | ("python-diff-match-patch" ,python-diff-match-patch) | |
11245 | ("python-levenshtein" ,python-levenshtein) | |
11246 | ("python-lxml" ,python-lxml) | |
11247 | ("python-six" ,python-six) | |
11248 | ("python-vobject" ,python-vobject) | |
11249 | ("python-pyyaml" ,python-pyyaml))) | |
11250 | (arguments | |
11251 | ;; TODO: tests are not run, because they end with | |
11252 | ;; TypeError: parse() missing 2 required positional arguments: 'tree' and | |
11253 | ;; 'parse_funcs' | |
11254 | ;; during test setup. | |
11255 | `(#:tests? #f)) | |
11256 | (home-page "http://toolkit.translatehouse.org") | |
11257 | (synopsis "Tools and API for translation and localization engineering") | |
11258 | (description | |
11259 | "Tools and API for translation and localization engineering. It contains | |
11260 | several utilities, as well as an API for building localization tools.") | |
11261 | (license license:gpl2+))) | |
11262 | ||
11263 | (define-public python2-translate-toolkit | |
11264 | (package-with-python2 python-translate-toolkit)) | |
3b08d1a6 | 11265 | |
c0f5b802 LF |
11266 | (define-public python-packaging |
11267 | (package | |
11268 | (name "python-packaging") | |
11269 | (version "16.8") | |
11270 | (source | |
11271 | (origin | |
11272 | (method url-fetch) | |
11273 | (uri (pypi-uri "packaging" version)) | |
11274 | (sha256 | |
11275 | (base32 | |
11276 | "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x")))) | |
11277 | (build-system python-build-system) | |
11278 | (native-inputs | |
11279 | `(("python-pretend" ,python-pretend) | |
11280 | ("python-pytest" ,python-pytest))) | |
11281 | (propagated-inputs | |
11282 | `(("python-pyparsing" ,python-pyparsing) | |
11283 | ("python-six" ,python-six))) | |
11284 | (home-page "https://github.com/pypa/packaging") | |
11285 | (synopsis "Core utilities for Python packages") | |
11286 | (description "Packaging is a Python module for dealing with Python packages. | |
11287 | It offers an interface for working with package versions, names, and dependency | |
11288 | information.") | |
11289 | ;; From 'LICENSE': This software is made available under the terms of | |
11290 | ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD. | |
11291 | ;; Contributions to this software is made under the terms of *both* these | |
11292 | ;; licenses. | |
11293 | (license (list license:asl2.0 license:bsd-2)))) | |
11294 | ||
11295 | (define-public python2-packaging | |
11296 | (package-with-python2 python-packaging)) | |
ad2ef260 | 11297 | |
ecca63b6 AP |
11298 | (define-public python-relatorio |
11299 | (package | |
11300 | (name "python-relatorio") | |
edb09c53 | 11301 | (version "0.8.0") |
ecca63b6 AP |
11302 | (source |
11303 | (origin | |
11304 | (method url-fetch) | |
11305 | (uri (pypi-uri "relatorio" version)) | |
11306 | (sha256 | |
11307 | (base32 | |
edb09c53 | 11308 | "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx")))) |
ecca63b6 AP |
11309 | (build-system python-build-system) |
11310 | (propagated-inputs | |
11311 | `(("python-lxml" ,python-lxml) | |
11312 | ("python-genshi" ,python-genshi))) | |
edb09c53 AP |
11313 | (native-inputs |
11314 | `(("python-magic" ,python-magic))) | |
ecca63b6 AP |
11315 | (home-page "https://relatorio.tryton.org/") |
11316 | (synopsis "Templating library able to output ODT and PDF files") | |
11317 | (description "Relatorio is a templating library which provides a way to | |
11318 | easily output ODT, ODS, PNG, SVG and several other kinds of files. Support | |
11319 | for more filetypes can be easily added by creating plugins for them.") | |
11320 | (license license:gpl3+))) | |
11321 | ||
11322 | (define-public python2-relatorio | |
11323 | (package-with-python2 python-relatorio)) | |
65e7d52a MFM |
11324 | |
11325 | (define-public python-radon | |
11326 | (package | |
11327 | (name "python-radon") | |
5861f9c9 | 11328 | (version "2.2.0") |
65e7d52a MFM |
11329 | (source |
11330 | (origin | |
11331 | (method url-fetch) | |
11332 | (uri (pypi-uri "radon" version)) | |
11333 | (sha256 | |
11334 | (base32 | |
5861f9c9 | 11335 | "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym")))) |
65e7d52a | 11336 | (build-system python-build-system) |
5861f9c9 MB |
11337 | (arguments |
11338 | `(#:phases (modify-phases %standard-phases | |
11339 | (replace 'check | |
11340 | (lambda _ | |
11341 | (invoke "python" "radon/tests/run.py")))))) | |
65e7d52a MFM |
11342 | (propagated-inputs |
11343 | `(("python-colorama" ,python-colorama) | |
11344 | ("python-flake8-polyfill" ,python-flake8-polyfill) | |
5861f9c9 | 11345 | ("python-mando" ,python-mando))) |
65e7d52a | 11346 | (native-inputs |
5861f9c9 MB |
11347 | `(("python-pytest" ,python-pytest) |
11348 | ("python-pytest-mock" ,python-pytest-mock))) | |
65e7d52a MFM |
11349 | (home-page "https://radon.readthedocs.org/") |
11350 | (synopsis "Code Metrics in Python") | |
11351 | (description "Radon is a Python tool which computes various code metrics. | |
11352 | Supported metrics are: | |
11353 | @itemize @bullet | |
11354 | @item raw metrics: SLOC, comment lines, blank lines, &c. | |
11355 | @item Cyclomatic Complexity (i.e. McCabe’s Complexity) | |
11356 | @item Halstead metrics (all of them) | |
11357 | @item the Maintainability Index (a Visual Studio metric) | |
11358 | @end itemize") | |
11359 | (license license:expat))) | |
11360 | ||
11361 | (define-public python2-radon | |
11362 | (package-with-python2 python-radon)) | |
50d586f6 MFM |
11363 | |
11364 | (define-public python-sure | |
11365 | (package | |
11366 | (name "python-sure") | |
11367 | (version "1.4.6") | |
11368 | (source | |
11369 | (origin | |
11370 | (method url-fetch) | |
11371 | (uri (pypi-uri "sure" version)) | |
11372 | (sha256 | |
11373 | (base32 | |
11374 | "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z")))) | |
11375 | (build-system python-build-system) | |
11376 | (propagated-inputs | |
11377 | `(("python-mock" ,python-mock) | |
11378 | ("python-six" ,python-six))) | |
11379 | (native-inputs | |
11380 | `(("python-nose" ,python-nose))) | |
11381 | (home-page "https://github.com/gabrielfalcao/sure") | |
11382 | (synopsis "Automated testing library in python for python") | |
11383 | (description | |
11384 | "Sure is a python library that leverages a DSL for writing assertions. | |
11385 | Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.") | |
11386 | (license license:gpl3+))) | |
11387 | ||
11388 | (define-public python2-sure | |
11389 | (package-with-python2 python-sure)) | |
a0ffc701 MFM |
11390 | |
11391 | (define-public python2-couleur | |
11392 | ;; This package does not seem to support python3 at all, hence, | |
11393 | ;; only the python2 variant definition is provided. | |
11394 | (package | |
11395 | (name "python2-couleur") | |
11396 | (version "0.6.2") | |
11397 | (source | |
11398 | (origin | |
11399 | (method url-fetch) | |
11400 | (uri (pypi-uri "couleur" version)) | |
11401 | (sha256 | |
11402 | (base32 | |
11403 | "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1")))) | |
11404 | (build-system python-build-system) | |
11405 | (arguments | |
11406 | `(#:python ,python-2)) | |
11407 | (home-page "https://github.com/gabrielfalcao/couleur") | |
11408 | (synopsis | |
11409 | "ANSI terminal tool for python, colored shell and other handy fancy features") | |
11410 | (description | |
11411 | "@code{Couleur} provides python programs a way to use the ANSI features in a unix | |
11412 | terminal such as coloured output in the shell, overwriting output, indentation, etc.") | |
11413 | ;; README.md says ASL2.0, but all source code headers are LGPL3+. | |
11414 | ;; https://github.com/gabrielfalcao/couleur/issues/11 | |
11415 | (license license:lgpl3+))) | |
511b47de MFM |
11416 | |
11417 | (define-public python-misaka | |
11418 | (package | |
11419 | (name "python-misaka") | |
11420 | (version "2.1.0") | |
11421 | (source | |
11422 | (origin | |
11423 | (method url-fetch) | |
11424 | (uri (pypi-uri "misaka" version)) | |
11425 | (sha256 | |
11426 | (base32 | |
11427 | "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7")))) | |
11428 | (build-system python-build-system) | |
11429 | (arguments | |
11430 | `(;; Line 37 of setup.py calls self.run_command('develop') | |
11431 | ;; in the 'check' phase. This command seems to be trying | |
11432 | ;; to write to | |
11433 | ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/ | |
11434 | ;; for which it does not have the permission to write. | |
11435 | #:tests? #f)) | |
11436 | (propagated-inputs | |
11437 | `(("python-cffi" ,python-cffi))) | |
11438 | (home-page "https://github.com/FSX/misaka") | |
11439 | (synopsis "Python binding for Hoedown") | |
11440 | (description | |
11441 | "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing | |
11442 | library written in C. It features a fast HTML renderer and functionality to make custom | |
11443 | renderers (e.g. man pages or LaTeX).") | |
11444 | (license license:expat))) | |
11445 | ||
11446 | (define-public python2-misaka | |
11447 | (package-with-python2 python-misaka)) | |
5786b47c MFM |
11448 | |
11449 | (define-public python2-steadymark | |
11450 | ;; This is forced into being a python2 only variant | |
11451 | ;; due to its dependence on couleur that has no support | |
11452 | ;; for python3 | |
11453 | (package | |
11454 | (name "python2-steadymark") | |
11455 | (version "0.7.3") | |
11456 | (source | |
11457 | (origin | |
11458 | (method url-fetch) | |
11459 | (uri (pypi-uri "steadymark" version)) | |
11460 | (sha256 | |
11461 | (base32 | |
11462 | "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v")))) | |
11463 | (build-system python-build-system) | |
11464 | (native-inputs | |
11465 | `(("python-couleur" ,python2-couleur) | |
11466 | ("python-sure" ,python2-sure) | |
11467 | ("python-misaka" ,python2-misaka))) | |
11468 | (arguments | |
11469 | `(#:python ,python-2 | |
11470 | #:phases | |
11471 | (modify-phases %standard-phases | |
11472 | (add-before 'build 'patch-setup-py | |
11473 | (lambda _ | |
11474 | ;; Update requirements from dependency==version | |
11475 | ;; to dependency>=version | |
11476 | (substitute* "setup.py" | |
11477 | (("==") ">=")) | |
11478 | #t))))) | |
11479 | (home-page "https://github.com/gabrielfalcao/steadymark") | |
11480 | (synopsis "Markdown-based test runner for python") | |
11481 | (description | |
11482 | "@code{Steadymark} allows documentation to be written in github-flavoured | |
11483 | markdown. The documentation may contain snippets of code surrounded by python | |
11484 | code blocks and @code{Steadymark} will find these snippets and run them, making | |
11485 | sure that there are no old malfunctional examples in the documentation examples.") | |
11486 | (license license:expat))) | |
7e488f99 | 11487 | |
1e92287d DM |
11488 | (define-public python-jsonpointer |
11489 | (package | |
11490 | (name "python-jsonpointer") | |
11491 | (version "1.10") | |
11492 | (source | |
11493 | (origin | |
11494 | (method url-fetch) | |
11495 | (uri (pypi-uri "jsonpointer" version)) | |
11496 | (sha256 | |
11497 | (base32 | |
11498 | "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz")))) | |
11499 | (build-system python-build-system) | |
11500 | (home-page "https://github.com/stefankoegl/python-json-pointer") | |
11501 | (synopsis "Identify specific nodes in a JSON document") | |
11502 | (description "@code{jsonpointer} allows you to access specific nodes | |
11503 | by path in a JSON document (see RFC 6901).") | |
11504 | (license license:bsd-3))) | |
11505 | ||
11506 | (define-public python2-jsonpointer | |
11507 | (package-with-python2 python-jsonpointer)) | |
7d88093f | 11508 | |
841e5908 OP |
11509 | (define-public python-jsonpatch |
11510 | (package | |
11511 | (name "python-jsonpatch") | |
11512 | (version "1.16") | |
11513 | (source | |
11514 | (origin | |
11515 | (method url-fetch) | |
11516 | ;; pypi version lacks tests.js | |
11517 | (uri (string-append "https://github.com/stefankoegl/python-json-patch/" | |
11518 | "archive/v" version ".tar.gz")) | |
11519 | (file-name (string-append name "-" version ".tar.gz")) | |
11520 | (sha256 | |
11521 | (base32 | |
11522 | "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5")))) | |
11523 | (build-system python-build-system) | |
11524 | (native-inputs | |
11525 | `(("python-jsonpointer" ,python-jsonpointer))) | |
11526 | (home-page "https://github.com/stefankoegl/python-json-patch") | |
11527 | (synopsis "Applying JSON Patches in Python 2.6+ and 3.x") | |
11528 | (description "@code{jsonpatch} is a library and program that allows | |
11529 | applying JSON Patches according to RFC 6902.") | |
11530 | (license license:bsd-3))) | |
11531 | ||
11532 | (define-public python2-jsonpatch | |
11533 | (package-with-python2 python-jsonpatch)) | |
11534 | ||
11535 | (define-public python-jsonpatch-0.4 | |
11536 | (package (inherit python-jsonpatch) | |
11537 | (name "python-jsonpatch") | |
11538 | (version "0.4") | |
11539 | (source | |
11540 | (origin | |
11541 | (method url-fetch) | |
11542 | (uri (string-append "https://github.com/stefankoegl/python-json-patch/" | |
11543 | "archive/v" version ".tar.gz")) | |
11544 | (file-name (string-append name "-" version ".tar.gz")) | |
11545 | (sha256 | |
11546 | (base32 | |
11547 | "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d")))))) | |
11548 | ||
11549 | (define-public python2-jsonpatch-0.4 | |
11550 | (package-with-python2 python-jsonpatch-0.4)) | |
11551 | ||
3e3302ac MB |
11552 | (define-public python-rfc3986 |
11553 | (package | |
11554 | (name "python-rfc3986") | |
11555 | (version "1.1.0") | |
11556 | (source (origin | |
11557 | (method url-fetch) | |
11558 | (uri (pypi-uri "rfc3986" version)) | |
11559 | (sha256 | |
11560 | (base32 | |
11561 | "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44")))) | |
11562 | (build-system python-build-system) | |
11563 | (arguments | |
11564 | `(#:modules ((guix build utils) | |
11565 | (guix build python-build-system) | |
11566 | (ice-9 ftw) | |
11567 | (srfi srfi-1) | |
11568 | (srfi srfi-26)) | |
11569 | #:phases | |
11570 | (modify-phases %standard-phases | |
11571 | (replace 'check | |
11572 | (lambda _ | |
11573 | (let ((cwd (getcwd))) | |
11574 | (setenv "PYTHONPATH" | |
11575 | (string-append cwd "/build/" | |
11576 | (find (cut string-prefix? "lib" <>) | |
11577 | (scandir (string-append cwd "/build"))) | |
11578 | ":" | |
11579 | (getenv "PYTHONPATH"))) | |
11580 | (invoke "pytest" "-v"))))))) | |
11581 | (native-inputs | |
11582 | `(("python-pytest" ,python-pytest))) | |
11583 | (home-page "https://rfc3986.readthedocs.io/") | |
11584 | (synopsis "Parse and validate URI references") | |
11585 | (description | |
11586 | "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including | |
11587 | validation and authority parsing. This module also supports RFC@tie{}6874 | |
11588 | which adds support for zone identifiers to IPv6 addresses.") | |
11589 | (license license:asl2.0))) | |
11590 | ||
11591 | (define-public python2-rfc3986 | |
11592 | (package-with-python2 python-rfc3986)) | |
11593 | ||
7d88093f DM |
11594 | (define-public python-rfc3987 |
11595 | (package | |
11596 | (name "python-rfc3987") | |
11597 | (version "1.3.7") | |
11598 | (source | |
11599 | (origin | |
11600 | (method url-fetch) | |
11601 | (uri (pypi-uri "rfc3987" version)) | |
11602 | (sha256 | |
11603 | (base32 | |
11604 | "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi")))) | |
11605 | (build-system python-build-system) | |
9be5ecdf | 11606 | (home-page "https://pypi.python.org/pypi/rfc3987") |
7d88093f DM |
11607 | (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)") |
11608 | (description "@code{rfc3987} provides routines for parsing and | |
11609 | validation of URIs (see RFC 3986) and IRIs (see RFC 3987).") | |
11610 | (license license:gpl3+))) | |
11611 | ||
11612 | (define-public python2-rfc3987 | |
11613 | (package-with-python2 python-rfc3987)) | |
0960bf8b DM |
11614 | |
11615 | (define-public python-validate-email | |
11616 | (package | |
11617 | (name "python-validate-email") | |
11618 | (version "1.3") | |
11619 | (source | |
11620 | (origin | |
11621 | (method url-fetch) | |
11622 | (uri (pypi-uri "validate_email" version)) | |
11623 | (sha256 | |
11624 | (base32 | |
11625 | "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq")))) | |
11626 | (build-system python-build-system) | |
9be5ecdf | 11627 | (home-page "https://github.com/syrusakbary/validate_email") |
0960bf8b DM |
11628 | (synopsis "Verifies if an email address is valid and really exists") |
11629 | (description "@code{validate_email} can be used to verify if an email | |
11630 | address is valid and really exists.") | |
11631 | (license license:lgpl3+))) | |
11632 | ||
11633 | (define-public python2-validate-email | |
11634 | (package-with-python2 python-validate-email)) | |
620b59ea DM |
11635 | |
11636 | (define-public python-flex | |
11637 | (package | |
11638 | (name "python-flex") | |
11639 | (version "6.10.0") | |
11640 | (source | |
11641 | (origin | |
11642 | (method url-fetch) | |
11643 | (uri (pypi-uri "flex" version)) | |
11644 | (sha256 | |
11645 | (base32 | |
11646 | "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk")))) | |
11647 | (build-system python-build-system) | |
11648 | (propagated-inputs | |
11649 | `(("python-click" ,python-click) | |
11650 | ("python-iso8601" ,python-iso8601) | |
11651 | ("python-jsonpointer" ,python-jsonpointer) | |
11652 | ("python-pyyaml" ,python-pyyaml) | |
11653 | ("python-requests" ,python-requests) | |
11654 | ("python-rfc3987" ,python-rfc3987) | |
11655 | ("python-six" ,python-six) | |
11656 | ("python-validate-email" ,python-validate-email))) | |
11657 | (home-page "https://github.com/pipermerriam/flex") | |
11658 | (synopsis "Validates Swagger schemata") | |
11659 | (description "@code{flex} can be used to validate Swagger schemata.") | |
11660 | (license license:bsd-3))) | |
11661 | ||
11662 | (define-public python2-flex | |
11663 | (package-with-python2 python-flex)) | |
235bc01b DM |
11664 | |
11665 | (define-public python-marshmallow | |
11666 | (package | |
11667 | (name "python-marshmallow") | |
58f3d459 | 11668 | (version "3.0.0b3") |
235bc01b DM |
11669 | (source |
11670 | (origin | |
11671 | (method url-fetch) | |
11672 | (uri (pypi-uri "marshmallow" version)) | |
11673 | (sha256 | |
11674 | (base32 | |
58f3d459 | 11675 | "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd")))) |
235bc01b DM |
11676 | (build-system python-build-system) |
11677 | (propagated-inputs | |
11678 | `(("python-dateutil" ,python-dateutil) | |
11679 | ("python-simplejson" ,python-simplejson))) | |
11680 | (native-inputs | |
928da609 | 11681 | `(("python-pytest" ,python-pytest) |
235bc01b DM |
11682 | ("python-pytz" ,python-pytz))) |
11683 | (home-page "https://github.com/marshmallow-code/marshmallow") | |
11684 | (synopsis "Convert complex datatypes to and from native | |
11685 | Python datatypes.") | |
11686 | (description "@code{marshmallow} provides a library for converting | |
11687 | complex datatypes to and from native Python datatypes.") | |
11688 | (license license:expat))) | |
11689 | ||
11690 | (define-public python2-marshmallow | |
11691 | (package-with-python2 python-marshmallow)) | |
d270df8d | 11692 | |
635b3636 DM |
11693 | (define-public python-apispec |
11694 | (package | |
11695 | (name "python-apispec") | |
a9769a29 | 11696 | (version "0.25.3") |
635b3636 DM |
11697 | (source |
11698 | (origin | |
11699 | (method url-fetch) | |
11700 | (uri (pypi-uri "apispec" version)) | |
11701 | (sha256 | |
11702 | (base32 | |
a9769a29 | 11703 | "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9")))) |
635b3636 DM |
11704 | (build-system python-build-system) |
11705 | (propagated-inputs | |
11706 | `(("python-pyyaml" ,python-pyyaml))) | |
11707 | (native-inputs | |
928da609 | 11708 | `(("python-pytest" ,python-pytest) |
635b3636 DM |
11709 | ("python-flask" ,python-flask) |
11710 | ("python-marshmallow" ,python-marshmallow) | |
11711 | ("python-tornado" ,python-tornado) | |
11712 | ("python-bottle" ,python-bottle) | |
11713 | ("python-mock" ,python-mock))) | |
11714 | (home-page "https://github.com/marshmallow-code/apispec") | |
11715 | (synopsis "Swagger 2.0 API specification generator") | |
11716 | (description "@code{python-apispec} is a pluggable API specification | |
11717 | generator. Currently supports the OpenAPI specification (f.k.a. | |
11718 | Swagger 2.0).") | |
11719 | (license license:expat))) | |
11720 | ||
11721 | (define-public python2-apispec | |
11722 | (package-with-python2 python-apispec)) | |
543c5f3f DM |
11723 | |
11724 | (define-public python-flasgger | |
11725 | (package | |
11726 | (name "python-flasgger") | |
11727 | (version "0.6.3") | |
11728 | (source | |
11729 | (origin | |
11730 | (method url-fetch) | |
11731 | (uri (string-append "https://github.com/rochacbruno/flasgger/archive/" | |
11732 | version ".tar.gz")) | |
11733 | (file-name (string-append name "-" version ".tar.gz")) | |
11734 | (sha256 | |
11735 | (base32 | |
11736 | "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay")))) | |
11737 | (build-system python-build-system) | |
11738 | (arguments | |
11739 | `(#:phases | |
11740 | (modify-phases %standard-phases | |
11741 | (replace 'check | |
11742 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
11743 | (substitute* "Makefile" | |
11744 | (("flake8 flasgger --ignore=F403") | |
11745 | "flake8 flasgger --ignore=E731,F403")) | |
11746 | (setenv "PYTHONPATH" (string-append (getcwd) | |
11747 | ":" | |
11748 | (getenv "PYTHONPATH"))) | |
11749 | (zero? (system* "py.test"))))))) | |
11750 | (propagated-inputs | |
11751 | `(("python-flask" ,python-flask) | |
11752 | ("python-pyyaml" ,python-pyyaml) | |
11753 | ("python-jsonschema" ,python-jsonschema) | |
11754 | ("python-mistune" ,python-mistune) | |
11755 | ("python-six" ,python-six))) | |
11756 | (native-inputs | |
11757 | `(("python-decorator" ,python-decorator) | |
11758 | ("python-flake8" ,python-flake8) | |
11759 | ("python-flask-restful" ,python-flask-restful) | |
11760 | ("python-flex" ,python-flex) | |
928da609 | 11761 | ("python-pytest" ,python-pytest) |
543c5f3f DM |
11762 | ("python-pytest-cov" ,python-pytest-cov) |
11763 | ("python-marshmallow" ,python-marshmallow) | |
11764 | ("python-apispec" ,python-apispec))) | |
11765 | (home-page "https://github.com/rochacbruno/flasgger/") | |
11766 | (synopsis "Extract Swagger specs from your Flask project") | |
11767 | (description "@code{python-flasgger} allows extracting Swagger specs | |
11768 | from your Flask project. It is a fork of Flask-Swagger.") | |
11769 | (license license:expat))) | |
11770 | ||
11771 | (define-public python2-flasgger | |
11772 | (package-with-python2 python-flasgger)) | |
4eadc8b9 DM |
11773 | |
11774 | (define-public python-swagger-spec-validator | |
11775 | (package | |
11776 | (name "python-swagger-spec-validator") | |
11777 | (version "2.1.0") | |
11778 | (source | |
11779 | (origin | |
11780 | (method url-fetch) | |
11781 | (uri (pypi-uri "swagger-spec-validator" version)) | |
11782 | (sha256 | |
11783 | (base32 | |
11784 | "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw")))) | |
11785 | (build-system python-build-system) | |
11786 | (propagated-inputs | |
11787 | `(("python-jsonschema" ,python-jsonschema) | |
11788 | ("python-six" ,python-six))) | |
11789 | (home-page | |
9be5ecdf | 11790 | "https://github.com/Yelp/swagger_spec_validator") |
4eadc8b9 DM |
11791 | (synopsis "Validation of Swagger specifications") |
11792 | (description "@code{swagger_spec_validator} provides a library for | |
11793 | validating Swagger API specifications.") | |
11794 | (license license:asl2.0))) | |
11795 | ||
11796 | (define-public python2-swagger-spec-validator | |
11797 | (package-with-python2 python-swagger-spec-validator)) | |
7ea498e5 DM |
11798 | |
11799 | (define-public python-apache-libcloud | |
11800 | (package | |
11801 | (name "python-apache-libcloud") | |
11802 | (version "2.0.0") | |
11803 | (source | |
11804 | (origin | |
11805 | (method url-fetch) | |
11806 | (uri (pypi-uri "apache-libcloud" version)) | |
11807 | (sha256 | |
11808 | (base32 | |
11809 | "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7")))) | |
11810 | (build-system python-build-system) | |
11811 | (arguments | |
11812 | `(#:phases | |
11813 | (modify-phases %standard-phases | |
11814 | (add-after 'unpack 'patch-ssh | |
11815 | (lambda* (#:key inputs #:allow-other-keys) | |
11816 | (substitute* "libcloud/compute/ssh.py" | |
11817 | (("'ssh'") (string-append "'" (assoc-ref inputs "openssh") | |
11818 | "/bin/ssh" "'"))) | |
11819 | #t)) | |
11820 | (add-after 'unpack 'patch-tests | |
11821 | (lambda _ | |
11822 | (substitute* "./libcloud/test/test_file_fixtures.py" | |
11823 | ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>. | |
11824 | (("def _ascii") "def _raw_data(self, method, url, body, headers): | |
11825 | return (httplib.OK, | |
11826 | \"1234abcd\", | |
11827 | {\"test\": \"value\"}, | |
11828 | httplib.responses[httplib.OK]) | |
11829 | def _ascii")) | |
11830 | (substitute* "libcloud/test/compute/test_ssh_client.py" | |
11831 | (("class ShellOutSSHClientTests") | |
11832 | "@unittest.skip(\"Guix container doesn't have ssh service\") | |
11833 | class ShellOutSSHClientTests") | |
11834 | ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>. | |
11835 | (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'") | |
11836 | (("'.xF0', '.x90', '.x8D', '.x88'") | |
11837 | "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'")) | |
11838 | #t))))) | |
11839 | (inputs | |
11840 | `(("openssh" ,openssh))) | |
11841 | (propagated-inputs | |
11842 | `(("python-paramiko" ,python-paramiko) | |
11843 | ("python-requests" ,python-requests))) | |
11844 | (native-inputs | |
11845 | `(("python-lockfile" ,python-lockfile) | |
11846 | ("python-mock" ,python-mock) | |
11847 | ("python-requests-mock" ,python-requests-mock))) | |
11848 | (home-page "https://libcloud.apache.org/") | |
11849 | (synopsis "Unified Cloud API") | |
11850 | (description "@code{libcloud} is a Python library for interacting with | |
11851 | many of the popular cloud service providers using a unified API.") | |
11852 | (license license:asl2.0))) | |
11853 | ||
11854 | (define-public python2-apache-libcloud | |
11855 | (package-with-python2 python-apache-libcloud)) | |
7fadeab4 DM |
11856 | |
11857 | (define-public python-smmap2 | |
11858 | (package | |
11859 | (name "python-smmap2") | |
11860 | (version "2.0.3") | |
11861 | (source | |
11862 | (origin | |
11863 | (method url-fetch) | |
11864 | (uri (pypi-uri "smmap2" version)) | |
11865 | (sha256 | |
11866 | (base32 | |
11867 | "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7")))) | |
11868 | (build-system python-build-system) | |
11869 | (native-inputs | |
11870 | `(("python-nosexcover" ,python-nosexcover))) | |
11871 | (home-page "https://github.com/Byron/smmap") | |
11872 | (synopsis "Python sliding window memory map manager") | |
11873 | (description "@code{smmap2} is a pure Python implementation of a sliding | |
11874 | window memory map manager.") | |
11875 | (license license:bsd-3))) | |
11876 | ||
11877 | (define-public python2-smmap2 | |
11878 | (package-with-python2 python-smmap2)) | |
fa3f5f47 RJ |
11879 | |
11880 | (define-public python-regex | |
11881 | (package | |
11882 | (name "python-regex") | |
11883 | (version "2017.06.07") | |
11884 | (source (origin | |
11885 | (method url-fetch) | |
11886 | (uri (pypi-uri "regex" version)) | |
11887 | (sha256 | |
11888 | (base32 | |
11889 | "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4")))) | |
11890 | (build-system python-build-system) | |
11891 | (home-page "https://bitbucket.org/mrabarnett/mrab-regex") | |
11892 | (synopsis "Alternative regular expression module") | |
11893 | (description "This regular expression implementation is backwards- | |
11894 | compatible with the standard @code{re} module, but offers additional | |
11895 | functionality like full case-folding for case-insensitive matches in Unicode.") | |
11896 | (license license:psfl))) | |
11897 | ||
11898 | (define-public python2-regex | |
11899 | (package-with-python2 python-regex)) | |
f817b4d9 RH |
11900 | |
11901 | (define-public python2-pyopengl | |
11902 | (package | |
11903 | (name "python2-pyopengl") | |
11904 | (version "3.1.0") | |
11905 | (source | |
11906 | (origin | |
11907 | (method url-fetch) | |
11908 | (uri (pypi-uri "PyOpenGL" version)) | |
11909 | (sha256 | |
11910 | (base32 | |
11911 | "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv")))) | |
11912 | (arguments | |
11913 | `(#:python ,python-2)) | |
11914 | (build-system python-build-system) | |
11915 | (home-page "http://pyopengl.sourceforge.net") | |
11916 | (synopsis "Standard OpenGL bindings for Python") | |
11917 | (description | |
11918 | "PyOpenGL is the most common cross platform Python binding to OpenGL and | |
11919 | related APIs. The binding is created using the standard @code{ctypes} | |
11920 | library.") | |
11921 | (license license:bsd-3))) | |
7efd98be | 11922 | |
97c26793 RH |
11923 | (define-public python2-pyopengl-accelerate |
11924 | (package | |
11925 | (inherit python2-pyopengl) | |
11926 | (name "python2-pyopengl-accelerate") | |
11927 | (version "3.1.0") | |
11928 | (source | |
11929 | (origin | |
11930 | (method url-fetch) | |
11931 | (uri (pypi-uri "PyOpenGL-accelerate" version)) | |
11932 | (sha256 | |
11933 | (base32 | |
11934 | "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj")))) | |
11935 | (synopsis "Acceleration code for PyOpenGL") | |
11936 | (description | |
11937 | "This is the Cython-coded accelerator module for PyOpenGL."))) | |
11938 | ||
7efd98be RH |
11939 | (define-public python-rencode |
11940 | (package | |
11941 | (name "python-rencode") | |
11942 | (version "1.0.3") | |
11943 | (source | |
11944 | (origin | |
11945 | (method url-fetch) | |
11946 | (uri (pypi-uri "rencode" version)) | |
11947 | (sha256 | |
11948 | (base32 | |
11949 | "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj")))) | |
11950 | (build-system python-build-system) | |
11951 | (native-inputs `(("pkg-config" ,pkg-config) | |
11952 | ("python-cython", python-cython))) | |
11953 | (home-page "https://github.com/aresch/rencode") | |
11954 | (synopsis "Serialization of heterogeneous data structures") | |
11955 | (description | |
11956 | "The @code{rencode} module is a data structure serialization library, | |
11957 | similar to @code{bencode} from the BitTorrent project. For complex, | |
11958 | heterogeneous data structures with many small elements, r-encoding stake up | |
11959 | significantly less space than b-encodings. This version of rencode is a | |
11960 | complete rewrite in Cython to attempt to increase the performance over the | |
11961 | pure Python module.") | |
11962 | (license license:bsd-3))) | |
11963 | ||
11964 | (define-public python2-rencode | |
11965 | (package-with-python2 python-rencode)) | |
9ea61b1c | 11966 | |
2038a48f MFM |
11967 | (define-public python-xenon |
11968 | (package | |
11969 | (name "python-xenon") | |
11970 | (version "0.5.1") | |
11971 | (source | |
11972 | (origin | |
11973 | (method url-fetch) | |
11974 | (uri (pypi-uri "xenon" version)) | |
11975 | (sha256 | |
11976 | (base32 | |
11977 | "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc")))) | |
11978 | (build-system python-build-system) | |
11979 | (native-inputs | |
11980 | `(("python-pyyaml" ,python-pyyaml) | |
11981 | ("python-radon" ,python-radon) | |
11982 | ("python-requests" ,python-requests) | |
11983 | ("python-flake8" ,python-flake8) | |
11984 | ("python-tox" ,python-tox))) | |
11985 | (arguments | |
11986 | `(#:phases | |
11987 | (modify-phases %standard-phases | |
11988 | (add-before 'build 'patch-test-requirements | |
11989 | (lambda* (#:key inputs #:allow-other-keys) | |
11990 | ;; Update requirements from dependency==version to | |
11991 | ;; dependency>=version. | |
11992 | (substitute* "requirements.txt" | |
11993 | (("==") ">=") | |
11994 | ((",<1.5.0") "")) | |
11995 | ;; Remove httpretty dependency for tests. | |
11996 | (substitute* "setup.py" | |
11997 | (("httpretty") "")) | |
11998 | #t))))) | |
11999 | (home-page "https://xenon.readthedocs.org/") | |
12000 | (synopsis "Monitor code metrics for Python on your CI server") | |
12001 | (description | |
12002 | "Xenon is a monitoring tool based on Radon. It monitors code complexity. | |
12003 | Ideally, @code{xenon} is run every time code is committed. Through command | |
12004 | line options, various thresholds can be set for the complexity of code. It | |
12005 | will fail (i.e. it will exit with a non-zero exit code) when any of these | |
12006 | requirements is not met.") | |
12007 | (license license:expat))) | |
12008 | ||
12009 | (define-public python2-xenon | |
12010 | (package-with-python2 python-xenon)) | |
12011 | ||
07e62ae1 CZ |
12012 | (define-public python-pysocks |
12013 | (package | |
12014 | (name "python-pysocks") | |
12015 | (version "1.6.7") | |
12016 | (source | |
12017 | (origin | |
12018 | (method url-fetch) | |
12019 | (uri (pypi-uri "PySocks" version)) | |
12020 | (sha256 | |
12021 | (base32 | |
12022 | "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh")))) | |
12023 | (build-system python-build-system) | |
12024 | (arguments `(#:tests? #f)) | |
12025 | (home-page "https://github.com/Anorov/PySocks") | |
12026 | (synopsis "SOCKS client module") | |
12027 | (description "@code{pysocks} is an updated and semi-actively maintained | |
12028 | version of @code{SocksiPy} with bug fixes and extra features.") | |
12029 | (license license:bsd-3))) | |
12030 | ||
12031 | (define-public python2-pysocks | |
12032 | (package-with-python2 python-pysocks)) | |
7a276cd9 | 12033 | |
ab7f51fa CR |
12034 | (define-public python-pydiff |
12035 | (package | |
12036 | (name "python-pydiff") | |
12037 | (version "0.2") | |
12038 | (source | |
12039 | (origin | |
12040 | (method url-fetch) | |
12041 | (uri (pypi-uri "pydiff" version)) | |
12042 | (sha256 | |
12043 | (base32 | |
12044 | "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44")))) | |
12045 | (build-system python-build-system) | |
12046 | (home-page "https://github.com/myint/pydiff") | |
12047 | (synopsis "Library to diff two Python files at the bytecode level") | |
12048 | (description | |
12049 | "@code{pydiff} makes it easy to look for actual code changes while | |
12050 | ignoring formatting changes.") | |
12051 | (license license:expat))) | |
12052 | ||
12053 | (define-public python2-pydiff | |
12054 | (package-with-python2 python-pydiff)) | |
8e6ceb47 | 12055 | |
b84ef9e2 CR |
12056 | (define-public python-tqdm |
12057 | (package | |
12058 | (name "python-tqdm") | |
3cbddeec | 12059 | (version "4.19.5") |
b84ef9e2 CR |
12060 | (source |
12061 | (origin | |
12062 | (method url-fetch) | |
12063 | (uri (pypi-uri "tqdm" version)) | |
12064 | (sha256 | |
12065 | (base32 | |
3cbddeec | 12066 | "0xvkffm77nqckk29xjy5fkqvig5b97vk7nzafp3cn36w4zqyccnz")))) |
b84ef9e2 CR |
12067 | (build-system python-build-system) |
12068 | (native-inputs | |
12069 | `(("python-flake8" ,python-flake8) | |
12070 | ("python-nose" ,python-nose) | |
3cbddeec | 12071 | ("python-coverage" ,python-coverage))) |
b84ef9e2 CR |
12072 | (home-page "https://github.com/tqdm/tqdm") |
12073 | (synopsis "Fast, extensible progress meter") | |
12074 | (description | |
12075 | "Make loops show a progress bar on the console by just wrapping any | |
12076 | iterable with @code{|tqdm(iterable)|}. Offers many options to define | |
12077 | design and layout.") | |
53f826cd MB |
12078 | (license (list license:mpl2.0 license:expat)) |
12079 | (properties `((python2-variant . ,(delay python2-tqdm)))))) | |
b84ef9e2 CR |
12080 | |
12081 | (define-public python2-tqdm | |
53f826cd MB |
12082 | (let ((tqdm (package-with-python2 |
12083 | (strip-python2-variant python-tqdm)))) | |
12084 | (package | |
12085 | (inherit tqdm) | |
12086 | (native-inputs | |
12087 | ;; FIXME: This should be propagated from python2-flake8 instead. | |
12088 | `(("python2-enum34" ,python2-enum34) | |
12089 | ,@(package-native-inputs tqdm)))))) | |
78f46e65 CR |
12090 | |
12091 | (define-public python-pkginfo | |
12092 | (package | |
12093 | (name "python-pkginfo") | |
12094 | (version "1.4.1") | |
12095 | (source | |
12096 | (origin | |
12097 | (method url-fetch) | |
12098 | (uri (pypi-uri "pkginfo" version)) | |
12099 | (sha256 | |
12100 | (base32 | |
12101 | "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv")))) | |
12102 | (build-system python-build-system) | |
12103 | (arguments | |
12104 | ;; The tests are broken upstream. | |
12105 | '(#:tests? #f)) | |
12106 | (home-page | |
12107 | "https://code.launchpad.net/~tseaver/pkginfo/trunk") | |
12108 | (synopsis | |
12109 | "Query metadatdata from sdists, bdists, and installed packages") | |
12110 | (description | |
12111 | "API to query the distutils metadata written in @file{PKG-INFO} inside a | |
12112 | source distriubtion (an sdist) or a binary distribution (e.g., created by | |
12113 | running bdist_egg). It can also query the EGG-INFO directory of an installed | |
12114 | distribution, and the *.egg-info stored in a \"development checkout\" (e.g, | |
12115 | created by running @code{python setup.py develop}).") | |
12116 | (license license:expat))) | |
12117 | ||
12118 | (define-public python2-pkginfo | |
12119 | (package-with-python2 python-pkginfo)) | |
3ef85c11 CR |
12120 | |
12121 | (define-public python-twine | |
12122 | (package | |
12123 | (name "python-twine") | |
12124 | (version "1.9.1") | |
12125 | (source | |
12126 | (origin | |
12127 | (method url-fetch) | |
12128 | (uri (pypi-uri "twine" version)) | |
12129 | (sha256 | |
12130 | (base32 | |
12131 | "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a")))) | |
12132 | (build-system python-build-system) | |
12133 | (propagated-inputs | |
12134 | `(("python-tqdm" ,python-tqdm) | |
12135 | ("python-pkginfo", python-pkginfo) | |
12136 | ("python-requests" ,python-requests) | |
12137 | ("python-requests-toolbelt" ,python-requests-toolbelt))) | |
12138 | (home-page "https://github.com/pypa/twine") | |
12139 | (synopsis "Collection of utilities for interacting with PyPI") | |
12140 | (description | |
12141 | "@code{twine} currently supports registering projects and uploading | |
12142 | distributions. It authenticates the user over HTTPS, allows them to pre-sign | |
12143 | their files and supports any packaging format (including wheels).") | |
12144 | (license license:asl2.0))) | |
12145 | ||
12146 | (define-public python2-twine | |
12147 | (package-with-python2 python-twine)) | |
ab28aa22 CR |
12148 | |
12149 | (define-public python-linecache2 | |
12150 | (package | |
12151 | (name "python-linecache2") | |
12152 | (version "1.0.0") | |
12153 | (source | |
12154 | (origin | |
12155 | (method url-fetch) | |
12156 | (uri (pypi-uri "linecache2" version)) | |
12157 | (sha256 | |
12158 | (base32 | |
12159 | "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb")))) | |
12160 | (build-system python-build-system) | |
12161 | (arguments | |
12162 | `(;; The tests depend on unittest2, and our version is a bit too old. | |
12163 | #:tests? #f)) | |
12164 | (native-inputs | |
3e6218b2 | 12165 | `(("python-pbr" ,python-pbr-minimal))) |
ab28aa22 CR |
12166 | (home-page |
12167 | "https://github.com/testing-cabal/linecache2") | |
12168 | (synopsis "Backports of the linecache module") | |
12169 | (description | |
12170 | "The linecache module allows one to get any line from any file, while | |
12171 | attempting to optimize internally, using a cache, the common case where many | |
12172 | lines are read from a single file.") | |
12173 | (license license:psfl))) | |
12174 | ||
12175 | (define-public python2-linecache2 | |
12176 | (package-with-python2 python-linecache2)) | |
1898eaa3 CR |
12177 | |
12178 | (define-public python-traceback2 | |
12179 | (package | |
12180 | (name "python-traceback2") | |
12181 | (version "1.4.0") | |
12182 | (source | |
12183 | (origin | |
12184 | (method url-fetch) | |
12185 | (uri (pypi-uri "traceback2" version)) | |
12186 | (sha256 | |
12187 | (base32 | |
12188 | "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05")))) | |
12189 | (build-system python-build-system) | |
12190 | (arguments | |
12191 | `(;; python-traceback2 and python-unittest2 depend on one another. | |
12192 | #:tests? #f)) | |
12193 | (native-inputs | |
3e6218b2 | 12194 | `(("python-pbr" ,python-pbr-minimal))) |
1898eaa3 CR |
12195 | (propagated-inputs |
12196 | `(("python-linecache2" ,python-linecache2))) | |
12197 | (home-page | |
12198 | "https://github.com/testing-cabal/traceback2") | |
12199 | (synopsis "Backports of the traceback module") | |
12200 | (description | |
12201 | "This module provides a standard interface to extract, format and print | |
12202 | stack traces of Python programs. It exactly mimics the behavior of the Python | |
12203 | interpreter when it prints a stack trace.") | |
12204 | (license license:psfl))) | |
12205 | ||
12206 | (define-public python2-traceback2 | |
12207 | (package-with-python2 python-traceback2)) | |
9d0866ce KM |
12208 | |
12209 | (define-public python-ratelimiter | |
12210 | (package | |
12211 | (name "python-ratelimiter") | |
12212 | (version "1.2.0") | |
12213 | (source | |
12214 | (origin | |
12215 | (method url-fetch) | |
12216 | (uri (pypi-uri "ratelimiter" version)) | |
12217 | (sha256 | |
12218 | (base32 | |
12219 | "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p")))) | |
12220 | (build-system python-build-system) | |
12221 | (arguments | |
12222 | '(#:tests? #f)) ; There are no tests in the pypi archive. | |
12223 | (home-page "https://github.com/RazerM/ratelimiter") | |
12224 | (synopsis "Simple rate limiting object") | |
12225 | (description | |
12226 | "The @code{ratelimiter} module ensures that an operation will not be | |
12227 | executed more than a given number of times during a given period.") | |
12228 | (license license:asl2.0))) | |
12229 | ||
12230 | (define-public python2-ratelimiter | |
12231 | (package-with-python2 python-ratelimiter)) | |
2e15906c BT |
12232 | |
12233 | (define-public python-dukpy | |
12234 | (package | |
12235 | (name "python-dukpy") | |
12236 | (version "0.3") | |
12237 | (source | |
12238 | (origin | |
12239 | (method url-fetch) | |
12240 | (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v" | |
12241 | version ".tar.gz")) | |
12242 | (sha256 | |
12243 | (base32 | |
12244 | "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c")))) | |
12245 | (build-system python-build-system) | |
12246 | (home-page "https://github.com/kovidgoyal/dukpy") | |
12247 | (synopsis "Run JavaScript in python") | |
12248 | (description | |
12249 | "dukpy is a JavaScript runtime environment for Python using the duktape | |
12250 | embeddable JavaScript engine.") | |
12251 | ;; Dukpy is licensed under MIT like the embedded duktape library, | |
12252 | ;; with 'errors.c' as GPL3. | |
12253 | (license (list license:expat license:gpl3)))) | |
12254 | ||
12255 | (define-public python2-dukpy | |
12256 | (package-with-python2 python-dukpy)) | |
ea0421bb CZ |
12257 | |
12258 | (define-public python-jsonrpclib-pelix | |
12259 | (package | |
12260 | (name "python-jsonrpclib-pelix") | |
12261 | (version "0.3.1") | |
12262 | (source | |
12263 | (origin | |
12264 | (method url-fetch) | |
12265 | (uri (pypi-uri "jsonrpclib-pelix" version)) | |
12266 | (sha256 | |
12267 | (base32 | |
12268 | "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl")))) | |
12269 | (build-system python-build-system) | |
12270 | (home-page "https://github.com/tcalmant/jsonrpclib/") | |
12271 | (synopsis "JSON-RPC 2.0 client library for Python") | |
12272 | (description | |
12273 | "This library implements the JSON-RPC v2.0 | |
12274 | specification (backwards-compatible) as a client library for Python. This | |
12275 | version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote | |
12276 | services.") | |
12277 | (license license:asl2.0))) | |
12278 | ||
12279 | (define-public python2-jsonrpclib-pelix | |
12280 | (package-with-python2 python-jsonrpclib-pelix)) | |
9b3c7520 | 12281 | |
12282 | (define-public python-setuptools-scm-git-archive | |
12283 | (package | |
12284 | (name "python-setuptools-scm-git-archive") | |
12285 | (version "1.0") | |
12286 | (source | |
12287 | (origin | |
12288 | (method url-fetch) | |
12289 | (uri (pypi-uri "setuptools_scm_git_archive" version)) | |
12290 | (sha256 | |
12291 | (base32 | |
12292 | "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj")))) | |
12293 | (build-system python-build-system) | |
12294 | (native-inputs | |
e09bb8a4 | 12295 | `(("python-pytest" ,python-pytest))) |
9b3c7520 | 12296 | (propagated-inputs |
12297 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
12298 | (home-page "https://github.com/Changaco/setuptools_scm_git_archive/") | |
12299 | (synopsis "Setuptools_scm plugin for git archives") | |
12300 | (description | |
12301 | "The setuptools_scm_git_archive package is a plugin to | |
12302 | setuptools_scm, which supports obtaining versions from git archives that | |
12303 | belong to tagged versions.") | |
12304 | (license license:expat))) | |
12305 | ||
12306 | (define-public python2-setuptools-scm-git-archive | |
12307 | (package-with-python2 python-setuptools-scm-git-archive)) | |
a39211fe | 12308 | |
12309 | (define-public python-pyclipper | |
12310 | (package | |
12311 | (name "python-pyclipper") | |
12312 | (version "1.0.6") | |
12313 | (source | |
12314 | (origin | |
12315 | (method url-fetch) | |
12316 | (uri (pypi-uri "pyclipper" version ".zip")) | |
12317 | (sha256 | |
12318 | (base32 | |
12319 | "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw")))) | |
12320 | (build-system python-build-system) | |
12321 | (arguments | |
12322 | `(#:tests? #f)); 8 Tests fail, 37 succeed | |
12323 | (propagated-inputs | |
12324 | `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive))) | |
12325 | (native-inputs | |
12326 | `(("unzip" ,unzip))) | |
12327 | (home-page "https://github.com/greginvm/pyclipper") | |
12328 | (synopsis "Wrapper for Angus Johnson's Clipper library") | |
12329 | (description | |
12330 | "Pyclipper is a Cython wrapper for the C++ translation of the | |
12331 | Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).") | |
12332 | (license license:expat))) | |
12333 | ||
12334 | (define-public python2-pyclipper | |
12335 | (package-with-python2 python-pyclipper)) | |
76040f71 | 12336 | |
12337 | (define-public python2-booleanoperations | |
12338 | (package | |
12339 | (name "python2-booleanoperations") | |
12340 | (version "0.7.1") | |
12341 | (source | |
12342 | (origin | |
12343 | (method url-fetch) | |
12344 | (uri (pypi-uri "booleanOperations" version ".zip")) | |
12345 | (sha256 | |
12346 | (base32 | |
12347 | "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn")))) | |
12348 | (build-system python-build-system) | |
12349 | (arguments | |
12350 | `(#:python ,python-2)) | |
12351 | (native-inputs | |
12352 | `(("unzip" ,unzip) | |
e09bb8a4 | 12353 | ("python2-pytest" ,python2-pytest) |
76040f71 | 12354 | ("python2-pytest-runner" ,python2-pytest-runner))) |
12355 | (propagated-inputs | |
12356 | `(("python-fonttools" ,python2-fonttools) | |
12357 | ("python-pyclipper" ,python2-pyclipper) | |
12358 | ("python-ufolib" ,python2-ufolib))) | |
12359 | (home-page "https://github.com/typemytype/booleanOperations") | |
12360 | (synopsis "Boolean operations on paths") | |
12361 | (description | |
12362 | "BooleanOperations provides a Python library that enables | |
12363 | boolean operations on paths.") | |
12364 | (license license:expat))) | |
c521c8f1 KH |
12365 | |
12366 | (define-public python-tempdir | |
12367 | (package | |
12368 | (name "python-tempdir") | |
12369 | (version "0.7.1") | |
12370 | (source | |
12371 | (origin | |
12372 | (method url-fetch) | |
12373 | (uri (pypi-uri "tempdir" version)) | |
12374 | (sha256 | |
12375 | (base32 | |
12376 | "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8")))) | |
12377 | (build-system python-build-system) | |
12378 | (home-page "https://pypi.org/project/tempdir/") | |
12379 | (arguments | |
12380 | ;; the package has no tests | |
12381 | '(#:tests? #f)) | |
12382 | (synopsis "Python library for managing temporary directories") | |
12383 | (description | |
12384 | "This library manages temporary directories that are automatically | |
12385 | deleted with all their contents when they are no longer needed. It is | |
12386 | particularly convenient for use in tests.") | |
12387 | (license license:expat))) | |
12388 | ||
12389 | (define-public python2-tempdir | |
12390 | (package-with-python2 python-tempdir)) | |
12391 | ||
de2032b9 KH |
12392 | (define-public python-activepapers |
12393 | (package | |
12394 | (name "python-activepapers") | |
12395 | (version "0.2.2") | |
12396 | (source | |
12397 | (origin | |
12398 | (method url-fetch) | |
12399 | (uri (pypi-uri "ActivePapers.Py" version)) | |
12400 | (sha256 | |
12401 | (base32 | |
12402 | "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8")))) | |
12403 | (build-system python-build-system) | |
12404 | (arguments | |
12405 | `(#:modules ((ice-9 ftw) | |
12406 | (srfi srfi-1) | |
12407 | (guix build utils) | |
12408 | (guix build python-build-system)) | |
12409 | ||
12410 | #:phases | |
12411 | (modify-phases %standard-phases | |
12412 | (add-after 'unpack 'delete-python2-code | |
12413 | (lambda _ | |
12414 | (for-each delete-file | |
12415 | '("lib/activepapers/builtins2.py" | |
12416 | "lib/activepapers/standardlib2.py" | |
12417 | "lib/activepapers/utility2.py")))) | |
12418 | (replace 'check | |
12419 | (lambda _ | |
12420 | ;; Deactivate the test cases that download files | |
12421 | (setenv "NO_NETWORK_ACCESS" "1") | |
12422 | ;; For some strange reason, some tests fail if nosetests runs all | |
12423 | ;; test modules in a single execution. They pass if each test | |
12424 | ;; module is run individually. | |
12425 | (for-each (lambda (filename) | |
12426 | (invoke "nosetests" | |
12427 | (string-append "tests/" filename))) | |
12428 | (scandir "tests" | |
12429 | (lambda (filename) | |
12430 | (string-suffix? ".py" filename))))))))) | |
12431 | (native-inputs | |
12432 | `(("python-tempdir" ,python-tempdir) | |
12433 | ("python-nose" ,python-nose))) | |
12434 | (propagated-inputs | |
12435 | `(("python-h5py" ,python-h5py))) | |
12436 | (home-page "http://www.activepapers.org/") | |
12437 | (synopsis "Executable papers for scientific computing") | |
12438 | (description | |
12439 | "ActivePapers is a tool for working with executable papers, which | |
12440 | combine data, code, and documentation in single-file packages, | |
12441 | suitable for publication as supplementary material or on repositories | |
12442 | such as figshare or Zenodo.") | |
12443 | (properties `((python2-variant . ,(delay python2-activepapers)))) | |
12444 | (license license:bsd-3))) | |
12445 | ||
12446 | (define-public python2-activepapers | |
12447 | (let ((base (package-with-python2 | |
12448 | (strip-python2-variant python-activepapers)))) | |
12449 | (package | |
12450 | (inherit base) | |
12451 | (arguments | |
12452 | (substitute-keyword-arguments (package-arguments base) | |
12453 | ((#:phases phases) | |
12454 | `(modify-phases ,phases | |
12455 | (delete 'delete-python2-code) | |
12456 | (add-after 'unpack 'delete-python3-code | |
12457 | (lambda _ | |
12458 | (for-each delete-file | |
12459 | '("lib/activepapers/builtins3.py" | |
12460 | "lib/activepapers/standardlib3.py" | |
12461 | "lib/activepapers/utility3.py"))))))))))) | |
467cfaa3 DM |
12462 | |
12463 | (define-public python-semver | |
12464 | (package | |
12465 | (name "python-semver") | |
12466 | (version "2.7.9") | |
12467 | (source | |
12468 | (origin | |
12469 | (method url-fetch) | |
12470 | (uri (pypi-uri "semver" version)) | |
12471 | (sha256 | |
12472 | (base32 | |
12473 | "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz")))) | |
12474 | (build-system python-build-system) | |
12475 | (arguments | |
12476 | `(#:phases | |
12477 | (modify-phases %standard-phases | |
12478 | (add-after 'unpack 'patch-test-requirements | |
12479 | (lambda _ | |
12480 | (substitute* "setup.py" | |
12481 | ;; Our Python is new enough. | |
12482 | (("'virtualenv<14\\.0\\.0'") "'virtualenv'")) | |
12483 | #t))))) | |
12484 | (native-inputs | |
12485 | `(("python-tox" ,python-tox) | |
12486 | ("python-virtualenv" ,python-virtualenv))) | |
12487 | (home-page "https://github.com/k-bx/python-semver") | |
12488 | (synopsis "Python helper for Semantic Versioning") | |
12489 | (description "This package provides a Python library for | |
12490 | @url{Semantic Versioning, http://semver.org/}.") | |
12491 | (license license:bsd-3))) | |
12492 | ||
12493 | (define-public python2-semver | |
12494 | (package-with-python2 python-semver)) | |
965ced9c KH |
12495 | |
12496 | (define-public python2-pyro | |
12497 | (package | |
12498 | (name "python2-pyro") | |
12499 | (version "3.16") | |
12500 | (source | |
12501 | (origin | |
12502 | (method url-fetch) | |
12503 | (uri (pypi-uri "Pyro" version)) | |
12504 | (file-name (string-append "Pyro-" version ".tar.gz")) | |
12505 | (sha256 | |
12506 | (base32 | |
12507 | "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v")))) | |
12508 | (build-system python-build-system) | |
12509 | (arguments | |
12510 | ;; Pyro is not compatible with Python 3 | |
12511 | `(#:python ,python-2 | |
12512 | ;; Pyro has no test cases for automatic execution | |
12513 | #:tests? #f)) | |
12514 | (home-page "http://pythonhosted.org/Pyro/") | |
12515 | (synopsis "Distributed object manager for Python") | |
12516 | (description "Pyro is a Distributed Object Technology system | |
12517 | written in Python that is designed to be easy to use. It resembles | |
12518 | Java's Remote Method Invocation (RMI). It has less similarity to CORBA, | |
12519 | which is a system and language independent Distributed Object Technology | |
12520 | and has much more to offer than Pyro or RMI. Pyro 3.x is no | |
12521 | longer maintained. New projects should use Pyro4 instead, which | |
12522 | is the new Pyro version that is actively developed.") | |
12523 | (license license:expat))) | |
49aebf96 KH |
12524 | |
12525 | (define-public python2-scientific | |
12526 | (package | |
12527 | (name "python2-scientific") | |
12528 | (version "2.9.4") | |
12529 | (source | |
12530 | (origin | |
12531 | (method url-fetch) | |
12532 | (uri (string-append "https://bitbucket.org/khinsen/" | |
12533 | "scientificpython/downloads/ScientificPython-" | |
12534 | version ".tar.gz")) | |
12535 | (file-name (string-append "ScientificPython-" version ".tar.gz")) | |
12536 | (sha256 | |
12537 | (base32 | |
12538 | "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3")))) | |
12539 | (build-system python-build-system) | |
12540 | (inputs | |
12541 | `(("netcdf" ,netcdf))) | |
12542 | (propagated-inputs | |
12543 | `(("python-numpy" ,python2-numpy-1.8) | |
12544 | ("python-pyro", python2-pyro))) | |
12545 | (arguments | |
12546 | ;; ScientificPython is not compatible with Python 3 | |
12547 | `(#:python ,python-2 | |
12548 | #:tests? #f ; No test suite | |
12549 | #:phases | |
12550 | (modify-phases %standard-phases | |
12551 | (replace 'build | |
12552 | (lambda* (#:key inputs #:allow-other-keys) | |
12553 | (zero? (system* "python" "setup.py" "build" | |
12554 | (string-append "--netcdf_prefix=" | |
12555 | (assoc-ref inputs "netcdf"))))))))) | |
12556 | (home-page "https://bitbucket.org/khinsen/scientificpython") | |
12557 | (synopsis "Python modules for scientific computing") | |
12558 | (description "ScientificPython is a collection of Python modules that are | |
12559 | useful for scientific computing. Most modules are rather general (Geometry, | |
12560 | physical units, automatic derivatives, ...) whereas others are more | |
12561 | domain-specific (e.g. netCDF and PDB support). The library is currently | |
12562 | not actively maintained and works only with Python 2 and NumPy < 1.9.") | |
12563 | (license license:cecill-c))) | |
42d6bffc KH |
12564 | |
12565 | (define-public python2-mmtk | |
12566 | (package | |
12567 | (name "python2-mmtk") | |
ce018d16 | 12568 | (version "2.7.11") |
42d6bffc KH |
12569 | (source |
12570 | (origin | |
12571 | (method url-fetch) | |
12572 | (uri (string-append "https://bitbucket.org/khinsen/" | |
12573 | "mmtk/downloads/MMTK-" version ".tar.gz")) | |
12574 | (file-name (string-append "MMTK-" version ".tar.gz")) | |
12575 | (sha256 | |
12576 | (base32 | |
ce018d16 | 12577 | "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862")))) |
42d6bffc KH |
12578 | (build-system python-build-system) |
12579 | (native-inputs | |
12580 | `(("netcdf" ,netcdf))) | |
12581 | (propagated-inputs | |
12582 | `(("python-scientific" ,python2-scientific) | |
12583 | ("python-tkinter" ,python-2 "tk"))) | |
12584 | (arguments | |
12585 | `(#:python ,python-2 | |
12586 | #:tests? #f | |
12587 | #:phases | |
12588 | (modify-phases %standard-phases | |
12589 | (add-before 'build 'includes-from-scientific | |
12590 | (lambda* (#:key inputs #:allow-other-keys) | |
12591 | (mkdir-p "Include/Scientific") | |
12592 | (copy-recursively | |
12593 | (string-append | |
12594 | (assoc-ref inputs "python-scientific") | |
12595 | "/include/python2.7/Scientific") | |
12596 | "Include/Scientific")))))) | |
12597 | (home-page "http://dirac.cnrs-orleans.fr/MMTK") | |
12598 | (synopsis "Python library for molecular simulation") | |
12599 | (description "MMTK is a library for molecular simulations with an emphasis | |
12600 | on biomolecules. It provides widely used methods such as Molecular Dynamics | |
12601 | and normal mode analysis, but also basic routines for implementing new methods | |
12602 | for simulation and analysis. The library is currently not actively maintained | |
12603 | and works only with Python 2 and NumPy < 1.9.") | |
12604 | (license license:cecill-c))) | |
09b9cf73 AP |
12605 | |
12606 | (define-public python-phonenumbers | |
12607 | (package | |
12608 | (name "python-phonenumbers") | |
12609 | (version "8.8.9") | |
12610 | (source | |
12611 | (origin | |
12612 | (method url-fetch) | |
12613 | (uri (pypi-uri "phonenumbers" version)) | |
12614 | (sha256 | |
12615 | (base32 | |
12616 | "1lhhxmx3hk0b5891nc0p82dl5bq2w9cqbawmh8j5zy587af2j6fq")))) | |
12617 | (build-system python-build-system) | |
12618 | (home-page | |
12619 | "https://github.com/daviddrysdale/python-phonenumbers") | |
12620 | (synopsis | |
12621 | "Python library for dealing with international phone numbers") | |
12622 | (description | |
12623 | "This package provides a Python port of Google's libphonenumber library.") | |
12624 | (license license:asl2.0))) | |
12625 | ||
12626 | (define-public python2-phonenumbers | |
12627 | (package-with-python2 python-phonenumbers)) | |
6055e88c FT |
12628 | |
12629 | (define-public python-yapf | |
12630 | (package | |
12631 | (name "python-yapf") | |
12632 | (version "0.20.1") | |
12633 | (source | |
12634 | (origin | |
12635 | (method url-fetch) | |
12636 | (uri (pypi-uri "yapf" version)) | |
12637 | (sha256 | |
12638 | (base32 | |
12639 | "0s7l6afzxvpx39kzd0lwshlaxw8m4fwh4iy0rlmav4vipr3g46dx")))) | |
12640 | (build-system python-build-system) | |
12641 | (home-page "https://github.com/google/yapf") | |
12642 | (synopsis "Formatter for Python code") | |
12643 | (description "YAPF is a formatter for Python code. It's based off of | |
12644 | @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm | |
12645 | takes the code and reformats it to the best formatting that conforms to the | |
12646 | style guide, even if the original code didn't violate the style guide.") | |
12647 | (license license:asl2.0))) | |
12648 | ||
12649 | (define-public python2-yapf | |
12650 | (package-with-python2 python-yapf)) | |
956ba99c EJ |
12651 | |
12652 | (define-public python-gyp | |
12653 | (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f") | |
12654 | (revision "0")) | |
12655 | (package | |
12656 | (name "python-gyp") | |
12657 | ;; Google does not release versions, | |
12658 | ;; based on second most recent commit date. | |
12659 | (version (git-version "0.0.0" revision commit)) | |
12660 | (source | |
12661 | (origin | |
12662 | ;; Google does not release tarballs, | |
12663 | ;; git checkout is needed. | |
12664 | (method git-fetch) | |
12665 | (uri (git-reference | |
12666 | (url "https://chromium.googlesource.com/external/gyp") | |
12667 | (commit commit))) | |
12668 | (file-name (git-file-name name version)) | |
12669 | (sha256 | |
12670 | (base32 | |
12671 | "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9")))) | |
12672 | (build-system python-build-system) | |
12673 | (home-page "https://gyp.gsrc.io/") | |
12674 | (synopsis "GYP is a Meta-Build system") | |
12675 | (description | |
12676 | "GYP builds build systems for large, cross platform applications. | |
12677 | It can be used to generate XCode projects, Visual Studio projects, Ninja build | |
12678 | files, and Makefiles.") | |
12679 | (license license:bsd-3)))) | |
12680 | ||
12681 | (define-public python2-gyp | |
12682 | (package-with-python2 python-gyp)) | |
89c57efd DM |
12683 | |
12684 | (define-public python-whatever | |
12685 | (package | |
12686 | (name "python-whatever") | |
12687 | (version "0.5") | |
12688 | (source | |
12689 | (origin | |
12690 | (method url-fetch) | |
12691 | (uri (string-append "https://github.com/Suor/whatever/archive/" version | |
12692 | ".tar.gz")) | |
12693 | (sha256 | |
12694 | (base32 | |
12695 | "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap")) | |
12696 | (file-name (string-append name "-" version ".tar.gz")))) | |
12697 | (build-system python-build-system) | |
12698 | (arguments | |
12699 | `(#:phases | |
12700 | (modify-phases %standard-phases | |
12701 | (replace 'check | |
12702 | (lambda _ | |
12703 | (invoke "py.test")))))) | |
12704 | (native-inputs | |
efe2a283 | 12705 | `(("python-pytest" ,python-pytest))) |
89c57efd DM |
12706 | (home-page "http://github.com/Suor/whatever") |
12707 | (synopsis "Make anonymous functions by partial application of operators") | |
12708 | (description "@code{whatever} provides an easy way to make anonymous | |
12709 | functions by partial application of operators.") | |
12710 | (license license:bsd-3))) | |
12711 | ||
12712 | (define-public python2-whatever | |
12713 | (package-with-python2 python-whatever)) | |
7e2dd00b DM |
12714 | |
12715 | (define-public python-funcy | |
12716 | (package | |
12717 | (name "python-funcy") | |
12718 | (version "1.10") | |
12719 | (source | |
12720 | (origin | |
12721 | (method url-fetch) | |
12722 | (uri (string-append "https://github.com/Suor/funcy/archive/" version | |
12723 | ".tar.gz")) | |
12724 | (sha256 | |
12725 | (base32 | |
12726 | "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz")) | |
12727 | (file-name (string-append name "-" version ".tar.gz")))) | |
12728 | (build-system python-build-system) | |
12729 | (arguments | |
12730 | `(#:phases | |
12731 | (modify-phases %standard-phases | |
12732 | (replace 'check | |
12733 | (lambda _ | |
12734 | (invoke "py.test")))))) | |
12735 | (native-inputs | |
efe2a283 | 12736 | `(("python-pytest" ,python-pytest) |
7e2dd00b DM |
12737 | ("python-whatever" ,python-whatever))) |
12738 | (home-page "http://github.com/Suor/funcy") | |
12739 | (synopsis "Functional tools") | |
12740 | (description "@code{funcy} is a library that provides functional tools. | |
12741 | Examples are: | |
12742 | @enumerate | |
12743 | @item merge - Merges collections of the same type | |
12744 | @item walk - Type-preserving map | |
12745 | @item select - Selects a part of a collection | |
12746 | @item take - Takes the first n items of a collection | |
12747 | @item first - Takes the first item of a collection | |
12748 | @item remove - Predicated-removes items of a collection | |
12749 | @item concat - Concatenates two collections | |
12750 | @item flatten - Flattens a collection with subcollections | |
12751 | @item distinct - Returns only distinct items | |
12752 | @item split - Predicated-splits a collection | |
12753 | @item split_at - Splits a collection at a given item | |
12754 | @item group_by - Groups items by group | |
12755 | @item pairwise - Pairs off adjacent items | |
12756 | @item partial - Partially-applies a function | |
12757 | @item curry - Curries a function | |
12758 | @item compose - Composes functions | |
12759 | @item complement - Complements a predicate | |
12760 | @item all_fn - \"all\" with predicate | |
12761 | @end enumerate") | |
12762 | (license license:bsd-3))) | |
12763 | ||
12764 | (define-public python2-funcy | |
12765 | (package-with-python2 python-funcy)) | |
4283653c KH |
12766 | |
12767 | (define-public python-isoweek | |
12768 | (package | |
12769 | (name "python-isoweek") | |
12770 | (version "1.3.3") | |
12771 | (source | |
12772 | (origin | |
12773 | (method url-fetch) | |
12774 | (uri (pypi-uri "isoweek" version)) | |
12775 | (sha256 | |
12776 | (base32 | |
12777 | "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk")))) | |
12778 | (build-system python-build-system) | |
12779 | (home-page "https://github.com/gisle/isoweek") | |
12780 | (synopsis "Objects representing a week") | |
12781 | (description "The @code{isoweek} module provide the class Week that | |
12782 | implements the week definition of ISO 8601. This standard also defines | |
12783 | a notation for identifying weeks; yyyyWww (where the W is a literal). | |
12784 | Week instances stringify to this form.") | |
12785 | (license license:bsd-3))) | |
12786 | ||
12787 | (define-public python2-isoweek | |
12788 | (package-with-python2 python-isoweek)) | |
8b2ad13b RW |
12789 | |
12790 | (define-public python-tokenize-rt | |
12791 | (package | |
12792 | (name "python-tokenize-rt") | |
12793 | (version "2.0.1") | |
12794 | (source | |
12795 | (origin | |
12796 | (method url-fetch) | |
12797 | (uri (pypi-uri "tokenize-rt" version)) | |
12798 | (sha256 | |
12799 | (base32 | |
12800 | "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw")))) | |
12801 | (build-system python-build-system) | |
12802 | (home-page "https://github.com/asottile/tokenize-rt") | |
12803 | (synopsis "Wrapper around the stdlib tokenize which roundtrips.") | |
12804 | (description | |
12805 | "This Python library is a wrapper around @code{tokenize} from the Python | |
12806 | standard library. It provides two additional tokens @code{ESCAPED_NL} and | |
12807 | @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens} | |
12808 | and @code{tokens_to_src} to roundtrip.") | |
12809 | (license license:expat))) | |
130d290e RW |
12810 | |
12811 | (define-public python-future-fstrings | |
12812 | (package | |
12813 | (name "python-future-fstrings") | |
12814 | (version "0.4.1") | |
12815 | (source | |
12816 | (origin | |
12817 | (method url-fetch) | |
12818 | (uri (pypi-uri "future_fstrings" version)) | |
12819 | (sha256 | |
12820 | (base32 | |
12821 | "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47")))) | |
12822 | (build-system python-build-system) | |
12823 | (propagated-inputs | |
12824 | `(("python-tokenize-rt" ,python-tokenize-rt))) | |
12825 | (home-page "https://github.com/asottile/future-fstrings") | |
12826 | (synopsis "Backport of fstrings to Python < 3.6") | |
12827 | (description | |
12828 | "This package provides a UTF-8 compatible encoding | |
12829 | @code{future_fstrings}, which performs source manipulation. It decodes the | |
12830 | source bytes using the UTF-8 encoding and then rewrites Python 3.6 style | |
12831 | @code{f} strings.") | |
12832 | (license license:expat))) | |
fc162dba RW |
12833 | |
12834 | (define-public python-typing | |
12835 | (package | |
12836 | (name "python-typing") | |
12837 | (version "3.6.4") | |
12838 | (source | |
12839 | (origin | |
12840 | (method url-fetch) | |
12841 | (uri (pypi-uri "typing" version)) | |
12842 | (sha256 | |
12843 | (base32 | |
12844 | "1wmk9nkh30n37cbrqwkbggmj2390lhrlagjkd0ikm02l88saj06l")))) | |
12845 | (build-system python-build-system) | |
12846 | (home-page "https://docs.python.org/3/library/typing.html") | |
12847 | (synopsis "Type hints for Python") | |
12848 | (description "This is a backport of the standard library @code{typing} | |
12849 | module to Python versions older than 3.5. Typing defines a standard notation | |
12850 | for Python function and variable type annotations. The notation can be used | |
12851 | for documenting code in a concise, standard format, and it has been designed | |
12852 | to also be used by static and runtime type checkers, static analyzers, IDEs | |
12853 | and other tools.") | |
12854 | (license license:psfl))) | |
12855 | ||
12856 | (define-public python2-typing | |
12857 | (package-with-python2 python-typing)) | |
150062f1 | 12858 | |
34581f68 HG |
12859 | (define-public bpython |
12860 | (package | |
12861 | (name "bpython") | |
5a82c904 | 12862 | (version "0.17.1") |
34581f68 HG |
12863 | (source |
12864 | (origin | |
12865 | (method url-fetch) | |
12866 | (uri (pypi-uri "bpython" version)) | |
12867 | (sha256 | |
12868 | (base32 | |
5a82c904 | 12869 | "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9")))) |
34581f68 HG |
12870 | (build-system python-build-system) |
12871 | (arguments | |
12872 | `(#:phases | |
12873 | (modify-phases %standard-phases | |
12874 | (add-after 'unpack 'remove-failing-test | |
12875 | (lambda _ | |
12876 | ;; Remove failing test. FIXME: make it pass | |
12877 | (delete-file "bpython/test/test_args.py") | |
12878 | #t)) | |
12879 | (add-after 'wrap 'add-aliases | |
12880 | ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc. | |
12881 | (lambda* (#:key outputs #:allow-other-keys) | |
12882 | (let ((out (assoc-ref outputs "out"))) | |
12883 | (for-each | |
12884 | (lambda (old new) | |
12885 | (symlink old (string-append out "/bin/" new))) | |
12886 | '("bpython" "bpython-curses" "bpython-urwid" "bpdb") | |
12887 | '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3"))) | |
12888 | #t))))) | |
12889 | (propagated-inputs | |
12890 | `(("python-pygments" ,python-pygments) | |
12891 | ("python-requests", python-requests) | |
12892 | ("python-babel" ,python-babel) ; optional, for internationalization | |
12893 | ("python-curtsies" ,python-curtsies) ; >= 0.1.18 | |
12894 | ("python-greenlet" ,python-greenlet) | |
12895 | ("python-urwid" ,python-urwid) ; for bpython-urwid only | |
12896 | ("python-six" ,python-six))) | |
12897 | (native-inputs | |
12898 | `(("python-sphinx" ,python-sphinx) | |
12899 | ("python-mock" ,python-mock))) | |
12900 | (home-page "https://bpython-interpreter.org/") | |
12901 | (synopsis "Fancy interface to the Python interpreter") | |
12902 | (description "Bpython is a fancy interface to the Python | |
12903 | interpreter. bpython's main features are | |
12904 | ||
12905 | @enumerate | |
12906 | @item in-line syntax highlighting, | |
12907 | @item readline-like autocomplete with suggestions displayed as you type, | |
12908 | @item expected parameter list for any Python function, | |
12909 | @item \"rewind\" function to pop the last line of code from memory and | |
12910 | re-evaluate, | |
12911 | @item send the code you've entered off to a pastebin, | |
12912 | @item save the code you've entered to a file, and | |
12913 | @item auto-indentation. | |
12914 | @end enumerate") | |
12915 | (license license:expat))) | |
12916 | ||
12917 | (define-public bpython2 | |
12918 | (let ((base (package-with-python2 | |
12919 | (strip-python2-variant bpython)))) | |
12920 | (package (inherit base) | |
12921 | (name "bpython2") | |
12922 | (arguments | |
12923 | `(#:python ,python-2 | |
12924 | #:phases | |
12925 | (modify-phases %standard-phases | |
12926 | (add-after 'unpack 'remove-failing-test | |
12927 | (lambda _ | |
12928 | ;; Remove failing test. FIXME: make it pass | |
12929 | (delete-file "bpython/test/test_args.py") | |
12930 | ;; Disable failing test-cases (renaming inhibits they are | |
12931 | ;; discovered) | |
12932 | (substitute* "bpython/test/test_curtsies_repl.py" | |
12933 | (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b) | |
12934 | (string-append a "xxx_off_" b)) | |
12935 | (("^(\\s*def )(test_complex\\W)" _ a b) | |
12936 | (string-append a "xxx_off_" b))) | |
12937 | #t)) | |
12938 | (add-before 'build 'rename-scripts | |
12939 | ;; rename the scripts to bypthon2, bpdb2, etc. | |
12940 | (lambda _ | |
12941 | (substitute* "setup.py" | |
12942 | (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest) | |
12943 | (string-append name "2" rest "\n")) | |
12944 | (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest) | |
12945 | (string-append name "2" (or sub "") rest "\n"))) | |
12946 | #t)))))))) | |
24f4400a MB |
12947 | |
12948 | (define-public python-pyinotify | |
12949 | (package | |
12950 | (name "python-pyinotify") | |
12951 | (version "0.9.6") | |
12952 | (source (origin | |
12953 | (method url-fetch) | |
12954 | (uri (pypi-uri "pyinotify" version)) | |
12955 | (sha256 | |
12956 | (base32 | |
12957 | "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw")))) | |
12958 | (build-system python-build-system) | |
12959 | (arguments `(#:tests? #f)) ;no tests | |
12960 | (home-page "https://github.com/seb-m/pyinotify") | |
12961 | (synopsis "Python library for monitoring inotify events") | |
12962 | (description | |
12963 | "@code{pyinotify} provides a Python interface for monitoring | |
12964 | filesystem events on Linux.") | |
12965 | (license license:expat))) | |
12966 | ||
12967 | (define-public python2-pyinotify | |
12968 | (package-with-python2 python-pyinotify)) |