Commit | Line | Data |
---|---|---|
44d10b1f RW |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
2d040763 | 3 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> |
fa8ffaa0 | 4 | ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr> |
44d10b1f RW |
5 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
6 | ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org> | |
7 | ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch> | |
8 | ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com> | |
9 | ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu> | |
10 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> | |
11 | ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org> | |
12 | ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> | |
13 | ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> | |
b742c006 | 14 | ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name> |
44d10b1f RW |
15 | ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com> |
16 | ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com> | |
17 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> | |
18 | ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com> | |
19 | ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com> | |
20 | ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org> | |
21 | ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> | |
22 | ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com> | |
23 | ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org> | |
24 | ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> | |
25 | ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com> | |
47956fa0 | 26 | ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is> |
44d10b1f RW |
27 | ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> |
28 | ;;; Copyright © 2016 David Craven <david@craven.ch> | |
ea43f0d5 | 29 | ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com> |
44d10b1f RW |
30 | ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at> |
31 | ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> | |
e746d1c3 | 32 | ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com> |
44d10b1f RW |
33 | ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net> |
34 | ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu> | |
217ea1a1 | 35 | ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
44d10b1f RW |
36 | ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be> |
37 | ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au> | |
38 | ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com> | |
39 | ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com> | |
40 | ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au> | |
41 | ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com> | |
42 | ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org> | |
43 | ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> | |
44 | ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net> | |
45 | ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> | |
46 | ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com> | |
dcfa0acd | 47 | ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot> |
44d10b1f RW |
48 | ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com |
49 | ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com> | |
50 | ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com> | |
51 | ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org> | |
52 | ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com> | |
53 | ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org> | |
412342d1 | 54 | ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
44d10b1f RW |
55 | ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> |
56 | ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> | |
4caf37b0 | 57 | ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
44d10b1f RW |
58 | ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com> |
59 | ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org> | |
a9ba0a31 | 60 | ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net> |
a91f4eba | 61 | ;;; Copyright © 2019 Sam <smbaines8@gmail.com> |
8c141421 | 62 | ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us> |
44d10b1f RW |
63 | ;;; |
64 | ;;; This file is part of GNU Guix. | |
65 | ;;; | |
66 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
67 | ;;; under the terms of the GNU General Public License as published by | |
68 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
69 | ;;; your option) any later version. | |
70 | ;;; | |
71 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
72 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
73 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
74 | ;;; GNU General Public License for more details. | |
75 | ;;; | |
76 | ;;; You should have received a copy of the GNU General Public License | |
77 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
78 | ||
79 | (define-module (gnu packages python-xyz) | |
80 | #:use-module ((guix licenses) #:prefix license:) | |
81 | #:use-module (gnu packages) | |
82 | #:use-module (gnu packages algebra) | |
83 | #:use-module (gnu packages adns) | |
84 | #:use-module (gnu packages attr) | |
85 | #:use-module (gnu packages backup) | |
86 | #:use-module (gnu packages bash) | |
87 | #:use-module (gnu packages check) | |
88 | #:use-module (gnu packages compression) | |
89 | #:use-module (gnu packages crypto) | |
90 | #:use-module (gnu packages databases) | |
91 | #:use-module (gnu packages file) | |
92 | #:use-module (gnu packages fontutils) | |
93 | #:use-module (gnu packages gcc) | |
94 | #:use-module (gnu packages geo) | |
95 | #:use-module (gnu packages ghostscript) | |
96 | #:use-module (gnu packages gl) | |
97 | #:use-module (gnu packages glib) | |
98 | #:use-module (gnu packages graphviz) | |
99 | #:use-module (gnu packages graphics) | |
100 | #:use-module (gnu packages gstreamer) | |
101 | #:use-module (gnu packages gtk) | |
102 | #:use-module (gnu packages icu4c) | |
103 | #:use-module (gnu packages image) | |
104 | #:use-module (gnu packages imagemagick) | |
105 | #:use-module (gnu packages libevent) | |
106 | #:use-module (gnu packages libffi) | |
107 | #:use-module (gnu packages linux) | |
108 | #:use-module (gnu packages llvm) | |
109 | #:use-module (gnu packages man) | |
110 | #:use-module (gnu packages maths) | |
42f0b0c2 | 111 | #:use-module (gnu packages monitoring) |
44d10b1f RW |
112 | #:use-module (gnu packages multiprecision) |
113 | #:use-module (gnu packages networking) | |
114 | #:use-module (gnu packages ncurses) | |
115 | #:use-module (gnu packages openstack) | |
116 | #:use-module (gnu packages pcre) | |
117 | #:use-module (gnu packages perl) | |
118 | #:use-module (gnu packages pkg-config) | |
119 | #:use-module (gnu packages python) | |
d362b11d | 120 | #:use-module (gnu packages python-check) |
44d10b1f RW |
121 | #:use-module (gnu packages python-crypto) |
122 | #:use-module (gnu packages python-web) | |
123 | #:use-module (gnu packages qt) | |
124 | #:use-module (gnu packages readline) | |
125 | #:use-module (gnu packages sdl) | |
126 | #:use-module (gnu packages search) | |
127 | #:use-module (gnu packages shells) | |
9d0c291e | 128 | #:use-module (gnu packages sphinx) |
44d10b1f RW |
129 | #:use-module (gnu packages ssh) |
130 | #:use-module (gnu packages terminals) | |
131 | #:use-module (gnu packages tex) | |
132 | #:use-module (gnu packages texinfo) | |
133 | #:use-module (gnu packages time) | |
134 | #:use-module (gnu packages tls) | |
135 | #:use-module (gnu packages version-control) | |
136 | #:use-module (gnu packages video) | |
137 | #:use-module (gnu packages web) | |
138 | #:use-module (gnu packages base) | |
139 | #:use-module (gnu packages xml) | |
140 | #:use-module (gnu packages xorg) | |
141 | #:use-module (gnu packages xdisorg) | |
142 | #:use-module (gnu packages tcl) | |
143 | #:use-module (gnu packages bdw-gc) | |
f98232a3 | 144 | #:use-module (gnu packages serialization) |
44d10b1f RW |
145 | #:use-module (guix packages) |
146 | #:use-module (guix download) | |
147 | #:use-module (guix git-download) | |
a042d348 | 148 | #:use-module (guix hg-download) |
44d10b1f RW |
149 | #:use-module (guix utils) |
150 | #:use-module (guix build-system gnu) | |
151 | #:use-module (guix build-system cmake) | |
152 | #:use-module (guix build-system python) | |
153 | #:use-module (guix build-system trivial) | |
154 | #:use-module (srfi srfi-1) | |
155 | #:use-module (srfi srfi-26)) | |
156 | ||
157 | (define-public python-psutil | |
158 | (package | |
159 | (name "python-psutil") | |
7abf3cbf | 160 | (version "5.6.2") |
44d10b1f RW |
161 | (source |
162 | (origin | |
163 | (method url-fetch) | |
164 | (uri (pypi-uri "psutil" version)) | |
165 | (sha256 | |
166 | (base32 | |
7abf3cbf | 167 | "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2")))) |
44d10b1f RW |
168 | (build-system python-build-system) |
169 | (arguments | |
170 | ;; FIXME: some tests does not return and times out. | |
171 | '(#:tests? #f)) | |
172 | (home-page "https://www.github.com/giampaolo/psutil") | |
173 | (synopsis "Library for retrieving information on running processes") | |
174 | (description | |
175 | "psutil (Python system and process utilities) is a library for retrieving | |
176 | information on running processes and system utilization (CPU, memory, disks, | |
177 | network) in Python. It is useful mainly for system monitoring, profiling and | |
178 | limiting process resources and management of running processes. It implements | |
179 | many functionalities offered by command line tools such as: ps, top, lsof, | |
180 | netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime, | |
181 | pidof, tty, taskset, pmap.") | |
182 | (properties `((python2-variant . ,(delay python2-psutil)))) | |
183 | (license license:bsd-3))) | |
184 | ||
185 | (define-public python2-psutil | |
186 | (let ((base (package-with-python2 (strip-python2-variant python-psutil)))) | |
187 | (package | |
188 | (inherit base) | |
189 | (propagated-inputs | |
190 | `(("python2-enum34" ,python2-enum34) ;optional | |
191 | ,@(package-propagated-inputs base)))))) | |
192 | ||
193 | (define-public python-shapely | |
194 | (package | |
195 | (name "python-shapely") | |
6d94465b | 196 | (version "1.6.4.post2") |
44d10b1f RW |
197 | (source |
198 | (origin | |
199 | (method url-fetch) | |
200 | (uri (pypi-uri "Shapely" version)) | |
201 | (sha256 | |
202 | (base32 | |
6d94465b | 203 | "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64")))) |
44d10b1f RW |
204 | (build-system python-build-system) |
205 | (native-inputs | |
206 | `(("python-cython" ,python-cython) | |
207 | ("python-matplotlib" ,python-matplotlib) | |
208 | ("python-pytest" ,python-pytest) | |
209 | ("python-pytest-cov" ,python-pytest-cov))) | |
210 | (inputs | |
211 | `(("geos" ,geos))) | |
212 | (propagated-inputs | |
213 | `(("python-numpy" ,python-numpy))) | |
214 | (arguments | |
215 | `(#:phases | |
216 | (modify-phases %standard-phases | |
217 | (add-after 'unpack 'patch-geos-path | |
218 | (lambda* (#:key inputs #:allow-other-keys) | |
219 | (let ((geos (assoc-ref inputs "geos")) | |
220 | (glibc (assoc-ref inputs ,(if (%current-target-system) | |
221 | "cross-libc" "libc")))) | |
222 | (substitute* "shapely/geos.py" | |
223 | (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)") | |
224 | (string-append "_lgeos = load_dll('geos_c', fallbacks=['" | |
225 | geos "/lib/libgeos_c.so'])")) | |
226 | (("free = load_dll\\('c'\\)\\.free") | |
227 | (string-append "free = load_dll('c', fallbacks=['" | |
228 | glibc "/lib/libc.so.6']).free")))) | |
229 | #t))))) | |
230 | (home-page "https://github.com/Toblerity/Shapely") | |
231 | (synopsis "Library for the manipulation and analysis of geometric objects") | |
232 | (description "Shapely is a Python package for manipulation and analysis of | |
233 | planar geometric objects. It is based on the @code{GEOS} library.") | |
234 | (license license:bsd-3))) | |
235 | ||
a91f4eba S |
236 | (define-public python-shortuuid |
237 | (package | |
238 | (name "python-shortuuid") | |
239 | (version "0.5.0") | |
240 | (source | |
241 | (origin | |
242 | (method url-fetch) | |
243 | (uri (pypi-uri "shortuuid" version)) | |
244 | (sha256 | |
245 | (base32 | |
246 | "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh")))) | |
247 | (build-system python-build-system) | |
248 | (native-inputs | |
249 | `(("python-pep8" ,python-pep8))) | |
250 | (home-page "https://github.com/skorokithakis/shortuuid") | |
251 | (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs") | |
252 | (description | |
253 | "@code{shortuuid} is a Python library for generating concise, unambiguous | |
254 | and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid} | |
255 | module and then similar looking characters are removed.") | |
256 | (license license:bsd-3))) | |
257 | ||
44d10b1f RW |
258 | (define-public python-logwrap |
259 | (package | |
260 | (name "python-logwrap") | |
261 | (version "3.2.1") | |
262 | (source | |
263 | (origin | |
264 | (method url-fetch) | |
265 | (uri (pypi-uri "logwrap" version ".zip")) | |
266 | (sha256 | |
267 | (base32 | |
268 | "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra")))) | |
269 | (build-system python-build-system) | |
270 | (propagated-inputs | |
271 | `(("python-six" ,python-six) | |
272 | ("python-typing" ,python-typing))) | |
273 | (native-inputs | |
274 | `(("unzip" ,unzip) | |
275 | ("python-cython" ,python-cython) | |
276 | ("python-pytest" ,python-pytest) | |
277 | ("python-pytest-cov" ,python-pytest-cov) | |
278 | ("python-pytest-runner" ,python-pytest-runner))) | |
279 | (home-page "https://github.com/penguinolog/logwrap") | |
280 | (synopsis "Decorator for logging function arguments") | |
281 | (description "This package provides a decorator to log function arguments | |
282 | and function call return values in a human-readable way.") | |
283 | (license license:asl2.0))) | |
284 | ||
285 | (define-public python2-shapely | |
286 | (package-with-python2 python-shapely)) | |
287 | ||
288 | (define-public python-clyent | |
289 | (package | |
290 | (name "python-clyent") | |
291 | (version "1.2.1") | |
292 | (source | |
293 | (origin | |
294 | (method url-fetch) | |
295 | (uri (pypi-uri "clyent" version)) | |
296 | (sha256 | |
297 | (base32 | |
298 | "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj")))) | |
299 | (build-system python-build-system) | |
300 | (native-inputs | |
301 | `(("python-mock" ,python-mock))) | |
302 | (home-page "https://github.com/binstar/clyent") | |
303 | (synopsis "Command line client library") | |
304 | (description "Clyent is a Python command line utiliy library. It is used | |
305 | by @code{binstar}, @code{binstar-build} and @code{chalmers}.") | |
306 | (license license:bsd-3))) | |
307 | ||
308 | (define-public python2-clyent | |
309 | (package-with-python2 python-clyent)) | |
310 | ||
311 | (define-public python-babel | |
312 | (package | |
313 | (name "python-babel") | |
314 | (version "2.6.0") | |
315 | (source | |
316 | (origin | |
317 | (method url-fetch) | |
318 | (uri (pypi-uri "Babel" version)) | |
319 | (sha256 | |
320 | (base32 | |
321 | "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc")))) | |
322 | (build-system python-build-system) | |
323 | (native-inputs | |
324 | `(("python-freezegun" ,python-freezegun) | |
325 | ("python-pytest" ,python-pytest))) | |
326 | (propagated-inputs | |
327 | `(("python-pytz" ,python-pytz))) | |
328 | (arguments | |
329 | `(#:phases (modify-phases %standard-phases | |
330 | (replace 'check | |
331 | (lambda _ (invoke "pytest" "-vv")))))) | |
332 | (home-page "http://babel.pocoo.org/") | |
333 | (synopsis | |
334 | "Tools for internationalizing Python applications") | |
335 | (description | |
336 | "Babel is composed of two major parts: | |
337 | - tools to build and work with gettext message catalogs | |
338 | - a Python interface to the CLDR (Common Locale Data Repository), providing | |
339 | access to various locale display names, localized number and date formatting, | |
340 | etc. ") | |
341 | (license license:bsd-3))) | |
342 | ||
343 | (define-public python2-babel | |
344 | (package-with-python2 python-babel)) | |
345 | ||
346 | (define-public python2-backport-ssl-match-hostname | |
347 | (package | |
348 | (name "python2-backport-ssl-match-hostname") | |
349 | (version "3.5.0.1") | |
350 | (source | |
351 | (origin | |
352 | (method url-fetch) | |
2c1f0d09 | 353 | (uri (pypi-uri "backports.ssl_match_hostname" version)) |
44d10b1f RW |
354 | (sha256 |
355 | (base32 | |
356 | "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh")))) | |
357 | (build-system python-build-system) | |
358 | (arguments | |
359 | `(#:python ,python-2 | |
360 | #:tests? #f)) ; no test target | |
361 | (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname") | |
362 | (synopsis "Backport of ssl.match_hostname() function from Python 3.5") | |
363 | (description | |
364 | "This backport brings the ssl.match_hostname() function to users of | |
365 | earlier versions of Python. The function checks the hostname in the | |
366 | certificate returned by the server to which a connection has been established, | |
367 | and verifies that it matches the intended target hostname.") | |
368 | (license license:psfl))) | |
369 | ||
370 | (define-public python-hdf4 | |
371 | (package | |
372 | (name "python-hdf4") | |
373 | (version "0.9") | |
374 | (source | |
375 | (origin | |
376 | (method url-fetch) | |
377 | (uri (pypi-uri name version)) | |
378 | (sha256 | |
379 | (base32 | |
380 | "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks")))) | |
381 | (build-system python-build-system) | |
382 | (native-inputs `(("nose" ,python-nose))) | |
383 | (propagated-inputs `(("numpy" ,python-numpy))) | |
384 | (inputs | |
385 | `(("hdf4" ,hdf4) | |
386 | ("libjpeg" ,libjpeg) | |
387 | ("zlib" ,zlib))) | |
388 | (arguments | |
389 | `(#:phases | |
390 | (modify-phases %standard-phases | |
391 | (replace 'check | |
392 | (lambda _ | |
393 | ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes | |
394 | ;; on to import numpy. Somehow this works on their CI system. | |
395 | ;; Let's just manage PYTHONPATH here instead. | |
396 | (substitute* "runexamples.sh" | |
397 | (("export PYTHONPATH=.*") "")) | |
398 | (setenv "PYTHONPATH" | |
399 | (string-append (getcwd) ":" | |
400 | (getenv "PYTHONPATH"))) | |
401 | (invoke "./runexamples.sh") | |
402 | (invoke "nosetests" "-v")))))) | |
403 | (home-page "https://github.com/fhs/python-hdf4") | |
404 | (synopsis "Python interface to the NCSA HDF4 library") | |
405 | (description | |
406 | "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library, | |
407 | which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s. | |
408 | NetCDF files can also be read and modified. Python-HDF4 is a fork of | |
409 | @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.") | |
410 | (license license:expat))) | |
411 | ||
412 | (define-public python2-hdf4 | |
413 | (package-with-python2 python-hdf4)) | |
414 | ||
415 | (define-public python-h5py | |
416 | (package | |
417 | (name "python-h5py") | |
418 | (version "2.8.0") | |
419 | (source | |
420 | (origin | |
421 | (method url-fetch) | |
422 | (uri (pypi-uri "h5py" version)) | |
423 | (sha256 | |
424 | (base32 | |
425 | "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6")))) | |
426 | (build-system python-build-system) | |
427 | (arguments | |
428 | `(#:tests? #f ; no test target | |
429 | #:phases | |
430 | (modify-phases %standard-phases | |
431 | (add-after 'unpack 'fix-hdf5-paths | |
432 | (lambda* (#:key inputs #:allow-other-keys) | |
433 | (let ((prefix (assoc-ref inputs "hdf5"))) | |
434 | (substitute* "setup_build.py" | |
435 | (("\\['/opt/local/lib', '/usr/local/lib'\\]") | |
436 | (string-append "['" prefix "/lib" "']")) | |
437 | (("'/opt/local/include', '/usr/local/include'") | |
438 | (string-append "'" prefix "/include" "'"))) | |
439 | (substitute* "setup_configure.py" | |
440 | (("\\['/usr/local/lib', '/opt/local/lib'\\]") | |
441 | (string-append "['" prefix "/lib" "']"))) | |
442 | #t)))))) | |
443 | (propagated-inputs | |
444 | `(("python-six" ,python-six) | |
445 | ("python-numpy" ,python-numpy))) | |
446 | (inputs | |
447 | `(("hdf5" ,hdf5))) | |
448 | (native-inputs | |
449 | `(("python-cython" ,python-cython) | |
450 | ("python-pkgconfig" ,python-pkgconfig))) | |
451 | (home-page "http://www.h5py.org/") | |
452 | (synopsis "Read and write HDF5 files from Python") | |
453 | (description | |
454 | "The h5py package provides both a high- and low-level interface to the | |
455 | HDF5 library from Python. The low-level interface is intended to be a | |
456 | complete wrapping of the HDF5 API, while the high-level component supports | |
457 | access to HDF5 files, datasets and groups using established Python and NumPy | |
458 | concepts.") | |
459 | (license license:bsd-3))) | |
460 | ||
461 | (define-public python2-h5py | |
462 | (package-with-python2 python-h5py)) | |
463 | ||
8b89dedc RW |
464 | (define-public python-sh |
465 | (package | |
466 | (name "python-sh") | |
467 | (version "1.12.14") | |
468 | (source | |
469 | (origin | |
470 | (method url-fetch) | |
471 | (uri (pypi-uri "sh" version)) | |
472 | (sha256 | |
473 | (base32 | |
474 | "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm")))) | |
475 | (build-system python-build-system) | |
fd3638d8 EF |
476 | (arguments |
477 | '(#:phases | |
478 | (modify-phases %standard-phases | |
479 | (replace 'check | |
480 | (lambda _ | |
ca983a2f NG |
481 | ;; XXX: A Python 2 test fails when HOME=/homeless-shelter. |
482 | (setenv "HOME" "/tmp") | |
fd3638d8 EF |
483 | (invoke "python" "sh.py" "test")))))) |
484 | (native-inputs | |
485 | `(("python-coverage" ,python-coverage))) | |
8b89dedc RW |
486 | (home-page "https://github.com/amoffat/sh") |
487 | (synopsis "Python subprocess replacement") | |
488 | (description "This package provides a replacement for Python's | |
489 | @code{subprocess} feature.") | |
490 | (license license:expat))) | |
491 | ||
3869effd RW |
492 | (define-public python2-sh |
493 | (package-with-python2 python-sh)) | |
494 | ||
d362b11d RW |
495 | (define-public python-cftime |
496 | (package | |
497 | (name "python-cftime") | |
498 | (version "1.0.3.4") | |
499 | (source | |
500 | (origin | |
501 | (method url-fetch) | |
502 | (uri (pypi-uri "cftime" version)) | |
503 | (sha256 | |
504 | (base32 | |
505 | "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x")))) | |
506 | (build-system python-build-system) | |
507 | (propagated-inputs | |
508 | `(("python-numpy" ,python-numpy))) | |
509 | (native-inputs | |
510 | `(("python-coveralls" ,python-coveralls) | |
511 | ("python-cython" ,python-cython) | |
512 | ("python-pytest-cov" ,python-pytest-cov))) | |
513 | (home-page "https://github.com/Unidata/cftime") | |
514 | (synopsis "Library for time handling") | |
515 | (description | |
516 | "This package provides time-handling functionality that used to be part | |
517 | of the netcdf4 package before.") | |
518 | ;; This package claims to include code under the GPLv3 but is released | |
519 | ;; under ISC. | |
520 | (license (list license:isc license:gpl3+)))) | |
521 | ||
44d10b1f RW |
522 | (define-public python-netcdf4 |
523 | (package | |
524 | (name "python-netcdf4") | |
93e7b209 | 525 | (version "1.4.2") |
44d10b1f RW |
526 | (source |
527 | (origin | |
528 | (method url-fetch) | |
529 | (uri (pypi-uri "netCDF4" version)) | |
530 | (sha256 | |
531 | (base32 | |
93e7b209 | 532 | "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r")))) |
44d10b1f | 533 | (build-system python-build-system) |
93e7b209 RW |
534 | (arguments |
535 | '(#:phases | |
536 | (modify-phases %standard-phases | |
537 | (add-after 'unpack 'configure-locations | |
538 | (lambda* (#:key inputs #:allow-other-keys) | |
539 | (setenv "HDF5_DIR" (assoc-ref inputs "hdf5")) | |
540 | #t))))) | |
44d10b1f RW |
541 | (native-inputs |
542 | `(("python-cython" ,python-cython))) | |
543 | (propagated-inputs | |
93e7b209 RW |
544 | `(("python-numpy" ,python-numpy) |
545 | ("python-cftime" ,python-cftime))) | |
44d10b1f RW |
546 | (inputs |
547 | `(("netcdf" ,netcdf) | |
548 | ("hdf4" ,hdf4) | |
549 | ("hdf5" ,hdf5))) | |
93e7b209 | 550 | (home-page "https://github.com/Unidata/netcdf4-python") |
44d10b1f RW |
551 | (synopsis "Python/numpy interface to the netCDF library") |
552 | (description "Netcdf4-python is a Python interface to the netCDF C | |
553 | library. netCDF version 4 has many features not found in earlier | |
554 | versions of the library and is implemented on top of HDF5. This module | |
555 | can read and write files in both the new netCDF 4 and the old netCDF 3 | |
556 | format, and can create files that are readable by HDF5 clients. The | |
557 | API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar | |
558 | to users of that module.") | |
559 | ;; The software is mainly ISC, but includes some files covered | |
560 | ;; by the Expat license. | |
561 | (license (list license:isc license:expat)))) | |
562 | ||
563 | (define-public python2-netcdf4 | |
564 | (package-with-python2 python-netcdf4)) | |
565 | ||
566 | (define-public python-lockfile | |
567 | (package | |
568 | (name "python-lockfile") | |
569 | (version "0.12.2") | |
570 | (source | |
571 | (origin | |
572 | (method url-fetch) | |
8318bf07 | 573 | (uri (pypi-uri "lockfile" version)) |
44d10b1f RW |
574 | (sha256 |
575 | (base32 | |
576 | "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba")))) | |
577 | (build-system python-build-system) | |
578 | (arguments '(#:test-target "check")) | |
579 | (native-inputs | |
580 | `(("python-pbr" ,python-pbr))) | |
581 | (home-page "https://launchpad.net/pylockfile") | |
582 | (synopsis "Platform-independent file locking module") | |
583 | (description | |
584 | "The lockfile package exports a LockFile class which provides a simple | |
585 | API for locking files.") | |
586 | (license license:expat))) | |
587 | ||
588 | (define-public python2-lockfile | |
589 | (package-with-python2 python-lockfile)) | |
590 | ||
591 | (define-public python-semantic-version | |
592 | (package | |
593 | (name "python-semantic-version") | |
594 | (version "2.6.0") | |
595 | (source | |
596 | (origin | |
597 | (method url-fetch) | |
598 | (uri (pypi-uri "semantic_version" version)) | |
599 | (sha256 | |
600 | (base32 | |
601 | "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra")))) | |
602 | (build-system python-build-system) | |
603 | (arguments | |
604 | `(#:tests? #f)) ; PyPI tarball lacks tests | |
605 | (home-page "https://github.com/rbarrois/python-semanticversion") | |
606 | (synopsis "Semantic versioning module for Python") | |
607 | (description | |
608 | "The @code{semantic_version} class is a small library for handling | |
609 | @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python. | |
610 | ||
611 | It can compare versions, generate a new version that represents a bump in one of | |
612 | the version levels, and check whether any given string is a proper semantic | |
613 | version identifier.") | |
614 | (license license:bsd-3))) | |
615 | ||
616 | (define-public python2-semantic-version | |
617 | (package-with-python2 python-semantic-version)) | |
618 | ||
619 | (define-public python-serpent | |
620 | (package | |
621 | (name "python-serpent") | |
fa9d14ac | 622 | (version "1.28") |
44d10b1f RW |
623 | (source |
624 | (origin | |
625 | (method url-fetch) | |
626 | (uri (pypi-uri "serpent" version)) | |
627 | (sha256 | |
fa9d14ac | 628 | (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk")))) |
44d10b1f | 629 | (build-system python-build-system) |
fa9d14ac TGR |
630 | (native-inputs |
631 | `(("python-attrs" ,python-attrs) | |
632 | ("python-pytz" ,python-pytz))) | |
44d10b1f RW |
633 | (home-page "https://github.com/irmen/Serpent") |
634 | (synopsis "Serializer for literal Python expressions") | |
635 | (description | |
1d3c7803 TGR |
636 | "Serpent provides @code{ast.literal_eval()}-compatible object tree |
637 | serialization. It serializes an object tree into bytes (an utf-8 encoded | |
638 | string) that can be decoded and then passed as-is to @code{ast.literal_eval()} | |
639 | to rebuild the original object tree. | |
640 | ||
641 | Because only safe literals are encoded, it is safe to send serpent data to | |
642 | other machines, such as over the network.") | |
44d10b1f RW |
643 | (license license:expat))) |
644 | ||
645 | (define-public python-setuptools | |
646 | (package | |
647 | (name "python-setuptools") | |
648 | (version "40.0.0") | |
649 | (source | |
650 | (origin | |
651 | (method url-fetch) | |
652 | (uri (pypi-uri "setuptools" version ".zip")) | |
653 | (sha256 | |
654 | (base32 | |
655 | "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1")) | |
656 | (modules '((guix build utils))) | |
657 | (snippet | |
658 | '(begin | |
659 | ;; Remove included binaries which are used to build self-extracting | |
660 | ;; installers for Windows. | |
661 | ;; TODO: Find some way to build them ourself so we can include them. | |
662 | (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$")) | |
663 | #t)))) | |
664 | (build-system python-build-system) | |
665 | ;; FIXME: Tests require pytest, which itself relies on setuptools. | |
666 | ;; One could bootstrap with an internal untested setuptools. | |
667 | (arguments | |
668 | `(#:tests? #f)) | |
669 | (home-page "https://pypi.python.org/pypi/setuptools") | |
670 | (synopsis | |
671 | "Library designed to facilitate packaging Python projects") | |
672 | (description | |
673 | "Setuptools is a fully-featured, stable library designed to facilitate | |
674 | packaging Python projects, where packaging includes: | |
675 | Python package and module definitions, | |
676 | distribution package metadata, | |
677 | test hooks, | |
678 | project installation, | |
679 | platform-specific details, | |
680 | Python 3 support.") | |
681 | ;; TODO: setuptools now bundles the following libraries: | |
682 | ;; packaging, pyparsing, six and appdirs. How to unbundle? | |
683 | (license (list license:psfl ; setuptools itself | |
684 | license:expat ; six, appdirs, pyparsing | |
685 | license:asl2.0 ; packaging is dual ASL2/BSD-2 | |
686 | license:bsd-2)))) | |
687 | ||
688 | (define-public python2-setuptools | |
689 | (package-with-python2 python-setuptools)) | |
690 | ||
691 | (define-public python-uniseg | |
692 | (package | |
693 | (name "python-uniseg") | |
694 | (version "0.7.1") | |
695 | (source | |
696 | (origin | |
697 | (method url-fetch) | |
698 | (uri (pypi-uri "uniseg" version ".zip")) | |
699 | (sha256 | |
700 | (base32 | |
701 | "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2")))) | |
702 | (build-system python-build-system) | |
703 | (arguments | |
704 | '(#:tests? #f)) ; The test suite requires network access. | |
705 | (native-inputs | |
706 | `(("unzip" ,unzip))) | |
707 | (home-page | |
708 | "https://bitbucket.org/emptypage/uniseg-python") | |
709 | (synopsis | |
710 | "Python library to determine Unicode text segmentations") | |
711 | (description | |
712 | "Uniseg is a Python package used to determine Unicode text segmentations. | |
713 | Supported segmentations include: | |
714 | @enumerate | |
715 | @item @dfn{Code point} (any value in the Unicode codespace) | |
716 | @item @dfn{Grapheme cluster} (user-perceived character made of a single or | |
717 | multiple Unicode code points, e.g. \"G\" + acute-accent) | |
718 | @item Word break | |
719 | @item Sentence break | |
720 | @item Line break | |
721 | @end enumerate") | |
722 | (license license:expat))) | |
723 | ||
724 | (define-public python2-uniseg | |
725 | (package-with-python2 python-uniseg)) | |
726 | ||
727 | (define-public python-humanfriendly | |
728 | (package | |
729 | (name "python-humanfriendly") | |
730 | (version "4.4.1") | |
731 | (source | |
732 | (origin | |
733 | (method url-fetch) | |
734 | (uri (pypi-uri "humanfriendly" version)) | |
735 | (sha256 | |
736 | (base32 | |
737 | "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi")))) | |
738 | (build-system python-build-system) | |
739 | (arguments | |
740 | `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly. | |
741 | #:tests? #f)) | |
742 | (propagated-inputs | |
743 | `(("python-monotonic" ,python-monotonic))) | |
744 | (home-page "https://humanfriendly.readthedocs.io") | |
745 | (synopsis "Human-friendly input and output in Python") | |
746 | (description | |
747 | "The functions and classes in @code{humanfriendly} can be used to make | |
748 | text interfaces more user-friendly. It includes tools to parse and format | |
749 | numbers, file sizes, and timespans, timers for long-running operations, menus | |
750 | to allow the user to choose from a list of options, and terminal interaction | |
751 | helpers.") | |
752 | (license license:expat))) | |
753 | ||
754 | (define-public python2-humanfriendly | |
755 | (package-with-python2 python-humanfriendly)) | |
756 | ||
757 | (define-public python-capturer | |
758 | (package | |
759 | (name "python-capturer") | |
760 | (version "2.4") | |
761 | (source | |
762 | (origin | |
763 | (method url-fetch) | |
764 | (uri (pypi-uri "capturer" version)) | |
765 | (sha256 | |
766 | (base32 | |
767 | "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089")))) | |
768 | (build-system python-build-system) | |
769 | (arguments | |
770 | `(#:tests? #f)) | |
771 | (propagated-inputs | |
772 | `(("python-humanfriendly" ,python-humanfriendly))) | |
773 | (home-page "https://capturer.readthedocs.io") | |
774 | (synopsis "Capture stdout and stderr streams of the current process") | |
775 | (description | |
776 | "The capturer package makes it easy to capture the stdout and stderr | |
777 | streams of the current process and subprocesses. Output can be relayed | |
778 | to the terminal in real time but is also available to the Python program | |
779 | for additional processing.") | |
780 | (license license:expat))) | |
781 | ||
782 | (define-public python2-capturer | |
783 | (package-with-python2 python-capturer)) | |
784 | ||
785 | (define-public python-case | |
786 | (package | |
787 | (name "python-case") | |
788 | (version "1.5.3") | |
789 | (source | |
790 | (origin | |
791 | (method url-fetch) | |
792 | (uri (pypi-uri "case" version)) | |
793 | (sha256 | |
794 | (base32 | |
795 | "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8")))) | |
796 | (build-system python-build-system) | |
797 | (propagated-inputs | |
798 | `(("python-mock" ,python-mock) | |
799 | ("python-nose" ,python-nose) | |
800 | ("python-six" ,python-six) | |
801 | ("python-unittest2" ,python-unittest2))) | |
802 | (native-inputs | |
803 | `(("python-coverage" ,python-coverage))) | |
804 | (home-page "https://github.com/celery/case") | |
805 | (synopsis "Unittest utilities and convenience methods") | |
806 | (description | |
807 | "The @code{case} package provides utilities on top of unittest, including | |
808 | some helpful Python 2 compatibility convenience methods.") | |
809 | (license license:bsd-3))) | |
810 | ||
811 | (define-public python-verboselogs | |
812 | (package | |
813 | (name "python-verboselogs") | |
814 | (version "1.7") | |
815 | (source | |
816 | (origin | |
817 | (method url-fetch) | |
818 | (uri (pypi-uri "verboselogs" version)) | |
819 | (sha256 | |
820 | (base32 | |
821 | "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3")))) | |
822 | (build-system python-build-system) | |
823 | (native-inputs | |
824 | `(("python-mock" ,python-mock) | |
825 | ("python-astroid" ,python-astroid) | |
826 | ("python-pylint" ,python-pylint))) | |
827 | (home-page "https://verboselogs.readthedocs.io") | |
828 | (synopsis "Verbose logging level for Python's logging module") | |
829 | (description | |
830 | "The @code{verboselogs} package extends Python's @code{logging} module to | |
831 | add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.") | |
832 | (license license:expat))) | |
833 | ||
834 | (define-public python2-verboselogs | |
835 | (package-with-python2 python-verboselogs)) | |
836 | ||
837 | (define-public python-coloredlogs | |
838 | (package | |
839 | (name "python-coloredlogs") | |
840 | (version "7.3") | |
841 | (source | |
842 | (origin | |
843 | (method url-fetch) | |
844 | (uri (pypi-uri "coloredlogs" version)) | |
845 | (sha256 | |
846 | (base32 | |
847 | "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9")))) | |
848 | (build-system python-build-system) | |
849 | (arguments | |
850 | `(;Tests require some updated modules | |
851 | #:tests? #f)) | |
852 | (propagated-inputs | |
853 | `(("python-capturer" ,python-capturer))) | |
854 | (home-page "https://coloredlogs.readthedocs.io") | |
855 | (synopsis "Colored stream handler for Python's logging module") | |
856 | (description | |
857 | "The @code{coloredlogs} package enables colored terminal output for | |
858 | Python's logging module. The @code{ColoredFormatter} class inherits from | |
859 | @code{logging.Formatter} and uses ANSI escape sequences to render your logging | |
860 | messages in color.") | |
861 | (license license:expat))) | |
862 | ||
863 | (define-public python2-coloredlogs | |
864 | (package-with-python2 python-coloredlogs)) | |
865 | ||
4caf37b0 MC |
866 | (define-public python-et-xmlfile |
867 | (package | |
868 | (name "python-et-xmlfile") | |
869 | (version "1.0.1") | |
870 | (source | |
871 | (origin | |
872 | (method url-fetch) | |
873 | (uri (pypi-uri "et_xmlfile" version)) | |
874 | (sha256 | |
875 | (base32 | |
876 | "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1")))) | |
877 | (build-system python-build-system) | |
878 | (arguments | |
879 | `(#:phases (modify-phases %standard-phases | |
880 | (replace 'check | |
881 | (lambda _ | |
882 | (invoke "pytest")))))) | |
883 | (native-inputs | |
884 | `(("python-pytest" ,python-pytest) | |
885 | ("python-lxml" ,python-lxml))) ;used for the tests | |
886 | (home-page "https://bitbucket.org/openpyxl/et_xmlfile") | |
887 | (synopsis "Low memory implementation of @code{lxml.xmlfile}") | |
888 | (description "This Python library is based upon the @code{xmlfile} module | |
889 | from @code{lxml}. It aims to provide a low memory, compatible implementation | |
890 | of @code{xmlfile}.") | |
891 | (license license:expat))) | |
892 | ||
893 | (define-public python2-et-xmlfile | |
894 | (package-with-python2 python-et-xmlfile)) | |
895 | ||
a042d348 MC |
896 | (define-public python-openpyxl |
897 | (package | |
898 | (name "python-openpyxl") | |
441e6d93 | 899 | (version "2.6.2") |
a042d348 MC |
900 | (source |
901 | (origin | |
902 | ;; We use the upstream repository, as the tests are not included in the | |
903 | ;; PyPI releases. | |
904 | (method hg-fetch) | |
905 | (uri (hg-reference | |
906 | (url "https://bitbucket.org/openpyxl/openpyxl") | |
907 | (changeset version))) | |
908 | (file-name (string-append name "-" version "-checkout")) | |
909 | (sha256 | |
441e6d93 | 910 | (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w")))) |
a042d348 MC |
911 | (build-system python-build-system) |
912 | (arguments | |
913 | `(#:phases (modify-phases %standard-phases | |
914 | (replace 'check | |
915 | (lambda _ | |
916 | (invoke "pytest")))))) | |
917 | (native-inputs | |
918 | ;; For the test suite. | |
919 | `(("python-lxml" ,python-lxml) | |
920 | ("python-pillow" ,python-pillow) | |
921 | ("python-pytest" ,python-pytest))) | |
922 | (propagated-inputs | |
923 | `(("python-et-xmlfile" ,python-et-xmlfile) | |
924 | ("python-jdcal" ,python-jdcal))) | |
925 | (home-page "https://openpyxl.readthedocs.io") | |
926 | (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files") | |
927 | (description "This Python library allows reading and writing to the Excel XLSX, XLSM, | |
928 | XLTX and XLTM file formats that are defined by the Office Open XML (OOXML) | |
929 | standard.") | |
930 | (license license:expat))) | |
931 | ||
44d10b1f RW |
932 | (define-public python-eventlet |
933 | (package | |
934 | (name "python-eventlet") | |
935 | (version "0.20.1") | |
936 | (source | |
937 | (origin | |
938 | (method url-fetch) | |
939 | (uri (pypi-uri "eventlet" version)) | |
940 | (sha256 | |
941 | (base32 | |
942 | "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s")))) | |
943 | (build-system python-build-system) | |
944 | (propagated-inputs | |
945 | `(("python-greenlet" ,python-greenlet))) | |
946 | (arguments | |
947 | ;; TODO: Requires unpackaged 'enum-compat'. | |
948 | '(#:tests? #f)) | |
949 | (home-page "http://eventlet.net") | |
950 | (synopsis "Concurrent networking library for Python") | |
951 | (description | |
952 | "Eventlet is a concurrent networking library for Python that | |
953 | allows you to change how you run your code, not how you write it. | |
954 | It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O. | |
955 | Coroutines ensure that the developer uses a blocking style of programming | |
956 | that is similar to threading, but provide the benefits of non-blocking I/O. | |
957 | The event dispatch is implicit, which means you can easily use @code{Eventlet} | |
958 | from the Python interpreter, or as a small part of a larger application.") | |
959 | (license license:expat))) | |
960 | ||
961 | (define-public python2-eventlet | |
962 | (let ((base (package-with-python2 | |
963 | (strip-python2-variant python-eventlet)))) | |
964 | (package (inherit base) | |
965 | (propagated-inputs | |
966 | `(("python2-enum34" ,python2-enum34) | |
967 | ,@(package-propagated-inputs base)))))) | |
968 | ||
969 | (define-public python-six | |
970 | (package | |
971 | (name "python-six") | |
972 | (version "1.11.0") | |
973 | (source | |
974 | (origin | |
975 | (method url-fetch) | |
976 | (uri (pypi-uri "six" version)) | |
977 | (sha256 | |
978 | (base32 | |
979 | "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h")))) | |
980 | (build-system python-build-system) | |
981 | (arguments | |
982 | `(#:phases | |
983 | (modify-phases %standard-phases | |
984 | (replace 'check | |
985 | (lambda _ | |
986 | (invoke "py.test" "-v")))))) | |
987 | (native-inputs | |
988 | `(("python-py" ,python-py) | |
989 | ("python-pytest" ,python-pytest-bootstrap))) | |
990 | (home-page "https://pypi.python.org/pypi/six/") | |
991 | (synopsis "Python 2 and 3 compatibility utilities") | |
992 | (description | |
993 | "Six is a Python 2 and 3 compatibility library. It provides utility | |
994 | functions for smoothing over the differences between the Python versions with | |
995 | the goal of writing Python code that is compatible on both Python versions. | |
996 | Six supports every Python version since 2.5. It is contained in only one | |
997 | Python file, so it can be easily copied into your project.") | |
998 | (license license:x11))) | |
999 | ||
1000 | (define-public python2-six | |
1001 | (package-with-python2 python-six)) | |
1002 | ||
1003 | (define-public python-six-bootstrap | |
1004 | (package | |
1005 | (inherit python-six) | |
1006 | (name "python-six-bootstrap") | |
1007 | (native-inputs `()) | |
1008 | (arguments `(#:tests? #f)))) | |
1009 | ||
1010 | (define-public python2-six-bootstrap | |
1011 | (package-with-python2 python-six-bootstrap)) | |
1012 | ||
1013 | (define-public python-schedule | |
1014 | (package | |
1015 | (name "python-schedule") | |
1016 | (version "0.4.3") | |
1017 | (source | |
1018 | (origin | |
1019 | (method url-fetch) | |
1020 | (uri (pypi-uri "schedule" version)) | |
1021 | (sha256 | |
1022 | (base32 | |
1023 | "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i")))) | |
1024 | (build-system python-build-system) | |
1025 | (native-inputs | |
1026 | `(("python-pytest" ,python-pytest) | |
1027 | ("python-mock" ,python-mock))) | |
1028 | (home-page "https://github.com/dbader/schedule") | |
1029 | (synopsis "Schedule periodic function calls in Python") | |
1030 | (description | |
1031 | "Schedule is an in-process scheduler for periodic jobs that uses the | |
1032 | builder pattern for configuration. Schedule lets you run Python functions (or | |
1033 | any other callable) periodically at pre-determined intervals using a simple, | |
1034 | human-friendly syntax.") | |
1035 | (license license:expat))) | |
1036 | ||
1037 | (define-public python2-schedule | |
1038 | (package-with-python2 python-schedule)) | |
1039 | ||
1040 | (define-public python-pandas | |
1041 | (package | |
1042 | (name "python-pandas") | |
c0d43f62 | 1043 | (version "0.24.2") |
44d10b1f RW |
1044 | (source |
1045 | (origin | |
1046 | (method url-fetch) | |
1047 | (uri (pypi-uri "pandas" version)) | |
1048 | (sha256 | |
c0d43f62 | 1049 | (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag")))) |
44d10b1f RW |
1050 | (build-system python-build-system) |
1051 | (arguments | |
1052 | `(#:modules ((guix build utils) | |
1053 | (guix build python-build-system) | |
1054 | (ice-9 ftw) | |
1055 | (srfi srfi-26)) | |
1056 | #:phases (modify-phases %standard-phases | |
c0d43f62 MC |
1057 | (add-after 'unpack 'patch-which |
1058 | (lambda* (#:key inputs #:allow-other-keys) | |
1059 | (let ((which (assoc-ref inputs "which"))) | |
1060 | (substitute* "pandas/io/clipboard/__init__.py" | |
1061 | (("^CHECK_CMD = .*") | |
1062 | (string-append "CHECK_CMD = \"" which "\"\n")))) | |
1063 | #t)) | |
44d10b1f RW |
1064 | (replace 'check |
1065 | (lambda _ | |
1066 | (let ((build-directory | |
1067 | (string-append | |
1068 | (getcwd) "/build/" | |
1069 | (car (scandir "build" | |
1070 | (cut string-prefix? "lib." <>)))))) | |
1071 | ;; Disable the "strict data files" option which causes | |
c0d43f62 MC |
1072 | ;; the build to error out if required data files are |
1073 | ;; not available (as is the case with PyPI archives). | |
44d10b1f RW |
1074 | (substitute* "setup.cfg" |
1075 | (("addopts = --strict-data-files") "addopts = ")) | |
1076 | (with-directory-excursion build-directory | |
c0d43f62 MC |
1077 | ;; Delete tests that require "moto" which is not yet |
1078 | ;; in Guix. | |
44d10b1f RW |
1079 | (for-each delete-file |
1080 | '("pandas/tests/io/conftest.py" | |
1081 | "pandas/tests/io/json/test_compression.py" | |
1082 | "pandas/tests/io/parser/test_network.py" | |
44d10b1f RW |
1083 | "pandas/tests/io/test_parquet.py")) |
1084 | (invoke "pytest" "-vv" "pandas" "--skip-slow" | |
1085 | "--skip-network" "-k" | |
1086 | ;; XXX: Due to the deleted tests above. | |
1087 | "not test_read_s3_jsonl")))))))) | |
1088 | (propagated-inputs | |
1089 | `(("python-numpy" ,python-numpy) | |
667c6ef5 | 1090 | ("python-openpyxl" ,python-openpyxl) |
44d10b1f | 1091 | ("python-pytz" ,python-pytz) |
667c6ef5 MC |
1092 | ("python-dateutil" ,python-dateutil) |
1093 | ("python-xlrd" ,python-xlrd))) | |
c0d43f62 MC |
1094 | (inputs |
1095 | `(("which" ,which))) | |
44d10b1f RW |
1096 | (native-inputs |
1097 | `(("python-cython" ,python-cython) | |
1098 | ("python-beautifulsoup4" ,python-beautifulsoup4) | |
1099 | ("python-lxml" ,python-lxml) | |
1100 | ("python-html5lib" ,python-html5lib) | |
1101 | ("python-nose" ,python-nose) | |
c0d43f62 MC |
1102 | ("python-pytest" ,python-pytest) |
1103 | ("python-pytest-mock" ,python-pytest-mock))) | |
44d10b1f RW |
1104 | (home-page "https://pandas.pydata.org") |
1105 | (synopsis "Data structures for data analysis, time series, and statistics") | |
1106 | (description | |
1107 | "Pandas is a Python package providing fast, flexible, and expressive data | |
1108 | structures designed to make working with structured (tabular, | |
1109 | multidimensional, potentially heterogeneous) and time series data both easy | |
1110 | and intuitive. It aims to be the fundamental high-level building block for | |
1111 | doing practical, real world data analysis in Python.") | |
1112 | (license license:bsd-3))) | |
1113 | ||
1114 | (define-public python2-pandas | |
1115 | (package-with-python2 python-pandas)) | |
1116 | ||
1117 | (define-public python2-mechanize | |
1118 | (package | |
1119 | (name "python2-mechanize") | |
1120 | (version "0.2.5") | |
1121 | (source | |
1122 | (origin | |
1123 | (method url-fetch) | |
1cc184e6 | 1124 | (uri (pypi-uri "mechanize" version)) |
44d10b1f RW |
1125 | (sha256 |
1126 | (base32 | |
1127 | "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf")))) | |
1128 | (build-system python-build-system) | |
1129 | (arguments | |
1130 | `(#:python ,python-2 ; apparently incompatible with Python 3 | |
1131 | #:tests? #f)) | |
1132 | ;; test fails with message | |
1133 | ;; AttributeError: 'module' object has no attribute 'test_pullparser' | |
1134 | ;; (python-3.3.2) or | |
1135 | ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet' | |
1136 | ;; (python-2.7.5). | |
1137 | ;; The source code is from March 2011 and probably not up-to-date | |
1138 | ;; with respect to python unit tests. | |
1139 | (home-page "http://wwwsearch.sourceforge.net/mechanize/") | |
1140 | (synopsis | |
1141 | "Stateful programmatic web browsing in Python") | |
1142 | (description | |
1143 | "Mechanize implements stateful programmatic web browsing in Python, | |
1144 | after Andy Lester’s Perl module WWW::Mechanize.") | |
1145 | (license (license:non-copyleft | |
1146 | "file://COPYING" | |
1147 | "See COPYING in the distribution.")))) | |
1148 | ||
1149 | ||
1150 | (define-public python-simplejson | |
1151 | (package | |
1152 | (name "python-simplejson") | |
1153 | (version "3.14.0") | |
1154 | (source | |
1155 | (origin | |
1156 | (method url-fetch) | |
1157 | (uri (pypi-uri "simplejson" version)) | |
1158 | (sha256 | |
1159 | (base32 | |
1160 | "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy")))) | |
1161 | (build-system python-build-system) | |
1162 | (home-page "http://simplejson.readthedocs.org/en/latest/") | |
1163 | (synopsis | |
1164 | "Json library for Python") | |
1165 | (description | |
1166 | "JSON (JavaScript Object Notation) is a subset of JavaScript | |
1167 | syntax (ECMA-262 3rd edition) used as a lightweight data interchange | |
1168 | format. | |
1169 | ||
1170 | Simplejson exposes an API familiar to users of the standard library marshal | |
1171 | and pickle modules. It is the externally maintained version of the json | |
1172 | library contained in Python 2.6, but maintains compatibility with Python 2.5 | |
1173 | and (currently) has significant performance advantages, even without using | |
1174 | the optional C extension for speedups. Simplejson is also supported on | |
1175 | Python 3.3+.") | |
1176 | (license license:x11))) | |
1177 | ||
1178 | (define-public python2-simplejson | |
1179 | (package-with-python2 python-simplejson)) | |
1180 | ||
1181 | ||
1182 | (define-public python-pyicu | |
1183 | (package | |
1184 | (name "python-pyicu") | |
1185 | (version "2.2") | |
1186 | (source | |
1187 | (origin | |
1188 | (method url-fetch) | |
1189 | (uri (pypi-uri "PyICU" version)) | |
1190 | (sha256 | |
1191 | (base32 | |
1192 | "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa")))) | |
1193 | (build-system python-build-system) | |
1194 | (inputs | |
1195 | `(("icu4c" ,icu4c))) | |
1196 | (native-inputs | |
1197 | `(("python-pytest" ,python-pytest) | |
1198 | ("python-six" ,python-six))) | |
1199 | (home-page "https://github.com/ovalhub/pyicu") | |
1200 | (synopsis "Python extension wrapping the ICU C++ API") | |
1201 | (description | |
1202 | "PyICU is a python extension wrapping the ICU C++ API.") | |
1203 | (properties `((python2-variant . ,(delay python2-pyicu)))) | |
1204 | (license license:x11))) | |
1205 | ||
1206 | (define-public python2-pyicu | |
1207 | (let ((base (package-with-python2 | |
1208 | (strip-python2-variant python-pyicu)))) | |
1209 | (package | |
1210 | (inherit base) | |
1211 | (arguments | |
1212 | `(,@(package-arguments base) | |
1213 | #:phases | |
1214 | (modify-phases %standard-phases | |
1215 | (add-before 'check 'delete-failing-test | |
1216 | (λ _ | |
1217 | ;; XXX: This fails due to Unicode issues unique to Python 2, | |
1218 | ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>. | |
1219 | (delete-file "test/test_Script.py") | |
1220 | #t)))))))) | |
1221 | ||
1222 | (define-public python2-dogtail | |
1223 | ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and | |
1224 | ;; spaces in indentation" with Python 3. | |
1225 | (package | |
1226 | (name "python2-dogtail") | |
1227 | (version "0.9.9") | |
1228 | (source (origin | |
1229 | (method url-fetch) | |
1230 | (uri (pypi-uri "dogtail" version)) | |
1231 | (sha256 | |
1232 | (base32 | |
1233 | "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x")))) | |
1234 | (build-system python-build-system) | |
1235 | (arguments `(#:python ,python-2 | |
1236 | #:tests? #f)) ; invalid command "test" | |
1237 | ;; Currently no offical homepage. | |
1238 | (home-page "https://pypi.python.org/pypi/dogtail/") | |
1239 | (synopsis "GUI test tool and automation framework written in Python") | |
1240 | (description | |
1241 | "Dogtail is a GUI test tool and automation framework written in Python. | |
1242 | It uses Accessibility (a11y) technologies to communicate with desktop | |
1243 | applications. dogtail scripts are written in Python and executed like any | |
1244 | other Python program.") | |
1245 | (license license:gpl2+))) | |
1246 | ||
1247 | (define-public python-empy | |
1248 | (package | |
1249 | (name "python-empy") | |
0f6d5115 | 1250 | (version "3.3.3") |
44d10b1f RW |
1251 | (source (origin |
1252 | (method url-fetch) | |
1253 | (uri (string-append "http://www.alcyone.com/software/empy/empy-" | |
1254 | version ".tar.gz")) | |
1255 | (sha256 | |
1256 | (base32 | |
0f6d5115 | 1257 | "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq")))) |
44d10b1f RW |
1258 | (build-system python-build-system) |
1259 | (arguments | |
0f6d5115 | 1260 | `(#:tests? #f)) ; python2 only |
44d10b1f RW |
1261 | (home-page "http://www.alcyone.com/software/empy/") |
1262 | (synopsis "Templating system for Python") | |
1263 | (description | |
1264 | "EmPy is a system for embedding Python expressions and statements in | |
1265 | template text; it takes an EmPy source file, processes it, and produces | |
1266 | output. This is accomplished via expansions, which are special signals to the | |
1267 | EmPy system and are set off by a special prefix (by default the at sign, @@). | |
1268 | EmPy can expand arbitrary Python expressions and statements in this way, as | |
1269 | well as a variety of special forms. Textual data not explicitly delimited in | |
1270 | this way is sent unaffected to the output, allowing Python to be used in | |
1271 | effect as a markup language. Also supported are callbacks via hooks, | |
1272 | recording and playback via diversions, and dynamic, chainable filters. The | |
1273 | system is highly configurable via command line options and embedded | |
1274 | commands.") | |
1275 | (license license:lgpl2.1+))) | |
1276 | ||
1277 | (define-public python2-empy | |
0f064242 TGR |
1278 | (let ((base (package-with-python2 (strip-python2-variant python-empy)))) |
1279 | (package | |
1280 | (inherit base) | |
1281 | (arguments `(,@(package-arguments base) | |
1282 | #:tests? #t))))) | |
44d10b1f RW |
1283 | |
1284 | (define-public python2-element-tree | |
1285 | (package | |
1286 | (name "python2-element-tree") | |
1287 | (version "1.2.6") | |
1288 | (source (origin | |
1289 | (method url-fetch) | |
1290 | (uri (string-append | |
1291 | "http://effbot.org/media/downloads/elementtree-" | |
1292 | version "-20050316.tar.gz")) | |
1293 | (sha256 | |
1294 | (base32 | |
1295 | "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj")))) | |
1296 | (build-system python-build-system) | |
1297 | (arguments | |
1298 | `(#:python ,python-2 ; seems to be part of Python 3 | |
1299 | #:tests? #f)) ; no 'test' sub-command | |
1300 | (synopsis "Toolkit for XML processing in Python") | |
1301 | (description | |
1302 | "ElementTree is a Python library supporting lightweight XML processing.") | |
1303 | (home-page "http://effbot.org/zone/element-index.htm") | |
1304 | (license (license:x11-style | |
1305 | "http://docs.python.org/2/license.html" | |
1306 | "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\".")))) | |
1307 | ||
1308 | (define-public python2-pybugz | |
1309 | (package | |
1310 | (name "python2-pybugz") | |
1311 | (version "0.6.11") | |
1312 | (source (origin | |
1313 | (method url-fetch) | |
1314 | (uri (string-append | |
1315 | "http://bits.liquidx.net/projects/pybugz/pybugz-" | |
1316 | version ".tar.gz")) | |
1317 | (sha256 | |
1318 | (base32 | |
1319 | "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd")) | |
1320 | (patches (search-patches "pybugz-stty.patch" | |
1321 | "pybugz-encode-error.patch")))) | |
1322 | (build-system python-build-system) | |
1323 | (arguments | |
1324 | `(#:python ,python-2 ; SyntaxError with Python 3 | |
1325 | #:tests? #f)) ; no 'test' sub-command | |
1326 | (propagated-inputs | |
1327 | `(("element-tree" ,python2-element-tree))) | |
1328 | (synopsis "Python and command-line interface to Bugzilla") | |
1329 | (description | |
1330 | "PyBugz is a Python library and command-line tool to query the Bugzilla | |
1331 | bug tracking system. It is meant as an aid to speed up interaction with the | |
1332 | bug tracker.") | |
1333 | (home-page "http://www.liquidx.net/pybugz/") | |
1334 | (license license:gpl2))) | |
1335 | ||
1336 | (define-public python2-enum | |
1337 | (package | |
1338 | (name "python2-enum") | |
1339 | (version "0.4.6") | |
1340 | (source (origin | |
1341 | (method url-fetch) | |
1342 | (uri (pypi-uri "enum" version)) | |
1343 | (sha256 | |
1344 | (base32 | |
1345 | "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl")))) | |
1346 | (build-system python-build-system) | |
1347 | (arguments | |
1348 | `(#:python ,python-2)) | |
1349 | (home-page "http://pypi.python.org/pypi/enum/") | |
1350 | (synopsis "Robust enumerated type support in Python") | |
1351 | (description | |
1352 | "This provides a module for robust enumerations in Python. It has | |
1353 | been superseded by the Python standard library and is provided only for | |
1354 | compatibility.") | |
1355 | ;; Choice of either license. | |
1356 | (license (list license:gpl3+ license:psfl)))) | |
1357 | ||
1358 | (define-public python-enum34 | |
1359 | (package | |
1360 | (name "python-enum34") | |
1361 | (version "1.1.6") | |
1362 | (source | |
1363 | (origin | |
1364 | (method url-fetch) | |
1365 | (uri (pypi-uri "enum34" version)) | |
1366 | (sha256 | |
1367 | (base32 | |
1368 | "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a")))) | |
1369 | (build-system python-build-system) | |
1370 | (home-page "https://pypi.python.org/pypi/enum34") | |
1371 | (synopsis "Backported Python 3.4 Enum") | |
1372 | (description | |
1373 | "Enum34 is the new Python stdlib enum module available in Python 3.4 | |
1374 | backported for previous versions of Python from 2.4 to 3.3.") | |
1375 | (license license:bsd-3))) | |
1376 | ||
1377 | (define-public python2-enum34 | |
1378 | (package-with-python2 python-enum34)) | |
1379 | ||
1380 | (define-public python-parse-type | |
1381 | (package | |
1382 | (name "python-parse-type") | |
1383 | (version "0.4.2") | |
1384 | (source | |
1385 | (origin | |
1386 | (method url-fetch) | |
1387 | (uri (pypi-uri "parse_type" version)) | |
1388 | (sha256 | |
1389 | (base32 | |
1390 | "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm")))) | |
1391 | (build-system python-build-system) | |
1392 | (propagated-inputs | |
1393 | `(("python-six" ,python-six) | |
1394 | ("python-parse" ,python-parse))) | |
1395 | (native-inputs | |
1396 | `(("python-pytest" ,python-pytest) | |
1397 | ("python-pytest-runner" ,python-pytest-runner))) | |
1398 | (home-page "https://github.com/jenisys/parse_type") | |
1399 | (synopsis "Extended parse module") | |
1400 | (description | |
1401 | "Parse_type extends the python parse module.") | |
1402 | (properties | |
1403 | `((python2-variant . ,(delay python2-parse-type)))) | |
1404 | (license license:bsd-3))) | |
1405 | ||
1406 | (define-public python2-parse-type | |
1407 | (let ((base (package-with-python2 | |
1408 | (strip-python2-variant python-parse-type)))) | |
1409 | (package (inherit base) | |
1410 | (propagated-inputs | |
1411 | `(("python2-enum34" ,python2-enum34) | |
1412 | ,@(package-propagated-inputs base)))))) | |
1413 | ||
1414 | (define-public python-parse | |
1415 | (package | |
1416 | (name "python-parse") | |
1417 | (version "1.8.4") | |
1418 | (source | |
1419 | (origin | |
1420 | (method url-fetch) | |
1421 | (uri (pypi-uri "parse" version)) | |
1422 | (sha256 | |
1423 | (base32 | |
1424 | "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3")))) | |
1425 | (build-system python-build-system) | |
1426 | (arguments | |
1427 | `(#:phases | |
1428 | (modify-phases %standard-phases | |
1429 | (replace 'check | |
1430 | (lambda _ (invoke "python" "test_parse.py")))))) | |
1431 | (home-page "https://github.com/r1chardj0n3s/parse") | |
1432 | (synopsis "Parse strings") | |
1433 | (description | |
1434 | "Parse strings using a specification based on the Python @code{format()} | |
1435 | syntax.") | |
1436 | (license license:x11))) | |
1437 | ||
1438 | (define-public python-polib | |
1439 | (package | |
1440 | (name "python-polib") | |
1441 | (version "1.0.8") | |
1442 | (source (origin | |
1443 | (method url-fetch) | |
1444 | (uri (pypi-uri "polib" version)) | |
1445 | (sha256 | |
1446 | (base32 | |
1447 | "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss")))) | |
1448 | (build-system python-build-system) | |
1449 | (home-page "https://bitbucket.org/izi/polib/wiki/Home") | |
1450 | (synopsis "Manipulate, create and modify gettext files") | |
1451 | (description "Polib can manipulate any gettext format (po, pot and mo) | |
1452 | files. It can be used to create po files from scratch or to modify | |
1453 | existing ones.") | |
1454 | (license license:expat))) | |
1455 | ||
1456 | (define-public python2-polib | |
1457 | (let ((base (package-with-python2 (strip-python2-variant python-polib)))) | |
1458 | (package | |
1459 | (inherit base) | |
1460 | (arguments `(,@(package-arguments base) | |
1461 | ;; Tests don't work with python2. | |
1462 | #:tests? #f))))) | |
1463 | ||
1464 | (define-public scons | |
1465 | (package | |
1466 | (name "scons") | |
05487ed8 | 1467 | (version "3.0.4") |
44d10b1f | 1468 | (source (origin |
ad34338d RW |
1469 | (method git-fetch) |
1470 | (uri (git-reference | |
1471 | (url "https://github.com/SCons/scons.git") | |
1472 | (commit version))) | |
1473 | (file-name (git-file-name name version)) | |
44d10b1f RW |
1474 | (sha256 |
1475 | (base32 | |
05487ed8 | 1476 | "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn")))) |
44d10b1f RW |
1477 | (build-system python-build-system) |
1478 | (arguments | |
1479 | `(#:use-setuptools? #f ; still relies on distutils | |
ad34338d RW |
1480 | #:tests? #f ; no 'python setup.py test' command |
1481 | #:phases | |
1482 | (modify-phases %standard-phases | |
1483 | (add-before 'build 'bootstrap | |
1484 | (lambda _ | |
1485 | (substitute* "src/engine/SCons/compat/__init__.py" | |
1486 | (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)") | |
1487 | "sys.modules[new] = __import__(old)")) | |
05487ed8 RW |
1488 | (substitute* "src/engine/SCons/Platform/__init__.py" |
1489 | (("mod = imp.load_module\\(full_name, file, path, desc\\)") | |
1490 | "mod = __import__(full_name)")) | |
ad34338d RW |
1491 | (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix") |
1492 | (chdir "build/scons") | |
1493 | #t))))) | |
44d10b1f RW |
1494 | (home-page "http://scons.org/") |
1495 | (synopsis "Software construction tool written in Python") | |
1496 | (description | |
1497 | "SCons is a software construction tool. Think of SCons as an improved, | |
1498 | cross-platform substitute for the classic Make utility with integrated | |
1499 | functionality similar to autoconf/automake and compiler caches such as ccache. | |
1500 | In short, SCons is an easier, more reliable and faster way to build | |
1501 | software.") | |
1502 | (license license:x11))) | |
1503 | ||
1504 | (define-public scons-python2 | |
1505 | (package | |
1506 | (inherit (package-with-python2 scons)) | |
1507 | (name "scons-python2"))) | |
1508 | ||
1509 | (define-public python-extras | |
1510 | (package | |
1511 | (name "python-extras") | |
1512 | (version "1.0.0") | |
1513 | (source | |
1514 | (origin | |
1515 | (method url-fetch) | |
1516 | (uri (pypi-uri "extras" version)) | |
1517 | (sha256 | |
1518 | (base32 | |
1519 | "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk")))) | |
1520 | (build-system python-build-system) | |
1521 | (arguments | |
1522 | ;; FIXME: Circular dependency on testtools. | |
1523 | '(#:tests? #f)) | |
1524 | (home-page "https://github.com/testing-cabal/extras") | |
1525 | (synopsis "Useful extensions to the Python standard library") | |
1526 | (description | |
1527 | "Extras is a set of extensions to the Python standard library.") | |
1528 | (license license:expat))) | |
1529 | ||
1530 | (define-public python2-extras | |
1531 | (package-with-python2 python-extras)) | |
1532 | ||
1533 | (define-public python-mimeparse | |
1534 | (package | |
1535 | (name "python-mimeparse") | |
1536 | (version "1.6.0") | |
1537 | (source | |
1538 | (origin | |
1539 | (method url-fetch) | |
89bf667c | 1540 | (uri (pypi-uri "python-mimeparse" version)) |
44d10b1f RW |
1541 | (sha256 |
1542 | (base32 | |
1543 | "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n")))) | |
1544 | (build-system python-build-system) | |
1545 | (arguments | |
1546 | '(#:phases | |
1547 | (modify-phases %standard-phases | |
1548 | (replace 'check | |
1549 | (lambda _ | |
1550 | (invoke "./mimeparse_test.py")))))) | |
1551 | (home-page | |
1552 | "https://github.com/dbtsai/python-mimeparse") | |
1553 | (synopsis "Python library for parsing MIME types") | |
1554 | (description | |
1555 | "Mimeparse provides basic functions for parsing MIME type names and | |
1556 | matching them against a list of media-ranges.") | |
1557 | (license license:expat))) | |
1558 | ||
1559 | (define-public python2-mimeparse | |
1560 | (package-with-python2 python-mimeparse)) | |
1561 | ||
1562 | (define-public python-miniboa | |
1563 | (package | |
1564 | (name "python-miniboa") | |
1565 | (version "1.0.7") | |
1566 | (source | |
1567 | (origin | |
1568 | (method url-fetch) | |
1569 | (uri (pypi-uri "miniboa" version)) | |
1570 | (sha256 | |
1571 | (base32 | |
1572 | "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3")))) | |
1573 | (build-system python-build-system) | |
1574 | (home-page "https://github.com/shmup/miniboa") | |
1575 | (synopsis "Simple, single-threaded Telnet server") | |
1576 | (description | |
1577 | "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet | |
1578 | server.") | |
1579 | (license license:asl2.0))) | |
1580 | ||
1581 | (define-public python2-miniboa | |
1582 | (package-with-python2 python-miniboa)) | |
1583 | ||
1584 | (define-public python-pafy | |
1585 | (package | |
1586 | (name "python-pafy") | |
1587 | (version "0.5.3.1") | |
1588 | (source | |
1589 | (origin | |
1590 | (method url-fetch) | |
1591 | (uri (pypi-uri "pafy" version)) | |
1592 | (sha256 | |
1593 | (base32 | |
1594 | "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim")))) | |
1595 | (build-system python-build-system) | |
1596 | (arguments | |
1597 | `(#:tests? #f)) ; Currently pafy can not find itself in the tests | |
1598 | (propagated-inputs | |
1599 | ;; Youtube-dl is a python package which is imported in the file | |
1600 | ;; "backend_youtube_dl.py", therefore it needs to be propagated. | |
1601 | `(("youtube-dl" ,youtube-dl))) | |
1602 | (home-page "https://np1.github.io/pafy/") | |
1603 | (synopsis "Retrieve YouTube content and metadata") | |
1604 | (description | |
1605 | "@code{pafy} is a python library to retrieve YouTube content and metadata.") | |
1606 | (license license:lgpl3+))) | |
1607 | ||
1608 | (define-public python2-funcsigs | |
1609 | (package | |
1610 | (name "python2-funcsigs") | |
1611 | (version "1.0.2") | |
1612 | (source (origin | |
1613 | (method url-fetch) | |
1614 | (uri (pypi-uri "funcsigs" version)) | |
1615 | (sha256 | |
1616 | (base32 | |
1617 | "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7")))) | |
1618 | (build-system python-build-system) | |
1619 | (arguments | |
1620 | `(#:python ,python-2)) | |
1621 | (native-inputs | |
1622 | `(("python2-unittest2" ,python2-unittest2))) | |
1623 | (home-page "http://funcsigs.readthedocs.org") | |
1624 | (synopsis "Python function signatures from PEP362") | |
1625 | (description | |
1626 | "Backport of @code{funcsigs} which was introduced in Python 3.3.") | |
1627 | (license license:asl2.0))) | |
1628 | ||
1629 | (define-public python2-funcsigs-bootstrap | |
1630 | (package | |
1631 | (inherit python2-funcsigs) | |
1632 | (name "python2-funcsigs-bootstrap") | |
1633 | (native-inputs `()) | |
1634 | (arguments | |
1635 | `(#:tests? #f | |
1636 | ,@(package-arguments python2-funcsigs))))) | |
1637 | ||
1638 | (define-public python-py | |
1639 | (package | |
1640 | (name "python-py") | |
1641 | (version "1.5.4") | |
1642 | (source | |
1643 | (origin | |
1644 | (method url-fetch) | |
1645 | (uri (pypi-uri "py" version)) | |
1646 | (sha256 | |
1647 | (base32 | |
1648 | "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z")))) | |
1649 | (build-system python-build-system) | |
1650 | (arguments | |
1651 | ;; FIXME: "ImportError: 'test' module incorrectly imported from | |
1652 | ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'. | |
1653 | ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'. | |
1654 | ;; Is this module globally installed?" | |
1655 | '(#:tests? #f)) | |
1656 | (native-inputs | |
1657 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
1658 | (home-page "https://github.com/pytest-dev/py") | |
1659 | (synopsis "Python library for parsing, I/O, instrospection, and logging") | |
1660 | (description | |
1661 | "Py is a Python library for file name parsing, .ini file parsing, I/O, | |
1662 | code introspection, and logging.") | |
1663 | (license license:expat))) | |
1664 | ||
1665 | (define-public python2-py | |
1666 | (package-with-python2 python-py)) | |
1667 | ||
1668 | ;; Recent versions of python-fixtures and python-testrepository need | |
1669 | ;; python-pbr for packaging, which itself needs these two packages for | |
1670 | ;; testing. | |
1671 | ;; To fix this circular dependency, we use a build of python-pbr, based on the | |
1672 | ;; same source, just without any test dependencies and with tests disabled. | |
1673 | ;; python-pbr-minmal is then used to package python-fixtures and | |
1674 | ;; python-testrepository. | |
1675 | ;; Strictly speaking we currently could remove the test-requirements from the | |
1676 | ;; normal python-pbr package (and save this package) since test are disabled | |
1677 | ;; there anyway. But this may change in future. | |
1678 | (define-public python-pbr-minimal | |
1679 | (package | |
1680 | (name "python-pbr-minimal") | |
1681 | (version "3.0.1") | |
1682 | (source | |
1683 | (origin | |
1684 | (method url-fetch) | |
1685 | (uri (pypi-uri "pbr" version)) | |
1686 | (sha256 | |
1687 | (base32 | |
1688 | "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p")))) | |
1689 | (build-system python-build-system) | |
1690 | (arguments | |
1691 | `(#:tests? #f)) | |
1692 | (home-page "http://docs.openstack.org/developer/pbr/") | |
1693 | (synopsis "Minimal build of python-pbr used for bootstrapping") | |
1694 | (description | |
1695 | "Used only for bootstrapping python2-pbr, you should not need this.") | |
1696 | (license license:asl2.0))) | |
1697 | ||
1698 | (define-public python2-pbr-minimal | |
1699 | (package-with-python2 python-pbr-minimal)) | |
1700 | ||
1701 | (define-public python-pbr | |
1702 | (package | |
1703 | (inherit python-pbr-minimal) | |
1704 | (name "python-pbr") | |
1705 | (arguments | |
1706 | `(#:tests? #f)) ;; Most tests seem to use the Internet. | |
1707 | (propagated-inputs | |
1708 | `(("git" ,git))) ;; pbr actually uses the "git" binary. | |
1709 | (native-inputs | |
1710 | `(("python-fixtures" ,python-fixtures-bootstrap) | |
1711 | ;; discover, coverage, hacking, subunit | |
1712 | ("python-mock" ,python-mock) | |
1713 | ("python-six" ,python-six) | |
1714 | ("python-sphinx" ,python-sphinx) | |
1715 | ("python-testrepository" ,python-testrepository-bootstrap) | |
1716 | ("python-testresources" ,python-testresources-bootstrap) | |
1717 | ("python-testscenarios" ,python-testscenarios-bootstrap) | |
1718 | ("python-testtools" ,python-testtools-bootstrap) | |
1719 | ("python-virtualenv" ,python-virtualenv))) | |
1720 | (synopsis "Enhance the default behavior of Python’s setuptools") | |
1721 | (description | |
1722 | "Python Build Reasonableness (PBR) is a library that injects some useful | |
1723 | and sensible default behaviors into your setuptools run. It will set | |
1724 | versions, process requirements files and generate AUTHORS and ChangeLog file | |
1725 | from git information. | |
1726 | "))) | |
1727 | ||
1728 | (define-public python2-pbr | |
1729 | (package-with-python2 python-pbr)) | |
1730 | ||
ea43f0d5 MB |
1731 | (define-public python-pyrsistent |
1732 | (package | |
1733 | (name "python-pyrsistent") | |
1734 | (version "0.14.11") | |
1735 | (home-page "https://github.com/tobgu/pyrsistent") | |
1736 | (source (origin | |
1737 | (method url-fetch) | |
1738 | (uri (pypi-uri "pyrsistent" version)) | |
1739 | (sha256 | |
1740 | (base32 | |
1741 | "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w")))) | |
1742 | (build-system python-build-system) | |
1743 | (native-inputs | |
1744 | `(("python-hypothesis" ,python-hypothesis) | |
1745 | ("python-pytest" ,python-pytest) | |
1746 | ("python-pytest-runner" ,python-pytest-runner))) | |
1747 | (propagated-inputs | |
1748 | `(("python-six" ,python-six))) | |
1749 | (synopsis "Persistent data structures for Python") | |
1750 | (description | |
1751 | "Pyrsistent is a number of persistent collections (by some referred to as | |
1752 | functional data structures). Persistent in the sense that they are immutable. | |
1753 | ||
1754 | All methods on a data structure that would normally mutate it instead return a | |
1755 | new copy of the structure containing the requested updates. The original | |
1756 | structure is left untouched.") | |
1757 | (license license:expat))) | |
1758 | ||
1759 | (define-public python2-pyrsistent | |
1760 | (package-with-python2 python-pyrsistent)) | |
1761 | ||
44d10b1f RW |
1762 | (define-public python-exif-read |
1763 | (package | |
1764 | (name "python-exif-read") | |
1765 | (version "2.1.2") | |
1766 | (source (origin | |
1767 | (method url-fetch) | |
1768 | (uri (pypi-uri "ExifRead" version)) | |
1769 | (sha256 | |
1770 | (base32 | |
1771 | "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr")))) | |
1772 | (build-system python-build-system) | |
1773 | (arguments `(#:tests? #f)) ; no tests | |
1774 | (home-page "https://github.com/ianare/exif-py") | |
1775 | (synopsis "Python library to extract EXIF data from image files") | |
1776 | (description | |
1777 | "ExifRead is a Python library to extract EXIF data from tiff and jpeg | |
1778 | files.") | |
1779 | (license license:bsd-3))) | |
1780 | ||
1781 | (define-public python2-exif-read | |
1782 | (package-with-python2 python-exif-read)) | |
1783 | ||
1784 | (define-public python-pyld | |
1785 | (package | |
1786 | (name "python-pyld") | |
1787 | (version "1.0.3") | |
1788 | (source (origin | |
1789 | (method url-fetch) | |
1790 | (uri (pypi-uri "PyLD" version)) | |
1791 | (sha256 | |
1792 | (base32 | |
1793 | "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm")))) | |
1794 | (build-system python-build-system) | |
1795 | (home-page "https://github.com/digitalbazaar/pyld") | |
1796 | (synopsis "Python implementation of the JSON-LD specification") | |
1797 | (description | |
1798 | "PyLD is an implementation of the JSON-LD specification.") | |
1799 | (license license:bsd-3))) | |
1800 | ||
1801 | (define-public python2-pyld | |
1802 | (package-with-python2 python-pyld)) | |
1803 | ||
1804 | (define-public python-click | |
1805 | (package | |
1806 | (name "python-click") | |
61984855 | 1807 | (version "7.0") |
44d10b1f RW |
1808 | (source |
1809 | (origin | |
1810 | (method url-fetch) | |
1811 | (uri (pypi-uri "click" version)) | |
1812 | (sha256 | |
1813 | (base32 | |
61984855 | 1814 | "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v")))) |
44d10b1f RW |
1815 | (build-system python-build-system) |
1816 | (arguments | |
8d7e7ca6 | 1817 | `(#:phases |
44d10b1f RW |
1818 | (modify-phases %standard-phases |
1819 | (add-after 'unpack 'fix-paths | |
1820 | (lambda* (#:key inputs #:allow-other-keys) | |
1821 | (let ((glibc (assoc-ref inputs ,(if (%current-target-system) | |
1822 | "cross-libc" "libc")))) | |
1823 | (substitute* "click/_unicodefun.py" | |
1824 | (("'locale'") | |
1825 | (string-append "'" glibc "/bin/locale'")))) | |
8d7e7ca6 EF |
1826 | #t)) |
1827 | (replace 'check | |
1828 | (lambda _ | |
1829 | (invoke "python" "-m" "pytest")))))) | |
44d10b1f RW |
1830 | (native-inputs |
1831 | `(("python-pytest" ,python-pytest))) | |
61984855 | 1832 | (home-page "https://palletsprojects.com/p/click/") |
44d10b1f RW |
1833 | (synopsis "Command line library for Python") |
1834 | (description | |
1835 | "Click is a Python package for creating command line interfaces in a | |
1836 | composable way with as little code as necessary. Its name stands for | |
1837 | \"Command Line Interface Creation Kit\". It's highly configurable but comes | |
1838 | with sensible defaults out of the box.") | |
1839 | (license license:bsd-3))) | |
1840 | ||
1841 | (define-public python2-click | |
1842 | (package-with-python2 python-click)) | |
1843 | ||
1844 | (define-public python-wheel | |
1845 | (package | |
1846 | (name "python-wheel") | |
746c074b | 1847 | (version "0.32.3") |
44d10b1f RW |
1848 | (source |
1849 | (origin | |
1850 | (method url-fetch) | |
1851 | (uri (pypi-uri "wheel" version)) | |
1852 | (sha256 | |
1853 | (base32 | |
746c074b | 1854 | "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2")))) |
44d10b1f RW |
1855 | (build-system python-build-system) |
1856 | (native-inputs | |
1857 | `(("python-jsonschema" ,python-jsonschema) | |
1858 | ("python-pytest-cov" ,python-pytest-cov))) | |
1859 | (home-page "https://bitbucket.org/pypa/wheel/") | |
1860 | (synopsis "Format for built Python packages") | |
1861 | (description | |
1862 | "A wheel is a ZIP-format archive with a specially formatted filename and | |
1863 | the @code{.whl} extension. It is designed to contain all the files for a PEP | |
1864 | 376 compatible install in a way that is very close to the on-disk format. Many | |
1865 | packages will be properly installed with only the @code{Unpack} step and the | |
1866 | unpacked archive preserves enough information to @code{Spread} (copy data and | |
1867 | scripts to their final locations) at any later time. Wheel files can be | |
1868 | installed with a newer @code{pip} or with wheel's own command line utility.") | |
1869 | (license license:expat) | |
1870 | (properties `((python2-variant . ,(delay python2-wheel)))))) | |
1871 | ||
1872 | (define-public python2-wheel | |
1873 | (let ((wheel (package-with-python2 | |
1874 | (strip-python2-variant python-wheel)))) | |
1875 | (package (inherit wheel) | |
1876 | (native-inputs `(("python2-functools32" ,python2-functools32) | |
1877 | ,@(package-native-inputs wheel)))))) | |
1878 | ||
1879 | (define-public python-vcversioner | |
1880 | (package | |
1881 | (name "python-vcversioner") | |
1882 | (version "2.16.0.0") | |
1883 | (source | |
1884 | (origin | |
1885 | (method url-fetch) | |
1886 | (uri (pypi-uri "vcversioner" version)) | |
1887 | (sha256 | |
1888 | (base32 | |
1889 | "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns")))) | |
1890 | (build-system python-build-system) | |
1891 | (synopsis "Python library for version number discovery") | |
1892 | (description "Vcversioner is a Python library that inspects tagging | |
1893 | information in a variety of version control systems in order to discover | |
1894 | version numbers.") | |
1895 | (home-page "https://github.com/habnabit/vcversioner") | |
1896 | (license license:isc))) | |
1897 | ||
1898 | (define-public python2-vcversioner | |
1899 | (package-with-python2 python-vcversioner)) | |
1900 | ||
5591fc4f MC |
1901 | (define-public python-jdcal |
1902 | (package | |
1903 | (name "python-jdcal") | |
1904 | (version "1.4") | |
1905 | (source | |
1906 | (origin | |
1907 | (method url-fetch) | |
1908 | (uri (pypi-uri "jdcal" version)) | |
1909 | (sha256 | |
1910 | (base32 | |
1911 | "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa")))) | |
1912 | (build-system python-build-system) | |
1913 | (arguments | |
1914 | `(#:phases (modify-phases %standard-phases | |
1915 | (replace 'check | |
1916 | (lambda _ | |
1917 | (invoke "pytest")))))) | |
1918 | (native-inputs | |
1919 | `(("python-pytest" ,python-pytest))) | |
1920 | (home-page "https://github.com/phn/jdcal") | |
1921 | (synopsis "Functions to convert between Julian dates Gregorian dates") | |
1922 | (description "This Python library provides functions for converting | |
1923 | between Julian dates and Gregorian dates.") | |
1924 | (license license:bsd-2))) | |
1925 | ||
1926 | (define-public python2-jdcal | |
1927 | (package-with-python2 python-jdcal)) | |
1928 | ||
44d10b1f RW |
1929 | (define-public python-jsonschema |
1930 | (package | |
1931 | (name "python-jsonschema") | |
1adde06e | 1932 | (version "3.0.1") |
44d10b1f RW |
1933 | (source (origin |
1934 | (method url-fetch) | |
786ccb87 | 1935 | (uri (pypi-uri "jsonschema" version)) |
44d10b1f RW |
1936 | (sha256 |
1937 | (base32 | |
1adde06e | 1938 | "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc")))) |
44d10b1f RW |
1939 | (build-system python-build-system) |
1940 | (arguments | |
1941 | '(#:phases | |
1942 | (modify-phases %standard-phases | |
1adde06e MB |
1943 | (replace 'check |
1944 | (lambda _ | |
1945 | (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) | |
1946 | (invoke "trial" "jsonschema")))))) | |
44d10b1f | 1947 | (native-inputs |
1adde06e MB |
1948 | `(("python-setuptools_scm" ,python-setuptools-scm) |
1949 | ("python-twisted" ,python-twisted))) | |
1950 | (propagated-inputs | |
1951 | `(("python-attrs" ,python-attrs) | |
1952 | ("python-pyrsistent" ,python-pyrsistent) | |
1953 | ("python-six" ,python-six))) | |
44d10b1f RW |
1954 | (home-page "https://github.com/Julian/jsonschema") |
1955 | (synopsis "Implementation of JSON Schema for Python") | |
1956 | (description | |
1957 | "Jsonschema is an implementation of JSON Schema for Python.") | |
1958 | (license license:expat) | |
1959 | (properties `((python2-variant . ,(delay python2-jsonschema)))))) | |
1960 | ||
1961 | (define-public python2-jsonschema | |
1962 | (let ((jsonschema (package-with-python2 | |
1963 | (strip-python2-variant python-jsonschema)))) | |
1964 | (package (inherit jsonschema) | |
44d10b1f | 1965 | (propagated-inputs |
1adde06e MB |
1966 | `(("python2-functools32" ,python2-functools32) |
1967 | ,@(package-propagated-inputs jsonschema)))))) | |
44d10b1f | 1968 | |
914bba28 TGR |
1969 | ;; This old version is still required by docker-compose as of 1.24.0. |
1970 | (define-public python-jsonschema-2.6 | |
1971 | (package | |
1972 | (name "python-jsonschema") | |
1973 | (version "2.6.0") | |
1974 | (source (origin | |
1975 | (method url-fetch) | |
1976 | (uri (pypi-uri "jsonschema" version)) | |
1977 | (sha256 | |
1978 | (base32 | |
1979 | "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg")))) | |
1980 | (build-system python-build-system) | |
1981 | (arguments | |
1982 | '(#:phases | |
1983 | (modify-phases %standard-phases | |
1984 | (replace 'check (lambda _ (invoke "nosetests")))))) | |
1985 | (native-inputs | |
1986 | `(("python-nose" ,python-nose) | |
1987 | ("python-vcversioner" ,python-vcversioner))) | |
1988 | (home-page "https://github.com/Julian/jsonschema") | |
1989 | (synopsis "Implementation of JSON Schema for Python") | |
1990 | (description | |
1991 | "Jsonschema is an implementation of JSON Schema for Python.") | |
1992 | (license license:expat) | |
1993 | (properties `((python2-variant . ,(delay python2-jsonschema)))))) | |
1994 | ||
44d10b1f RW |
1995 | (define-public python-schema |
1996 | (package | |
1997 | (name "python-schema") | |
1998 | (version "0.6.6") | |
1999 | (source | |
2000 | (origin | |
2001 | (method url-fetch) | |
2002 | (uri (pypi-uri "schema" version)) | |
2003 | (sha256 | |
2004 | (base32 | |
2005 | "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm")))) | |
2006 | (build-system python-build-system) | |
2007 | (native-inputs | |
2008 | `(("python-pytest" ,python-pytest))) | |
2009 | (home-page "https://github.com/keleshev/schema") | |
2010 | (synopsis "Simple data validation library") | |
2011 | (description | |
2012 | "@code{python-schema} is a library for validating Python data | |
2013 | structures, such as those obtained from config-files, forms, external | |
2014 | services or command-line parsing, converted from JSON/YAML (or | |
2015 | something else) to Python data-types.") | |
2016 | (license license:psfl))) | |
2017 | ||
2018 | (define-public python2-schema | |
2019 | (package-with-python2 python-schema)) | |
2020 | ||
2021 | (define-public python-schema-0.5 | |
2022 | (package (inherit python-schema) | |
2023 | (version "0.5.0") | |
2024 | (source | |
2025 | (origin | |
2026 | (method url-fetch) | |
2027 | (uri (pypi-uri "schema" version)) | |
2028 | (sha256 | |
2029 | (base32 | |
2030 | "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s")))))) | |
2031 | ||
2032 | (define-public python2-schema-0.5 | |
2033 | (package-with-python2 python-schema-0.5)) | |
2034 | ||
2035 | (define-public python-kitchen | |
2036 | (package | |
2037 | (name "python-kitchen") | |
2038 | (version "1.2.5") | |
2039 | (source | |
2040 | (origin | |
2041 | (method url-fetch) | |
2042 | (uri (pypi-uri "kitchen" version)) | |
2043 | (sha256 | |
2044 | (base32 | |
2045 | "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg")))) | |
2046 | (build-system python-build-system) | |
2047 | (propagated-inputs | |
2048 | `(("python-chardet" ,python-chardet))) | |
2049 | (home-page "https://github.com/fedora-infra/kitchen") | |
2050 | (synopsis "Python API for snippets") | |
2051 | (description "@code{kitchen} module provides a python API for all sorts of | |
2052 | little useful snippets of code that everybody ends up writing for their projects | |
2053 | but never seem big enough to build an independent release. Use kitchen and stop | |
2054 | cutting and pasting that code over and over.") | |
2055 | (license (list license:lgpl2.1+ | |
2056 | ;; subprocess.py, test_subprocess.py, | |
2057 | ;; kitchen/pycompat25/defaultdict.py: | |
2058 | license:psfl)))) | |
2059 | ||
2060 | (define-public python2-kitchen | |
2061 | (package-with-python2 python-kitchen)) | |
2062 | ||
2063 | (define-public python-unidecode | |
2064 | (package | |
2065 | (name "python-unidecode") | |
bd9d7206 | 2066 | (version "1.1.0") |
44d10b1f RW |
2067 | (source (origin |
2068 | (method url-fetch) | |
2069 | (uri (pypi-uri "Unidecode" version)) | |
2070 | (sha256 | |
2071 | (base32 | |
bd9d7206 | 2072 | "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc")))) |
44d10b1f RW |
2073 | (build-system python-build-system) |
2074 | (home-page "https://pypi.python.org/pypi/Unidecode") | |
2075 | (synopsis "ASCII transliterations of Unicode text") | |
2076 | (description | |
2077 | "Unidecode provides ASCII transliterations of Unicode text. Unidecode is | |
2078 | useful when integrating with legacy code that doesn't support Unicode, or for | |
2079 | ease of entry of non-Roman names on a US keyboard, or when constructing ASCII | |
2080 | machine identifiers from human-readable Unicode strings that should still be | |
2081 | somewhat intelligible.") | |
2082 | (license license:gpl2+))) | |
2083 | ||
2084 | (define-public python2-unidecode | |
2085 | (package-with-python2 python-unidecode)) | |
2086 | ||
2087 | (define-public python-pyjwt | |
2088 | (package | |
2089 | (name "python-pyjwt") | |
2090 | (version "1.5.3") | |
2091 | (source | |
2092 | (origin | |
2093 | (method url-fetch) | |
2094 | (uri (pypi-uri "PyJWT" version)) | |
2095 | (sha256 | |
2096 | (base32 | |
2097 | "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh")) | |
2098 | (modules '((guix build utils))) | |
2099 | (snippet | |
2100 | '(begin | |
2101 | (for-each delete-file-recursively | |
2102 | (find-files "." "\\.pyc$")) | |
2103 | #t)))) | |
2104 | (build-system python-build-system) | |
2105 | (native-inputs | |
2106 | `(("python-pytest" ,python-pytest) | |
2107 | ("python-pytest-cov" ,python-pytest-cov) | |
2108 | ("python-pytest-runner" ,python-pytest-runner))) | |
2109 | (home-page "https://github.com/progrium/pyjwt") | |
2110 | (synopsis "JSON Web Token implementation in Python") | |
2111 | (description | |
2112 | "PyJWT is a JSON Web Token implementation written in Python.") | |
2113 | (license license:expat))) | |
2114 | ||
2115 | (define-public python2-pyjwt | |
2116 | (package-with-python2 python-pyjwt)) | |
2117 | ||
2118 | (define-public python-pykka | |
2119 | (package | |
2120 | (name "python-pykka") | |
2121 | (version "1.2.1") | |
2122 | (source | |
2123 | (origin | |
2124 | (method url-fetch) | |
2125 | (uri (pypi-uri "Pykka" version)) | |
2126 | (sha256 | |
2127 | (base32 | |
2128 | "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8")))) | |
2129 | (build-system python-build-system) | |
2130 | (native-inputs | |
2131 | `(("python-mock" ,python-mock) | |
2132 | ("python-nose" ,python-nose) | |
2133 | ("python-gevent" ,python-gevent) | |
2134 | ("python-eventlet" ,python-eventlet))) | |
2135 | (home-page "https://www.pykka.org/") | |
2136 | (synopsis "Pykka is a Python implementation of the actor model") | |
2137 | (description | |
2138 | "Pykka is a Python implementation of the actor model. | |
2139 | The actor model introduces some simple rules to control the sharing | |
2140 | of state and cooperation between execution units, which makes it | |
2141 | easier to build concurrent applications.") | |
2142 | (license license:asl2.0))) | |
2143 | ||
2144 | (define-public python2-pykka | |
2145 | (package-with-python2 python-pykka)) | |
2146 | ||
8d22f7e3 VC |
2147 | (define-public python-pymsgbox |
2148 | (package | |
2149 | (name "python-pymsgbox") | |
2150 | (version "1.0.6") | |
2151 | (source | |
2152 | (origin | |
2153 | (method git-fetch) | |
2154 | (uri (git-reference | |
2155 | ;; LICENSE.txt is not present on pypi | |
2156 | (url "https://github.com/asweigart/PyMsgBox") | |
2157 | (commit "55926b55f46caa969c5ddb87990ebea2737bd66f"))) | |
2158 | (file-name (git-file-name name version)) | |
2159 | (sha256 | |
2160 | (base32 | |
2161 | "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg")))) | |
2162 | (arguments | |
2163 | ;; Circular dependency to run tests: | |
2164 | ;; Tests need pyautogui, which depends on pymsgbox. | |
2165 | '(#:tests? #f)) | |
2166 | (build-system python-build-system) | |
2167 | (home-page "https://github.com/asweigart/PyMsgBox") | |
2168 | (synopsis "Python module for JavaScript-like message boxes") | |
2169 | (description | |
2170 | "PyMsgBox is a simple, cross-platform, pure Python module for | |
2171 | JavaScript-like message boxes. Types of dialog boxes include: | |
2172 | @enumerate | |
2173 | @item alert | |
2174 | @item confirm | |
2175 | @item prompt | |
2176 | @item password | |
2177 | @end enumerate | |
2178 | ") | |
2179 | (license license:bsd-3))) | |
2180 | ||
44d10b1f RW |
2181 | (define-public python-pympler |
2182 | (package | |
2183 | (name "python-pympler") | |
2184 | (home-page "https://pythonhosted.org/Pympler/") | |
2185 | (version "0.5") | |
2186 | (source (origin | |
2187 | (method url-fetch) | |
2188 | (uri (pypi-uri "Pympler" version)) | |
2189 | (sha256 | |
2190 | (base32 | |
2191 | "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx")))) | |
2192 | (build-system python-build-system) | |
2193 | (arguments | |
2194 | `(#:phases (modify-phases %standard-phases | |
2195 | (delete 'check) | |
2196 | (add-after 'install 'check | |
2197 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2198 | (add-installed-pythonpath inputs outputs) | |
2199 | (invoke "python" "setup.py" "test")))))) | |
2200 | (synopsis "Measure, monitor and analyze memory behavior") | |
2201 | (description | |
2202 | "Pympler is a development tool to measure, monitor and analyze | |
2203 | the memory behavior of Python objects in a running Python application. | |
2204 | ||
2205 | By pympling a Python application, detailed insight in the size and the | |
2206 | lifetime of Python objects can be obtained. Undesirable or unexpected | |
2207 | runtime behavior like memory bloat and other @samp{pymples} can easily | |
2208 | be identified. | |
2209 | ||
2210 | A web profiling frontend exposes process statistics, garbage | |
2211 | visualisation and class tracker statistics.") | |
2212 | (license license:asl2.0))) | |
2213 | ||
2214 | (define-public python2-pympler | |
2215 | (package-with-python2 python-pympler)) | |
2216 | ||
2217 | (define-public python-itsdangerous | |
2218 | (package | |
2219 | (name "python-itsdangerous") | |
acfcf2ed | 2220 | (version "1.1.0") |
44d10b1f RW |
2221 | (source |
2222 | (origin | |
2223 | (method url-fetch) | |
acfcf2ed | 2224 | (uri (pypi-uri "itsdangerous" version)) |
44d10b1f RW |
2225 | (sha256 |
2226 | (base32 | |
acfcf2ed | 2227 | "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj")))) |
44d10b1f | 2228 | (build-system python-build-system) |
acfcf2ed | 2229 | (home-page "https://palletsprojects.com/p/itsdangerous/") |
44d10b1f RW |
2230 | (synopsis "Python library for passing data to/from untrusted environments") |
2231 | (description | |
2232 | "Itsdangerous provides various helpers to pass trusted data to untrusted | |
2233 | environments and back.") | |
2234 | (license license:bsd-3))) | |
2235 | ||
2236 | (define-public python2-itsdangerous | |
2237 | (package-with-python2 python-itsdangerous)) | |
2238 | ||
2239 | (define-public python-pyyaml | |
2240 | (package | |
2241 | (name "python-pyyaml") | |
2242 | (version "3.13") | |
2243 | (source | |
2244 | (origin | |
2245 | (method url-fetch) | |
2246 | (uri (pypi-uri "PyYAML" version)) | |
2247 | (sha256 | |
2248 | (base32 | |
2249 | "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry")))) | |
2250 | (build-system python-build-system) | |
2251 | (inputs | |
2252 | `(("libyaml" ,libyaml))) | |
2253 | (home-page "http://pyyaml.org/wiki/PyYAML") | |
2254 | (synopsis "YAML parser and emitter for Python") | |
2255 | (description | |
2256 | "PyYAML is a YAML parser and emitter for Python. PyYAML features a | |
2257 | complete YAML 1.1 parser, Unicode support, pickle support, capable extension | |
2258 | API, and sensible error messages. PyYAML supports standard YAML tags and | |
2259 | provides Python-specific tags that allow to represent an arbitrary Python | |
2260 | object.") | |
2261 | (license license:expat))) | |
2262 | ||
2263 | (define-public python2-pyyaml | |
2264 | (package-with-python2 python-pyyaml)) | |
2265 | ||
2266 | (define-public python-vine | |
2267 | (package | |
2268 | (name "python-vine") | |
2269 | (version "1.1.4") | |
2270 | (source | |
2271 | (origin | |
2272 | (method url-fetch) | |
2273 | (uri (pypi-uri "vine" version)) | |
2274 | (sha256 | |
2275 | (base32 | |
2276 | "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj")))) | |
2277 | (build-system python-build-system) | |
2278 | (native-inputs | |
2279 | `(("python-pytest" ,python-pytest) | |
2280 | ("python-case" ,python-case))) | |
2281 | (home-page "https://github.com/celery/vine") | |
2282 | (synopsis "Promises for Python") | |
2283 | (description | |
2284 | "@code{vine} provides a special implementation of promises in that it can | |
2285 | be used both for \"promise of a value\" and lazy evaluation. The biggest | |
2286 | upside for this is that everything in a promise can also be a promise, | |
2287 | e.g. filters, callbacks and errbacks can all be promises.") | |
2288 | (license license:bsd-3))) | |
2289 | ||
2290 | (define-public python-virtualenv | |
2291 | (package | |
2292 | (name "python-virtualenv") | |
2782bd51 | 2293 | (version "16.1.0") |
44d10b1f RW |
2294 | (source |
2295 | (origin | |
2296 | (method url-fetch) | |
2297 | (uri (pypi-uri "virtualenv" version)) | |
2298 | (sha256 | |
2299 | (base32 | |
2782bd51 | 2300 | "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq")))) |
44d10b1f RW |
2301 | (build-system python-build-system) |
2302 | (arguments | |
2303 | `(#:phases | |
2304 | (modify-phases %standard-phases | |
2782bd51 | 2305 | (add-before 'check 'disable-failing-test |
44d10b1f RW |
2306 | (lambda _ |
2307 | ;; Disable failing test. See upstream bug report | |
2308 | ;; https://github.com/pypa/virtualenv/issues/957 | |
2309 | (substitute* "tests/test_virtualenv.py" | |
2310 | (("skipif.*") "skipif(True, reason=\"Guix\")\n")) | |
2782bd51 | 2311 | #t))))) |
44d10b1f RW |
2312 | (native-inputs |
2313 | `(("python-mock" ,python-mock) | |
2314 | ("python-pytest" ,python-pytest))) | |
2315 | (home-page "https://virtualenv.pypa.io/") | |
2316 | (synopsis "Virtual Python environment builder") | |
2317 | (description | |
2318 | "Virtualenv is a tool to create isolated Python environments.") | |
2319 | (license license:expat))) | |
2320 | ||
2321 | (define-public python2-virtualenv | |
2322 | (package-with-python2 python-virtualenv)) | |
2323 | ||
2324 | (define-public python-markupsafe | |
2325 | (package | |
2326 | (name "python-markupsafe") | |
2327 | (version "1.0") | |
2328 | (source | |
2329 | (origin | |
2330 | (method url-fetch) | |
5182927c | 2331 | (uri (pypi-uri "MarkupSafe" version)) |
44d10b1f RW |
2332 | (sha256 |
2333 | (base32 | |
2334 | "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6")))) | |
2335 | (build-system python-build-system) | |
2336 | (home-page "https://github.com/mitsuhiko/markupsafe") | |
2337 | (synopsis "XML/HTML/XHTML markup safe string implementation for Python") | |
2338 | (description | |
2339 | "Markupsafe provides an XML/HTML/XHTML markup safe string implementation | |
2340 | for Python.") | |
2341 | (license license:bsd-3))) | |
2342 | ||
2343 | (define-public python2-markupsafe | |
2344 | (package-with-python2 python-markupsafe)) | |
2345 | ||
2346 | (define-public python-jinja2 | |
2347 | (package | |
2348 | (name "python-jinja2") | |
4a5c7934 | 2349 | (version "2.10.1") |
44d10b1f RW |
2350 | (source |
2351 | (origin | |
2352 | (method url-fetch) | |
2353 | (uri (pypi-uri "Jinja2" version)) | |
2354 | (sha256 | |
2355 | (base32 | |
4a5c7934 | 2356 | "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06")))) |
44d10b1f RW |
2357 | (build-system python-build-system) |
2358 | (propagated-inputs | |
2359 | `(("python-markupsafe" ,python-markupsafe))) | |
2360 | (home-page "http://jinja.pocoo.org/") | |
2361 | (synopsis "Python template engine") | |
2362 | (description | |
2363 | "Jinja2 is a small but fast and easy to use stand-alone template engine | |
2364 | written in pure Python.") | |
2365 | (license license:bsd-3))) | |
2366 | ||
2367 | (define-public python2-jinja2 | |
2368 | (package-with-python2 python-jinja2)) | |
2369 | ||
2370 | (define-public python-pystache | |
2371 | (package | |
2372 | (name "python-pystache") | |
2373 | (version "0.5.4") | |
2374 | (source (origin | |
2375 | (method url-fetch) | |
2376 | (uri (pypi-uri "pystache" version)) | |
2377 | (sha256 | |
2378 | (base32 | |
2379 | "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp")))) | |
2380 | (build-system python-build-system) | |
2381 | (arguments | |
2382 | '(#:tests? #f)) ; FIXME: Python 3 tests are failing. | |
2383 | (home-page "http://defunkt.io/pystache/") | |
2384 | (synopsis "Python logic-less template engine") | |
2385 | (description | |
2386 | "Pystache is a Python implementation of the framework agnostic, | |
2387 | logic-free templating system Mustache.") | |
2388 | (license license:expat) | |
2389 | (properties `((python2-variant . ,(delay python2-pystache)))))) | |
2390 | ||
2391 | (define-public python2-pystache | |
2392 | (package (inherit (package-with-python2 | |
2393 | (strip-python2-variant python-pystache))) | |
2394 | (arguments | |
2395 | `(#:python ,python-2 | |
2396 | #:phases | |
2397 | (modify-phases %standard-phases | |
2398 | (replace 'check | |
2399 | (lambda _ | |
dfafc29b | 2400 | (invoke "python" "test_pystache.py")))))))) |
44d10b1f RW |
2401 | |
2402 | (define-public python-joblib | |
2403 | (package | |
2404 | (name "python-joblib") | |
2405 | (version "0.13.0") | |
2406 | (source (origin | |
2407 | (method url-fetch) | |
2408 | (uri (pypi-uri "joblib" version)) | |
2409 | (sha256 | |
2410 | (base32 | |
2411 | "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5")))) | |
2412 | (build-system python-build-system) | |
2413 | (arguments | |
2414 | `(#:phases | |
2415 | (modify-phases %standard-phases | |
2416 | (replace 'check | |
2417 | (lambda _ (invoke "pytest" "-v" "joblib")))))) | |
2418 | (native-inputs | |
2419 | `(("python-pytest" ,python-pytest))) | |
2420 | (home-page "https://joblib.readthedocs.io/") | |
2421 | (synopsis "Using Python functions as pipeline jobs") | |
2422 | (description | |
2423 | "Joblib is a set of tools to provide lightweight pipelining in Python. | |
2424 | In particular, joblib offers: transparent disk-caching of the output values | |
2425 | and lazy re-evaluation (memoize pattern), easy simple parallel computing | |
2426 | logging and tracing of the execution.") | |
2427 | (license license:bsd-3))) | |
2428 | ||
2429 | (define-public python2-joblib | |
2430 | (package-with-python2 python-joblib)) | |
2431 | ||
a3363341 VC |
2432 | (define-public python-daemon |
2433 | (package | |
2434 | (name "python-daemon") | |
2435 | (version "2.2.3") | |
2436 | (source | |
2437 | (origin | |
2438 | (method url-fetch) | |
2439 | (uri (pypi-uri "python-daemon" version)) | |
2440 | (sha256 | |
2441 | (base32 | |
2442 | "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg")))) | |
2443 | (build-system python-build-system) | |
2444 | (arguments | |
2445 | `(#:phases | |
2446 | (modify-phases %standard-phases | |
2447 | (add-before 'check 'disable-tests | |
2448 | (lambda _ | |
2449 | ;; FIXME: Determine why test fails | |
2450 | (substitute* "test/test_daemon.py" | |
2451 | (("test_detaches_process_context") | |
2452 | "skip_test_detaches_process_context")) | |
2453 | #t))))) | |
2454 | (propagated-inputs | |
2455 | `(("python-lockfile" ,python-lockfile))) | |
2456 | (native-inputs | |
2457 | `(("python-unittest2" ,python-unittest2) | |
2458 | ("python-testtools" ,python-testtools) | |
2459 | ("python-testscenarios" ,python-testscenarios) | |
2460 | ("python-mock" ,python-mock) | |
2461 | ("python-docutils" ,python-docutils))) | |
2462 | (home-page "https://pagure.io/python-daemon/") | |
2463 | (synopsis "Python library for making a Unix daemon process") | |
2464 | (description "Python-daemon is a library that assists a Python program to | |
2465 | turn itself into a well-behaved Unix daemon process, as specified in PEP 3143. | |
2466 | ||
2467 | This library provides a @code{DaemonContext} class that manages the following | |
2468 | important tasks for becoming a daemon process: | |
2469 | @enumerate | |
2470 | @item Detach the process into its own process group. | |
2471 | @item Set process environment appropriate for running inside a chroot. | |
2472 | @item Renounce suid and sgid privileges. | |
2473 | @item Close all open file descriptors. | |
2474 | @item Change the working directory, uid, gid, and umask. | |
2475 | @item Set appropriate signal handlers. | |
2476 | @item Open new file descriptors for stdin, stdout, and stderr. | |
2477 | @item Manage a specified PID lock file. | |
2478 | @item Register cleanup functions for at-exit processing. | |
2479 | @end enumerate") | |
2480 | ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed. | |
2481 | (license (list license:asl2.0 license:gpl3+)))) | |
2482 | ||
44d10b1f RW |
2483 | (define-public python-docutils |
2484 | (package | |
2485 | (name "python-docutils") | |
2486 | (version "0.14") | |
2487 | (source | |
2488 | (origin | |
2489 | (method url-fetch) | |
2490 | (uri (pypi-uri "docutils" version)) | |
2491 | (sha256 | |
2492 | (base32 | |
2493 | "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji")))) | |
2494 | (build-system python-build-system) | |
2495 | (arguments | |
2496 | '(#:tests? #f)) ; no setup.py test command | |
2497 | (home-page "http://docutils.sourceforge.net/") | |
2498 | (synopsis "Python Documentation Utilities") | |
2499 | (description | |
2500 | "Docutils is a modular system for processing documentation into useful | |
2501 | formats, such as HTML, XML, and LaTeX. For input Docutils supports | |
2502 | reStructuredText.") | |
2503 | ;; Most of the source code is public domain, but some source files are | |
2504 | ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses. | |
2505 | (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+)))) | |
2506 | ||
2507 | (define-public python2-docutils | |
2508 | (package-with-python2 python-docutils)) | |
2509 | ||
2510 | (define-public python-pygments | |
2511 | (package | |
2512 | (name "python-pygments") | |
4cd4173d | 2513 | (version "2.4.0") |
44d10b1f RW |
2514 | (source |
2515 | (origin | |
2516 | (method url-fetch) | |
2517 | (uri (pypi-uri "Pygments" version)) | |
2518 | (sha256 | |
2519 | (base32 | |
4cd4173d | 2520 | "1xb5n3hvhk63kxypc03k7kfry20pny6gygi4bsl9kw1rnzzsdjri")))) |
44d10b1f RW |
2521 | (build-system python-build-system) |
2522 | (arguments | |
2523 | ;; FIXME: Tests require sphinx, which depends on this. | |
2524 | '(#:tests? #f)) | |
2525 | (home-page "http://pygments.org/") | |
2526 | (synopsis "Syntax highlighting") | |
2527 | (description | |
2528 | "Pygments is a syntax highlighting package written in Python.") | |
2529 | (license license:bsd-2))) | |
2530 | ||
2531 | (define-public python2-pygments | |
2532 | (package-with-python2 python-pygments)) | |
2533 | ||
0f0a5ef9 MC |
2534 | (define-public python-bumpversion |
2535 | (package | |
2536 | (name "python-bumpversion") | |
2537 | (version "0.5.3") | |
2538 | (source | |
2539 | (origin | |
2540 | (method url-fetch) | |
2541 | (uri (pypi-uri "bumpversion" version)) | |
2542 | (sha256 | |
2543 | (base32 | |
2544 | "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37")))) | |
2545 | (build-system python-build-system) | |
2546 | (home-page "https://github.com/peritus/bumpversion") | |
2547 | (synopsis "Tool to bump software version") | |
2548 | (description "This tool provides a command-line interface (CLI) to bump a | |
2549 | software version simply.") | |
2550 | (license license:expat))) | |
2551 | ||
b24fd2c2 MC |
2552 | (define-public python-deprecated |
2553 | (package | |
2554 | (name "python-deprecated") | |
2555 | (version "1.2.5") | |
2556 | (source | |
2557 | (origin | |
2558 | (method git-fetch) | |
2559 | (uri (git-reference | |
2560 | (url "https://github.com/tantale/deprecated.git") | |
2561 | (commit (string-append "v" version)))) | |
2562 | (file-name (git-file-name name version)) | |
2563 | (sha256 | |
2564 | (base32 | |
2565 | "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz")))) | |
2566 | (build-system python-build-system) | |
2567 | (arguments | |
2568 | `(#:phases (modify-phases %standard-phases | |
2569 | (replace 'check | |
2570 | (lambda _ | |
2571 | (invoke "pytest")))))) | |
2572 | (propagated-inputs | |
2573 | `(("python-wrapt" ,python-wrapt))) | |
2574 | (native-inputs | |
2575 | `(("python-bumpversion" ,python-bumpversion) | |
2576 | ("python-pytest" ,python-pytest) | |
2577 | ("python-pytest-cov" ,python-pytest-cov) | |
2578 | ("python-sphinx" ,python-sphinx) | |
2579 | ("python-tox" ,python-tox))) | |
2580 | (home-page "https://github.com/tantale/deprecated") | |
2581 | (synopsis "Python decorator to deprecate classes, functions or methods") | |
2582 | (description "The @code{deprecated} decorator provides a convenient way to deprecate | |
2583 | to deprecate classes, functions or methods.") | |
2584 | (license license:expat))) | |
2585 | ||
d5a998fa MC |
2586 | (define-public python-pygithub |
2587 | (package | |
2588 | (name "python-pygithub") | |
2589 | (version "1.43.7") | |
2590 | (source | |
2591 | ;; We fetch from the Git repo because there are no tests in the PyPI | |
2592 | ;; archive. | |
2593 | (origin | |
2594 | (method git-fetch) | |
2595 | (uri (git-reference | |
2596 | (url "https://github.com/PyGithub/PyGithub.git") | |
2597 | (commit (string-append "v" version)))) | |
2598 | (file-name (git-file-name name version)) | |
2599 | (sha256 | |
2600 | (base32 | |
2601 | "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i")))) | |
2602 | (build-system python-build-system) | |
2603 | (arguments | |
2604 | `(#:phases (modify-phases %standard-phases | |
2605 | ;; Some tests rely on the network. | |
2606 | (add-after 'unpack 'disable-failing-tests | |
2607 | (lambda _ | |
2608 | (substitute* "tests/Issue142.py" | |
2609 | (("testDecodeJson") "disabled_testDecodeJson")) | |
2610 | #t)) | |
2611 | (add-before 'check 'prepare-for-tests | |
2612 | (lambda _ | |
2613 | (for-each (lambda (f) | |
2614 | (chmod f #o666)) | |
2615 | (find-files "./tests")) | |
2616 | (system* "python" "-m" "lib2to3" "-w" "-n" "tests") | |
2617 | (setenv "PYTHONPATH" | |
2618 | (string-append "./tests:" (getenv "PYTHONPATH"))) | |
2619 | #t))))) | |
2620 | (propagated-inputs | |
2621 | `(("python-deprecated" ,python-deprecated) | |
2622 | ("python-pyjwt" ,python-pyjwt) | |
2623 | ("python-requests" ,python-requests))) | |
2624 | (native-inputs `(("python-httpretty" ,python-httpretty))) | |
2625 | (home-page "https://pygithub.readthedocs.io/en/latest/") | |
2626 | (synopsis "Python library for the GitHub API") | |
2627 | (description "This library allows managing GitHub resources such as | |
2628 | repositories, user profiles, and organizations in your Python applications, | |
2629 | using version 3 of the GitHub application programming interface (API).") | |
2630 | (license license:lgpl3+))) | |
2631 | ||
c0c0bb38 MC |
2632 | (define-public python-rellu |
2633 | (package | |
2634 | (name "python-rellu") | |
2635 | (version "0.7") | |
2636 | (source | |
2637 | (origin | |
2638 | (method url-fetch) | |
2639 | (uri (pypi-uri "rellu" version)) | |
2640 | (sha256 | |
2641 | (base32 | |
2642 | "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x")))) | |
2643 | (build-system python-build-system) | |
2644 | (propagated-inputs | |
2645 | `(("python-invoke" ,python-invoke) | |
2646 | ("python-pygithub" ,python-pygithub))) | |
2647 | (home-page "https://github.com/robotframework/rellu") | |
2648 | (synopsis "Utilities to create PyPI releases") | |
2649 | (description "This collection of utilities contains tooling and templates | |
2650 | to assist in creating releases on GitHub and publishing them on PyPI. It is | |
2651 | designed to be used by Robot Framework and tools and libraries in its | |
2652 | ecosystem, but can naturally be used also by other projects.") | |
2653 | (license license:asl2.0))) | |
2654 | ||
b9790285 MC |
2655 | (define-public python-robotframework |
2656 | (package | |
2657 | (name "python-robotframework") | |
1710b8f8 | 2658 | (version "3.1.2") |
b9790285 MC |
2659 | ;; There are no tests in the PyPI archive. |
2660 | (source | |
2661 | (origin | |
2662 | (method git-fetch) | |
2663 | (uri (git-reference | |
2664 | (url "https://github.com/robotframework/robotframework.git") | |
2665 | (commit (string-append "v" version)))) | |
2666 | (file-name (git-file-name name version)) | |
2667 | (sha256 | |
1710b8f8 | 2668 | (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym")) |
b9790285 MC |
2669 | (patches (search-patches |
2670 | "python-robotframework-honor-source-date-epoch.patch")))) | |
2671 | (build-system python-build-system) | |
2672 | (arguments | |
2673 | `(#:phases (modify-phases %standard-phases | |
2674 | (add-before 'build 'build-and-install-doc | |
2675 | (lambda* (#:key outputs #:allow-other-keys) | |
2676 | (let* ((doc-output (assoc-ref outputs "doc")) | |
2677 | (doc (string-append doc-output "/share/" | |
2678 | ,name "-" ,version "/"))) | |
2679 | (invoke "invoke" "library-docs" "all") | |
2680 | (mkdir-p doc) | |
2681 | (copy-recursively "doc/libraries" | |
2682 | (string-append doc "/libraries")) | |
2683 | #t))) | |
2684 | (replace 'check | |
2685 | (lambda _ | |
2686 | (invoke "python" "utest/run.py")))))) | |
2687 | (native-inputs | |
2688 | `(("python-invoke" ,python-invoke) | |
2689 | ("python-rellu" ,python-rellu) | |
2690 | ("python:tk" ,python "tk"))) ;used when building the HTML doc | |
2691 | (outputs '("out" "doc")) | |
2692 | (home-page "https://robotframework.org") | |
2693 | (synopsis "Generic automation framework") | |
2694 | (description "Robot Framework is a generic automation framework for | |
2695 | acceptance testing, acceptance test driven development (ATDD), and robotic | |
2696 | process automation (RPA).") | |
2697 | (license license:asl2.0))) | |
2698 | ||
5b84c120 MC |
2699 | (define-public python-robotframework-lint |
2700 | ;; There is no properly tagged release; the commit below seems to correspond | |
2701 | ;; to the 0.9 stable release available from PyPI. The tests are not | |
2702 | ;; included in the PyPI archive, so we fetch the sources from the upstream | |
2703 | ;; Git repo. | |
2704 | (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830") | |
2705 | (revision "1")) | |
2706 | (package | |
2707 | (name "python-robotframework-lint") | |
2708 | (version (git-version "0.9.0" revision commit)) | |
2709 | (source | |
2710 | (origin | |
2711 | (method git-fetch) | |
2712 | (uri (git-reference | |
2713 | (url "https://github.com/boakley/robotframework-lint.git") | |
2714 | (commit commit))) | |
2715 | (file-name (git-file-name name version)) | |
2716 | (sha256 | |
2717 | (base32 | |
2718 | "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m")))) | |
2719 | (build-system python-build-system) | |
2720 | (arguments | |
2721 | `(#:phases | |
2722 | (modify-phases %standard-phases | |
2723 | (replace 'check | |
2724 | (lambda _ | |
2725 | (invoke "python" "-m" "robot" "-A" | |
2726 | "tests/conf/default.args" "tests")))))) | |
2727 | (propagated-inputs | |
2728 | `(("python-robotframework" ,python-robotframework))) | |
2729 | (home-page "https://github.com/boakley/robotframework-lint/") | |
2730 | (synopsis "Static analysis tool (linter) for Robot Framework") | |
2731 | (description "This package provides the @code{rflint} command-line | |
2732 | utility, a static analysis tool (linter) for Robot Framework source files.") | |
2733 | (license license:asl2.0)))) | |
2734 | ||
c0c64f17 MC |
2735 | (define-public python-robotframework-sshlibrary |
2736 | (package | |
2737 | (name "python-robotframework-sshlibrary") | |
2738 | (version "3.3.0") | |
2739 | ;; There are no tests in the PyPI archive. | |
2740 | (source | |
2741 | (origin | |
2742 | (method git-fetch) | |
2743 | (uri (git-reference | |
2744 | (url "https://github.com/robotframework/SSHLibrary.git") | |
2745 | (commit (string-append "v" version)))) | |
2746 | (file-name (git-file-name name version)) | |
2747 | (sha256 | |
2748 | (base32 | |
2749 | "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2")))) | |
2750 | (build-system python-build-system) | |
2751 | (arguments | |
2752 | `(#:phases | |
2753 | (modify-phases %standard-phases | |
2754 | (add-before 'build 'build-and-install-doc | |
2755 | (lambda* (#:key outputs #:allow-other-keys) | |
2756 | (let* ((doc-output (assoc-ref outputs "doc")) | |
2757 | (doc (string-append doc-output "/share/" | |
2758 | ,name "-" ,version "/"))) | |
2759 | (invoke "chmod" "-R" "+w" "docs") | |
2760 | (invoke "invoke" "kw-docs" "project-docs") | |
2761 | (mkdir-p doc) | |
2762 | (for-each delete-file (find-files "docs" "\\.rst")) | |
2763 | (copy-recursively "docs" doc) | |
2764 | #t))) | |
2765 | (replace 'check | |
2766 | (lambda _ | |
2767 | ;; Some tests require an SSH server; we remove them. | |
2768 | (delete-file "utest/test_client_api.py") | |
2769 | (delete-file "utest/test_scp.py") | |
2770 | (invoke "python" "utest/run.py")))))) | |
2771 | (propagated-inputs | |
2772 | `(("python-robotframework" ,python-robotframework) | |
2773 | ("python-paramiko" ,python-paramiko) | |
2774 | ("python-scp" ,python-scp))) | |
2775 | (native-inputs | |
2776 | `(("openssh" ,openssh) | |
2777 | ("which" ,which) | |
2778 | ;; To generate the documentation | |
2779 | ("python-docutils" ,python-docutils) | |
2780 | ("python-invoke" ,python-invoke) | |
2781 | ("python-pygments" ,python-pygments) | |
2782 | ("python-rellu" ,python-rellu))) | |
2783 | (outputs '("out" "doc")) | |
2784 | (home-page "https://github.com/robotframework/SSHLibrary") | |
2785 | (synopsis "Robot Framework library for SSH and SFTP") | |
2786 | (description "SSHLibrary is a Robot Framework library providing support | |
2787 | for SSH and SFTP. It has the following main usages: | |
2788 | @itemize @bullet | |
2789 | @item Executing commands on the remote machine, either blocking or non-blocking. | |
2790 | @item Writing and reading in an interactive shell. | |
2791 | @item Transferring files and directories over SFTP. | |
2792 | @item Ensuring that files and directories exist on the remote machine. | |
2793 | @end itemize") | |
2794 | (license license:asl2.0))) | |
2795 | ||
13d825fc MC |
2796 | (define-public python-scp |
2797 | (package | |
2798 | (name "python-scp") | |
2799 | (version "0.13.2") | |
2800 | (source | |
2801 | (origin | |
2802 | (method url-fetch) | |
2803 | (uri (pypi-uri "scp" version)) | |
2804 | (sha256 | |
2805 | (base32 | |
2806 | "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg")))) | |
2807 | (build-system python-build-system) | |
2808 | (arguments | |
2809 | '(#:tests? #f)) ;tests require an SSH server | |
2810 | (propagated-inputs | |
2811 | `(("python-paramiko" ,python-paramiko))) | |
2812 | (home-page "https://github.com/jbardin/scp.py") | |
2813 | (synopsis "SCP protocol module for Python and Paramiko") | |
2814 | (description "The scp module extends the Paramiko library to send and | |
2815 | receive files via the SCP1 protocol, as implemented by the OpenSSH | |
2816 | @command{scp} program.") | |
2817 | (license license:gpl2+))) | |
2818 | ||
44d10b1f RW |
2819 | (define-public python-rst.linker |
2820 | (package | |
2821 | (name "python-rst.linker") | |
2822 | (version "1.10") | |
2823 | (source | |
2824 | (origin | |
2825 | (method url-fetch) | |
2826 | (uri (pypi-uri "rst.linker" version)) | |
2827 | (sha256 | |
2828 | (base32 | |
2829 | "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj")))) | |
2830 | (build-system python-build-system) | |
2831 | (propagated-inputs | |
2832 | `(("python-dateutil" ,python-dateutil) | |
2833 | ("python-six" ,python-six))) | |
2834 | (native-inputs | |
2835 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
2836 | ;; Test would require path.py, which would introduce a cyclic dependence. | |
2837 | (arguments `(#:tests? #f)) | |
2838 | ;; Note: As of version 1.7 the documentation is not worth building. | |
2839 | (home-page "https://github.com/jaraco/rst.linker") | |
2840 | (synopsis "Sphinx plugin to add links and timestamps") | |
2841 | (description "rst.linker allows to automatically replace text by a | |
2842 | reStructuredText external reference or timestamps. It's primary purpose is to | |
2843 | augment the changelog, but it can be used for other documents, too.") | |
2844 | (license license:expat))) | |
2845 | ||
2846 | (define-public python2-rst.linker | |
2847 | (package-with-python2 python-rst.linker)) | |
2848 | ||
2849 | (define-public python-feedgenerator | |
2850 | (package | |
2851 | (name "python-feedgenerator") | |
2852 | (version "1.9") | |
2853 | (source | |
2854 | (origin | |
2855 | (method url-fetch) | |
2856 | (uri (pypi-uri "feedgenerator" version)) | |
2857 | (sha256 | |
2858 | (base32 | |
2859 | "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s")) | |
2860 | (modules '((guix build utils))) | |
2861 | (snippet | |
2862 | '(begin | |
2863 | ;; Remove pre-compiled .pyc files from source. | |
2864 | (for-each delete-file-recursively | |
2865 | (find-files "." "__pycache__" #:directories? #t)) | |
2866 | (for-each delete-file (find-files "." "\\.pyc$")) | |
2867 | #t)))) | |
2868 | (build-system python-build-system) | |
2869 | (propagated-inputs | |
2870 | `(("python-pytz" ,python-pytz) | |
2871 | ("python-six" ,python-six))) | |
2872 | (home-page "https://github.com/getpelican/feedgenerator") | |
2873 | (synopsis | |
2874 | "Standalone version of Django's Atom/RSS feed generator") | |
2875 | (description | |
2876 | "Feedgenerator-py3k is a standalone version of Django's feedgenerator, | |
2877 | which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") | |
2878 | (license license:bsd-3))) | |
2879 | ||
2880 | (define-public python2-feedgenerator | |
2881 | (package-with-python2 python-feedgenerator)) | |
2882 | ||
2883 | (define-public python-toml | |
2884 | (package | |
2885 | (name "python-toml") | |
2886 | (version "0.9.4") | |
2887 | (source | |
2888 | (origin | |
2889 | (method url-fetch) | |
2890 | (uri (pypi-uri "toml" version)) | |
2891 | (sha256 | |
2892 | (base32 | |
2893 | "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf")))) | |
2894 | (build-system python-build-system) | |
2895 | (arguments | |
2896 | `(#:tests? #f)) ;no tests suite in release | |
2897 | (home-page "https://github.com/uiri/toml") | |
2898 | (synopsis "Library for TOML") | |
2899 | (description | |
2900 | "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal | |
2901 | Language (TOML) configuration files.") | |
2902 | (license license:expat))) | |
2903 | ||
346c8752 BG |
2904 | (define-public python-jsonrpc-server |
2905 | (package | |
2906 | (name "python-jsonrpc-server") | |
2907 | (version "0.1.2") | |
2908 | (source | |
2909 | (origin | |
2910 | (method url-fetch) | |
2911 | (uri (pypi-uri "python-jsonrpc-server" version)) | |
2912 | (sha256 | |
2913 | (base32 | |
2914 | "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09")))) | |
2915 | (build-system python-build-system) | |
2916 | (propagated-inputs | |
2917 | `(("python-future" ,python-future) | |
2918 | ("python-mock" ,python-mock) | |
2919 | ("python-pytest" ,python-pytest))) | |
2920 | (home-page | |
2921 | "https://github.com/palantir/python-jsonrpc-server") | |
2922 | (synopsis "JSON RPC 2.0 server library") | |
2923 | (description | |
1df5407c | 2924 | "This package provides a JSON RPC 2.0 server library for Python.") |
346c8752 BG |
2925 | (license license:expat))) |
2926 | ||
56f4ad47 BG |
2927 | (define-public python-pydocstyle |
2928 | (package | |
2929 | (name "python-pydocstyle") | |
2930 | (version "3.0.0") | |
2931 | (source | |
2932 | (origin | |
2933 | (method url-fetch) | |
2934 | (uri (pypi-uri "pydocstyle" version)) | |
2935 | (sha256 | |
2936 | (base32 | |
2937 | "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap")))) | |
2938 | (build-system python-build-system) | |
2939 | (propagated-inputs | |
2940 | `(("python-six" ,python-six) | |
2941 | ("python-snowballstemmer" ,python-snowballstemmer))) | |
2942 | (home-page | |
2943 | "https://github.com/PyCQA/pydocstyle/") | |
2944 | (synopsis "Python docstring style checker") | |
2945 | (description | |
2946 | "This package provides a style checker for the Python Language | |
2947 | Server (PLS).") | |
2948 | (license license:expat))) | |
2949 | ||
be4d840c BG |
2950 | (define-public python-language-server |
2951 | (package | |
2952 | (name "python-language-server") | |
ccbaeba3 | 2953 | (version "0.26.1") |
be4d840c BG |
2954 | (source |
2955 | (origin | |
2956 | (method url-fetch) | |
2957 | (uri (pypi-uri "python-language-server" version)) | |
2958 | (sha256 | |
2959 | (base32 | |
ccbaeba3 | 2960 | "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s")))) |
be4d840c BG |
2961 | (build-system python-build-system) |
2962 | (propagated-inputs | |
2963 | `(("python-pluggy" ,python-pluggy) | |
2964 | ("python-jsonrpc-server" ,python-jsonrpc-server) | |
2965 | ("python-jedi" ,python-jedi) | |
2966 | ("python-yapf" ,python-yapf) | |
2967 | ("python-pyflakes" ,python-pyflakes) | |
2968 | ("python-pydocstyle" ,python-pydocstyle) | |
2969 | ("python-pycodestyle" ,python-pycodestyle) | |
2970 | ("python-mccabe" ,python-mccabe) | |
2971 | ("python-rope" ,python-rope) | |
fe4a4bd2 BG |
2972 | ("python-autopep8" ,python-autopep8) |
2973 | ("python-pylint" ,python-pylint))) | |
be4d840c BG |
2974 | (home-page "https://github.com/palantir/python-language-server") |
2975 | (synopsis "Python implementation of the Language Server Protocol") | |
2976 | (description | |
2977 | "The Python Language Server (pyls) is an implementation of the Python 3 | |
2978 | language specification for the Language Server Protocol (LSP). This tool is | |
2979 | used in text editing environments to provide a complete and integrated | |
2980 | feature-set for programming Python effectively.") | |
2981 | (license license:expat))) | |
2982 | ||
44d10b1f RW |
2983 | (define-public python-black |
2984 | (package | |
2985 | (name "python-black") | |
2986 | (version "18.6b4") | |
2987 | (source | |
2988 | (origin | |
2989 | (method url-fetch) | |
2990 | (uri (pypi-uri "black" version)) | |
2991 | (sha256 | |
2992 | (base32 | |
2993 | "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592")))) | |
2994 | (build-system python-build-system) | |
2995 | (arguments | |
2996 | `(#:phases | |
2997 | (modify-phases %standard-phases | |
2998 | (add-after 'patch-source-shebangs 'patch-extra-shebangs | |
2999 | (lambda _ | |
3000 | (let ((python3 (which "python3"))) | |
3001 | (substitute* '("tests/data/fmtonoff.py" | |
3002 | "tests/data/string_prefixes.py" | |
3003 | "tests/data/function.py") | |
3004 | (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version) | |
3005 | (string-append "#!" python3 (if (string? minor-version) | |
3006 | minor-version | |
3007 | "")))))))))) | |
3008 | (propagated-inputs | |
3009 | `(("python-click" ,python-click) | |
3010 | ("python-attrs" ,python-attrs) | |
3011 | ("python-appdirs" ,python-appdirs) | |
3012 | ("python-toml" ,python-toml))) | |
3013 | (home-page "https://github.com/ambv/black") | |
3014 | (synopsis "The uncompromising code formatter") | |
3015 | (description "Black is the uncompromising Python code formatter.") | |
3016 | (license license:expat))) | |
3017 | ||
3018 | (define-public python-blinker | |
3019 | (package | |
3020 | (name "python-blinker") | |
3021 | (version "1.4") | |
3022 | (source | |
3023 | (origin | |
3024 | (method url-fetch) | |
3025 | (uri (pypi-uri "blinker" version)) | |
3026 | (sha256 | |
3027 | (base32 | |
3028 | "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7")))) | |
3029 | (build-system python-build-system) | |
3030 | (home-page "http://pythonhosted.org/blinker/") | |
3031 | (synopsis "Fast, simple object-to-object and broadcast signaling") | |
3032 | (description | |
3033 | "Blinker provides a fast dispatching system that allows any number of | |
3034 | interested parties to subscribe to events, or \"signals\".") | |
3035 | (license license:expat))) | |
3036 | ||
3037 | (define-public python2-blinker | |
3038 | (package-with-python2 python-blinker)) | |
3039 | ||
3040 | (define-public pelican | |
3041 | (package | |
3042 | (name "pelican") | |
aa71b690 | 3043 | (version "4.0.1") |
44d10b1f RW |
3044 | (source |
3045 | (origin | |
3046 | (method url-fetch) | |
3047 | (uri (pypi-uri "pelican" version)) | |
3048 | (sha256 | |
3049 | (base32 | |
aa71b690 | 3050 | "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr")))) |
44d10b1f RW |
3051 | (build-system python-build-system) |
3052 | (propagated-inputs | |
3053 | `(("python-feedgenerator" ,python-feedgenerator) | |
3054 | ("python-jinja2" ,python-jinja2) | |
3055 | ("python-pygments" ,python-pygments) | |
3056 | ("python-docutils" ,python-docutils) | |
3057 | ("python-pytz" ,python-pytz) | |
3058 | ("python-blinker" ,python-blinker) | |
3059 | ("python-unidecode" ,python-unidecode) | |
3060 | ("python-six" ,python-six) | |
3061 | ("python-dateutil" ,python-dateutil) | |
3062 | ("python-markdown" ,python-markdown))) | |
3063 | (home-page "https://getpelican.com/") | |
3064 | (arguments | |
3065 | `(;; XXX Requires a lot more packages to do unit tests :P | |
3066 | #:tests? #f | |
3067 | #:phases (modify-phases %standard-phases | |
3068 | (add-before | |
3069 | 'install 'adjust-requires | |
3070 | ;; Since feedgenerator is installed from git, it doesn't | |
3071 | ;; conform to the version requirements. | |
3072 | ;; | |
3073 | ;; We *do have* "feedgenerator >= 1.6", but strip off the | |
3074 | ;; version requirement so setuptools doesn't get confused. | |
3075 | (lambda _ | |
3076 | (substitute* "setup.py" | |
3077 | (("['\"]feedgenerator.*?['\"]") | |
3078 | "'feedgenerator'"))))))) | |
3079 | (synopsis "Python-based static site publishing system") | |
3080 | (description | |
3081 | "Pelican is a tool to generate a static blog from reStructuredText, | |
3082 | Markdown input files, and more. Pelican uses Jinja2 for templating | |
3083 | and is very extensible.") | |
3084 | (license license:agpl3+))) | |
3085 | ||
8c141421 JH |
3086 | (define-public mallard-ducktype |
3087 | (package | |
3088 | (name "mallard-ducktype") | |
3089 | (version "1.0.1") | |
3090 | (source | |
3091 | (origin | |
3092 | (method git-fetch) | |
3093 | ;; git-reference because a proper source tarball is not available | |
3094 | ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html | |
3095 | (uri (git-reference | |
3096 | (url "https://github.com/projectmallard/mallard-ducktype.git") | |
3097 | (commit version))) | |
3098 | (file-name (git-file-name name version)) | |
3099 | (sha256 | |
3100 | (base32 | |
3101 | "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n")))) | |
3102 | (build-system python-build-system) | |
3103 | (home-page "http://projectmallard.org") | |
3104 | (synopsis "Convert Ducktype to Mallard documentation markup") | |
3105 | (description | |
3106 | "Ducktype is a lightweight syntax that can represent all the semantics | |
3107 | of the Mallard XML documentation system. Ducktype files can be converted to | |
3108 | Mallard using the @command{ducktype} tool. The yelp-tools package | |
3109 | provides additional functionality on the produced Mallard documents.") | |
3110 | (license license:expat))) | |
3111 | ||
44d10b1f RW |
3112 | (define-public python-scikit-image |
3113 | (package | |
3114 | (name "python-scikit-image") | |
9ff04084 | 3115 | (version "0.14.2") |
44d10b1f RW |
3116 | (source |
3117 | (origin | |
3118 | (method url-fetch) | |
3119 | (uri (pypi-uri "scikit-image" version)) | |
3120 | (sha256 | |
9ff04084 | 3121 | (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s")))) |
44d10b1f RW |
3122 | (build-system python-build-system) |
3123 | (arguments | |
3124 | ;; TODO: Some tests require running X11 server. Disable them? | |
3125 | '(#:tests? #f)) | |
3126 | ;; See DEPENDS.txt for the list of build and run time requiremnts | |
3127 | (propagated-inputs | |
3128 | `(("python-cloudpickle" ,python-cloudpickle) | |
3129 | ("python-dask" ,python-dask) | |
3130 | ("python-matplotlib" ,python-matplotlib) | |
3131 | ("python-networkx" ,python-networkx) | |
3132 | ("python-numpy" ,python-numpy) | |
3133 | ("python-pillow" ,python-pillow) | |
3134 | ("python-pywavelets" ,python-pywavelets) | |
3135 | ("python-scipy" ,python-scipy) | |
3136 | ("python-six" ,python-six))) | |
3137 | (native-inputs | |
3138 | `(("python-cython" ,python-cython))) | |
3139 | (home-page "http://scikit-image.org/") | |
3140 | (synopsis "Image processing in Python") | |
3141 | (description | |
3142 | "Scikit-image is a collection of algorithms for image processing.") | |
3143 | (license license:bsd-3))) | |
3144 | ||
3145 | (define-public python2-scikit-image | |
3146 | (package-with-python2 python-scikit-image)) | |
3147 | ||
3148 | (define-public python-cython | |
3149 | (package | |
3150 | (name "python-cython") | |
11bab809 | 3151 | (version "0.29.7") |
44d10b1f RW |
3152 | (source |
3153 | (origin | |
3154 | (method url-fetch) | |
3155 | (uri (pypi-uri "Cython" version)) | |
3156 | (sha256 | |
3157 | (base32 | |
11bab809 | 3158 | "1s61hq2ikawxp6qvmkbfvvaxy9rqj67cddzwgcfc3dwi44b83l2m")))) |
44d10b1f RW |
3159 | (build-system python-build-system) |
3160 | ;; we need the full python package and not just the python-wrapper | |
3161 | ;; because we need libpython3.3m.so | |
3162 | (inputs | |
3163 | `(("python" ,python))) | |
3164 | (arguments | |
3165 | `(#:phases | |
3166 | (modify-phases %standard-phases | |
3167 | (add-before 'check 'set-HOME | |
3168 | ;; some tests require access to "$HOME/.cython" | |
3169 | (lambda _ (setenv "HOME" "/tmp") #t)) | |
3170 | ||
3171 | ;; FIXME: These tests started failing on armhf after the 0.28 update | |
3172 | ;; (commit c69d11c5930), both with an error such as this: | |
3173 | ;; compiling (cpp) and running dictcomp ... | |
3174 | ;; === C/C++ compiler error output: === | |
3175 | ;; ‘ | |
3176 | ;; dictcomp.cpp:5221: confused by earlier errors, bailing out | |
3177 | ;; See <https://hydra.gnu.org/build/2948724> for logs. | |
3178 | ,@(if (target-arm32?) | |
3179 | `((add-before 'check 'disable-failing-tests | |
3180 | (lambda _ | |
3181 | (let ((disabled-tests (open-file "tests/bugs.txt" "a"))) | |
3182 | (for-each (lambda (test) | |
3183 | (format disabled-tests "~a\n" test)) | |
3184 | '("memslice" "dictcomp")) | |
3185 | (close-port disabled-tests))))) | |
3186 | '()) | |
3187 | ||
3188 | (replace 'check | |
3189 | (lambda _ | |
44d10b1f | 3190 | (invoke "python" "runtests.py" "-vv")))))) |
f319409b | 3191 | (home-page "https://cython.org/") |
44d10b1f RW |
3192 | (synopsis "C extensions for Python") |
3193 | (description "Cython is an optimising static compiler for both the Python | |
3194 | programming language and the extended Cython programming language. It makes | |
3195 | writing C extensions for Python as easy as Python itself.") | |
3196 | (license license:asl2.0) | |
3197 | (properties `((python2-variant . ,(delay python2-cython)))))) | |
3198 | ||
3199 | (define-public python2-cython | |
3200 | (package (inherit (package-with-python2 | |
3201 | (strip-python2-variant python-cython))) | |
3202 | (name "python2-cython") | |
3203 | (inputs | |
3204 | `(("python-2" ,python-2))))) ; this is not automatically changed | |
3205 | ||
3206 | ;; The RPython toolchain currently does not support Python 3. | |
3207 | (define-public python2-rpython | |
3208 | (package | |
3209 | (name "python2-rpython") | |
3210 | (version "0.2.1") | |
3211 | (source | |
3212 | (origin | |
3213 | (method url-fetch) | |
3214 | (uri (pypi-uri "rpython" version)) | |
3215 | (sha256 | |
3216 | (base32 | |
3217 | "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0")))) | |
3218 | (build-system python-build-system) | |
3219 | (arguments `(#:python ,python-2)) | |
3220 | (native-inputs | |
3221 | `(("python2-pytest" ,python2-pytest))) ; needed for running tests | |
3222 | (home-page "https://rpython.readthedocs.org") | |
3223 | (synopsis "Framework for implementing interpreters and virtual machines") | |
3224 | (description "RPython is a translation and support framework for | |
3225 | producing implementations of dynamic languages, emphasizing a clean separation | |
3226 | between language specification and implementation aspects.") | |
3227 | (license license:expat))) | |
3228 | ||
3229 | ;; NOTE: when upgrading numpy please make sure that python-pandas and | |
3230 | ;; python-scipy still build, as these three packages are often used together. | |
3231 | (define-public python-numpy | |
3232 | (package | |
3233 | (name "python-numpy") | |
3234 | (version "1.15.4") | |
3235 | (source | |
3236 | (origin | |
3237 | (method url-fetch) | |
3238 | (uri (string-append | |
3239 | "https://github.com/numpy/numpy/releases/download/v" | |
3240 | version "/numpy-" version ".tar.gz")) | |
3241 | (sha256 | |
3242 | (base32 | |
3243 | "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn")))) | |
3244 | (build-system python-build-system) | |
3245 | (inputs | |
3246 | `(("openblas" ,openblas) | |
3247 | ("lapack" ,lapack))) | |
3248 | (native-inputs | |
3249 | `(("python-cython" ,python-cython) | |
3250 | ("python-pytest" ,python-pytest) | |
3251 | ("gfortran" ,gfortran))) | |
3252 | (arguments | |
3253 | `(#:phases | |
3254 | (modify-phases %standard-phases | |
3255 | (add-before 'build 'configure-blas-lapack | |
3256 | (lambda* (#:key inputs #:allow-other-keys) | |
3257 | (call-with-output-file "site.cfg" | |
3258 | (lambda (port) | |
3259 | (format port | |
3260 | "[openblas] | |
3261 | libraries = openblas | |
3262 | library_dirs = ~a/lib | |
3263 | include_dirs = ~a/include | |
3264 | ||
3265 | # backslash-n to make emacs happy | |
3266 | \n[lapack] | |
3267 | lapack_libs = lapack | |
3268 | library_dirs = ~a/lib | |
3269 | include_dirs = ~a/include | |
3270 | " | |
3271 | (assoc-ref inputs "openblas") | |
3272 | (assoc-ref inputs "openblas") | |
3273 | (assoc-ref inputs "lapack") | |
3274 | (assoc-ref inputs "lapack")))) | |
3275 | #t)) | |
3276 | (add-before 'build 'fix-executable-paths | |
3277 | (lambda* (#:key inputs #:allow-other-keys) | |
3278 | ;; Make /gnu/store/...-bash-.../bin/sh the default shell, | |
3279 | ;; instead of /bin/sh. | |
3280 | (substitute* "numpy/distutils/exec_command.py" | |
3281 | (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end) | |
3282 | (string-append match-start (assoc-ref inputs "bash") match-end))) | |
3283 | ;; Use "gcc" executable, not "cc". | |
3284 | (substitute* "numpy/distutils/system_info.py" | |
3285 | (("c = distutils\\.ccompiler\\.new_compiler\\(\\)") | |
3286 | "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')")) | |
3287 | #t)) | |
3288 | ;; Tests can only be run after the library has been installed and not | |
3289 | ;; within the source directory. | |
3290 | (delete 'check) | |
3291 | (add-after 'install 'check | |
3292 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
3293 | ;; Make installed package available for running the tests | |
3294 | (add-installed-pythonpath inputs outputs) | |
3295 | ;; Make sure "f2py" etc is found. | |
3296 | (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin" | |
3297 | ":" (getenv "PATH"))) | |
3298 | (with-directory-excursion "/tmp" | |
3299 | (invoke "python" "-c" | |
3300 | "import numpy; numpy.test(verbose=2)"))))))) | |
3301 | (home-page "http://www.numpy.org/") | |
3302 | (synopsis "Fundamental package for scientific computing with Python") | |
3303 | (description "NumPy is the fundamental package for scientific computing | |
3304 | with Python. It contains among other things: a powerful N-dimensional array | |
3305 | object, sophisticated (broadcasting) functions, tools for integrating C/C++ | |
3306 | and Fortran code, useful linear algebra, Fourier transform, and random number | |
3307 | capabilities.") | |
3308 | (license license:bsd-3))) | |
3309 | ||
3310 | (define-public python2-numpy | |
3311 | (package-with-python2 python-numpy)) | |
3312 | ||
3313 | ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of | |
3314 | ;; interest only for legacy code going back to NumPy's predecessor | |
3315 | ;; Numeric. | |
3316 | (define-public python2-numpy-1.8 | |
3317 | (package (inherit python2-numpy) | |
3318 | (version "1.8.2") | |
3319 | (source | |
3320 | (origin | |
3321 | (method url-fetch) | |
3322 | (uri (string-append | |
3323 | "https://github.com/numpy/numpy/archive/v" version ".tar.gz")) | |
3324 | (file-name (string-append "python2-numpy-" version ".tar.gz")) | |
3325 | (sha256 | |
3326 | (base32 | |
3327 | "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g")))) | |
3328 | (arguments | |
3329 | (substitute-keyword-arguments (package-arguments python2-numpy) | |
3330 | ((#:phases phases) | |
3331 | `(modify-phases ,phases | |
3332 | (replace 'configure-blas-lapack | |
3333 | (lambda* (#:key inputs #:allow-other-keys) | |
3334 | (call-with-output-file "site.cfg" | |
3335 | (lambda (port) | |
3336 | (format port | |
3337 | "[openblas] | |
3338 | libraries = openblas,lapack | |
3339 | library_dirs = ~a/lib:~a/lib | |
3340 | include_dirs = ~a/include:~a/include | |
3341 | " | |
3342 | (assoc-ref inputs "openblas") | |
3343 | (assoc-ref inputs "lapack") | |
3344 | (assoc-ref inputs "openblas") | |
3345 | (assoc-ref inputs "lapack")))) | |
3346 | #t)))))) | |
3347 | (native-inputs | |
3348 | `(("python2-nose" ,python2-nose))) | |
3349 | (description "NumPy is the fundamental package for scientific computing | |
3350 | with Python. It contains among other things: a powerful N-dimensional array | |
3351 | object, sophisticated (broadcasting) functions, tools for integrating C/C++ | |
3352 | and Fortran code, useful linear algebra, Fourier transform, and random number | |
3353 | capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API | |
3354 | that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor | |
3355 | Numeric.") | |
3356 | (license license:bsd-3))) | |
3357 | ||
3358 | (define-public python-munch | |
3359 | (package | |
3360 | (name "python-munch") | |
3361 | (version "2.0.4") | |
3362 | (source | |
3363 | (origin | |
3364 | (method url-fetch) | |
3365 | (uri (pypi-uri "munch" version)) | |
3366 | (sha256 | |
3367 | (base32 | |
3368 | "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l")))) | |
3369 | (build-system python-build-system) | |
3370 | (home-page "https://github.com/Infinidat/munch") | |
3371 | (synopsis "Dot-accessible dictionary") | |
3372 | (description "Munch is a dot-accessible dictionary similar to JavaScript | |
3373 | objects.") | |
3374 | (license license:expat))) | |
3375 | ||
3376 | (define-public python2-munch | |
3377 | (package-with-python2 python-munch)) | |
3378 | ||
3379 | (define-public python-colormath | |
3380 | (package | |
3381 | (name "python-colormath") | |
3382 | (version "3.0.0") | |
3383 | (source | |
3384 | (origin | |
3385 | (method url-fetch) | |
3386 | (uri (pypi-uri "colormath" version)) | |
3387 | (sha256 | |
3388 | (base32 | |
3389 | "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix")))) | |
3390 | (build-system python-build-system) | |
3391 | (propagated-inputs | |
3392 | `(("python-networkx" ,python-networkx) | |
3393 | ("python-numpy" ,python-numpy))) | |
3394 | (home-page "https://github.com/gtaylor/python-colormath") | |
3395 | (synopsis "Color math and conversion library") | |
3396 | (description | |
3397 | "This is a Python library for color math and conversions.") | |
3398 | (license license:bsd-3))) | |
3399 | ||
3400 | (define-public python2-colormath | |
3401 | (package-with-python2 python-colormath)) | |
3402 | ||
3403 | (define-public python-spectra | |
3404 | (package | |
3405 | (name "python-spectra") | |
3406 | (version "0.0.11") | |
3407 | (source | |
3408 | (origin | |
3409 | (method url-fetch) | |
3410 | (uri (pypi-uri "spectra" version)) | |
3411 | (sha256 | |
3412 | (base32 | |
3413 | "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf")))) | |
3414 | (build-system python-build-system) | |
3415 | (arguments | |
3416 | `(#:phases | |
3417 | (modify-phases %standard-phases | |
3418 | (replace 'check | |
38ec0f6a | 3419 | (lambda _ (invoke "nosetests" "-v")))))) |
44d10b1f RW |
3420 | (propagated-inputs |
3421 | `(("python-colormath" ,python-colormath))) | |
3422 | (native-inputs | |
3423 | `(("python-nose" ,python-nose))) | |
3424 | (home-page "https://github.com/jsvine/spectra") | |
3425 | (synopsis "Color scales and color conversion") | |
3426 | (description | |
3427 | "This package provides a Python library intended to make color math, | |
3428 | color scales, and color space conversion easy. It has support for: | |
3429 | ||
3430 | @enumerate | |
3431 | @item Color scales | |
3432 | @item Color ranges | |
3433 | @item Color blending | |
3434 | @item Brightening/darkening colors | |
3435 | @item Saturating/desaturating colors | |
3436 | @item Conversion to/from multiple color spaces. | |
3437 | @end enumerate\n") | |
3438 | (license license:expat))) | |
3439 | ||
3440 | (define-public python2-spectra | |
3441 | (package-with-python2 python-spectra)) | |
3442 | ||
3443 | (define-public python-numpy-documentation | |
3444 | (package | |
3445 | (name "python-numpy-documentation") | |
3446 | (version (package-version python-numpy)) | |
3447 | (source (package-source python-numpy)) | |
3448 | (build-system python-build-system) | |
3449 | (native-inputs | |
3450 | `(("python-matplotlib" ,python-matplotlib) | |
3451 | ("python-numpy" ,python-numpy) | |
3452 | ("pkg-config" ,pkg-config) | |
3453 | ("python-sphinx" ,python-sphinx) | |
3454 | ("python-numpydoc" ,python-numpydoc) | |
3455 | ("texlive" ,(texlive-union (list texlive-fonts-amsfonts | |
3456 | texlive-fonts-cm-super | |
3457 | texlive-fonts-ec | |
3458 | texlive-generic-ifxetex | |
3459 | texlive-generic-pdftex | |
3460 | texlive-latex-amsfonts | |
3461 | texlive-latex-capt-of | |
3462 | texlive-latex-cmap | |
3463 | texlive-latex-environ | |
3464 | texlive-latex-eqparbox | |
3465 | texlive-latex-etoolbox | |
3466 | texlive-latex-expdlist | |
3467 | texlive-latex-fancyhdr | |
3468 | texlive-latex-fancyvrb | |
3469 | texlive-latex-fncychap | |
3470 | texlive-latex-float | |
3471 | texlive-latex-framed | |
3472 | texlive-latex-geometry | |
3473 | texlive-latex-graphics | |
3474 | texlive-latex-hyperref | |
3475 | texlive-latex-mdwtools | |
3476 | texlive-latex-multirow | |
3477 | texlive-latex-needspace | |
3478 | texlive-latex-oberdiek | |
3479 | texlive-latex-parskip | |
3480 | texlive-latex-preview | |
3481 | texlive-latex-tabulary | |
3482 | texlive-latex-threeparttable | |
3483 | texlive-latex-titlesec | |
3484 | texlive-latex-trimspaces | |
3485 | texlive-latex-ucs | |
3486 | texlive-latex-upquote | |
3487 | texlive-latex-url | |
3488 | texlive-latex-varwidth | |
3489 | texlive-latex-wrapfig))) | |
3490 | ("texinfo" ,texinfo) | |
3491 | ("perl" ,perl) | |
3492 | ("scipy-sphinx-theme" | |
3493 | ,(origin ; The build script expects scipy-sphinx-theme as a git submodule | |
3494 | (method git-fetch) | |
3495 | (uri (git-reference | |
3496 | (url "https://github.com/scipy/scipy-sphinx-theme.git") | |
3497 | (commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))) | |
3498 | (sha256 | |
3499 | (base32 | |
3500 | "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))) | |
3501 | ,@(package-native-inputs python-numpy))) | |
3502 | (arguments | |
3503 | `(#:tests? #f ; we're only generating the documentation | |
3504 | #:phases | |
3505 | (modify-phases %standard-phases | |
3506 | (delete 'build) | |
3507 | (replace 'install | |
3508 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3509 | (let* ((data (string-append (assoc-ref outputs "out") "/share")) | |
3510 | (doc (string-append | |
3511 | data "/doc/" ,name "-" | |
3512 | ,(package-version python-numpy))) | |
3513 | (info-reader (string-append data "/info")) | |
3514 | (html (string-append doc "/html")) | |
3515 | (scipy-sphinx-theme "scipy-sphinx-theme") | |
3516 | (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme)) | |
3517 | (pyver ,(string-append "PYVER="))) | |
3518 | ||
3519 | ;; FIXME: this is needed to for texlive-union to generate | |
3520 | ;; fonts, which are not found. | |
3521 | (setenv "HOME" "/tmp") | |
3522 | ||
3523 | (with-directory-excursion "doc" | |
3524 | (copy-recursively sphinx-theme-checkout scipy-sphinx-theme) | |
3525 | (mkdir-p html) | |
4fc898da RW |
3526 | (invoke "make" "html" pyver) |
3527 | (invoke "make" "latex" "PAPER=a4" pyver) | |
3528 | (invoke "make" "-C" "build/latex" | |
44d10b1f RW |
3529 | "all-pdf" "PAPER=a4" pyver) |
3530 | ;; FIXME: Generation of the info file fails. | |
4fc898da | 3531 | ;; (invoke "make" "info" pyver) |
44d10b1f RW |
3532 | ;; (mkdir-p info) |
3533 | ;; (copy-file "build/texinfo/numpy.info" | |
3534 | ;; (string-append info "/numpy.info")) | |
3535 | (for-each (lambda (file) | |
3536 | (copy-file (string-append "build/latex" file) | |
3537 | (string-append doc file))) | |
3538 | '("/numpy-ref.pdf" "/numpy-user.pdf")) | |
3539 | (with-directory-excursion "build/html" | |
3540 | (for-each (lambda (file) | |
3541 | (let* ((dir (dirname file)) | |
3542 | (tgt-dir (string-append html "/" dir))) | |
3543 | (unless (equal? "." dir) | |
3544 | (mkdir-p tgt-dir)) | |
3545 | (install-file file html))) | |
3546 | (find-files "." ".*"))))) | |
3547 | #t))))) | |
3548 | (home-page (package-home-page python-numpy)) | |
3549 | (synopsis "Documentation for the python-numpy package") | |
3550 | (description (package-description python-numpy)) | |
3551 | (license (package-license python-numpy)))) | |
3552 | ||
3553 | (define-public python2-numpy-documentation | |
3554 | (let ((numpy-documentation (package-with-python2 python-numpy-documentation))) | |
3555 | (package | |
3556 | (inherit numpy-documentation) | |
3557 | (native-inputs `(("python2-functools32" ,python2-functools32) | |
3558 | ,@(package-native-inputs numpy-documentation)))))) | |
3559 | ||
3560 | (define-public python-pygit2 | |
3561 | (package | |
3562 | (name "python-pygit2") | |
c3ecab0d | 3563 | (version "0.28.0") |
44d10b1f RW |
3564 | (source |
3565 | (origin | |
3566 | (method url-fetch) | |
3567 | (uri (pypi-uri "pygit2" version)) | |
3568 | (sha256 | |
c3ecab0d | 3569 | (base32 "0lngsaz029d4fjcwhl17pr59nh9gwl6hwfin36nph60fgsmfdg3d")))) |
44d10b1f RW |
3570 | (build-system python-build-system) |
3571 | (arguments | |
c3ecab0d | 3572 | '(#:tests? #f)) ; tests don't run correctly in our environment |
44d10b1f RW |
3573 | (propagated-inputs |
3574 | `(("python-six" ,python-six) | |
3575 | ("python-cffi" ,python-cffi) | |
3576 | ("libgit2" ,libgit2) | |
3577 | ("python-tox" ,python-tox))) | |
3578 | (native-inputs | |
3579 | `(("python-pytest" ,python-pytest))) | |
3580 | (home-page "https://github.com/libgit2/pygit2") | |
3581 | (synopsis "Python bindings for libgit2") | |
3582 | (description "Pygit2 is a set of Python bindings to the libgit2 shared | |
3583 | library, libgit2 implements Git plumbing.") | |
3584 | ;; GPL2.0 only, with linking exception. | |
3585 | (license license:gpl2))) | |
3586 | ||
3587 | (define-public python2-pygit2 | |
3588 | (package-with-python2 python-pygit2)) | |
3589 | ||
3590 | (define-public python-pyparsing | |
3591 | (package | |
3592 | (name "python-pyparsing") | |
6d3cff5a | 3593 | (version "2.3.1") |
44d10b1f RW |
3594 | (source |
3595 | (origin | |
3596 | (method url-fetch) | |
3597 | (uri (pypi-uri "pyparsing" version)) | |
3598 | (sha256 | |
6d3cff5a | 3599 | (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6")))) |
44d10b1f RW |
3600 | (build-system python-build-system) |
3601 | (outputs '("out" "doc")) | |
3602 | (arguments | |
3603 | `(#:tests? #f ; no test target | |
3604 | #:phases | |
3605 | (modify-phases %standard-phases | |
3606 | (add-after 'install 'install-doc | |
3607 | (lambda* (#:key outputs #:allow-other-keys) | |
3608 | (let* ((doc (string-append (assoc-ref outputs "doc") | |
3609 | "/share/doc/" ,name "-" ,version)) | |
3610 | (html-doc (string-append doc "/html")) | |
3611 | (examples (string-append doc "/examples"))) | |
3612 | (mkdir-p html-doc) | |
3613 | (mkdir-p examples) | |
3614 | (for-each | |
3615 | (lambda (dir tgt) | |
3616 | (map (lambda (file) | |
3617 | (install-file file tgt)) | |
3618 | (find-files dir ".*"))) | |
3619 | (list "docs" "htmldoc" "examples") | |
3620 | (list doc html-doc examples)) | |
3621 | #t)))))) | |
3622 | (home-page "https://github.com/pyparsing/pyparsing") | |
3623 | (synopsis "Python parsing class library") | |
3624 | (description | |
3625 | "The pyparsing module is an alternative approach to creating and | |
3626 | executing simple grammars, vs. the traditional lex/yacc approach, or the use | |
3627 | of regular expressions. The pyparsing module provides a library of classes | |
3628 | that client code uses to construct the grammar directly in Python code.") | |
3629 | (license license:expat))) | |
3630 | ||
3631 | (define-public python2-pyparsing | |
3632 | (package-with-python2 python-pyparsing)) | |
3633 | ||
3634 | (define-public python-numpydoc | |
3635 | (package | |
3636 | (name "python-numpydoc") | |
3637 | (version "0.8.0") | |
3638 | (source | |
3639 | (origin | |
3640 | (method url-fetch) | |
3641 | (uri (pypi-uri "numpydoc" version)) | |
3642 | (sha256 | |
3643 | (base32 | |
3644 | "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31")))) | |
3645 | (build-system python-build-system) | |
3646 | (propagated-inputs | |
3647 | `(("python-sphinx" ,python-sphinx))) | |
3648 | (native-inputs | |
3649 | `(("python-nose" ,python-nose))) | |
3650 | (home-page "https://pypi.python.org/pypi/numpydoc") | |
3651 | (synopsis | |
3652 | "Numpy's Sphinx extensions") | |
3653 | (description | |
3654 | "Sphinx extension to support docstrings in Numpy format.") | |
3655 | (license license:bsd-2))) | |
3656 | ||
3657 | (define-public python2-numpydoc | |
3658 | (package-with-python2 python-numpydoc)) | |
3659 | ||
3660 | (define-public python-numexpr | |
3661 | (package | |
3662 | (name "python-numexpr") | |
3663 | (version "2.6.5") | |
3664 | (source | |
3665 | (origin | |
3666 | (method url-fetch) | |
3667 | (uri (pypi-uri "numexpr" version)) | |
3668 | (sha256 | |
3669 | (base32 | |
3670 | "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq")))) | |
3671 | (build-system python-build-system) | |
3672 | (arguments `(#:tests? #f)) ; no tests included | |
3673 | (propagated-inputs | |
3674 | `(("python-numpy" ,python-numpy))) | |
3675 | (home-page "https://github.com/pydata/numexpr") | |
3676 | (synopsis "Fast numerical expression evaluator for NumPy") | |
3677 | (description | |
3678 | "Numexpr is a fast numerical expression evaluator for NumPy. With it, | |
3679 | expressions that operate on arrays are accelerated and use less memory than | |
3680 | doing the same calculation in Python. In addition, its multi-threaded | |
3681 | capabilities can make use of all your cores, which may accelerate | |
3682 | computations, most specially if they are not memory-bounded (e.g. those using | |
3683 | transcendental functions).") | |
3684 | (license license:expat))) | |
3685 | ||
3686 | (define-public python2-numexpr | |
3687 | (package-with-python2 python-numexpr)) | |
3688 | ||
3689 | (define-public python-cycler | |
3690 | (package | |
3691 | (name "python-cycler") | |
3692 | (version "0.10.0") | |
3693 | (source (origin | |
3694 | (method url-fetch) | |
3695 | (uri (pypi-uri "cycler" version)) | |
3696 | (sha256 | |
3697 | (base32 | |
3698 | "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd")))) | |
3699 | (build-system python-build-system) | |
3700 | (arguments | |
3701 | ;; XXX: The current version requires 'coveralls' which we don't have. | |
3702 | ;; Enable this for the next release which uses 'python-pytest'. | |
3703 | '(#:tests? #f)) | |
3704 | (propagated-inputs | |
3705 | `(("python-six" ,python-six))) | |
3706 | (home-page "http://matplotlib.org/cycler/") | |
3707 | (synopsis "Composable keyword argument iterator") | |
3708 | (description | |
3709 | "When using @code{matplotlib} and plotting more than one line, it is | |
3710 | common to want to be able to want to be able to cycle over one or more artist | |
3711 | styles; but the plotting logic can quickly become involved. | |
3712 | To address this and enable easy cycling over arbitrary @code{kwargs}, the | |
3713 | @code{Cycler} class was developed.") | |
3714 | (license license:bsd-3))) | |
3715 | ||
3716 | (define-public python2-cycler | |
3717 | (package-with-python2 python-cycler)) | |
3718 | ||
3719 | (define-public python-colorspacious | |
3720 | (package | |
3721 | (name "python-colorspacious") | |
3722 | (version "1.1.0") | |
3723 | (source | |
dee92e65 TGR |
3724 | (origin |
3725 | (method git-fetch) | |
3726 | (uri (git-reference | |
3727 | (url "https://github.com/njsmith/colorspacious.git") | |
3728 | (commit (string-append "v" version)))) | |
3729 | (file-name (git-file-name name version)) | |
3730 | (sha256 | |
3731 | (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid")))) | |
44d10b1f RW |
3732 | (build-system python-build-system) |
3733 | (propagated-inputs | |
3734 | `(("python-numpy" ,python-numpy))) | |
3735 | (native-inputs | |
3736 | `(("python-nose" ,python-nose))) | |
3737 | (arguments | |
3738 | `(#:phases | |
3739 | (modify-phases %standard-phases | |
3740 | (replace 'check | |
3741 | (lambda _ | |
c988afda | 3742 | (invoke "nosetests" "--all-modules" "-v" "colorspacious")))))) |
44d10b1f RW |
3743 | (home-page "https://github.com/njsmith/colorspacious") |
3744 | (synopsis "Python library for colorspace conversions") | |
3745 | (description "@code{colorspacious} is a Python library that lets you | |
3746 | convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") | |
3747 | (license license:expat))) | |
3748 | ||
3749 | (define-public python2-colorspacious | |
3750 | (package-with-python2 python-colorspacious)) | |
3751 | ||
3752 | (define-public python-matplotlib | |
3753 | (package | |
3754 | (name "python-matplotlib") | |
3755 | (version "2.2.3") | |
3756 | (source | |
3757 | (origin | |
3758 | (method url-fetch) | |
3759 | (uri (pypi-uri "matplotlib" version)) | |
3760 | (sha256 | |
3761 | (base32 | |
3762 | "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk")))) | |
3763 | (build-system python-build-system) | |
3764 | (propagated-inputs ; the following packages are all needed at run time | |
3765 | `(("python-cycler" ,python-cycler) | |
3766 | ("python-kiwisolver" ,python-kiwisolver) | |
3767 | ("python-pyparsing" ,python-pyparsing) | |
3768 | ("python-pygobject" ,python-pygobject) | |
3769 | ("gobject-introspection" ,gobject-introspection) | |
3770 | ("python-tkinter" ,python "tk") | |
3771 | ("python-dateutil" ,python-dateutil) | |
3772 | ("python-numpy" ,python-numpy) | |
3773 | ("python-pillow" ,python-pillow) | |
3774 | ("python-pytz" ,python-pytz) | |
3775 | ("python-six" ,python-six) | |
3776 | ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated | |
3777 | ;; from 'gtk+') provides the required 'typelib' files used by | |
3778 | ;; 'gobject-introspection'. The location of these files is set with the | |
3779 | ;; help of the environment variable GI_TYPELIB_PATH. At build time this | |
3780 | ;; is done automatically by a 'native-search-path' procedure. However, | |
3781 | ;; at run-time the user must set this variable as follows: | |
3782 | ;; | |
3783 | ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0 | |
3784 | ("gtk+" ,gtk+) | |
3785 | ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of | |
3786 | ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context' | |
3787 | ;; object. For this reason we need to import both libraries. | |
3788 | ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo | |
3789 | ("python-pycairo" ,python-pycairo) | |
3790 | ;; XXX: qtwebkit cannot be built reliably. | |
3791 | ("python-pyqt" ,python-pyqt-without-qtwebkit) | |
3792 | ("python-cairocffi" ,python-cairocffi))) | |
3793 | (inputs | |
3794 | `(("libpng" ,libpng) | |
3795 | ("imagemagick" ,imagemagick) | |
3796 | ("freetype" ,freetype) | |
3797 | ("cairo" ,cairo) | |
3798 | ("glib" ,glib) | |
3799 | ;; FIXME: Add backends when available. | |
3800 | ;("python-wxpython" ,python-wxpython) | |
3801 | ("tcl" ,tcl) | |
3802 | ("tk" ,tk))) | |
3803 | (native-inputs | |
3804 | `(("pkg-config" ,pkg-config) | |
3805 | ("python-nose" ,python-nose) | |
3806 | ("python-mock" ,python-mock))) | |
3807 | (arguments | |
3808 | `(#:phases | |
3809 | (modify-phases %standard-phases | |
3810 | (add-before 'build 'configure-environment | |
3811 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
3812 | (let ((cairo (assoc-ref inputs "cairo")) | |
3813 | (gtk+ (assoc-ref inputs "gtk+"))) | |
3814 | ;; Setting these directories in the 'basedirlist' of 'setup.cfg' | |
3815 | ;; has not effect. | |
3816 | (setenv "LD_LIBRARY_PATH" | |
3817 | (string-append cairo "/lib:" gtk+ "/lib")) | |
3818 | (setenv "HOME" (getcwd)) | |
3819 | (call-with-output-file "setup.cfg" | |
3820 | (lambda (port) | |
3821 | (format port "[directories]~% | |
3822 | basedirlist = ~a,~a~% | |
3823 | [rc_options]~% | |
3824 | backend = TkAgg~%" | |
3825 | (assoc-ref inputs "tcl") | |
3826 | (assoc-ref inputs "tk"))))) | |
3827 | #t))))) | |
3828 | (home-page "http://matplotlib.org") | |
3829 | (synopsis "2D plotting library for Python") | |
3830 | (description | |
3831 | "Matplotlib is a Python 2D plotting library which produces publication | |
3832 | quality figures in a variety of hardcopy formats and interactive environments | |
3833 | across platforms. Matplotlib can be used in Python scripts, the python and | |
3834 | ipython shell, web application servers, and six graphical user interface | |
3835 | toolkits.") | |
3836 | (license license:psfl) | |
3837 | (properties `((python2-variant . ,(delay python2-matplotlib)))))) | |
3838 | ||
3839 | (define-public python2-matplotlib | |
3840 | (let ((matplotlib (package-with-python2 | |
3841 | (strip-python2-variant python-matplotlib)))) | |
3842 | (package (inherit matplotlib) | |
3843 | ;; Make sure to use special packages for Python 2 instead | |
3844 | ;; of those automatically rewritten by package-with-python2. | |
3845 | (propagated-inputs | |
3846 | `(("python2-pycairo" ,python2-pycairo) | |
3847 | ("python2-backports-functools-lru-cache" | |
3848 | ,python2-backports-functools-lru-cache) | |
3849 | ("python2-functools32" ,python2-functools32) | |
3850 | ("python2-pygobject-2" ,python2-pygobject-2) | |
3851 | ("python2-subprocess32" ,python2-subprocess32) | |
3852 | ("python2-tkinter" ,python-2 "tk") | |
3853 | ,@(fold alist-delete (package-propagated-inputs matplotlib) | |
3854 | '("python-pycairo" "python-pygobject" "python-tkinter"))))))) | |
3855 | ||
3856 | (define-public python-matplotlib-documentation | |
3857 | (package | |
3858 | (name "python-matplotlib-documentation") | |
3859 | (version (package-version python-matplotlib)) | |
3860 | (source (package-source python-matplotlib)) | |
3861 | (build-system python-build-system) | |
3862 | (native-inputs | |
3863 | `(("python-matplotlib" ,python-matplotlib) | |
3864 | ("python-colorspacious" ,python-colorspacious) | |
3865 | ("python-sphinx" ,python-sphinx) | |
3866 | ("python-sphinx-gallery" ,python-sphinx-gallery) | |
3867 | ("python-numpydoc" ,python-numpydoc) | |
3868 | ("python-ipython" ,python-ipython) | |
e7a53914 | 3869 | ("python-ipykernel" ,python-ipykernel) |
44d10b1f RW |
3870 | ("python-mock" ,python-mock) |
3871 | ("graphviz" ,graphviz) | |
e7a53914 RW |
3872 | ("texlive" ,(texlive-union (list texlive-latex-amsfonts |
3873 | texlive-latex-amsmath | |
3874 | texlive-latex-enumitem | |
3875 | texlive-latex-expdlist | |
3876 | texlive-latex-geometry | |
3877 | texlive-latex-preview | |
3878 | texlive-latex-type1cm | |
3879 | texlive-latex-ucs | |
3880 | ||
3881 | texlive-generic-pdftex | |
3882 | ||
3883 | texlive-fonts-amsfonts | |
3884 | texlive-fonts-ec | |
3885 | texlive-fonts-adobe-times | |
3886 | texlive-fonts-txfonts))) | |
44d10b1f RW |
3887 | ("texinfo" ,texinfo) |
3888 | ,@(package-native-inputs python-matplotlib))) | |
3889 | (arguments | |
3890 | `(#:tests? #f ; we're only generating documentation | |
3891 | #:phases | |
3892 | (modify-phases %standard-phases | |
3893 | (replace 'build | |
3894 | (lambda _ | |
3895 | (chdir "doc") | |
e7a53914 RW |
3896 | (setenv "PYTHONPATH" |
3897 | (string-append (getenv "PYTHONPATH") | |
3898 | ":" (getcwd) "/../examples/units")) | |
44d10b1f | 3899 | (substitute* "conf.py" |
e7a53914 RW |
3900 | ;; Don't use git. |
3901 | (("^SHA = check_output.*") | |
3902 | (string-append "SHA = \"" ,version "\"\n")) | |
3903 | ;; Don't fetch intersphinx files from the Internet | |
3904 | (("^explicit_order_folders" m) | |
3905 | (string-append "intersphinx_mapping = {}\n" m)) | |
3906 | (("'sphinx.ext.intersphinx',") "") | |
3907 | ;; Disable URL embedding which requires internet access. | |
3908 | (("'https://docs.scipy.org/doc/numpy'") "None") | |
3909 | (("'https://docs.scipy.org/doc/scipy/reference'") "None")) | |
3910 | (invoke "make" | |
3911 | "SPHINXBUILD=sphinx-build" | |
3912 | "SPHINXOPTS=" ; don't abort on warnings | |
3913 | "html" "texinfo"))) | |
44d10b1f RW |
3914 | (replace 'install |
3915 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3916 | (let* ((data (string-append (assoc-ref outputs "out") "/share")) | |
3917 | (doc (string-append data "/doc/python-matplotlib-" ,version)) | |
3918 | (info (string-append data "/info")) | |
3919 | (html (string-append doc "/html"))) | |
3920 | (mkdir-p html) | |
3921 | (mkdir-p info) | |
3922 | (copy-recursively "build/html" html) | |
3923 | (symlink (string-append html "/_images") | |
3924 | (string-append info "/matplotlib-figures")) | |
3925 | (with-directory-excursion "build/texinfo" | |
3926 | (substitute* "matplotlib.texi" | |
3927 | (("@image\\{([^,]*)" all file) | |
3928 | (string-append "@image{matplotlib-figures/" file))) | |
3929 | (symlink (string-append html "/_images") | |
3930 | "./matplotlib-figures") | |
e7a53914 RW |
3931 | (invoke "makeinfo" "--no-split" |
3932 | "-o" "matplotlib.info" "matplotlib.texi")) | |
3933 | (install-file "build/texinfo/matplotlib.info" info)) | |
44d10b1f RW |
3934 | #t))))) |
3935 | (home-page (package-home-page python-matplotlib)) | |
3936 | (synopsis "Documentation for the python-matplotlib package") | |
3937 | (description (package-description python-matplotlib)) | |
3938 | (license (package-license python-matplotlib)))) | |
3939 | ||
3940 | (define-public python2-matplotlib-documentation | |
3941 | (package-with-python2 python-matplotlib-documentation)) | |
3942 | ||
55dae98f RW |
3943 | (define-public python-matplotlib-venn |
3944 | (package | |
3945 | (name "python-matplotlib-venn") | |
3946 | (version "0.11.5") | |
3947 | (source | |
3948 | (origin | |
3949 | (method url-fetch) | |
3950 | (uri (pypi-uri "matplotlib-venn" version ".zip")) | |
3951 | (sha256 | |
3952 | (base32 | |
3953 | "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy")))) | |
3954 | (build-system python-build-system) | |
3955 | (arguments '(#:tests? #f)) ; tests are not included | |
3956 | (propagated-inputs | |
3957 | `(("python-matplotlib" ,python-matplotlib) | |
3958 | ("python-numpy" ,python-numpy) | |
3959 | ("python-scipy" ,python-scipy))) | |
3960 | (native-inputs | |
3961 | `(("unzip" ,unzip))) | |
3962 | (home-page "https://github.com/konstantint/matplotlib-venn") | |
3963 | (synopsis "Plot area-proportional Venn diagrams") | |
3964 | (description | |
3965 | "This package provides tools for plotting area-proportional two- and | |
3966 | three-way Venn diagrams in @code{matplotlib}.") | |
3967 | (license license:expat))) | |
3968 | ||
44d10b1f RW |
3969 | (define-public python2-pysnptools |
3970 | (package | |
3971 | (name "python2-pysnptools") | |
5d1ade85 | 3972 | (version "0.3.13") |
44d10b1f RW |
3973 | (source |
3974 | (origin | |
3975 | (method url-fetch) | |
5d1ade85 | 3976 | (uri (pypi-uri "pysnptools" version)) |
44d10b1f RW |
3977 | (sha256 |
3978 | (base32 | |
5d1ade85 | 3979 | "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm")))) |
44d10b1f RW |
3980 | (build-system python-build-system) |
3981 | (arguments | |
5d1ade85 RW |
3982 | `(#:python ,python-2 ; only Python 2.7 is supported |
3983 | #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included | |
44d10b1f RW |
3984 | (propagated-inputs |
3985 | `(("python2-numpy" ,python2-numpy) | |
3986 | ("python2-scipy" ,python2-scipy) | |
3987 | ("python2-pandas" ,python2-pandas))) | |
44d10b1f | 3988 | (native-inputs |
5d1ade85 | 3989 | `(("python2-cython" ,python2-cython))) |
1b66989b | 3990 | (home-page "http://microsoftgenomics.github.io/PySnpTools/") |
44d10b1f RW |
3991 | (synopsis "Library for reading and manipulating genetic data") |
3992 | (description | |
3993 | "PySnpTools is a library for reading and manipulating genetic data. It | |
3994 | can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of | |
3995 | those files. It can also efficiently manipulate ranges of integers using set | |
3996 | operators such as union, intersection, and difference.") | |
3997 | (license license:asl2.0))) | |
3998 | ||
3999 | (define-public python-scipy | |
4000 | (package | |
4001 | (name "python-scipy") | |
5cfc1632 | 4002 | (version "1.2.2") |
44d10b1f RW |
4003 | (source |
4004 | (origin | |
4005 | (method url-fetch) | |
4006 | (uri (pypi-uri "scipy" version)) | |
4007 | (sha256 | |
4008 | (base32 | |
5cfc1632 | 4009 | "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4")))) |
44d10b1f RW |
4010 | (build-system python-build-system) |
4011 | (propagated-inputs | |
4012 | `(("python-numpy" ,python-numpy) | |
4013 | ("python-matplotlib" ,python-matplotlib) | |
4014 | ("python-pyparsing" ,python-pyparsing))) | |
4015 | (inputs | |
4016 | `(("lapack" ,lapack) | |
4017 | ("openblas" ,openblas))) | |
4018 | (native-inputs | |
4019 | `(("python-cython" ,python-cython) | |
4020 | ("python-pytest" ,python-pytest) | |
4021 | ("python-sphinx" ,python-sphinx) | |
4022 | ("python-numpydoc" ,python-numpydoc) | |
4023 | ("gfortran" ,gfortran) | |
4024 | ("perl" ,perl) | |
4025 | ("which" ,which))) | |
4026 | (outputs '("out" "doc")) | |
4027 | (arguments | |
4028 | `(#:phases | |
4029 | (modify-phases %standard-phases | |
4030 | (add-after 'unpack 'disable-broken-tests | |
4031 | (lambda _ | |
4032 | (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py" | |
4033 | (("^( +)def test_threads_parallel\\(self\\):" m indent) | |
4034 | (string-append indent | |
4035 | "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" | |
4036 | m))) | |
4037 | (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py" | |
4038 | (("^def test_parallel_threads\\(\\):" m) | |
4039 | (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" | |
4040 | m))) | |
4041 | #t)) | |
4042 | (add-before 'build 'configure-openblas | |
4043 | (lambda* (#:key inputs #:allow-other-keys) | |
4044 | (call-with-output-file "site.cfg" | |
4045 | (lambda (port) | |
4046 | (format port | |
4047 | "[blas] | |
4048 | libraries = openblas | |
4049 | library_dirs = ~a/lib | |
4050 | include_dirs = ~a/include | |
4051 | ||
4052 | # backslash-n to make emacs happy | |
4053 | \n[atlas] | |
4054 | library_dirs = ~a/lib | |
4055 | atlas_libs = openblas | |
4056 | " | |
4057 | (assoc-ref inputs "openblas") | |
4058 | (assoc-ref inputs "openblas") | |
4059 | (assoc-ref inputs "openblas")))) | |
4060 | #t)) | |
4061 | (add-after 'install 'install-doc | |
4062 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4063 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4064 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
4065 | (html (string-append doc "/html")) | |
4066 | (pyver ,(string-append "PYVER=" (version-major+minor | |
4067 | (package-version python)))) | |
4068 | ;; By default it tries to run sphinx-build through the Python | |
4069 | ;; interpreter which won't work with our shell wrapper. | |
4070 | (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build")) | |
4071 | ;; Make installed package available for building the | |
4072 | ;; documentation | |
4073 | (add-installed-pythonpath inputs outputs) | |
4074 | (with-directory-excursion "doc" | |
4075 | ;; Fix generation of images for mathematical expressions. | |
4076 | (substitute* (find-files "source" "conf\\.py") | |
4077 | (("pngmath_use_preview = True") | |
4078 | "pngmath_use_preview = False")) | |
4079 | (mkdir-p html) | |
4080 | (invoke "make" "html" pyver sphinxbuild) | |
4081 | (with-directory-excursion "build/html" | |
4082 | (for-each (lambda (file) | |
4083 | (let* ((dir (dirname file)) | |
4084 | (tgt-dir (string-append html "/" dir))) | |
4085 | (install-file file html))) | |
4086 | (find-files "." ".*"))))) | |
4087 | #t)) | |
4088 | ;; Tests can only be run after the library has been installed and not | |
4089 | ;; within the source directory. | |
4090 | (delete 'check) | |
4091 | (add-after 'install 'check | |
4092 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4093 | (add-installed-pythonpath inputs outputs) | |
4094 | (with-directory-excursion "/tmp" | |
4095 | (invoke "python" "-c" | |
4096 | "import scipy; scipy.test(verbose=2)"))))))) | |
4097 | (home-page "https://www.scipy.org/") | |
4098 | (synopsis "The Scipy library provides efficient numerical routines") | |
4099 | (description "The SciPy library is one of the core packages that make up | |
4100 | the SciPy stack. It provides many user-friendly and efficient numerical | |
4101 | routines such as routines for numerical integration and optimization.") | |
4102 | (properties `((python2-variant . ,(delay python2-scipy)))) | |
4103 | (license license:bsd-3))) | |
4104 | ||
4105 | (define-public python2-scipy | |
4106 | (package-with-python2 | |
4107 | (strip-python2-variant python-scipy))) | |
4108 | ||
4109 | (define-public python-socksipy-branch | |
4110 | (package | |
4111 | (name "python-socksipy-branch") | |
4112 | (version "1.01") | |
4113 | (source | |
4114 | (origin | |
4115 | (method url-fetch) | |
4116 | (uri (pypi-uri "SocksiPy-branch" version)) | |
4117 | (sha256 | |
4118 | (base32 | |
4119 | "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p")))) | |
4120 | (build-system python-build-system) | |
4121 | (arguments | |
4122 | `(#:tests? #f)) ; There are no tests | |
4123 | (home-page "https://code.google.com/archive/p/socksipy-branch/") | |
4124 | (synopsis "Python SOCKS module") | |
4125 | (description | |
4126 | "SocksiPy - A Python SOCKS client module. It provides a | |
4127 | socket-like interface that supports connections to any TCP | |
4128 | service through the use of a SOCKS4, SOCKS5 or HTTP proxy. | |
4129 | The original version was developed by Dan Haim, this is a | |
4130 | branch created by Mario Vilas to address some open issues, | |
4131 | as the original project seems to have been abandoned circa 2007.") | |
4132 | (license license:bsd-3))) | |
4133 | ||
4134 | (define-public python2-socksipy-branch | |
4135 | (package-with-python2 python-socksipy-branch)) | |
4136 | ||
4137 | (define-public python-pycodestyle | |
4138 | (package | |
4139 | (name "python-pycodestyle") | |
4140 | (version "2.4.0") | |
4141 | (source | |
4142 | (origin | |
4143 | (method url-fetch) | |
4144 | (uri (pypi-uri "pycodestyle" version)) | |
4145 | (sha256 | |
4146 | (base32 | |
4147 | "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b")))) | |
4148 | (build-system python-build-system) | |
4149 | (home-page "https://pycodestyle.readthedocs.io/") | |
4150 | (synopsis "Python style guide checker") | |
4151 | (description "@code{pycodestyle} (formerly pep8) is a tool to check | |
4152 | Python code against some of the style conventions in | |
4153 | @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.") | |
4154 | (license license:expat))) | |
4155 | ||
4156 | (define-public python2-pycodestyle | |
4157 | (package-with-python2 python-pycodestyle)) | |
4158 | ||
4159 | (define-public python-multidict | |
4160 | (package | |
4161 | (name "python-multidict") | |
4162 | (version "4.2.0") | |
4163 | (source | |
4164 | (origin | |
4165 | (method url-fetch) | |
4166 | (uri (pypi-uri "multidict" version)) | |
4167 | (sha256 | |
4168 | (base32 | |
4169 | "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194")))) | |
4170 | (build-system python-build-system) | |
4171 | (native-inputs | |
4172 | `(("python-pytest" ,python-pytest) | |
4173 | ("python-pytest-runner" ,python-pytest-runner))) | |
4174 | (home-page "https://github.com/aio-libs/multidict/") | |
4175 | (synopsis "Multidict implementation") | |
4176 | (description "Multidict is dict-like collection of key-value pairs | |
4177 | where key might be occurred more than once in the container.") | |
4178 | (license license:asl2.0))) | |
4179 | ||
4180 | (define-public python-orderedmultidict | |
4181 | (package | |
4182 | (name "python-orderedmultidict") | |
4183 | (version "0.7.11") | |
4184 | (source | |
4185 | (origin | |
4186 | (method url-fetch) | |
4187 | (uri (pypi-uri "orderedmultidict" version)) | |
4188 | (sha256 | |
4189 | (base32 | |
4190 | "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw")))) | |
4191 | (build-system python-build-system) | |
4192 | (arguments | |
4193 | `(#:phases | |
4194 | (modify-phases %standard-phases | |
4195 | (add-after 'unpack 'fix-tests | |
4196 | (lambda _ | |
4197 | ;; The package uses nosetest for running the tests. | |
4198 | ;; Adding this initfile allows to run the test suite | |
4199 | ;; without requiring nosetest. | |
d1c4f329 RW |
4200 | (with-output-to-file "tests/__init__.py" newline) |
4201 | #t))))) | |
44d10b1f RW |
4202 | (propagated-inputs |
4203 | `(("python-six" ,python-six))) | |
4204 | (native-inputs | |
4205 | `(("python-pycodestyle" ,python-pycodestyle))) | |
4206 | (home-page "https://github.com/gruns/orderedmultidict") | |
4207 | (synopsis "Python Ordered Multivalue Dictionary - omdict") | |
4208 | (description "This package contains a library for ordered multivalue | |
4209 | dictionaries. A multivalue dictionary is a dictionary that can store | |
4210 | multiple values for the same key. An ordered multivalue dictionary is a | |
4211 | multivalue dictionary that retains the order of insertions and deletions.") | |
4212 | (license license:unlicense))) | |
4213 | ||
4214 | (define-public python2-orderedmultidict | |
4215 | (package-with-python2 python-orderedmultidict)) | |
4216 | ||
4217 | (define-public python-autopep8 | |
4218 | (package | |
4219 | (name "python-autopep8") | |
4220 | (version "1.3.5") | |
4221 | (source | |
4222 | (origin | |
4223 | (method url-fetch) | |
4224 | (uri (pypi-uri "autopep8" version)) | |
4225 | (sha256 | |
4226 | (base32 | |
4227 | "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112")))) | |
4228 | (build-system python-build-system) | |
4229 | (propagated-inputs | |
4230 | `(("python-pycodestyle" ,python-pycodestyle))) | |
4231 | (home-page "https://github.com/hhatto/autopep8") | |
4232 | (synopsis "Format Python code according to the PEP 8 style guide") | |
4233 | (description | |
4234 | "@code{autopep8} automatically formats Python code to conform to | |
4235 | the PEP 8 style guide. It uses the pycodestyle utility to determine | |
4236 | what parts of the code needs to be formatted. @code{autopep8} is | |
4237 | capable of fixing most of the formatting issues that can be reported | |
4238 | by pycodestyle.") | |
4239 | (license (license:non-copyleft | |
4240 | "https://github.com/hhatto/autopep8/blob/master/LICENSE")))) | |
4241 | ||
4242 | (define-public python2-autopep8 | |
4243 | (package-with-python2 python-autopep8)) | |
4244 | ||
4245 | (define-public python-distutils-extra | |
4246 | (package | |
4247 | (name "python-distutils-extra") | |
4248 | (version "2.38") | |
4249 | (source | |
4250 | (origin | |
4251 | (method url-fetch) | |
4252 | (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/" | |
4253 | version "/+download/python-distutils-extra-" | |
4254 | version ".tar.gz")) | |
4255 | (sha256 | |
4256 | (base32 | |
4257 | "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x")))) | |
4258 | (build-system python-build-system) | |
4259 | (home-page "https://launchpad.net/python-distutils-extra/") | |
4260 | (synopsis "Enhancements to Python's distutils") | |
4261 | (description | |
4262 | "The python-distutils-extra module enables you to easily integrate | |
4263 | gettext support, themed icons, and scrollkeeper-based documentation into | |
4264 | Python's distutils.") | |
4265 | (license license:gpl2))) | |
4266 | ||
4267 | (define-public python2-distutils-extra | |
4268 | (package-with-python2 python-distutils-extra)) | |
4269 | ||
4270 | (define-public python2-elib.intl | |
4271 | (package | |
4272 | (name "python2-elib.intl") | |
4273 | (version "0.0.3") | |
4274 | (source | |
4275 | (origin | |
4276 | ;; This project doesn't tag releases or publish tarballs, so we take | |
4277 | ;; source from a (semi-arbitrary, i.e. latest as of now) git commit. | |
4278 | (method git-fetch) | |
4279 | (uri (git-reference | |
4280 | (url "https://github.com/dieterv/elib.intl.git") | |
4281 | (commit "d09997cfef"))) | |
4282 | (file-name (string-append name "-" version "-checkout")) | |
4283 | (sha256 | |
4284 | (base32 | |
4285 | "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d")))) | |
4286 | (build-system python-build-system) | |
4287 | (arguments | |
4288 | ;; incompatible with Python 3 (exception syntax) | |
4289 | `(#:python ,python-2 | |
4290 | #:tests? #f)) | |
4291 | (home-page "https://github.com/dieterv/elib.intl") | |
4292 | (synopsis "Enhanced internationalization for Python") | |
4293 | (description | |
4294 | "The elib.intl module provides enhanced internationalization (I18N) | |
4295 | services for your Python modules and applications.") | |
4296 | (license license:lgpl3+))) | |
4297 | ||
4298 | (define-public python-olefile | |
4299 | (package | |
4300 | (name "python-olefile") | |
4301 | (version "0.45.1") | |
4302 | (source | |
4303 | (origin | |
4304 | (method url-fetch) | |
4305 | (uri (string-append "https://github.com/decalage2/olefile/archive/v" | |
4306 | version ".tar.gz")) | |
4307 | (file-name (string-append name "-" version ".tar.gz")) | |
4308 | (sha256 | |
4309 | (base32 | |
4310 | "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai")))) | |
4311 | (build-system python-build-system) | |
4312 | (home-page | |
4313 | "https://www.decalage.info/python/olefileio") | |
4314 | (synopsis "Read and write Microsoft OLE2 files.") | |
4315 | (description | |
4316 | "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured | |
4317 | Storage or Compound Document, Microsoft Office). It is an improved version of | |
4318 | the OleFileIO module from PIL, the Python Image Library.") | |
4319 | (license license:bsd-3))) | |
4320 | ||
4321 | (define-public python2-olefile | |
4322 | (package-with-python2 python-olefile)) | |
4323 | ||
4324 | (define-public python-pillow | |
4325 | (package | |
4326 | (name "python-pillow") | |
4327 | (version "5.4.1") | |
4328 | (source | |
4329 | (origin | |
4330 | (method url-fetch) | |
4331 | (uri (pypi-uri "Pillow" version)) | |
4332 | (sha256 | |
4333 | (base32 | |
4334 | "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj")))) | |
4335 | (build-system python-build-system) | |
4336 | (native-inputs | |
4337 | `(("python-pytest" ,python-pytest))) | |
4338 | (inputs | |
4339 | `(("freetype" ,freetype) | |
4340 | ("lcms" ,lcms) | |
4341 | ("zlib" ,zlib) | |
4342 | ("libjpeg" ,libjpeg) | |
4343 | ("openjpeg" ,openjpeg) | |
4344 | ("libtiff" ,libtiff) | |
4345 | ("libwebp" ,libwebp))) | |
4346 | (propagated-inputs | |
4347 | `(("python-olefile" ,python-olefile))) | |
4348 | (arguments | |
4349 | `(#:phases | |
4350 | (modify-phases %standard-phases | |
4351 | (add-after 'unpack 'patch-ldconfig | |
4352 | (lambda _ | |
4353 | (substitute* "setup.py" | |
4354 | (("\\['/sbin/ldconfig', '-p'\\]") "['true']")))) | |
4355 | (delete 'check) ; We must run checks after python-pillow is installed. | |
4356 | (add-after 'install 'check-installed | |
4357 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
4358 | (begin | |
4359 | (setenv "HOME" (getcwd)) | |
4360 | ;; Make installed package available for running the tests. | |
4361 | (add-installed-pythonpath inputs outputs) | |
4362 | (invoke "python" "selftest.py" "--installed") | |
4363 | (invoke "python" "-m" "pytest" "-vv"))))))) | |
4364 | (home-page "https://python-pillow.org") | |
4365 | (synopsis "Fork of the Python Imaging Library") | |
4366 | (description | |
4367 | "The Python Imaging Library adds image processing capabilities to your | |
4368 | Python interpreter. This library provides extensive file format support, an | |
4369 | efficient internal representation, and fairly powerful image processing | |
4370 | capabilities. The core image library is designed for fast access to data | |
4371 | stored in a few basic pixel formats. It should provide a solid foundation for | |
4372 | a general image processing tool.") | |
4373 | (license (license:x11-style | |
4374 | "http://www.pythonware.com/products/pil/license.htm" | |
4375 | "The PIL Software License")))) | |
4376 | ||
4377 | (define-public python2-pillow | |
4378 | (package-with-python2 python-pillow)) | |
4379 | ||
4380 | (define-public python-pycparser | |
4381 | (package | |
4382 | (name "python-pycparser") | |
4383 | (version "2.18") | |
4384 | (source | |
4385 | (origin | |
4386 | (method url-fetch) | |
4387 | (uri (pypi-uri "pycparser" version)) | |
4388 | (sha256 | |
4389 | (base32 | |
4390 | "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r")))) | |
4391 | (outputs '("out" "doc")) | |
4392 | (build-system python-build-system) | |
4393 | (native-inputs | |
4394 | `(("pkg-config" ,pkg-config))) | |
4395 | (arguments | |
4396 | `(#:phases | |
4397 | (modify-phases %standard-phases | |
4398 | (replace 'check | |
4399 | (lambda _ | |
4400 | (with-directory-excursion "tests" | |
acb75c03 RW |
4401 | (invoke "python" "all_tests.py")) |
4402 | #t)) | |
44d10b1f RW |
4403 | (add-after 'install 'install-doc |
4404 | (lambda* (#:key outputs #:allow-other-keys) | |
4405 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4406 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
4407 | (examples (string-append doc "/examples"))) | |
4408 | (mkdir-p examples) | |
4409 | (for-each (lambda (file) | |
4410 | (copy-file (string-append "." file) | |
4411 | (string-append doc file))) | |
4412 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
4413 | (copy-recursively "examples" examples))))))) | |
4414 | (home-page "https://github.com/eliben/pycparser") | |
4415 | (synopsis "C parser in Python") | |
4416 | (description | |
4417 | "Pycparser is a complete parser of the C language, written in pure Python | |
4418 | using the PLY parsing library. It parses C code into an AST and can serve as | |
4419 | a front-end for C compilers or analysis tools.") | |
4420 | (license license:bsd-3))) | |
4421 | ||
4422 | (define-public python2-pycparser | |
4423 | (package-with-python2 python-pycparser)) | |
4424 | ||
4425 | (define-public python-pywavelets | |
4426 | (package | |
4427 | (name "python-pywavelets") | |
4428 | (version "1.0.1") | |
4429 | (home-page "https://github.com/PyWavelets/pywt") | |
4430 | (source (origin | |
4431 | (method url-fetch) | |
4432 | (uri (pypi-uri "PyWavelets" version)) | |
4433 | (sha256 | |
4434 | (base32 | |
4435 | "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w")))) | |
4436 | (build-system python-build-system) | |
4437 | (arguments | |
4438 | '(#:modules ((ice-9 ftw) | |
4439 | (srfi srfi-1) | |
4440 | (srfi srfi-26) | |
4441 | (guix build utils) | |
4442 | (guix build python-build-system)) | |
4443 | #:phases (modify-phases %standard-phases | |
4444 | (replace 'check | |
4445 | (lambda _ | |
4446 | (let ((cwd (getcwd)) | |
4447 | (libdir (find (cut string-prefix? "lib." <>) | |
4448 | (scandir "build")))) | |
4449 | (with-directory-excursion (string-append cwd "/build/" libdir) | |
4450 | (invoke "nosetests" "-v" ".")))))))) | |
4451 | (native-inputs | |
4452 | `(("python-matplotlib" ,python-matplotlib) ;for tests | |
4453 | ("python-nose" ,python-nose))) | |
4454 | (propagated-inputs | |
4455 | `(("python-numpy" ,python-numpy))) | |
4456 | (synopsis "Wavelet transforms in Python") | |
4457 | (description | |
4458 | "PyWavelets is a library for wavelet transforms in Python. Wavelets are | |
4459 | mathematical basis functions that are localized in both time and frequency. | |
4460 | Wavelet transforms are time-frequency transforms employing wavelets. They are | |
4461 | similar to Fourier transforms, the difference being that Fourier transforms are | |
4462 | localized only in frequency instead of in time and frequency.") | |
4463 | (license license:expat))) | |
4464 | ||
4465 | (define-public python2-pywavelets | |
4466 | (package-with-python2 python-pywavelets)) | |
4467 | ||
4468 | (define-public python-xcffib | |
4469 | (package | |
4470 | (name "python-xcffib") | |
4471 | (version "0.6.0") | |
4472 | (source | |
4473 | (origin | |
4474 | (method url-fetch) | |
4475 | (uri (pypi-uri "xcffib" version)) | |
4476 | (sha256 | |
4477 | (base32 | |
4478 | "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n")))) | |
4479 | (build-system python-build-system) | |
4480 | (inputs | |
4481 | `(("libxcb" ,libxcb))) | |
4482 | (propagated-inputs | |
4483 | `(("python-cffi" ,python-cffi) ; used at run time | |
4484 | ("python-six" ,python-six))) | |
4485 | (arguments | |
4486 | `(;; FIXME: Tests need more work. See ".travis.yml" in the repository. | |
4487 | #:tests? #f | |
4488 | #:phases | |
4489 | (modify-phases %standard-phases | |
4490 | (add-after 'unpack 'fix-libxcb-path | |
4491 | (lambda* (#:key inputs #:allow-other-keys) | |
4492 | (let ((libxcb (assoc-ref inputs "libxcb"))) | |
4493 | (substitute* '("xcffib/__init__.py") | |
4494 | (("^soname = \"") (string-append "soname = \"" libxcb "/lib/"))) | |
4495 | #t))) | |
4496 | (add-after 'install 'install-doc | |
4497 | (lambda* (#:key outputs #:allow-other-keys) | |
4498 | (let ((doc (string-append (assoc-ref outputs "out") "/share" | |
4499 | "/doc/" ,name "-" ,version))) | |
4500 | (mkdir-p doc) | |
4501 | (copy-file "README.md" | |
4502 | (string-append doc "/README.md")) | |
4503 | #t)))))) | |
4504 | (home-page "https://github.com/tych0/xcffib") | |
4505 | (synopsis "XCB Python bindings") | |
4506 | (description | |
4507 | "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds | |
4508 | support for Python 3 and PyPy. It is based on cffi.") | |
4509 | (license license:expat))) | |
4510 | ||
4511 | (define-public python2-xcffib | |
4512 | (package-with-python2 python-xcffib)) | |
4513 | ||
4514 | (define-public python-cairocffi | |
4515 | (package | |
4516 | (name "python-cairocffi") | |
4517 | (version "0.9.0") | |
4518 | (source | |
4519 | (origin | |
4520 | (method url-fetch) | |
4521 | (uri (pypi-uri "cairocffi" version)) | |
4522 | (sha256 | |
4523 | (base32 | |
4524 | "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m")) | |
4525 | (patches (search-patches "python-cairocffi-dlopen-path.patch")))) | |
4526 | (build-system python-build-system) | |
4527 | (outputs '("out" "doc")) | |
4528 | (inputs | |
4529 | `(("glib" ,glib) | |
4530 | ("gtk+" ,gtk+) | |
4531 | ("gdk-pixbuf" ,gdk-pixbuf) | |
4532 | ("cairo" ,cairo) | |
4533 | ("pango" ,pango))) | |
4534 | (native-inputs | |
4535 | `(("pkg-config" ,pkg-config) | |
4536 | ("python-pytest" ,python-pytest) | |
4537 | ("python-pytest-cov" ,python-pytest-cov) | |
4538 | ("python-pytest-runner" ,python-pytest-runner) | |
4539 | ("python-sphinx" ,python-sphinx) | |
4540 | ("python-docutils" ,python-docutils))) | |
4541 | (propagated-inputs | |
4542 | `(("python-xcffib" ,python-xcffib))) ; used at run time | |
4543 | (arguments | |
4544 | `(#:phases | |
4545 | (modify-phases %standard-phases | |
4546 | (add-after 'unpack 'patch-paths | |
4547 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4548 | (substitute* (find-files "." "\\.py$") | |
4549 | (("dlopen\\(ffi, 'cairo'") | |
4550 | (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo") | |
4551 | "/lib/libcairo.so.2'")) | |
4552 | (("dlopen\\(ffi, 'gdk-3'") | |
4553 | (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+") | |
4554 | "/lib/libgtk-3.so.0'")) | |
4555 | (("dlopen\\(ffi, 'gdk_pixbuf-2.0'") | |
4556 | (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf") | |
4557 | "/lib/libgdk_pixbuf-2.0.so.0'")) | |
4558 | (("dlopen\\(ffi, 'glib-2.0'") | |
4559 | (string-append "dlopen(ffi, '" (assoc-ref inputs "glib") | |
4560 | "/lib/libglib-2.0.so.0'")) | |
4561 | (("dlopen\\(ffi, 'gobject-2.0'") | |
4562 | (string-append "dlopen(ffi, '" (assoc-ref inputs "glib") | |
4563 | "/lib/libgobject-2.0.so.0'")) | |
4564 | (("dlopen\\(ffi, 'pangocairo-1.0'") | |
4565 | (string-append "dlopen(ffi, '" (assoc-ref inputs "pango") | |
4566 | "/lib/libpangocairo-1.0.so.0'")) | |
4567 | (("dlopen\\(ffi, 'pango-1.0'") | |
4568 | (string-append "dlopen(ffi, '" (assoc-ref inputs "pango") | |
4569 | "/lib/libpango-1.0.so.0'"))) | |
4570 | #t)) | |
4571 | (add-after 'install 'install-doc | |
4572 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4573 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4574 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
4575 | (html (string-append doc "/html"))) | |
4576 | (setenv "LD_LIBRARY_PATH" | |
4577 | (string-append (assoc-ref inputs "cairo") "/lib" ":" | |
4578 | (assoc-ref inputs "gdk-pixbuf") "/lib")) | |
4579 | (setenv "LANG" "en_US.UTF-8") | |
4580 | (mkdir-p html) | |
4581 | (for-each (lambda (file) | |
4582 | (copy-file (string-append "." file) | |
4583 | (string-append doc file))) | |
4584 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
4585 | (system* "python" "setup.py" "build_sphinx") | |
4586 | (copy-recursively "docs/_build/html" html) | |
4587 | #t)))))) | |
4588 | (home-page "https://github.com/Kozea/cairocffi") | |
4589 | (synopsis "Python bindings and object-oriented API for Cairo") | |
4590 | (description | |
4591 | "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of | |
4592 | Python bindings and object-oriented API for cairo. Cairo is a 2D vector | |
4593 | graphics library with support for multiple backends including image buffers, | |
4594 | PNG, PostScript, PDF, and SVG file output.") | |
4595 | (license license:bsd-3))) | |
4596 | ||
4597 | (define-public python2-cairocffi | |
4598 | (package-with-python2 python-cairocffi)) | |
4599 | ||
4600 | (define-public python-decorator | |
4601 | (package | |
4602 | (name "python-decorator") | |
4603 | (version "4.3.0") | |
4604 | (source | |
4605 | (origin | |
4606 | (method url-fetch) | |
4607 | (uri (pypi-uri "decorator" version)) | |
4608 | (sha256 | |
4609 | (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3")))) | |
4610 | (build-system python-build-system) | |
4611 | (home-page "https://pypi.python.org/pypi/decorator/") | |
4612 | (synopsis "Python module to simplify usage of decorators") | |
4613 | (description | |
4614 | "The aim of the decorator module is to simplify the usage of decorators | |
4615 | for the average programmer, and to popularize decorators usage giving examples | |
4616 | of useful decorators, such as memoize, tracing, redirecting_stdout, locked, | |
4617 | etc. The core of this module is a decorator factory.") | |
4618 | (license license:expat))) | |
4619 | ||
4620 | (define-public python2-decorator | |
4621 | (package-with-python2 python-decorator)) | |
4622 | ||
4623 | (define-public python-drmaa | |
4624 | (package | |
4625 | (name "python-drmaa") | |
4626 | (version "0.7.7") | |
4627 | (source | |
4628 | (origin | |
4629 | (method url-fetch) | |
4630 | (uri (pypi-uri "drmaa" version)) | |
4631 | (sha256 | |
4632 | (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx")))) | |
4633 | (build-system python-build-system) | |
4634 | ;; The test suite requires libdrmaa which is provided by the cluster | |
4635 | ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH | |
4636 | ;; should be set to the path of the libdrmaa library. | |
4637 | (arguments '(#:tests? #f)) | |
4638 | (native-inputs | |
4639 | `(("python-nose" ,python-nose))) | |
4640 | (home-page "https://pypi.python.org/pypi/drmaa") | |
4641 | (synopsis "Python bindings for the DRMAA library") | |
4642 | (description | |
4643 | "A Python package for Distributed Resource Management (DRM) job | |
4644 | submission and control. This package is an implementation of the DRMAA 1.0 | |
4645 | Python language binding specification.") | |
4646 | (license license:bsd-3))) | |
4647 | ||
4648 | (define-public python2-drmaa | |
4649 | (package-with-python2 python-drmaa)) | |
4650 | ||
4651 | (define-public python-grako | |
4652 | (package | |
4653 | (name "python-grako") | |
4654 | (version "3.99.9") | |
4655 | (source | |
4656 | (origin | |
4657 | (method url-fetch) | |
4658 | (uri | |
4659 | (pypi-uri "grako" version ".zip")) | |
4660 | (sha256 | |
4661 | (base32 | |
4662 | "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw")))) | |
4663 | (build-system python-build-system) | |
4664 | (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive. | |
4665 | (native-inputs | |
4666 | `(("unzip" ,unzip) | |
4667 | ("python-pytest" ,python-pytest) | |
4668 | ("python-pytest-runner" ,python-pytest-runner))) | |
4669 | (home-page "https://bitbucket.org/neogeny/grako") | |
4670 | (synopsis "EBNF parser generator") | |
4671 | (description | |
4672 | "Grako takes a grammar in a variation of EBNF as input, and outputs a | |
4673 | memoizing PEG/Packrat parser in Python.") | |
4674 | (license license:bsd-3))) | |
4675 | ||
4676 | (define-public python2-grako | |
4677 | (package-with-python2 python-grako)) | |
4678 | ||
4679 | (define-public python-gridmap | |
4680 | (package | |
4681 | (name "python-gridmap") | |
4682 | (version "0.13.0") | |
4683 | (source | |
4684 | (origin | |
768fea0f TGR |
4685 | (method git-fetch) |
4686 | (uri (git-reference | |
4687 | (url "https://github.com/pygridtools/gridmap.git") | |
4688 | (commit (string-append "v" version)))) | |
4689 | (file-name (git-file-name name version)) | |
44d10b1f | 4690 | (sha256 |
768fea0f | 4691 | (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm")))) |
44d10b1f RW |
4692 | (build-system python-build-system) |
4693 | (arguments | |
4694 | '(#:tests? #f)) ; FIXME: Requires python-cherrypy. | |
4695 | (propagated-inputs | |
4696 | `(("python-psutil" ,python-psutil) | |
4697 | ("python-drmaa" ,python-drmaa) | |
4698 | ("python-pyzmq" ,python-pyzmq))) | |
4699 | (home-page "https://github.com/pygridtools/gridmap") | |
4700 | (synopsis "Create jobs on a cluster directly from Python") | |
4701 | (description | |
4702 | "Gridmap is a Python package to allow you to easily create jobs on the | |
4703 | cluster directly from Python. You can directly map Python functions onto the | |
4704 | cluster without needing to write any wrapper code yourself.") | |
4705 | (license license:gpl3+))) | |
4706 | ||
4707 | (define-public python2-gridmap | |
4708 | (package-with-python2 python-gridmap)) | |
4709 | ||
4710 | (define-public python-honcho | |
4711 | (package | |
4712 | (name "python-honcho") | |
4713 | (version "1.0.1") | |
4714 | (source | |
4715 | (origin | |
8524d130 TGR |
4716 | (method git-fetch) |
4717 | (uri (git-reference | |
4718 | (url "https://github.com/nickstenning/honcho.git") | |
4719 | (commit (string-append "v" version)))) | |
4720 | (file-name (git-file-name name version)) | |
44d10b1f | 4721 | (sha256 |
8524d130 | 4722 | (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b")))) |
44d10b1f RW |
4723 | (build-system python-build-system) |
4724 | (native-inputs | |
4725 | `(("python-pytest" ,python-pytest) | |
4726 | ("python-mock" ,python-mock) | |
4727 | ("python-tox" ,python-tox) | |
4728 | ("which" ,which))) ;for tests | |
4729 | (propagated-inputs | |
4730 | `(("python-jinja2" ,python-jinja2))) | |
4731 | (arguments | |
4732 | `(#:phases | |
4733 | (modify-phases %standard-phases | |
4734 | (delete 'check) | |
4735 | (add-after 'install 'check | |
4736 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
4737 | ;; fix honcho path in testsuite | |
4738 | (substitute* "tests/conftest.py" | |
4739 | (("'honcho'") (string-append "'" (assoc-ref outputs "out") | |
4740 | "/bin/honcho" "'"))) | |
4741 | ;; It's easier to run tests after install. | |
4742 | ;; Make installed package available for running the tests | |
4743 | (add-installed-pythonpath inputs outputs) | |
95b707fb | 4744 | (invoke "py.test" "-v")))))) |
44d10b1f RW |
4745 | (home-page "https://github.com/nickstenning/honcho") |
4746 | (synopsis "Manage Procfile-based applications") | |
4747 | (description | |
4748 | "A Procfile is a file which describes how to run an application | |
50fceab0 | 4749 | consisting of several processes. honcho starts all listed processes. |
44d10b1f RW |
4750 | The output of all running processes is collected by honcho and |
4751 | displayed.") | |
4752 | (license license:expat))) | |
4753 | ||
4754 | (define-public python2-honcho | |
4755 | (package-with-python2 python-honcho)) | |
4756 | ||
4757 | (define-public python-pexpect | |
4758 | (package | |
4759 | (name "python-pexpect") | |
4760 | (version "4.6.0") | |
4761 | (source | |
4762 | (origin | |
4763 | (method url-fetch) | |
4764 | (uri (pypi-uri "pexpect" version)) | |
4765 | (sha256 | |
4766 | (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia")))) | |
4767 | (build-system python-build-system) | |
4768 | (arguments | |
4769 | `(#:phases | |
4770 | (modify-phases %standard-phases | |
4771 | (add-before 'check 'prepare-tests | |
4772 | (lambda _ | |
4773 | (substitute* (find-files "tests") | |
4774 | (("/bin/ls") (which "ls")) | |
4775 | (("/bin/echo") (which "echo")) | |
4776 | (("/bin/which") (which "which")) | |
4777 | ;; Many tests try to use the /bin directory which | |
4778 | ;; is not present in the build environment. | |
4779 | ;; Use one that's non-empty and unlikely to change. | |
4780 | (("/bin'") "/dev'")) | |
4781 | ;; XXX: Socket connection test gets "Connection reset by peer". | |
4782 | ;; Why does it not work? Delete for now. | |
4783 | (delete-file "tests/test_socket.py") | |
4784 | #t)) | |
4785 | (replace 'check (lambda _ (invoke "nosetests" "-v")))))) | |
4786 | (native-inputs | |
4787 | `(("python-nose" ,python-nose) | |
4788 | ("python-pytest" ,python-pytest) | |
4789 | ("man-db" ,man-db) | |
4790 | ("which" ,which) | |
4791 | ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py' | |
4792 | (propagated-inputs | |
4793 | `(("python-ptyprocess" ,python-ptyprocess))) | |
4794 | (home-page "http://pexpect.readthedocs.org/") | |
4795 | (synopsis "Controlling interactive console applications") | |
4796 | (description | |
4797 | "Pexpect is a pure Python module for spawning child applications; | |
4798 | controlling them; and responding to expected patterns in their output. | |
4799 | Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a | |
4800 | child application and control it as if a human were typing commands.") | |
4801 | (license license:isc))) | |
4802 | ||
4803 | (define-public python2-pexpect | |
4804 | (package-with-python2 python-pexpect)) | |
4805 | ||
4806 | (define-public python-setuptools-scm | |
4807 | (package | |
4808 | (name "python-setuptools-scm") | |
4809 | (version "3.1.0") | |
4810 | (source (origin | |
4811 | (method url-fetch) | |
4812 | (uri (pypi-uri "setuptools_scm" version)) | |
4813 | (sha256 | |
4814 | (base32 | |
4815 | "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i")))) | |
4816 | (build-system python-build-system) | |
4817 | (home-page "https://github.com/pypa/setuptools_scm/") | |
4818 | (synopsis "Manage Python package versions in SCM metadata") | |
4819 | (description | |
4820 | "Setuptools_scm handles managing your Python package versions in | |
4821 | @dfn{software configuration management} (SCM) metadata instead of declaring | |
4822 | them as the version argument or in a SCM managed file.") | |
4823 | (license license:expat))) | |
4824 | ||
4825 | (define-public python2-setuptools-scm | |
4826 | (package-with-python2 python-setuptools-scm)) | |
4827 | ||
4828 | (define-public python-pathpy | |
4829 | (package | |
4830 | (name "python-pathpy") | |
4831 | (version "11.0.1") | |
4832 | (source | |
4833 | (origin | |
4834 | (method url-fetch) | |
4835 | (uri (pypi-uri "path.py" version)) | |
4836 | (sha256 | |
4837 | (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7")))) | |
4838 | ;; (outputs '("out" "doc")) | |
4839 | (build-system python-build-system) | |
4840 | (propagated-inputs | |
4841 | `(("python-appdirs" ,python-appdirs))) | |
4842 | (native-inputs | |
4843 | `(("python-setuptools-scm" ,python-setuptools-scm) | |
4844 | ("python-sphinx" ,python-sphinx) | |
4845 | ("python-rst.linker" ,python-rst.linker) | |
4846 | ("python-pytest" ,python-pytest) | |
4847 | ("python-pytest-runner" ,python-pytest-runner))) | |
4848 | (arguments | |
4849 | ;; FIXME: Documentation and tests require "jaraco.packaging". | |
4850 | `(#:tests? #f)) | |
4851 | ;; #:phases | |
4852 | ;; (modify-phases %standard-phases | |
4853 | ;; (add-after 'build 'build-doc | |
4854 | ;; (lambda _ | |
4855 | ;; (setenv "LANG" "en_US.UTF-8") | |
4856 | ;; (zero? (system* "python" "setup.py" "build_sphinx")))) | |
4857 | ;; (add-after 'install 'install-doc | |
4858 | ;; (lambda* (#:key outputs #:allow-other-keys) | |
4859 | ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4860 | ;; (doc (string-append data "/doc/" ,name "-" ,version)) | |
4861 | ;; (html (string-append doc "/html"))) | |
4862 | ;; (mkdir-p html) | |
4863 | ;; (for-each (lambda (file) | |
4864 | ;; (copy-file file (string-append doc "/" file))) | |
4865 | ;; '("README.rst" "CHANGES.rst")) | |
4866 | ;; (copy-recursively "build/sphinx/html" html))))))) | |
4867 | (home-page "https://github.com/jaraco/path.py") | |
4868 | (synopsis "Python module wrapper for built-in os.path") | |
4869 | (description | |
4870 | "@code{path.py} implements path objects as first-class entities, allowing | |
4871 | common operations on files to be invoked on those path objects directly.") | |
4872 | (license license:expat))) | |
4873 | ||
4874 | (define-public python2-pathpy | |
4875 | (package-with-python2 python-pathpy)) | |
4876 | ||
4877 | (define-public python-simplegeneric | |
4878 | (package | |
4879 | (name "python-simplegeneric") | |
4880 | (version "0.8.1") | |
4881 | (source | |
4882 | (origin | |
4883 | (method url-fetch) | |
6c8c3980 | 4884 | (uri (pypi-uri "simplegeneric" version ".zip")) |
44d10b1f RW |
4885 | (sha256 |
4886 | (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw")))) | |
4887 | (build-system python-build-system) | |
4888 | (native-inputs | |
4889 | `(("unzip" ,unzip))) | |
4890 | (home-page "http://cheeseshop.python.org/pypi/simplegeneric") | |
4891 | (synopsis "Python module for simple generic functions") | |
4892 | (description | |
4893 | "The simplegeneric module lets you define simple single-dispatch generic | |
4894 | functions, akin to Python’s built-in generic functions like @code{len()}, | |
4895 | @code{iter()} and so on. However, instead of using specially-named methods, | |
4896 | these generic functions use simple lookup tables, akin to those used by | |
4897 | e.g. @code{pickle.dump()} and other generic functions found in the Python | |
4898 | standard library.") | |
4899 | (license license:zpl2.1))) | |
4900 | ||
4901 | (define-public python2-simplegeneric | |
4902 | (package-with-python2 python-simplegeneric)) | |
4903 | ||
4904 | (define-public python-ipython-genutils | |
4905 | ;; TODO: This package is retired, check if can be removed, see description. | |
4906 | (package | |
4907 | (name "python-ipython-genutils") | |
4908 | (version "0.1.0") | |
4909 | (source | |
4910 | (origin | |
4911 | (method url-fetch) | |
c9671d4b | 4912 | (uri (pypi-uri "ipython_genutils" version)) |
44d10b1f RW |
4913 | (sha256 |
4914 | (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is")))) | |
4915 | (build-system python-build-system) | |
4916 | (arguments `(#:tests? #f)) ; no tests | |
4917 | (home-page "https://ipython.org") | |
4918 | (synopsis "Vestigial utilities from IPython") | |
4919 | (description | |
4920 | "This package provides retired utilities from IPython. No packages | |
4921 | outside IPython/Jupyter should depend on it. | |
4922 | ||
4923 | This package shouldn't exist. It contains some common utilities shared by | |
4924 | Jupyter and IPython projects during The Big Split. As soon as possible, those | |
4925 | packages will remove their dependency on this, and this package will go | |
4926 | away.") | |
4927 | (license license:bsd-3))) | |
4928 | ||
4929 | (define-public python2-ipython-genutils | |
4930 | (package-with-python2 python-ipython-genutils)) | |
4931 | ||
4932 | (define-public python-traitlets | |
4933 | (package | |
4934 | (name "python-traitlets") | |
4935 | (version "4.3.2") | |
4936 | (source | |
4937 | (origin | |
4938 | (method url-fetch) | |
4939 | (uri (pypi-uri "traitlets" version)) | |
4940 | (sha256 | |
4941 | (base32 | |
4942 | "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww")))) | |
4943 | (build-system python-build-system) | |
4944 | (arguments | |
4945 | `(#:phases | |
4946 | (modify-phases %standard-phases | |
4947 | (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets")))))) | |
4948 | (propagated-inputs | |
4949 | `(("python-ipython-genutils" ,python-ipython-genutils) | |
4950 | ("python-decorator" ,python-decorator))) ;not needed for >4.3.2 | |
4951 | (native-inputs | |
4952 | `(("python-pytest" ,python-pytest))) | |
4953 | (properties `((python2-variant . ,(delay python2-traitlets)))) | |
4954 | (home-page "https://ipython.org") | |
4955 | (synopsis "Configuration system for Python applications") | |
4956 | (description | |
4957 | "Traitlets is a framework that lets Python classes have attributes with | |
4958 | type checking, dynamically calculated default values, and ‘on change’ | |
4959 | callbacks. The package also includes a mechanism to use traitlets for | |
4960 | configuration, loading values from files or from command line arguments. This | |
4961 | is a distinct layer on top of traitlets, so you can use traitlets in your code | |
4962 | without using the configuration machinery.") | |
4963 | (license license:bsd-3))) | |
4964 | ||
4965 | (define-public python2-traitlets | |
4966 | (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets)))) | |
4967 | (package | |
4968 | (inherit traitlets) | |
4969 | (propagated-inputs | |
4970 | `(("python2-enum34" ,python2-enum34) | |
4971 | ,@(package-propagated-inputs traitlets)))))) | |
4972 | ||
4973 | (define-public python-jupyter-core | |
4974 | (package | |
4975 | (name "python-jupyter-core") | |
4976 | (version "4.4.0") | |
4977 | (source | |
4978 | (origin | |
4979 | (method url-fetch) | |
4980 | (uri (string-append (pypi-uri "jupyter_core" version))) | |
4981 | (sha256 | |
4982 | (base32 | |
4983 | "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s")))) | |
4984 | (build-system python-build-system) | |
4985 | ;; FIXME: not sure how to run the tests | |
4986 | (arguments `(#:tests? #f)) | |
4987 | (propagated-inputs | |
4988 | `(("python-traitlets" ,python-traitlets))) | |
4989 | (home-page "http://jupyter.org/") | |
4990 | (synopsis "Jupyter base package") | |
4991 | (description | |
4992 | "Jupyter core is the base package on which Jupyter projects rely.") | |
4993 | (license license:bsd-3))) | |
4994 | ||
4995 | (define-public python2-jupyter-core | |
4996 | (package-with-python2 python-jupyter-core)) | |
4997 | ||
4998 | (define-public python-jupyter-client | |
4999 | (package | |
5000 | (name "python-jupyter-client") | |
5001 | (version "5.2.4") | |
5002 | (source | |
5003 | (origin | |
5004 | (method url-fetch) | |
5005 | (uri (pypi-uri "jupyter_client" version)) | |
5006 | (sha256 | |
5007 | (base32 | |
5008 | "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm")))) | |
5009 | (build-system python-build-system) | |
5010 | ;; Tests fail because of missing native python kernel which I assume is | |
5011 | ;; provided by the ipython package, which we cannot use because it would | |
5012 | ;; cause a dependency cycle. | |
5013 | (arguments `(#:tests? #f)) | |
5014 | (propagated-inputs | |
5015 | `(("python-pyzmq" ,python-pyzmq) | |
5016 | ("python-traitlets" ,python-traitlets) | |
5017 | ("python-jupyter-core" ,python-jupyter-core))) | |
5018 | (home-page "http://jupyter.org/") | |
5019 | (synopsis "Jupyter protocol implementation and client libraries") | |
5020 | (description | |
5021 | "The @code{jupyter_client} package contains the reference implementation | |
5022 | of the Jupyter protocol. It also provides client and kernel management APIs | |
5023 | for working with kernels, and the @code{jupyter kernelspec} entrypoint for | |
5024 | installing @code{kernelspec}s for use with Jupyter frontends.") | |
5025 | (license license:bsd-3))) | |
5026 | ||
5027 | (define-public python2-jupyter-client | |
5028 | (package-with-python2 python-jupyter-client)) | |
5029 | ||
5030 | (define-public python-ipykernel | |
5031 | (package | |
5032 | (name "python-ipykernel") | |
82110dea | 5033 | (version "5.1.1") |
44d10b1f RW |
5034 | (source |
5035 | (origin | |
5036 | (method url-fetch) | |
5037 | (uri (pypi-uri "ipykernel" version)) | |
5038 | (sha256 | |
82110dea | 5039 | (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh")))) |
44d10b1f RW |
5040 | (build-system python-build-system) |
5041 | (arguments | |
5042 | `(#:phases | |
5043 | (modify-phases %standard-phases | |
5044 | (replace 'check | |
5045 | (lambda _ | |
5046 | (setenv "HOME" "/tmp") | |
5047 | (invoke "pytest" "-v") | |
5048 | #t))))) | |
5049 | (propagated-inputs | |
5050 | `(("python-ipython" ,python-ipython) | |
5051 | ;; imported at runtime during connect | |
5052 | ("python-jupyter-client" ,python-jupyter-client))) | |
5053 | (native-inputs | |
5054 | `(("python-pytest" ,python-pytest) | |
5055 | ("python-nose" ,python-nose))) | |
5056 | (home-page "https://ipython.org") | |
5057 | (synopsis "IPython Kernel for Jupyter") | |
5058 | (description | |
5059 | "This package provides the IPython kernel for Jupyter.") | |
5060 | (license license:bsd-3))) | |
5061 | ||
0f378947 | 5062 | ;; Version 5.1.1 and above no longer support Python 2. |
44d10b1f | 5063 | (define-public python2-ipykernel |
0f378947 RW |
5064 | (package |
5065 | (name "python2-ipykernel") | |
5066 | (version "5.1.0") | |
5067 | (source | |
5068 | (origin | |
5069 | (method url-fetch) | |
5070 | (uri (pypi-uri "ipykernel" version)) | |
5071 | (sha256 | |
5072 | (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g")))) | |
5073 | (build-system python-build-system) | |
5074 | (arguments | |
5075 | `(#:python ,python-2 | |
5076 | #:phases | |
5077 | (modify-phases %standard-phases | |
5078 | (replace 'check | |
5079 | (lambda _ | |
5080 | (setenv "HOME" "/tmp") | |
5081 | (invoke "pytest" "-v") | |
5082 | #t))))) | |
5083 | (propagated-inputs | |
5084 | `(("python2-ipython" ,python2-ipython) | |
5085 | ;; imported at runtime during connect | |
5086 | ("python2-jupyter-client" ,python2-jupyter-client))) | |
5087 | (native-inputs | |
5088 | `(("python2-pytest" ,python2-pytest) | |
5089 | ("python2-nose" ,python2-nose))) | |
5090 | (home-page "https://ipython.org") | |
5091 | (synopsis "IPython Kernel for Jupyter") | |
5092 | (description | |
5093 | "This package provides the IPython kernel for Jupyter.") | |
5094 | (license license:bsd-3))) | |
44d10b1f | 5095 | |
966aa714 AE |
5096 | (define-public python-pari-jupyter |
5097 | (package | |
5098 | (name "python-pari-jupyter") | |
5099 | (version "1.3.2") | |
5100 | (source | |
5101 | (origin | |
5102 | (method url-fetch) | |
5103 | (uri (pypi-uri "pari_jupyter" version)) | |
5104 | (sha256 | |
5105 | (base32 | |
5106 | "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6")))) | |
5107 | (build-system python-build-system) | |
5108 | (propagated-inputs | |
5109 | `(("python-ipykernel" ,python-ipykernel))) | |
5110 | (inputs | |
5111 | `(("pari-gp" ,pari-gp) | |
5112 | ("readline" ,readline))) | |
5113 | (arguments | |
5114 | `(#:tests? #f)) ; no test suite | |
5115 | (home-page | |
5116 | "https://github.com/jdemeyer/pari_jupyter") | |
5117 | (synopsis "A Jupyter kernel for PARI/GP") | |
5118 | (description "The package provides a PARI/GP kernel for Jupyter.") | |
5119 | (license license:gpl3+))) | |
5120 | ||
dede052a RW |
5121 | (define-public python-backcall |
5122 | (package | |
5123 | (name "python-backcall") | |
5124 | (version "0.1.0") | |
5125 | (source | |
5126 | (origin | |
5127 | (method url-fetch) | |
5128 | (uri (pypi-uri "backcall" version)) | |
5129 | (sha256 | |
5130 | (base32 | |
5131 | "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q")))) | |
5132 | (build-system python-build-system) | |
5133 | (home-page "https://github.com/takluyver/backcall/") | |
5134 | (synopsis "Specifications for callback functions passed in to an API") | |
5135 | (description | |
5136 | "If your code lets other people supply callback functions, it's important | |
5137 | to specify the function signature you expect, and check that functions support | |
5138 | that. Adding extra parameters later would break other peoples code unless | |
5139 | you're careful. The @code{backcall} package provides a way of specifying the | |
5140 | callback signature using a prototype function.") | |
5141 | (license license:bsd-3))) | |
5142 | ||
44d10b1f RW |
5143 | ;; This is the latest release of the LTS version of ipython with support for |
5144 | ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have | |
8b5f756c RW |
5145 | ;; dropped support for Python 2.7. |
5146 | (define-public python2-ipython | |
44d10b1f | 5147 | (package |
8b5f756c | 5148 | (name "python2-ipython") |
44d10b1f RW |
5149 | (version "5.8.0") |
5150 | (source | |
5151 | (origin | |
5152 | (method url-fetch) | |
5153 | (uri (pypi-uri "ipython" version ".tar.gz")) | |
5154 | (sha256 | |
5155 | (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b")))) | |
5156 | (build-system python-build-system) | |
44d10b1f | 5157 | (propagated-inputs |
8b5f756c RW |
5158 | `(("python2-backports-shutil-get-terminal-size" |
5159 | ,python2-backports-shutil-get-terminal-size) | |
5160 | ("python2-pathlib2" ,python2-pathlib2) | |
5161 | ("python2-pyzmq" ,python2-pyzmq) | |
5162 | ("python2-prompt-toolkit" ,python2-prompt-toolkit-1) | |
5163 | ("python2-terminado" ,python2-terminado) | |
5164 | ("python2-matplotlib" ,python2-matplotlib) | |
5165 | ("python2-numpy" ,python2-numpy) | |
5166 | ("python2-numpydoc" ,python2-numpydoc) | |
5167 | ("python2-jinja2" ,python2-jinja2) | |
5168 | ("python2-mistune" ,python2-mistune) | |
5169 | ("python2-pexpect" ,python2-pexpect) | |
5170 | ("python2-pickleshare" ,python2-pickleshare) | |
5171 | ("python2-simplegeneric" ,python2-simplegeneric) | |
5172 | ("python2-jsonschema" ,python2-jsonschema) | |
5173 | ("python2-traitlets" ,python2-traitlets) | |
5174 | ("python2-nbformat" ,python2-nbformat) | |
5175 | ("python2-pygments" ,python2-pygments))) | |
5176 | (inputs | |
5177 | `(("readline" ,readline) | |
5178 | ("which" ,which))) | |
5179 | (native-inputs | |
5180 | `(("graphviz" ,graphviz) | |
5181 | ("pkg-config" ,pkg-config) | |
5182 | ("python2-requests" ,python2-requests) ;; for tests | |
5183 | ("python2-testpath" ,python2-testpath) | |
5184 | ("python2-mock" ,python2-mock) | |
5185 | ("python2-nose" ,python2-nose))) | |
5186 | (arguments | |
5187 | `(#:python ,python-2 | |
5188 | #:phases | |
5189 | (modify-phases %standard-phases | |
5190 | (add-before 'check 'delete-broken-tests | |
5191 | (lambda* (#:key inputs #:allow-other-keys) | |
5192 | ;; These tests throw errors for unknown reasons. | |
5193 | (delete-file "IPython/core/tests/test_profile.py") | |
5194 | (delete-file "IPython/core/tests/test_interactiveshell.py") | |
5195 | (delete-file "IPython/core/tests/test_magic.py") | |
5196 | #t))))) | |
5197 | (home-page "https://ipython.org") | |
5198 | (synopsis "IPython is a tool for interactive computing in Python") | |
5199 | (description | |
5200 | "IPython provides a rich architecture for interactive computing with: | |
5201 | Powerful interactive shells, a browser-based notebook, support for interactive | |
5202 | data visualization, embeddable interpreters and tools for parallel | |
5203 | computing.") | |
5204 | (license license:bsd-3))) | |
5205 | ||
5206 | (define-public python-ipython | |
5207 | (package | |
5208 | (name "python-ipython") | |
5209 | (version "7.5.0") | |
5210 | (source | |
5211 | (origin | |
5212 | (method url-fetch) | |
5213 | (uri (pypi-uri "ipython" version ".tar.gz")) | |
5214 | (sha256 | |
5215 | (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78")))) | |
5216 | (build-system python-build-system) | |
5217 | (propagated-inputs | |
5218 | `(("python-backcall" ,python-backcall) | |
5219 | ("python-pyzmq" ,python-pyzmq) | |
5220 | ("python-prompt-toolkit" ,python-prompt-toolkit) | |
44d10b1f RW |
5221 | ("python-terminado" ,python-terminado) |
5222 | ("python-matplotlib" ,python-matplotlib) | |
5223 | ("python-numpy" ,python-numpy) | |
5224 | ("python-numpydoc" ,python-numpydoc) | |
8b5f756c | 5225 | ("python-jedi" ,python-jedi) |
44d10b1f RW |
5226 | ("python-jinja2" ,python-jinja2) |
5227 | ("python-mistune" ,python-mistune) | |
5228 | ("python-pexpect" ,python-pexpect) | |
5229 | ("python-pickleshare" ,python-pickleshare) | |
5230 | ("python-simplegeneric" ,python-simplegeneric) | |
5231 | ("python-jsonschema" ,python-jsonschema) | |
5232 | ("python-traitlets" ,python-traitlets) | |
5233 | ("python-nbformat" ,python-nbformat) | |
5234 | ("python-pygments" ,python-pygments))) | |
5235 | (inputs | |
5236 | `(("readline" ,readline) | |
5237 | ("which" ,which))) | |
5238 | (native-inputs | |
5239 | `(("graphviz" ,graphviz) | |
5240 | ("pkg-config" ,pkg-config) | |
5241 | ("python-requests" ,python-requests) ;; for tests | |
5242 | ("python-testpath" ,python-testpath) | |
8b5f756c | 5243 | ("python-nose" ,python-nose))) |
44d10b1f RW |
5244 | (arguments |
5245 | `(#:phases | |
5246 | (modify-phases %standard-phases | |
44d10b1f RW |
5247 | ;; Tests can only be run after the library has been installed and not |
5248 | ;; within the source directory. | |
5249 | (delete 'check) | |
5250 | (add-after 'install 'check | |
5251 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) | |
5252 | (if tests? | |
5253 | (begin | |
5254 | ;; Make installed package available for running the tests | |
5255 | (add-installed-pythonpath inputs outputs) | |
5256 | (setenv "HOME" "/tmp/") ;; required by a test | |
5257 | ;; We only test the core because one of the other tests | |
5258 | ;; tries to import ipykernel. | |
5259 | (invoke "python" "IPython/testing/iptest.py" | |
5260 | "-v" "IPython/core/tests")) | |
5261 | #t))) | |
5262 | (add-before 'check 'fix-tests | |
5263 | (lambda* (#:key inputs #:allow-other-keys) | |
5264 | (substitute* "./IPython/utils/_process_posix.py" | |
5265 | (("/usr/bin/env', 'which") (which "which"))) | |
5266 | (substitute* "./IPython/core/tests/test_inputtransformer.py" | |
5267 | (("#!/usr/bin/env python") | |
5268 | (string-append "#!" (which "python")))) | |
44d10b1f RW |
5269 | ;; This test introduces a circular dependency on ipykernel |
5270 | ;; (which depends on ipython). | |
5271 | (delete-file "IPython/core/tests/test_display.py") | |
8b5f756c | 5272 | ;; AttributeError: module 'IPython.core' has no attribute 'formatters' |
44d10b1f | 5273 | (delete-file "IPython/core/tests/test_interactiveshell.py") |
44d10b1f RW |
5274 | #t))))) |
5275 | (home-page "https://ipython.org") | |
5276 | (synopsis "IPython is a tool for interactive computing in Python") | |
5277 | (description | |
5278 | "IPython provides a rich architecture for interactive computing with: | |
5279 | Powerful interactive shells, a browser-based notebook, support for interactive | |
5280 | data visualization, embeddable interpreters and tools for parallel | |
5281 | computing.") | |
8b5f756c | 5282 | (license license:bsd-3))) |
44d10b1f | 5283 | |
8b5f756c RW |
5284 | (define-public python-ipython-documentation |
5285 | (package | |
5286 | (inherit python-ipython) | |
5287 | (name "python-ipython-documentation") | |
5288 | (version (package-version python-ipython)) | |
5289 | (arguments | |
5290 | `(#:phases | |
5291 | (modify-phases %standard-phases | |
5292 | (delete 'build) | |
5293 | (delete 'check) | |
5294 | (replace 'install | |
5295 | (lambda* (#:key outputs #:allow-other-keys) | |
5296 | (let* ((data (string-append (assoc-ref outputs "out") "/share")) | |
5297 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
5298 | (html (string-append doc "/html")) | |
5299 | (man1 (string-append data "/man/man1")) | |
5300 | (info (string-append data "/info")) | |
5301 | (examples (string-append doc "/examples")) | |
5302 | (python-arg (string-append "PYTHON=" (which "python")))) | |
5303 | (setenv "LANG" "en_US.utf8") | |
5304 | (with-directory-excursion "docs" | |
5305 | ;; FIXME: pdf fails to build | |
5306 | ;;(system* "make" "pdf" "PAPER=a4") | |
5307 | (system* "make" python-arg "html") | |
5308 | ;; FIXME: the generated texi file contains ^@^@, which trips | |
5309 | ;; up the parser. | |
5310 | ;; (system* "make" python-arg "info") | |
5311 | ) | |
5312 | (copy-recursively "docs/man" man1) | |
5313 | (copy-recursively "examples" examples) | |
5314 | (copy-recursively "docs/build/html" html) | |
5315 | ;; (copy-file "docs/build/latex/ipython.pdf" | |
5316 | ;; (string-append doc "/ipython.pdf")) | |
5317 | (mkdir-p info) | |
5318 | ;; (copy-file "docs/build/texinfo/ipython.info" | |
5319 | ;; (string-append info "/ipython.info")) | |
5320 | (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))) | |
5321 | #t))))) | |
5322 | (inputs | |
5323 | `(("python-ipython" ,python-ipython) | |
5324 | ("python-ipykernel" ,python-ipykernel))) | |
5325 | (native-inputs | |
5326 | `(("python-sphinx" ,python-sphinx) | |
5327 | ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) | |
5328 | ;; FIXME: It's possible that a smaller union would work just as well. | |
5329 | ("texlive" ,(texlive-union (list texlive-fonts-amsfonts | |
5330 | texlive-fonts-ec | |
5331 | texlive-generic-ifxetex | |
5332 | texlive-generic-pdftex | |
5333 | texlive-latex-amsfonts | |
5334 | texlive-latex-capt-of | |
5335 | texlive-latex-cmap | |
5336 | texlive-latex-environ | |
5337 | texlive-latex-eqparbox | |
5338 | texlive-latex-etoolbox | |
5339 | texlive-latex-expdlist | |
5340 | texlive-latex-fancyhdr | |
5341 | texlive-latex-fancyvrb | |
5342 | texlive-latex-fncychap | |
5343 | texlive-latex-float | |
5344 | texlive-latex-framed | |
5345 | texlive-latex-geometry | |
5346 | texlive-latex-graphics | |
5347 | texlive-latex-hyperref | |
5348 | texlive-latex-mdwtools | |
5349 | texlive-latex-multirow | |
5350 | texlive-latex-needspace | |
5351 | texlive-latex-oberdiek | |
5352 | texlive-latex-parskip | |
5353 | texlive-latex-preview | |
5354 | texlive-latex-tabulary | |
5355 | texlive-latex-threeparttable | |
5356 | texlive-latex-titlesec | |
5357 | texlive-latex-trimspaces | |
5358 | texlive-latex-ucs | |
5359 | texlive-latex-upquote | |
5360 | texlive-latex-url | |
5361 | texlive-latex-varwidth | |
5362 | texlive-latex-wrapfig))) | |
5363 | ("texinfo" ,texinfo))))) | |
44d10b1f RW |
5364 | |
5365 | (define-public python-urwid | |
5366 | (package | |
5367 | (name "python-urwid") | |
5368 | (version "2.0.1") | |
5369 | (source | |
5370 | (origin | |
5371 | (method url-fetch) | |
5372 | (uri (pypi-uri "urwid" version)) | |
5373 | (sha256 | |
5374 | (base32 | |
5375 | "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4")))) | |
5376 | (build-system python-build-system) | |
5377 | (home-page "http://urwid.org") | |
5378 | (synopsis "Console user interface library for Python") | |
5379 | (description | |
5380 | "Urwid is a curses-based UI/widget library for Python. It includes many | |
5381 | features useful for text console applications.") | |
5382 | (license license:lgpl2.1+))) | |
5383 | ||
5384 | (define-public python2-urwid | |
5385 | (package-with-python2 python-urwid)) | |
5386 | ||
5387 | (define-public python-urwidtrees | |
5388 | (package | |
5389 | (name "python-urwidtrees") | |
5390 | (version "1.0.2") | |
5391 | (source | |
5392 | (origin | |
5393 | (method url-fetch) | |
5394 | ;; package author intends on distributing via github rather than pypi: | |
5395 | ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331 | |
5396 | (uri (string-append "https://github.com/pazz/urwidtrees/archive/" | |
5397 | version ".tar.gz")) | |
5398 | (file-name (string-append name "-" version ".tar.gz")) | |
5399 | (sha256 | |
5400 | (base32 | |
5401 | "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh")))) | |
5402 | (build-system python-build-system) | |
5403 | (arguments | |
5404 | '(#:tests? #f)) ; no tests | |
5405 | (propagated-inputs `(("python-urwid" ,python-urwid))) | |
5406 | (home-page "https://github.com/pazz/urwidtrees") | |
5407 | (synopsis "Tree widgets for urwid") | |
5408 | (description "Urwidtrees is a Widget Container API for the @code{urwid} | |
5409 | toolkit. Use it to build trees of widgets.") | |
5410 | (license license:gpl3+))) | |
5411 | ||
5412 | (define-public python2-urwidtrees | |
5413 | (package-with-python2 python-urwidtrees)) | |
5414 | ||
5415 | (define-public python-ua-parser | |
5416 | (package | |
5417 | (name "python-ua-parser") | |
5418 | (version "0.8.0") | |
5419 | (source | |
5420 | (origin | |
5421 | (method url-fetch) | |
5422 | (uri (pypi-uri "ua-parser" version)) | |
5423 | (sha256 | |
5424 | (base32 | |
5425 | "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp")))) | |
5426 | (build-system python-build-system) | |
5427 | (arguments | |
5428 | `(#:tests? #f)) ;no test suite in release | |
5429 | (native-inputs | |
5430 | `(("python-pyyaml" ,python-pyyaml))) | |
5431 | (home-page "https://github.com/ua-parser/uap-python") | |
5432 | (synopsis "User agent parser") | |
5433 | (description | |
5434 | "@code{ua-parser} is a Python port of Browserscope's user agent parser.") | |
5435 | (license license:asl2.0))) | |
5436 | ||
5437 | (define-public python2-ua-parser | |
5438 | (package-with-python2 python-ua-parser)) | |
5439 | ||
5440 | (define-public python-user-agents | |
5441 | (package | |
5442 | (name "python-user-agents") | |
5443 | (version "1.1.0") | |
5444 | (source | |
5445 | (origin | |
5446 | (method url-fetch) | |
5447 | (uri (pypi-uri "user-agents" version)) | |
5448 | (sha256 | |
5449 | (base32 | |
5450 | "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4")))) | |
5451 | (build-system python-build-system) | |
5452 | (arguments | |
5453 | `(#:tests? #f)) ;missing devices.json test file in release | |
5454 | (propagated-inputs | |
5455 | `(("python-ua-parser" ,python-ua-parser))) | |
5456 | (home-page "https://github.com/selwin/python-user-agents") | |
5457 | (synopsis "User Agent strings parsing library") | |
5458 | (description | |
5459 | "A library to identify devices (phones, tablets) and their capabilities by | |
5460 | parsing (browser/HTTP) user agent strings.") | |
5461 | (license license:expat))) | |
5462 | ||
5463 | (define-public python2-user-agents | |
5464 | (package-with-python2 python-user-agents)) | |
5465 | ||
5466 | (define-public python-dbus | |
5467 | (package | |
5468 | (name "python-dbus") | |
5469 | (version "1.2.8") | |
5470 | (source | |
5471 | (origin | |
5472 | (method url-fetch) | |
5473 | (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/" | |
5474 | "dbus-python-" version ".tar.gz")) | |
5475 | (sha256 | |
5476 | (base32 | |
5477 | "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb")))) | |
5478 | (build-system gnu-build-system) | |
5479 | (arguments | |
5480 | '(#:phases | |
5481 | (modify-phases %standard-phases | |
5482 | (add-before | |
5483 | 'check 'pre-check | |
5484 | (lambda _ | |
5485 | ;; XXX: For the missing '/etc/machine-id'. | |
5486 | (substitute* "test/run-test.sh" | |
5487 | (("DBUS_FATAL_WARNINGS=1") | |
5488 | "DBUS_FATAL_WARNINGS=0")) | |
5489 | #t))))) | |
5490 | (native-inputs | |
5491 | `(("pkg-config" ,pkg-config))) | |
5492 | (inputs | |
5493 | `(("python" ,python-wrapper) | |
5494 | ("dbus-glib" ,dbus-glib))) | |
5495 | (synopsis "Python bindings for D-bus") | |
5496 | (description "python-dbus provides bindings for libdbus, the reference | |
5497 | implementation of D-Bus.") | |
5498 | (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/") | |
5499 | (license license:expat))) | |
5500 | ||
5501 | (define-public python2-dbus | |
5502 | (package (inherit python-dbus) | |
5503 | (name "python2-dbus") | |
5504 | (inputs `(("python" ,python-2) | |
5505 | ,@(alist-delete "python" | |
5506 | (package-inputs python-dbus) | |
5507 | equal?))) | |
5508 | ;; FIXME: on Python 2, the test_utf8 fails with: | |
5509 | ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)" | |
5510 | (arguments `(#:tests? #f)))) | |
5511 | ||
5512 | (define-public python-lxml | |
5513 | (package | |
5514 | (name "python-lxml") | |
5515 | (version "4.2.5") | |
5516 | (source | |
5517 | (origin | |
5518 | (method url-fetch) | |
5519 | (uri (pypi-uri "lxml" version)) | |
5520 | (sha256 | |
5521 | (base32 | |
5522 | "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin")))) | |
5523 | (build-system python-build-system) | |
5524 | (inputs | |
5525 | `(("libxml2" ,libxml2) | |
5526 | ("libxslt" ,libxslt))) | |
5527 | (home-page "http://lxml.de/") | |
5528 | (synopsis | |
5529 | "Python XML processing library") | |
5530 | (description | |
5531 | "The lxml XML toolkit is a Pythonic binding for the C libraries | |
5532 | libxml2 and libxslt.") | |
5533 | (license license:bsd-3))) ; and a few more, see LICENSES.txt | |
5534 | ||
5535 | (define-public python2-lxml | |
5536 | (package-with-python2 python-lxml)) | |
5537 | ||
5538 | ;; beautifulsoup4 has a totally different namespace than 3.x, | |
5539 | ;; and pypi seems to put it under its own name, so I guess we should too | |
5540 | (define-public python-beautifulsoup4 | |
5541 | (package | |
5542 | (name "python-beautifulsoup4") | |
abb53e6f | 5543 | (version "4.7.1") |
44d10b1f RW |
5544 | (source |
5545 | (origin | |
5546 | (method url-fetch) | |
5547 | (uri (pypi-uri "beautifulsoup4" version)) | |
5548 | (sha256 | |
5549 | (base32 | |
abb53e6f | 5550 | "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l")))) |
44d10b1f RW |
5551 | (build-system python-build-system) |
5552 | (arguments | |
5553 | `(#:phases | |
5554 | (modify-phases %standard-phases | |
5555 | ;; The Python 2 source is the definitive source of beautifulsoup4. We | |
5556 | ;; must use this conversion script when building with Python 3. The | |
5557 | ;; conversion script also runs the tests. | |
5558 | ;; For more information, see the file 'convert-py3k' in the source | |
5559 | ;; distribution. | |
5560 | (replace 'check | |
dff0197e | 5561 | (lambda _ (invoke "./convert-py3k")))))) |
f83e10e4 | 5562 | (propagated-inputs |
abb53e6f | 5563 | `(("python-soupsieve" ,python-soupsieve))) |
44d10b1f RW |
5564 | (home-page |
5565 | "https://www.crummy.com/software/BeautifulSoup/bs4/") | |
5566 | (synopsis | |
5567 | "Python screen-scraping library") | |
5568 | (description | |
5569 | "Beautiful Soup is a Python library designed for rapidly setting up | |
5570 | screen-scraping projects. It offers Pythonic idioms for navigating, | |
5571 | searching, and modifying a parse tree, providing a toolkit for | |
5572 | dissecting a document and extracting what you need. It automatically | |
5573 | converts incoming documents to Unicode and outgoing documents to UTF-8.") | |
5574 | (license license:expat) | |
5575 | (properties `((python2-variant . ,(delay python2-beautifulsoup4)))))) | |
5576 | ||
5577 | (define-public python2-beautifulsoup4 | |
5578 | (package | |
5579 | (inherit (package-with-python2 | |
5580 | (strip-python2-variant python-beautifulsoup4))) | |
5581 | (arguments `(#:python ,python-2)))) | |
5582 | ||
ad74978a BT |
5583 | (define-public python-soupsieve |
5584 | (package | |
5585 | (name "python-soupsieve") | |
5586 | (version "1.9.1") | |
5587 | (source | |
5588 | (origin | |
5589 | (method url-fetch) | |
5590 | (uri (pypi-uri "soupsieve" version)) | |
5591 | (sha256 | |
5592 | (base32 | |
5593 | "1jnzkiwmjl6yvqckc9mf689g87b6yz07sv868hap2aa5arggy3mj")))) | |
5594 | (build-system python-build-system) | |
5595 | (arguments `(#:tests? #f)) | |
5596 | ;;XXX: 2 tests fail currently despite claming they were to be | |
5597 | ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we | |
5598 | ;;don't want to create a circular dependency. | |
5599 | (home-page "https://github.com/facelessuser/soupsieve") | |
5600 | (synopsis "CSS selector library") | |
5601 | (description | |
5602 | "Soup Sieve is a CSS selector library designed to be used with Beautiful | |
5603 | Soup 4. It aims to provide selecting, matching, and filtering using modern | |
5604 | CSS selectors. Soup Sieve currently provides selectors from the CSS level 1 | |
5605 | specifications up through the latest CSS level 4 drafts and beyond (though | |
5606 | some are not yet implemented).") | |
d00b83fb | 5607 | (properties `((python2-variant . ,(delay python2-soupsieve)))) |
ad74978a BT |
5608 | (license license:expat))) |
5609 | ||
5610 | (define-public python2-soupsieve | |
d00b83fb | 5611 | (let ((base (package-with-python2 (strip-python2-variant python-soupsieve)))) |
ad74978a BT |
5612 | (package |
5613 | (inherit base) | |
5614 | (propagated-inputs | |
d00b83fb MB |
5615 | `(("python2-backports-functools-lru-cache" |
5616 | ,python2-backports-functools-lru-cache) | |
5617 | ,@(package-propagated-inputs base)))))) | |
ad74978a | 5618 | |
44d10b1f RW |
5619 | (define-public python-netifaces |
5620 | (package | |
5621 | (name "python-netifaces") | |
5622 | (version "0.10.7") | |
5623 | (source | |
5624 | (origin | |
5625 | (method url-fetch) | |
5626 | (uri (pypi-uri "netifaces" version)) | |
5627 | (sha256 | |
5628 | (base32 | |
5629 | "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx")))) | |
5630 | (build-system python-build-system) | |
5631 | (home-page "https://github.com/al45tair/netifaces") | |
5632 | (synopsis | |
5633 | "Python module for portable network interface information") | |
5634 | (description | |
5635 | "Netifaces is a Python module providing information on network | |
5636 | interfaces in an easy and portable manner.") | |
5637 | (license license:expat))) | |
5638 | ||
5639 | (define-public python2-netifaces | |
5640 | (package-with-python2 python-netifaces)) | |
5641 | ||
5642 | (define-public python-networkx | |
5643 | (package | |
5644 | (name "python-networkx") | |
5645 | (version "2.2") | |
5646 | (source | |
5647 | (origin | |
5648 | (method url-fetch) | |
5649 | (uri (pypi-uri "networkx" version ".zip")) | |
5650 | (sha256 | |
5651 | (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5")))) | |
5652 | (build-system python-build-system) | |
5653 | ;; python-decorator is needed at runtime. | |
5654 | (propagated-inputs | |
5655 | `(("python-decorator" ,python-decorator))) | |
5656 | (native-inputs | |
5657 | `(("python-nose" ,python-nose) | |
5658 | ("unzip" ,unzip))) | |
5659 | (home-page "https://networkx.github.io/") | |
5660 | (synopsis "Python module for creating and manipulating graphs and networks") | |
5661 | (description | |
5662 | "NetworkX is a Python package for the creation, manipulation, and study | |
5663 | of the structure, dynamics, and functions of complex networks.") | |
5664 | (license license:bsd-3))) | |
5665 | ||
5666 | (define-public python2-networkx | |
5667 | (package-with-python2 python-networkx)) | |
5668 | ||
5669 | (define-public python-datrie | |
5670 | (package | |
5671 | (name "python-datrie") | |
5672 | (version "0.7.1") | |
5673 | (source | |
5674 | (origin | |
5675 | (method url-fetch) | |
5676 | (uri (pypi-uri "datrie" version)) | |
5677 | (sha256 | |
5678 | (base32 | |
5679 | "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs")))) | |
5680 | (build-system python-build-system) | |
5681 | (arguments | |
5682 | `(#:phases (modify-phases %standard-phases | |
5683 | (add-before 'build 'cythonize | |
5684 | (lambda _ | |
5685 | ;; Regenerate Cython classes to solve ABI issues with Python | |
5686 | ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>. | |
5687 | (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd" | |
5688 | "src/stdio_ext.pxd" "-a")))))) | |
5689 | (native-inputs | |
5690 | `(("python-cython" ,python-cython) | |
5691 | ("python-hypothesis" ,python-hypothesis) | |
5692 | ("python-pytest" ,python-pytest) | |
5693 | ("python-pytest-runner" ,python-pytest-runner))) | |
5694 | (home-page "https://github.com/kmike/datrie") | |
5695 | (synopsis "Fast, efficiently stored trie for Python") | |
5696 | (description | |
5697 | "This package provides a fast, efficiently stored trie implementation for | |
5698 | Python.") | |
5699 | (license license:lgpl2.1+))) | |
5700 | ||
5701 | (define-public snakemake | |
5702 | (package | |
5703 | (name "snakemake") | |
5704 | (version "5.2.4") | |
5705 | (source | |
5706 | (origin | |
5707 | (method url-fetch) | |
5708 | (uri (pypi-uri "snakemake" version)) | |
5709 | (sha256 | |
5710 | (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z")))) | |
5711 | (build-system python-build-system) | |
5712 | (arguments | |
5713 | ;; TODO: Package missing test dependencies. | |
5714 | '(#:tests? #f | |
5715 | #:phases | |
5716 | (modify-phases %standard-phases | |
5717 | ;; For cluster execution Snakemake will call Python. Since there is | |
5718 | ;; no suitable PYTHONPATH set, cluster execution will fail. We fix | |
5719 | ;; this by calling the snakemake wrapper instead. | |
5720 | (add-after 'unpack 'call-wrapper-not-wrapped-snakemake | |
5721 | (lambda* (#:key outputs #:allow-other-keys) | |
5722 | (substitute* "snakemake/executors.py" | |
5723 | (("\\{sys.executable\\} -m snakemake") | |
5724 | (string-append (assoc-ref outputs "out") | |
5725 | "/bin/snakemake"))) | |
5726 | #t))))) | |
5727 | (propagated-inputs | |
5728 | `(("python-gitpython" ,python-gitpython) | |
5729 | ("python-wrapt" ,python-wrapt) | |
5730 | ("python-requests" ,python-requests) | |
5731 | ("python-appdirs" ,python-appdirs) | |
5732 | ("python-configargparse" ,python-configargparse) | |
5733 | ("python-datrie" ,python-datrie) | |
5734 | ("python-docutils" ,python-docutils) | |
5735 | ("python-jinja2" ,python-jinja2) | |
5736 | ("python-jsonschema" ,python-jsonschema) | |
5737 | ("python-networkx" ,python-networkx) | |
5738 | ("python-pyyaml" ,python-pyyaml) | |
5739 | ("python-ratelimiter" ,python-ratelimiter))) | |
5740 | (home-page "https://snakemake.readthedocs.io") | |
5741 | (synopsis "Python-based execution environment for make-like workflows") | |
5742 | (description | |
5743 | "Snakemake aims to reduce the complexity of creating workflows by | |
5744 | providing a clean and modern domain specific specification language (DSL) in | |
5745 | Python style, together with a fast and comfortable execution environment.") | |
5746 | (license license:expat))) | |
5747 | ||
5748 | ;; This is currently needed for the pigx-* packages. | |
5749 | (define-public snakemake-4 | |
5750 | (package (inherit snakemake) | |
5751 | (version "4.4.0") | |
5752 | (source | |
5753 | (origin | |
5754 | (method url-fetch) | |
5755 | (uri (pypi-uri "snakemake" version)) | |
5756 | (sha256 | |
5757 | (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv")))) | |
5758 | (propagated-inputs | |
5759 | `(("python-wrapt" ,python-wrapt) | |
5760 | ("python-requests" ,python-requests) | |
5761 | ("python-appdirs" ,python-appdirs) | |
5762 | ("python-configargparse" ,python-configargparse) | |
5763 | ("python-pyyaml" ,python-pyyaml) | |
5764 | ("python-ratelimiter" ,python-ratelimiter))))) | |
5765 | ||
5766 | (define-public python-pyqrcode | |
5767 | (package | |
5768 | (name "python-pyqrcode") | |
5769 | (version "1.2.1") | |
5770 | (source | |
5771 | (origin | |
5772 | (method url-fetch) | |
5773 | (uri (pypi-uri "PyQRCode" version)) | |
5774 | (sha256 | |
5775 | (base32 | |
5776 | "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx")))) | |
5777 | (build-system python-build-system) | |
5778 | (home-page | |
5779 | "https://github.com/mnooner256/pyqrcode") | |
5780 | (synopsis "QR code generator") | |
5781 | (description | |
5782 | "Pyqrcode is a QR code generator written purely in Python with | |
5783 | SVG, EPS, PNG and terminal output.") | |
5784 | (license license:bsd-3))) | |
5785 | ||
5786 | (define-public python-seaborn | |
5787 | (package | |
5788 | (name "python-seaborn") | |
5789 | (version "0.9.0") | |
5790 | (source | |
5791 | (origin | |
5792 | (method url-fetch) | |
5793 | (uri (pypi-uri "seaborn" version)) | |
5794 | (sha256 | |
5795 | (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n")))) | |
5796 | (build-system python-build-system) | |
5797 | (arguments | |
5798 | `(#:phases | |
5799 | (modify-phases %standard-phases | |
5800 | (add-before 'check 'start-xserver | |
5801 | (lambda* (#:key inputs #:allow-other-keys) | |
5802 | (let ((xorg-server (assoc-ref inputs "xorg-server"))) | |
5803 | ;; There must be a running X server and make check doesn't | |
5804 | ;; start one. Therefore we must do it. | |
5805 | (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) | |
5806 | (setenv "DISPLAY" ":1") | |
5807 | #t))) | |
5808 | (replace 'check (lambda _ (invoke "pytest" "seaborn") #t))))) | |
5809 | (propagated-inputs | |
5810 | `(("python-pandas" ,python-pandas) | |
5811 | ("python-matplotlib" ,python-matplotlib) | |
5812 | ("python-numpy" ,python-numpy) | |
5813 | ("python-scipy" ,python-scipy))) | |
5814 | (native-inputs | |
5815 | `(("python-pytest" ,python-pytest) | |
5816 | ("xorg-server" ,xorg-server))) | |
5817 | (home-page "http://stanford.edu/~mwaskom/software/seaborn/") | |
5818 | (synopsis "Statistical data visualization") | |
5819 | (description | |
5820 | "Seaborn is a library for making attractive and informative statistical | |
5821 | graphics in Python. It is built on top of matplotlib and tightly integrated | |
5822 | with the PyData stack, including support for numpy and pandas data structures | |
5823 | and statistical routines from scipy and statsmodels.") | |
5824 | (license license:bsd-3))) | |
5825 | ||
5826 | (define-public python2-seaborn | |
5827 | (package-with-python2 python-seaborn)) | |
5828 | ||
5829 | (define-public python-mpmath | |
5830 | (package | |
5831 | (name "python-mpmath") | |
5832 | (version "0.19") | |
5833 | (source (origin | |
5834 | (method url-fetch) | |
5835 | (uri (string-append "http://mpmath.org/files/mpmath-" | |
5836 | version ".tar.gz")) | |
5837 | (sha256 | |
5838 | (base32 | |
5839 | "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8")))) | |
5840 | (build-system python-build-system) | |
5841 | (arguments | |
5842 | '(#:phases | |
5843 | (modify-phases %standard-phases | |
5844 | (replace 'check | |
5845 | (lambda _ | |
5d7a6f1c | 5846 | (invoke "python" "mpmath/tests/runtests.py" "-local")))))) |
44d10b1f RW |
5847 | (home-page "http://mpmath.org") |
5848 | (synopsis "Arbitrary-precision floating-point arithmetic in python") | |
5849 | (description | |
5850 | "@code{mpmath} can be used as an arbitrary-precision substitute for | |
5851 | Python's float/complex types and math/cmath modules, but also does much | |
5852 | more advanced mathematics.") | |
5853 | (license license:bsd-3))) | |
5854 | ||
5855 | (define-public python2-mpmath | |
5856 | (package-with-python2 python-mpmath)) | |
5857 | ||
5858 | (define-public python-bigfloat | |
5859 | (package | |
5860 | (name "python-bigfloat") | |
5861 | (version "0.3.0") | |
5862 | (source | |
5863 | (origin | |
5864 | (method url-fetch) | |
5865 | (uri (pypi-uri "bigfloat" version)) | |
5866 | (sha256 | |
5867 | (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6")))) | |
5868 | (build-system python-build-system) | |
5869 | (inputs | |
5870 | `(("mpfr" ,mpfr))) | |
5871 | (home-page "https://github.com/mdickinson/bigfloat") | |
5872 | (synopsis "Arbitrary precision floating-point arithmetic for Python") | |
5873 | (description | |
e36de31b | 5874 | "This package provides a Python interface to the MPFR library for |
44d10b1f RW |
5875 | multiprecision arithmetic.") |
5876 | (license license:lgpl3+))) | |
5877 | ||
5878 | (define-public python2-bigfloat | |
5879 | (package-with-python2 python-bigfloat)) | |
5880 | ||
5881 | (define-public python-sympy | |
5882 | (package | |
5883 | (name "python-sympy") | |
5884 | (version "1.1.1") | |
5885 | (source | |
5886 | (origin | |
5887 | (method url-fetch) | |
5888 | (uri (string-append | |
5889 | "https://github.com/sympy/sympy/releases/download/sympy-" | |
5890 | version "/sympy-" version ".tar.gz")) | |
5891 | (sha256 | |
5892 | (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc")))) | |
5893 | (build-system python-build-system) | |
5894 | (arguments | |
5895 | `(#:phases | |
5896 | (modify-phases %standard-phases | |
5897 | ;; Run the core tests after installation. By default it would run | |
5898 | ;; *all* tests, which take a very long time to complete and are known | |
5899 | ;; to be flaky. | |
5900 | (delete 'check) | |
5901 | (add-after 'install 'check | |
5902 | (lambda* (#:key outputs #:allow-other-keys) | |
5903 | (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")") | |
5904 | #t))))) | |
5905 | (propagated-inputs | |
5906 | `(("python-mpmath" ,python-mpmath))) | |
5907 | (home-page "http://www.sympy.org/") | |
5908 | (synopsis "Python library for symbolic mathematics") | |
5909 | (description | |
5910 | "SymPy is a Python library for symbolic mathematics. It aims to become a | |
5911 | full-featured computer algebra system (CAS) while keeping the code as simple | |
5912 | as possible in order to be comprehensible and easily extensible.") | |
5913 | (license license:bsd-3))) | |
5914 | ||
5915 | (define-public python2-sympy | |
5916 | (package | |
5917 | (inherit (package-with-python2 python-sympy)) | |
5918 | (arguments | |
5919 | `(#:phases | |
5920 | (modify-phases %standard-phases | |
5921 | ;; Run the core tests after installation. By default it would run | |
5922 | ;; *all* tests, which take a very long time to complete and are known | |
5923 | ;; to be flaky. | |
5924 | (delete 'check) | |
5925 | (add-after 'install 'check | |
5926 | (lambda* (#:key outputs #:allow-other-keys) | |
5927 | (invoke "python" "-c" "import sympy; sympy.test(\"/core\")") | |
5928 | #t))))))) | |
5929 | ||
5930 | (define-public python-q | |
5931 | (package | |
5932 | (name "python-q") | |
5933 | (version "2.6") | |
5934 | (source | |
5935 | (origin | |
5936 | (method url-fetch) | |
5937 | (uri (pypi-uri "q" version)) | |
5938 | (sha256 | |
5939 | (base32 | |
5940 | "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy")))) | |
5941 | (build-system python-build-system) | |
5942 | (home-page "https://github.com/zestyping/q") | |
5943 | (synopsis "Quick-and-dirty debugging output for tired programmers") | |
5944 | (description | |
5945 | "q is a Python module for \"print\" style of debugging Python code. It | |
5946 | provides convenient short API for print out of values, tracebacks, and | |
5947 | falling into the Python interpreter.") | |
5948 | (license license:asl2.0))) | |
5949 | ||
5950 | (define-public python2-q | |
5951 | (package-with-python2 python-q)) | |
5952 | ||
5953 | (define-public python2-xlib | |
5954 | (package | |
5955 | (name "python2-xlib") | |
5956 | (version "0.14") | |
5957 | (source (origin | |
5958 | (method url-fetch) | |
5959 | (uri (string-append "mirror://sourceforge/python-xlib/python-xlib" | |
5960 | "/" version "/" | |
5961 | "python-xlib-" version ".tar.gz")) | |
5962 | (sha256 | |
5963 | (base32 | |
5964 | "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7")))) | |
5965 | (build-system python-build-system) | |
5966 | (arguments | |
5967 | `(#:python ,python-2 ;Python 2 only | |
5968 | #:tests? #f)) ;no tests | |
5969 | (home-page "http://python-xlib.sourceforge.net/") | |
5970 | (synopsis "Python X11 client library") | |
5971 | (description | |
5972 | "The Python X Library is intended to be a fully functional X client | |
5973 | library for Python programs. It is useful to implement low-level X clients. | |
5974 | It is written entirely in Python.") | |
5975 | (license license:gpl2+))) | |
5976 | ||
5977 | (define-public python-singledispatch | |
5978 | (package | |
5979 | (name "python-singledispatch") | |
5980 | (version "3.4.0.3") | |
5981 | (source | |
5982 | (origin | |
5983 | (method url-fetch) | |
5984 | (uri (pypi-uri "singledispatch" version)) | |
5985 | (sha256 | |
5986 | (base32 | |
5987 | "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv")))) | |
5988 | (build-system python-build-system) | |
5989 | (native-inputs | |
5990 | `(("python-six" ,python-six))) ; required for conversion, not at run-time | |
5991 | (home-page | |
5992 | "http://docs.python.org/3/library/functools.html#functools.singledispatch") | |
5993 | (synopsis "Backport of singledispatch feature from Python 3.4") | |
5994 | (description | |
5995 | "This library brings functools.singledispatch from Python 3.4 to Python | |
5996 | 2.6-3.3.") | |
5997 | (license license:expat))) | |
5998 | ||
5999 | (define-public python2-singledispatch | |
6000 | (package-with-python2 python-singledispatch)) | |
6001 | ||
6002 | ;; the python- version can be removed with python-3.5 | |
6003 | (define-public python-backports-abc | |
6004 | (package | |
6005 | (name "python-backports-abc") | |
6006 | (version "0.5") | |
6007 | (source | |
6008 | (origin | |
6009 | (method url-fetch) | |
6010 | (uri (pypi-uri "backports_abc" version)) | |
6011 | (sha256 | |
6012 | (base32 | |
6013 | "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3")))) | |
6014 | (build-system python-build-system) | |
6015 | (home-page "https://github.com/cython/backports_abc") | |
6016 | (synopsis "Backport of additions to the 'collections.abc' module") | |
6017 | (description | |
6018 | "Python-backports-abc provides a backport of additions to the | |
36a4366d | 6019 | @code{collections.abc} module in Python-3.5.") |
44d10b1f RW |
6020 | (license license:psfl))) |
6021 | ||
6022 | (define-public python2-backports-abc | |
6023 | (package-with-python2 python-backports-abc)) | |
6024 | ||
6025 | (define-public python-backports-csv | |
6026 | (package | |
6027 | (name "python-backports-csv") | |
6028 | (version "1.0.5") | |
6029 | (source | |
6030 | (origin | |
6031 | (method url-fetch) | |
6032 | (uri (pypi-uri "backports.csv" version)) | |
6033 | (sha256 | |
6034 | (base32 | |
6035 | "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc")))) | |
6036 | (build-system python-build-system) | |
6037 | (home-page "https://github.com/ryanhiebert/backports.csv") | |
6038 | (synopsis "Backport of Python 3's csv module for Python 2") | |
6039 | (description | |
6040 | "Provides a backport of Python 3's @code{csv} module for parsing | |
6041 | comma separated values. The API of the @code{csv} module in Python 2 | |
6042 | is drastically different from the @code{csv} module in Python 3. | |
6043 | This is due, for the most part, to the difference between str in | |
6044 | Python 2 and Python 3.") | |
6045 | (license license:psfl))) | |
6046 | ||
6047 | (define-public python2-backports-csv | |
6048 | (package-with-python2 python-backports-csv)) | |
6049 | ||
6050 | (define-public python2-backports-shutil-get-terminal-size | |
6051 | (package | |
6052 | (name "python2-backports-shutil-get-terminal-size") | |
6053 | (version "1.0.0") | |
6054 | (source | |
6055 | (origin | |
6056 | (method url-fetch) | |
6057 | (uri (pypi-uri "backports.shutil_get_terminal_size" version)) | |
6058 | (sha256 | |
6059 | (base32 | |
6060 | "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki")))) | |
6061 | (build-system python-build-system) | |
6062 | (arguments | |
6063 | `(#:python ,python-2 | |
6064 | #:phases | |
6065 | (modify-phases %standard-phases | |
6066 | (replace 'check | |
6067 | (lambda _ | |
4a4a7d9a | 6068 | (invoke "py.test" "-v")))))) |
44d10b1f RW |
6069 | (native-inputs |
6070 | `(("python2-pytest" ,python2-pytest))) | |
6071 | (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size") | |
6072 | (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}") | |
6073 | (description | |
6074 | "This package provides a backport of the @code{get_terminal_size | |
6075 | function} from Python 3.3's @code{shutil}. | |
6076 | Unlike the original version it is written in pure Python rather than C, | |
6077 | so it might be a tiny bit slower.") | |
6078 | (license license:expat))) | |
6079 | ||
6080 | (define-public python-waf | |
6081 | (package | |
6082 | (name "python-waf") | |
6083 | (version "2.0.11") | |
6084 | (source (origin | |
6085 | (method url-fetch) | |
6086 | (uri (string-append "https://waf.io/" | |
6087 | "waf-" version ".tar.bz2")) | |
6088 | (sha256 | |
6089 | (base32 | |
6090 | "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4")))) | |
6091 | (build-system python-build-system) | |
6092 | (arguments | |
6093 | '(#:phases | |
6094 | (modify-phases %standard-phases | |
6095 | (replace 'build | |
6096 | (lambda _ | |
6097 | (invoke "python" "waf-light" "configure" "build"))) | |
6098 | (replace 'check | |
6099 | (lambda _ | |
6100 | (invoke "python" "waf" "--version"))) | |
6101 | (replace 'install | |
6102 | (lambda* (#:key outputs #:allow-other-keys) | |
6103 | (let ((out (assoc-ref outputs "out"))) | |
6104 | (install-file "waf" (string-append out "/bin"))) | |
6105 | #t)) | |
6106 | ;; waf breaks when it is wrapped. | |
6107 | (delete 'wrap)))) | |
6108 | (home-page "https://waf.io/") | |
6109 | (synopsis "Python-based build system") | |
6110 | (description | |
6111 | "Waf is a Python-based framework for configuring, compiling and installing | |
6112 | applications.") | |
6113 | (license license:bsd-3))) | |
6114 | ||
6115 | (define-public python2-waf | |
6116 | (package-with-python2 python-waf)) | |
6117 | ||
6118 | (define-public python-pyzmq | |
6119 | (package | |
6120 | (name "python-pyzmq") | |
6121 | (version "17.1.2") | |
6122 | (source | |
6123 | (origin | |
6124 | (method url-fetch) | |
6125 | (uri (pypi-uri "pyzmq" version)) | |
6126 | (sha256 | |
6127 | (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7")))) | |
6128 | (build-system python-build-system) | |
6129 | (arguments | |
6130 | `(#:configure-flags | |
6131 | (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq"))) | |
6132 | ;; FIXME: You must build pyzmq with 'python setup.py build_ext | |
6133 | ;; --inplace' for 'python setup.py test' to work. | |
6134 | #:tests? #f)) | |
6135 | (inputs | |
6136 | `(("zeromq" ,zeromq))) | |
6137 | (native-inputs | |
6138 | `(("pkg-config" ,pkg-config) | |
6139 | ("python-nose" ,python-nose))) | |
6140 | (home-page "https://github.com/zeromq/pyzmq") | |
6141 | (synopsis "Python bindings for 0MQ") | |
6142 | (description | |
6143 | "PyZMQ is the official Python binding for the ZeroMQ messaging library.") | |
6144 | (license license:bsd-4))) | |
6145 | ||
6146 | (define-public python2-pyzmq | |
6147 | (package-with-python2 python-pyzmq)) | |
6148 | ||
6149 | (define-public python-pep8 | |
6150 | ;; This package has been renamed to ‘pycodestyle’ and is no longer updated. | |
6151 | ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking | |
6152 | ;; some dependents' test suites, and nothing more. | |
6153 | (package | |
6154 | (name "python-pep8") | |
6155 | (version "1.7.0") | |
6156 | (source | |
6157 | (origin | |
6158 | (method url-fetch) | |
6159 | (uri (pypi-uri "pep8" version)) | |
6160 | (sha256 | |
6161 | (base32 | |
6162 | "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1")))) | |
6163 | (build-system python-build-system) | |
6164 | (home-page "https://pep8.readthedocs.org/") | |
6165 | (synopsis "Python style guide checker") | |
6166 | (description | |
6167 | "This tools checks Python code against some of the style conventions in | |
6168 | PEP 8.") | |
6169 | (license license:expat))) | |
6170 | ||
6171 | (define-public python2-pep8 | |
6172 | (package-with-python2 python-pep8)) | |
6173 | ||
6174 | (define-public python-pyflakes | |
6175 | (package | |
6176 | (name "python-pyflakes") | |
6177 | (version "2.0.0") | |
6178 | (source | |
6179 | (origin | |
6180 | (method url-fetch) | |
6181 | (uri (pypi-uri "pyflakes" version)) | |
6182 | (sha256 | |
6183 | (base32 | |
6184 | "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls")))) | |
6185 | (build-system python-build-system) | |
6186 | (home-page | |
6187 | "https://github.com/pyflakes/pyflakes") | |
6188 | (synopsis "Passive checker of Python programs") | |
6189 | (description | |
6190 | "Pyflakes statically checks Python source code for common errors.") | |
6191 | (license license:expat))) | |
6192 | ||
6193 | (define-public python2-pyflakes | |
6194 | (package-with-python2 python-pyflakes)) | |
6195 | ||
6196 | (define-public python-mccabe | |
6197 | (package | |
6198 | (name "python-mccabe") | |
6199 | (version "0.6.1") | |
6200 | (source | |
6201 | (origin | |
6202 | (method url-fetch) | |
6203 | (uri (pypi-uri "mccabe" version)) | |
6204 | (sha256 | |
6205 | (base32 | |
6206 | "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx")))) | |
6207 | (build-system python-build-system) | |
6208 | (native-inputs | |
6209 | `(("python-pytest" ,python-pytest-bootstrap) | |
6210 | ("python-pytest-runner" ,python-pytest-runner))) | |
6211 | (home-page "https://github.com/flintwork/mccabe") | |
6212 | (synopsis "McCabe checker, plugin for flake8") | |
6213 | (description | |
6214 | "This package provides a Flake8 plug-in to compute the McCabe cyclomatic | |
6215 | complexity of Python source code.") | |
6216 | (license license:expat))) | |
6217 | ||
6218 | (define-public python2-mccabe | |
6219 | (package-with-python2 python-mccabe)) | |
6220 | ||
6221 | (define-public python-mccabe-0.2.1 | |
6222 | (package (inherit python-mccabe) | |
6223 | (version "0.2.1") | |
6224 | (source | |
6225 | (origin | |
6226 | (method url-fetch) | |
6227 | (uri (pypi-uri "mccabe" version)) | |
6228 | (sha256 | |
6229 | (base32 | |
6230 | "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs")))))) | |
6231 | ||
6232 | (define-public python2-mccabe-0.2.1 | |
6233 | (package-with-python2 python-mccabe-0.2.1)) | |
6234 | ||
6235 | ;; Flake8 2.4.1 requires an older version of pep8. | |
6236 | ;; This should be removed ASAP. | |
6237 | (define-public python-pep8-1.5.7 | |
6238 | (package (inherit python-pep8) | |
6239 | (version "1.5.7") | |
6240 | (source | |
f3576970 RW |
6241 | (origin |
6242 | (method url-fetch) | |
6243 | (uri (pypi-uri "pep8" version)) | |
6244 | (sha256 | |
6245 | (base32 | |
6246 | "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m")))) | |
44d10b1f RW |
6247 | (arguments |
6248 | ;; XXX Tests not compatible with Python 3.5. | |
6249 | '(#:tests? #f)))) | |
6250 | ||
6251 | (define-public python2-pep8-1.5.7 | |
6252 | (package-with-python2 python-pep8-1.5.7)) | |
6253 | ||
6254 | ;; Flake8 2.4.1 requires an older version of pyflakes. | |
6255 | ;; This should be removed ASAP. | |
6256 | (define-public python-pyflakes-0.8.1 | |
6257 | (package (inherit python-pyflakes) | |
6258 | (version "0.8.1") | |
6259 | (source | |
8c4dffb5 RW |
6260 | (origin |
6261 | (method url-fetch) | |
6262 | (uri (pypi-uri "pyflakes" version)) | |
6263 | (sha256 | |
6264 | (base32 | |
6265 | "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z")))) | |
44d10b1f RW |
6266 | (arguments |
6267 | ;; XXX Tests not compatible with Python 3.5. | |
6268 | '(#:tests? #f)))) | |
6269 | ||
6270 | (define-public python2-pyflakes-0.8.1 | |
6271 | (package-with-python2 python-pyflakes-0.8.1)) | |
6272 | ||
6273 | ;; This package is used by hypothesis which has thousands of dependent packages. | |
6274 | ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle. | |
6275 | (define-public python-flake8-3.5 | |
6276 | (package | |
6277 | (name "python-flake8") | |
6278 | (version "3.5.0") | |
6279 | (source | |
6280 | (origin | |
6281 | (method url-fetch) | |
6282 | (uri (pypi-uri "flake8" version)) | |
6283 | (sha256 | |
6284 | (base32 | |
6285 | "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj")))) | |
6286 | (build-system python-build-system) | |
6287 | (arguments | |
6288 | `(#:phases | |
6289 | (modify-phases %standard-phases | |
6290 | ;; Two errors don't seem to have assigned codes. | |
6291 | (add-after 'unpack 'delete-broken-test | |
6292 | (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t)) | |
6293 | (add-after 'unpack 'fix-problem-with-pycodestyle | |
6294 | (lambda _ | |
6295 | ;; See https://gitlab.com/pycqa/flake8/merge_requests/230 | |
6296 | ;; This should no longer be needed with the next release. | |
6297 | (substitute* "setup.py" | |
6298 | (("PEP8_PLUGIN\\('break_around_binary_operator'\\),") | |
6299 | "PEP8_PLUGIN('break_after_binary_operator'),\ | |
6300 | PEP8_PLUGIN('break_before_binary_operator'),")) | |
6301 | #t)) | |
6302 | (delete 'check) | |
6303 | (add-after 'install 'check | |
6304 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6305 | (add-installed-pythonpath inputs outputs) | |
6306 | (invoke "pytest" "-v") | |
6307 | #t))))) | |
6308 | (propagated-inputs | |
6309 | `(("python-pycodestyle" ,python-pycodestyle) | |
6310 | ("python-pyflakes" ,python-pyflakes) | |
6311 | ("python-mccabe" ,python-mccabe))) | |
6312 | (native-inputs | |
6313 | `(("python-mock" ,python-mock) | |
6314 | ("python-pytest" ,python-pytest-bootstrap) | |
6315 | ("python-pytest-runner" ,python-pytest-runner))) | |
6316 | (home-page "https://gitlab.com/pycqa/flake8") | |
6317 | (synopsis | |
6318 | "The modular source code checker: pep8, pyflakes and co") | |
6319 | (description | |
6320 | "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.") | |
6321 | (properties `((python2-variant . ,(delay python2-flake8-3.5)))) | |
6322 | (license license:expat))) | |
6323 | ||
6324 | (define-public python2-flake8-3.5 | |
6325 | (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5)))) | |
6326 | (package (inherit base) | |
6327 | (propagated-inputs | |
6328 | `(("python2-configparser" ,python2-configparser) | |
6329 | ("python2-enum34" ,python2-enum34) | |
6330 | ,@(package-propagated-inputs base)))))) | |
6331 | ||
6332 | ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need | |
6333 | ;; this newer version. Keep it as a separate variable for now to avoid | |
6334 | ;; rebuilding "python-hypothesis"; this should be removed in the next | |
6335 | ;; rebuild cycle. | |
6336 | (define-public python-flake8 | |
6337 | (package | |
6338 | (inherit python-flake8-3.5) | |
6339 | (version "3.6.0") | |
6340 | (source (origin | |
6341 | (method url-fetch) | |
6342 | (uri (pypi-uri "flake8" version)) | |
6343 | (sha256 | |
6344 | (base32 | |
6345 | "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba")))) | |
6346 | (arguments | |
6347 | (substitute-keyword-arguments (package-arguments python-flake8-3.5) | |
6348 | ((#:phases phases) | |
6349 | `(modify-phases ,phases | |
6350 | (delete 'delete-broken-test) | |
6351 | (delete 'fix-problem-with-pycodestyle))))) | |
6352 | (properties `((python2-variant . ,(delay python2-flake8)))))) | |
6353 | ||
6354 | (define-public python2-flake8 | |
6355 | (let ((base (package-with-python2 (strip-python2-variant python-flake8)))) | |
6356 | (package (inherit base) | |
6357 | (propagated-inputs | |
6358 | (package-propagated-inputs python2-flake8-3.5))))) | |
6359 | ||
6360 | ;; python-hacking requires flake8 <2.6.0. | |
6361 | (define-public python-flake8-2.5 | |
6362 | (package | |
6363 | (inherit python-flake8) | |
6364 | (version "2.5.5") | |
6365 | (source (origin | |
6366 | (method url-fetch) | |
6367 | (uri (pypi-uri "flake8" version)) | |
6368 | (sha256 | |
6369 | (base32 | |
6370 | "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij")))) | |
6371 | (propagated-inputs | |
6372 | `(("python-pep8" ,python-pep8) | |
6373 | ,@(package-propagated-inputs python-flake8))) | |
6374 | (properties `((python2-variant . ,(delay python2-flake8-2.5)))))) | |
6375 | ||
6376 | (define-public python2-flake8-2.5 | |
6377 | (package | |
6378 | (inherit python2-flake8) | |
6379 | (version (package-version python-flake8-2.5)) | |
6380 | (source (origin | |
6381 | (inherit (package-source python-flake8-2.5)))) | |
6382 | (propagated-inputs | |
6383 | `(("python2-pep8" ,python2-pep8) | |
6384 | ,@(package-propagated-inputs python2-flake8))))) | |
6385 | ||
6386 | (define-public python-flake8-polyfill | |
6387 | (package | |
6388 | (name "python-flake8-polyfill") | |
6389 | (version "1.0.2") | |
6390 | (source | |
6391 | (origin | |
6392 | (method url-fetch) | |
6393 | (uri (pypi-uri "flake8-polyfill" version)) | |
6394 | (sha256 | |
6395 | (base32 | |
6396 | "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4")))) | |
6397 | (build-system python-build-system) | |
6398 | (arguments | |
6399 | '(#:phases | |
6400 | (modify-phases %standard-phases | |
6401 | (replace 'check | |
6402 | (lambda _ | |
6403 | (setenv "PYTHONPATH" | |
6404 | (string-append (getcwd) "/build/lib:" | |
6405 | (getenv "PYTHONPATH"))) | |
4f0a0894 | 6406 | (invoke "py.test" "-v")))))) |
44d10b1f RW |
6407 | (native-inputs |
6408 | `(("python-flake8" ,python-flake8) | |
6409 | ("python-mock" ,python-mock) | |
6410 | ("python-pep8" ,python-pep8) | |
6411 | ("python-pycodestyle" ,python-pycodestyle) | |
6412 | ("python-pytest" ,python-pytest))) | |
6413 | (home-page "https://gitlab.com/pycqa/flake8-polyfill") | |
6414 | (synopsis "Polyfill package for Flake8 plugins") | |
6415 | (description | |
6416 | "This package that provides some compatibility helpers for Flake8 | |
6417 | plugins that intend to support Flake8 2.x and 3.x simultaneously.") | |
6418 | (license license:expat))) | |
6419 | ||
6420 | (define-public python2-flake8-polyfill | |
6421 | (package-with-python2 python-flake8-polyfill)) | |
6422 | ||
6423 | (define-public python-mistune | |
6424 | (package | |
6425 | (name "python-mistune") | |
6426 | (version "0.8.4") | |
6427 | (source | |
6428 | (origin | |
6429 | (method url-fetch) | |
6430 | (uri (pypi-uri "mistune" version)) | |
6431 | (sha256 | |
6432 | (base32 | |
6433 | "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr")))) | |
6434 | (build-system python-build-system) | |
6435 | (native-inputs | |
6436 | `(("python-nose" ,python-nose) | |
6437 | ("python-cython" ,python-cython))) | |
6438 | (home-page "https://github.com/lepture/mistune") | |
6439 | (synopsis "Markdown parser in pure Python") | |
6440 | (description "This package provides a fast markdown parser in pure | |
6441 | Python.") | |
6442 | (license license:bsd-3))) | |
6443 | ||
6444 | (define-public python2-mistune | |
6445 | (package-with-python2 python-mistune)) | |
6446 | ||
6447 | (define-public python-markdown | |
6448 | (package | |
6449 | (name "python-markdown") | |
ceb1936a | 6450 | (version "3.1.1") |
44d10b1f RW |
6451 | (source |
6452 | (origin | |
6453 | (method url-fetch) | |
6454 | (uri (pypi-uri "Markdown" version)) | |
6455 | (sha256 | |
6456 | (base32 | |
ceb1936a | 6457 | "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))) |
44d10b1f RW |
6458 | (build-system python-build-system) |
6459 | (native-inputs | |
6460 | `(("python-nose" ,python-nose) | |
6461 | ("python-pyyaml" ,python-pyyaml))) | |
6462 | (home-page "https://python-markdown.github.io/") | |
6463 | (synopsis "Python implementation of Markdown") | |
6464 | (description | |
6465 | "This package provides a Python implementation of John Gruber's | |
6466 | Markdown. The library features international input, various Markdown | |
6467 | extensions, and several HTML output formats. A command line wrapper | |
6468 | markdown_py is also provided to convert Markdown files to HTML.") | |
6469 | (license license:bsd-3))) | |
6470 | ||
6471 | (define-public python2-markdown | |
6472 | (package-with-python2 python-markdown)) | |
6473 | ||
6474 | (define-public python-ptyprocess | |
6475 | (package | |
6476 | (name "python-ptyprocess") | |
6477 | (version "0.5.2") | |
6478 | (source | |
6479 | (origin | |
6480 | (method url-fetch) | |
6481 | (uri (pypi-uri "ptyprocess" version)) | |
6482 | (sha256 | |
6483 | (base32 | |
6484 | "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6")))) | |
6485 | (build-system python-build-system) | |
6486 | (native-inputs | |
6487 | `(("python-nose" ,python-nose))) | |
6488 | (arguments | |
6489 | `(#:phases | |
6490 | (modify-phases %standard-phases | |
6491 | (replace 'check | |
7904d6fa | 6492 | (lambda _ (invoke "nosetests")))))) |
44d10b1f RW |
6493 | (home-page "https://github.com/pexpect/ptyprocess") |
6494 | (synopsis "Run a subprocess in a pseudo terminal") | |
6495 | (description | |
6496 | "This package provides a Python library used to launch a subprocess in a | |
6497 | pseudo terminal (pty), and interact with both the process and its pty.") | |
6498 | (license license:isc))) | |
6499 | ||
6500 | (define-public python2-ptyprocess | |
6501 | (package-with-python2 python-ptyprocess)) | |
6502 | ||
6503 | (define-public python-cram | |
6504 | (package | |
6505 | (name "python-cram") | |
6506 | (version "0.7") | |
6507 | (home-page "https://bitheap.org/cram/") | |
6508 | (source (origin | |
6509 | (method url-fetch) | |
6510 | (uri (list (string-append home-page "cram-" | |
6511 | version ".tar.gz") | |
6512 | (pypi-uri "cram" version))) | |
6513 | (sha256 | |
6514 | (base32 | |
6515 | "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx")))) | |
6516 | (arguments | |
6517 | '(#:phases | |
6518 | (modify-phases %standard-phases | |
6519 | (add-after 'unpack 'patch-source | |
6520 | (lambda _ | |
6521 | (substitute* (find-files "cram" ".*\\.py$") | |
6522 | ;; Replace default shell path. | |
6523 | (("/bin/sh") (which "sh"))) | |
6524 | (substitute* (find-files "tests" ".*\\.t$") | |
6525 | (("md5") "md5sum") | |
6526 | (("/bin/bash") (which "bash")) | |
6527 | (("/bin/sh") (which "sh"))) | |
6528 | (substitute* "cram/_test.py" | |
6529 | ;; This hack works around a bug triggered by substituting | |
6530 | ;; the /bin/sh paths. "tests/usage.t" compares the output of | |
6531 | ;; "cram -h", which breaks the output at 80 characters. This | |
6532 | ;; causes the line showing the default shell to break into two | |
6533 | ;; lines, but the test expects a single line... | |
6534 | (("env\\['COLUMNS'\\] = '80'") | |
6535 | "env['COLUMNS'] = '160'")) | |
6536 | #t)) | |
6537 | (delete 'check) | |
6538 | (add-after 'install 'check | |
6539 | ;; The test phase uses the built library and executable. | |
6540 | ;; It's easier to run it after install since the build | |
6541 | ;; directory contains version-specific PATH. | |
6542 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6543 | (add-installed-pythonpath inputs outputs) | |
6544 | (setenv "PATH" (string-append (getenv "PATH") ":" | |
6545 | (assoc-ref outputs "out") "/bin")) | |
2d7db192 | 6546 | (invoke "make" "test")))))) |
44d10b1f RW |
6547 | (build-system python-build-system) |
6548 | (native-inputs | |
6549 | `(("python-coverage" ,python-coverage) | |
6550 | ("which" ,which))) | |
6551 | (synopsis "Simple testing framework for command line applications") | |
6552 | (description | |
6553 | "Cram is a functional testing framework for command line applications. | |
6554 | Cram tests look like snippets of interactive shell sessions. Cram runs each | |
6555 | command and compares the command output in the test with the command’s actual | |
6556 | output.") | |
6557 | (license license:gpl2+))) | |
6558 | ||
6559 | (define-public python2-cram | |
6560 | (package-with-python2 python-cram)) | |
6561 | ||
6562 | (define-public python-straight-plugin | |
6563 | (package | |
6564 | (name "python-straight-plugin") | |
6565 | (version "1.4.1") | |
6566 | (source | |
6567 | (origin | |
6568 | (method url-fetch) | |
6569 | (uri (pypi-uri "straight.plugin" version)) | |
6570 | (sha256 | |
6571 | (base32 | |
6572 | "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62")))) | |
6573 | (build-system python-build-system) | |
6574 | (home-page "https://github.com/ironfroggy/straight.plugin") | |
6575 | (synopsis "Simple namespaced plugin facility") | |
6576 | (description "Straight Plugin provides a type of plugin you can create from | |
6577 | almost any existing Python modules, and an easy way for outside developers to | |
6578 | add functionality and customization to your projects with their own plugins.") | |
6579 | (license license:expat))) | |
6580 | ||
6581 | (define-public python2-straight-plugin | |
6582 | (package-with-python2 python-straight-plugin)) | |
6583 | ||
6584 | (define-public python-fonttools | |
6585 | (package | |
6586 | (name "python-fonttools") | |
6587 | (version "3.28.0") | |
6588 | (source (origin | |
6589 | (method url-fetch) | |
6590 | (uri (pypi-uri "fonttools" version ".zip")) | |
6591 | (sha256 | |
6592 | (base32 | |
6593 | "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb")))) | |
6594 | (build-system python-build-system) | |
6595 | (native-inputs | |
6596 | `(("unzip" ,unzip) | |
6597 | ("python-pytest" ,python-pytest) | |
6598 | ("python-pytest-runner" ,python-pytest-runner))) | |
6599 | (home-page "https://github.com/behdad/fonttools") | |
6600 | (synopsis "Tools to manipulate font files") | |
6601 | (description | |
6602 | "FontTools/TTX is a library to manipulate font files from Python. It | |
6603 | supports reading and writing of TrueType/OpenType fonts, reading and writing | |
6604 | of AFM files, reading (and partially writing) of PS Type 1 fonts. The package | |
6605 | also contains a tool called “TTX” which converts TrueType/OpenType fonts to and | |
6606 | from an XML-based format.") | |
6607 | (license license:expat))) | |
6608 | ||
6609 | (define-public python2-fonttools | |
6610 | (package-with-python2 python-fonttools)) | |
6611 | ||
6612 | (define-public python-ly | |
6613 | (package | |
6614 | (name "python-ly") | |
6615 | (version "0.9.5") | |
6616 | (source | |
6617 | (origin | |
6618 | (method url-fetch) | |
6619 | (uri (pypi-uri name version)) | |
6620 | (sha256 | |
6621 | (base32 | |
6622 | "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl")))) | |
6623 | (build-system python-build-system) | |
6624 | (arguments | |
6625 | ;; FIXME: Some tests need network access. | |
6626 | '(#:tests? #f)) | |
6627 | (synopsis "Tool and library for manipulating LilyPond files") | |
6628 | (description "This package provides a Python library to parse, manipulate | |
6629 | or create documents in LilyPond format. A command line program ly is also | |
6630 | provided that can be used to do various manipulations with LilyPond files.") | |
6631 | (home-page "https://pypi.python.org/pypi/python-ly") | |
6632 | (license license:gpl2+))) | |
6633 | ||
6634 | (define-public python-appdirs | |
6635 | (package | |
6636 | (name "python-appdirs") | |
6637 | (version "1.4.3") | |
6638 | (source | |
6639 | (origin | |
6640 | (method url-fetch) | |
6641 | (uri (pypi-uri "appdirs" version)) | |
6642 | (sha256 | |
6643 | (base32 | |
6644 | "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y")))) | |
6645 | (build-system python-build-system) | |
6646 | (home-page "https://github.com/ActiveState/appdirs") | |
6647 | (synopsis | |
6648 | "Determine platform-specific dirs, e.g. a \"user data dir\"") | |
6649 | (description | |
6650 | "This module provides a portable way of finding out where user data | |
6651 | should be stored on various operating systems.") | |
6652 | (license license:expat))) | |
6653 | ||
6654 | (define-public python2-appdirs | |
6655 | (package-with-python2 python-appdirs)) | |
6656 | ||
6657 | (define-public python-llfuse | |
6658 | (package | |
6659 | (name "python-llfuse") | |
6660 | (version "1.3.5") | |
6661 | (source (origin | |
6662 | (method url-fetch) | |
6663 | (uri (pypi-uri "llfuse" version ".tar.bz2")) | |
6664 | (sha256 | |
6665 | (base32 | |
6666 | "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf")))) | |
6667 | (build-system python-build-system) | |
6668 | (inputs | |
6669 | `(("fuse" ,fuse) | |
6670 | ("attr" ,attr))) | |
6671 | (native-inputs | |
6672 | `(("pkg-config" ,pkg-config))) | |
6673 | (synopsis "Python bindings for FUSE") | |
6674 | (description | |
6675 | "Python-LLFUSE is a set of Python bindings for the low level FUSE API.") | |
6676 | (home-page "https://bitbucket.org/nikratio/python-llfuse/") | |
6677 | (license license:lgpl2.0+) | |
6678 | (properties `((python2-variant . ,(delay python2-llfuse)))))) | |
6679 | ||
6680 | (define-public python2-llfuse | |
6681 | (package (inherit (package-with-python2 | |
6682 | (strip-python2-variant python-llfuse))) | |
6683 | (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))) | |
6684 | ||
6685 | ;; For attic-0.16 | |
6686 | (define-public python-llfuse-0.41 | |
6687 | (package (inherit python-llfuse) | |
6688 | (version "0.41.1") | |
6689 | (source (origin | |
6690 | (method url-fetch) | |
6691 | (uri (string-append | |
6692 | "https://bitbucket.org/nikratio/python-llfuse/downloads/" | |
6693 | "llfuse-" version ".tar.bz2")) | |
6694 | (sha256 | |
6695 | (base32 | |
6696 | "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa")))) | |
6697 | ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat) | |
6698 | ;; licensed. The rest of the package is licensed under LGPL2.0 or later. | |
6699 | (license (list license:expat license:lgpl2.0+)))) | |
6700 | ||
6701 | (define-public python-msgpack | |
6702 | (package | |
6703 | (name "python-msgpack") | |
6704 | (version "0.5.6") | |
6705 | (source (origin | |
6706 | (method url-fetch) | |
6707 | (uri (pypi-uri "msgpack" version)) | |
6708 | (sha256 | |
6709 | (base32 | |
6710 | "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f")))) | |
6711 | (build-system python-build-system) | |
6712 | (arguments | |
6713 | `(#:modules ((guix build utils) | |
6714 | (guix build python-build-system) | |
6715 | (ice-9 ftw) | |
6716 | (srfi srfi-1) | |
6717 | (srfi srfi-26)) | |
6718 | #:phases | |
6719 | (modify-phases %standard-phases | |
6720 | (replace 'check | |
6721 | (lambda _ | |
6722 | (let ((cwd (getcwd))) | |
6723 | (setenv "PYTHONPATH" | |
6724 | (string-append cwd "/build/" | |
6725 | (find (cut string-prefix? "lib" <>) | |
6726 | (scandir (string-append cwd "/build"))) | |
6727 | ":" | |
6728 | (getenv "PYTHONPATH"))) | |
6729 | (invoke "pytest" "-v" "test"))))))) | |
6730 | (native-inputs | |
6731 | `(("python-pytest" ,python-pytest))) | |
6732 | (synopsis "MessagePack (de)serializer") | |
6733 | (description "MessagePack is a fast, compact binary serialization format, | |
6734 | suitable for similar data to JSON. This package provides CPython bindings for | |
6735 | reading and writing MessagePack data.") | |
6736 | (home-page "https://pypi.python.org/pypi/msgpack/") | |
6737 | (license license:asl2.0))) | |
6738 | ||
6739 | ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with | |
6740 | ;; release 0.5. Some packages like borg still call it by the old name for now. | |
6741 | ;; <https://bugs.gnu.org/30662> | |
6742 | (define-public python-msgpack-transitional | |
6743 | (package | |
6744 | (inherit python-msgpack) | |
6745 | (name "python-msgpack-transitional") | |
6746 | (arguments | |
6747 | (substitute-keyword-arguments (package-arguments python-msgpack) | |
6748 | ((#:phases phases) | |
6749 | `(modify-phases ,phases | |
6750 | (add-after 'unpack 'configure-transitional | |
6751 | (lambda _ | |
6752 | ;; Keep using the old name. | |
6753 | (substitute* "setup.py" | |
6754 | (("TRANSITIONAL = False") | |
6755 | "TRANSITIONAL = 1")) | |
6756 | #t)))))))) | |
6757 | ||
6758 | (define-public python2-msgpack | |
6759 | (package-with-python2 python-msgpack)) | |
6760 | ||
6761 | (define-public python-netaddr | |
6762 | (package | |
6763 | (name "python-netaddr") | |
6764 | (version "0.7.19") | |
6765 | (source | |
6766 | (origin | |
6767 | (method url-fetch) | |
6768 | (uri (pypi-uri "netaddr" version)) | |
6769 | (sha256 | |
6770 | (base32 | |
6771 | "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq")))) | |
6772 | (build-system python-build-system) | |
6773 | (arguments `(#:tests? #f)) ;; No tests. | |
6774 | (home-page "https://github.com/drkjam/netaddr/") | |
6775 | (synopsis "Pythonic manipulation of network addresses") | |
6776 | (description | |
6777 | "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI | |
6778 | and MAC network addresses.") | |
6779 | (license license:bsd-3))) | |
6780 | ||
6781 | (define-public python2-netaddr | |
6782 | (package-with-python2 python-netaddr)) | |
6783 | ||
6784 | (define-public python-wrapt | |
6785 | (package | |
6786 | (name "python-wrapt") | |
dddd7a75 | 6787 | (version "1.11.1") |
44d10b1f RW |
6788 | (source |
6789 | (origin | |
6790 | (method url-fetch) | |
6791 | (uri (pypi-uri "wrapt" version)) | |
6792 | (sha256 | |
6793 | (base32 | |
dddd7a75 | 6794 | "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja")))) |
44d10b1f RW |
6795 | (build-system python-build-system) |
6796 | (arguments | |
6797 | ;; Tests are not included in the tarball, they are only available in the | |
6798 | ;; git repository. | |
6799 | `(#:tests? #f)) | |
6800 | (home-page "https://github.com/GrahamDumpleton/wrapt") | |
6801 | (synopsis "Module for decorators, wrappers and monkey patching") | |
6802 | (description | |
6803 | "The aim of the wrapt module is to provide a transparent object proxy for | |
6804 | Python, which can be used as the basis for the construction of function | |
6805 | wrappers and decorator functions.") | |
6806 | (license license:bsd-2))) | |
6807 | ||
6808 | (define-public python2-wrapt | |
6809 | (package-with-python2 python-wrapt)) | |
6810 | ||
6811 | (define-public python-xlrd | |
6812 | (package | |
6813 | (name "python-xlrd") | |
6814 | (version "1.0.0") | |
6815 | (source (origin | |
6816 | (method url-fetch) | |
6817 | (uri (pypi-uri "xlrd" version)) | |
6818 | (sha256 | |
6819 | (base32 | |
6820 | "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g")))) | |
6821 | (build-system python-build-system) | |
6822 | (arguments | |
6823 | `(#:phases | |
6824 | (modify-phases %standard-phases | |
6825 | ;; Current test in setup.py does not work as of 1.0.0, so use nose to | |
6826 | ;; run tests instead for now. | |
45fd0081 | 6827 | (replace 'check (lambda _ (invoke "nosetests")))))) |
44d10b1f RW |
6828 | (native-inputs `(("python-nose" ,python-nose))) |
6829 | (home-page "http://www.python-excel.org/") | |
6830 | (synopsis "Library for extracting data from Excel files") | |
a0909286 | 6831 | (description "This package provides a library to extract data from |
44d10b1f RW |
6832 | spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and |
6833 | @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is | |
6834 | Unicode-aware. It is not intended as an end-user tool.") | |
6835 | (license license:bsd-3))) | |
6836 | ||
6837 | (define-public python2-xlrd | |
6838 | (package-with-python2 python-xlrd)) | |
6839 | ||
6840 | (define-public python-prettytable | |
6841 | (package | |
6842 | (name "python-prettytable") | |
6843 | (version "0.7.2") | |
6844 | (source | |
6845 | (origin | |
6846 | (method url-fetch) | |
337c3a1e | 6847 | (uri (pypi-uri "prettytable" version ".tar.bz2")) |
44d10b1f RW |
6848 | (sha256 |
6849 | (base32 | |
6850 | "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45")))) | |
6851 | (build-system python-build-system) | |
6852 | (home-page "http://code.google.com/p/prettytable/") | |
6853 | (synopsis "Display tabular data in an ASCII table format") | |
6854 | (description | |
6855 | "A library designed to represent tabular data in visually appealing ASCII | |
6856 | tables. PrettyTable allows for selection of which columns are to be printed, | |
6857 | independent alignment of columns (left or right justified or centred) and | |
6858 | printing of sub-tables by specifying a row range.") | |
6859 | (license license:bsd-3))) | |
6860 | ||
6861 | (define-public python2-prettytable | |
6862 | (package-with-python2 python-prettytable)) | |
6863 | ||
6864 | (define-public python-tables | |
6865 | (package | |
6866 | (name "python-tables") | |
6867 | (version "3.4.4") | |
6868 | (source | |
6869 | (origin | |
6870 | (method url-fetch) | |
6871 | (uri (pypi-uri "tables" version)) | |
6872 | (sha256 | |
6873 | (base32 | |
6874 | "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx")) | |
6875 | (modules '((guix build utils))) | |
6876 | (snippet | |
6877 | '(begin | |
6878 | ;; Remove pre-compiled .pyc files from source. | |
6879 | (for-each delete-file-recursively | |
6880 | (find-files "." "__pycache__" #:directories? #t)) | |
6881 | (for-each delete-file (find-files "." "\\.pyc$")) | |
6882 | #t)))) | |
6883 | (build-system python-build-system) | |
6884 | (arguments | |
6885 | `(;; FIXME: python-build-system does not pass configure-flags to "build" | |
6886 | ;; or "check", so we must override the build and check phases. | |
6887 | #:phases | |
6888 | (modify-phases %standard-phases | |
6889 | (add-after 'unpack 'use-gcc | |
6890 | (lambda _ | |
6891 | (substitute* "setup.py" | |
6892 | (("compiler = new_compiler\\(\\)" line) | |
6893 | (string-append line | |
6894 | "\ncompiler.set_executables(compiler='gcc'," | |
6895 | "compiler_so='gcc'," | |
6896 | "linker_exe='gcc'," | |
6897 | "linker_so='gcc -shared')"))) | |
6898 | #t)) | |
6899 | (replace 'build | |
6900 | (lambda* (#:key inputs #:allow-other-keys) | |
35d79d61 RW |
6901 | (invoke "python" "setup.py" "build" |
6902 | (string-append "--hdf5=" | |
6903 | (assoc-ref inputs "hdf5"))))) | |
44d10b1f RW |
6904 | (replace 'check |
6905 | (lambda* (#:key inputs #:allow-other-keys) | |
35d79d61 RW |
6906 | (invoke "python" "setup.py" "check" |
6907 | (string-append "--hdf5=" | |
6908 | (assoc-ref inputs "hdf5")))))))) | |
44d10b1f RW |
6909 | (propagated-inputs |
6910 | `(("python-numexpr" ,python-numexpr) | |
6911 | ("python-numpy" ,python-numpy))) | |
6912 | (native-inputs | |
6913 | `(("python-cython" ,python-cython) | |
6914 | ("pkg-config" ,pkg-config))) | |
6915 | (inputs | |
6916 | `(("hdf5" ,hdf5) | |
6917 | ("bzip2" ,bzip2) | |
6918 | ("zlib" ,zlib))) | |
6919 | (home-page "http://www.pytables.org/") | |
6920 | (synopsis "Hierarchical datasets for Python") | |
6921 | (description "PyTables is a package for managing hierarchical datasets and | |
6922 | designed to efficiently cope with extremely large amounts of data.") | |
6923 | (license license:bsd-3))) | |
6924 | ||
6925 | (define-public python2-tables | |
6926 | (package-with-python2 python-tables)) | |
6927 | ||
6928 | (define-public python-pyasn1 | |
6929 | (package | |
6930 | (name "python-pyasn1") | |
6931 | (version "0.4.3") | |
6932 | (source | |
6933 | (origin | |
6934 | (method url-fetch) | |
6935 | (uri (pypi-uri "pyasn1" version)) | |
6936 | (sha256 | |
6937 | (base32 | |
6938 | "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv")))) | |
6939 | (build-system python-build-system) | |
6940 | (home-page "http://pyasn1.sourceforge.net/") | |
6941 | (synopsis "ASN.1 types and codecs") | |
6942 | (description | |
6943 | "This is an implementation of ASN.1 types and codecs in Python. It is | |
6944 | suitable for a wide range of protocols based on the ASN.1 specification.") | |
6945 | (license license:bsd-2))) | |
6946 | ||
6947 | (define-public python2-pyasn1 | |
6948 | (package-with-python2 python-pyasn1)) | |
6949 | ||
6950 | (define-public python-pyasn1-modules | |
6951 | (package | |
6952 | (name "python-pyasn1-modules") | |
6953 | (version "0.2.2") | |
6954 | (source | |
6955 | (origin | |
6956 | (method url-fetch) | |
6957 | (uri (pypi-uri "pyasn1-modules" version)) | |
6958 | (sha256 | |
6959 | (base32 | |
6960 | "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0")))) | |
6961 | (build-system python-build-system) | |
6962 | (propagated-inputs | |
6963 | `(("python-pyasn1" ,python-pyasn1))) | |
6964 | (home-page "https://sourceforge.net/projects/pyasn1/") | |
6965 | (synopsis "ASN.1 codec implementations") | |
6966 | (description | |
6967 | "Pyasn1-modules is a collection of Python modules providing ASN.1 types and | |
6968 | implementations of ASN.1-based codecs and protocols.") | |
6969 | (license license:bsd-3))) | |
6970 | ||
6971 | (define-public python2-pyasn1-modules | |
6972 | (package-with-python2 python-pyasn1-modules)) | |
6973 | ||
6974 | (define-public python-ipaddress | |
6975 | (package | |
6976 | (name "python-ipaddress") | |
6977 | (version "1.0.22") | |
6978 | (source (origin | |
6979 | (method url-fetch) | |
6980 | (uri (pypi-uri "ipaddress" version)) | |
6981 | (sha256 | |
6982 | (base32 | |
6983 | "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi")))) | |
6984 | (build-system python-build-system) | |
6985 | (home-page "https://github.com/phihag/ipaddress") | |
6986 | (synopsis "IP address manipulation library") | |
6987 | (description | |
6988 | "This package provides a fast, lightweight IPv4/IPv6 manipulation library | |
6989 | in Python. This library is used to create, poke at, and manipulate IPv4 and | |
6990 | IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress | |
6991 | module to older versions of Python.") | |
6992 | (license license:psfl))) | |
6993 | ||
6994 | (define-public python2-ipaddress | |
6995 | (package-with-python2 python-ipaddress)) | |
6996 | ||
6997 | (define-public python2-ipaddr | |
6998 | (package | |
6999 | (name "python2-ipaddr") | |
7000 | (version "2.1.11") | |
7001 | (source | |
7002 | (origin | |
7003 | (method url-fetch) | |
7004 | (uri (pypi-uri "ipaddr" version)) | |
7005 | (sha256 | |
7006 | (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v")))) | |
7007 | (build-system python-build-system) | |
7008 | (arguments | |
7009 | `(#:python ,python-2 ;version 2 only | |
7010 | #:phases | |
7011 | (modify-phases %standard-phases | |
7012 | (replace 'check | |
40b8c4e3 | 7013 | (lambda _ (invoke "python" "ipaddr_test.py")))))) |
44d10b1f RW |
7014 | (home-page "https://github.com/google/ipaddr-py") |
7015 | (synopsis "IP address manipulation library") | |
7016 | (description | |
7017 | "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and | |
7018 | IPv6 addresses and networks. | |
7019 | ||
7020 | For new implementations you may prefer to use the standard module | |
7021 | @code{ipaddress}, which was introduced in Python 3.3 and backported to older | |
7022 | versions of Python.") | |
7023 | (license license:asl2.0))) | |
7024 | ||
7025 | (define-public python-idna | |
7026 | (package | |
7027 | (name "python-idna") | |
e95c9837 | 7028 | (version "2.8") |
44d10b1f RW |
7029 | (source |
7030 | (origin | |
7031 | (method url-fetch) | |
7032 | (uri (pypi-uri "idna" version)) | |
7033 | (sha256 | |
7034 | (base32 | |
e95c9837 | 7035 | "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3")))) |
44d10b1f RW |
7036 | (build-system python-build-system) |
7037 | (home-page "https://github.com/kjd/idna") | |
7038 | (synopsis "Internationalized domain names in applications") | |
7039 | (description | |
7040 | "This is a library to support the Internationalised Domain Names in | |
7041 | Applications (IDNA) protocol as specified in RFC 5891. This version of the | |
7042 | protocol is often referred to as “IDNA2008” and can produce different results | |
7043 | from the earlier standard from 2003. The library is also intended to act as a | |
7044 | suitable drop-in replacement for the “encodings.idna” module that comes with | |
7045 | the Python standard library but currently only supports the older 2003 | |
7046 | specification.") | |
7047 | (license license:bsd-4))) | |
7048 | ||
7049 | (define-public python2-idna | |
7050 | (package-with-python2 python-idna)) | |
7051 | ||
7052 | (define-public python-idna-ssl | |
7053 | (package | |
7054 | (name "python-idna-ssl") | |
7055 | (version "1.0.1") | |
7056 | (source | |
7057 | (origin | |
7058 | (method url-fetch) | |
7059 | (uri (pypi-uri "idna-ssl" version)) | |
7060 | (sha256 | |
7061 | (base32 | |
7062 | "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj")))) | |
7063 | (build-system python-build-system) | |
7064 | (arguments | |
7065 | `(#:tests? #f)) ;circular dependency with python-aiohttp | |
7066 | (home-page "https://github.com/aio-libs/idna-ssl") | |
7067 | (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support") | |
7068 | (description "Patch @code{ssl.match_hostname} for Unicode(idna) | |
7069 | domains support.") | |
7070 | (license license:expat))) | |
7071 | ||
7072 | (define-public python-pretend | |
7073 | (package | |
7074 | (name "python-pretend") | |
7075 | (version "1.0.9") | |
7076 | (source | |
7077 | (origin | |
7078 | (method url-fetch) | |
9f1f22ee | 7079 | (uri (pypi-uri "pretend" version)) |
44d10b1f RW |
7080 | (sha256 |
7081 | (base32 | |
7082 | "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9")))) | |
7083 | (build-system python-build-system) | |
7084 | (home-page "https://github.com/alex/pretend") | |
7085 | (synopsis "Library for stubbing in Python") | |
7086 | (description | |
7087 | "Pretend is a library to make stubbing with Python easier. Stubbing is a | |
7088 | technique for writing tests. You may hear the term mixed up with mocks, | |
7089 | fakes, or doubles. Basically, a stub is an object that returns pre-canned | |
7090 | responses, rather than doing any computation.") | |
7091 | (license license:bsd-3))) | |
7092 | ||
7093 | (define-public python2-pretend | |
7094 | (package-with-python2 python-pretend)) | |
7095 | ||
7096 | (define-public python-pip | |
7097 | (package | |
7098 | (name "python-pip") | |
7099 | (version "18.1") | |
7100 | (source | |
7101 | (origin | |
7102 | (method url-fetch) | |
7103 | (uri (pypi-uri "pip" version)) | |
7104 | (sha256 | |
7105 | (base32 | |
7106 | "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0")))) | |
7107 | (build-system python-build-system) | |
7108 | (arguments | |
7109 | '(#:tests? #f)) ; there are no tests in the pypi archive. | |
7110 | (home-page "https://pip.pypa.io/") | |
7111 | (synopsis "Package manager for Python software") | |
7112 | (description | |
7113 | "Pip is a package manager for Python software, that finds packages on the | |
7114 | Python Package Index (PyPI).") | |
7115 | (license license:expat))) | |
7116 | ||
7117 | (define-public python2-pip | |
7118 | (package-with-python2 python-pip)) | |
7119 | ||
7120 | (define-public python-tlsh | |
7121 | (package | |
7122 | (name "python-tlsh") | |
7123 | (version "3.4.5") | |
7124 | (home-page "https://github.com/trendmicro/tlsh") | |
3e3ff8ad TGR |
7125 | (source |
7126 | (origin | |
7127 | (method git-fetch) | |
7128 | (uri (git-reference | |
7129 | (url "https://github.com/trendmicro/tlsh.git") | |
7130 | (commit (string-append "v" version)))) | |
7131 | (file-name (git-file-name name version)) | |
7132 | (sha256 | |
7133 | (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll")))) | |
44d10b1f RW |
7134 | (build-system cmake-build-system) |
7135 | (arguments | |
7136 | '(#:out-of-source? #f | |
7137 | #:phases (modify-phases %standard-phases | |
7138 | (replace | |
7139 | 'install | |
7140 | (lambda* (#:key outputs #:allow-other-keys) | |
7141 | ;; Build and install the Python bindings. The underlying | |
7142 | ;; C++ library is apparently not meant to be installed. | |
7143 | (let ((out (assoc-ref outputs "out"))) | |
7144 | (with-directory-excursion "py_ext" | |
7145 | (and (system* "python" "setup.py" "build") | |
7146 | (system* "python" "setup.py" "install" | |
7147 | (string-append "--prefix=" out)))))))))) | |
7148 | (inputs `(("python" ,python-wrapper))) ;for the bindings | |
7149 | (synopsis "Fuzzy matching library for Python") | |
7150 | (description | |
7151 | "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library. | |
7152 | Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash | |
7153 | value which can be used for similarity comparisons. Similar objects have | |
7154 | similar hash values, which allows for the detection of similar objects by | |
7155 | comparing their hash values. The byte stream should have a sufficient amount | |
7156 | of complexity; for example, a byte stream of identical bytes will not generate | |
7157 | a hash value.") | |
7158 | (license license:asl2.0))) | |
7159 | ||
7160 | (define-public python2-tlsh | |
7161 | (package | |
7162 | (inherit python-tlsh) | |
7163 | (name "python2-tlsh") | |
7164 | (inputs `(("python" ,python-2))))) | |
7165 | ||
7166 | (define-public python-termcolor | |
7167 | (package | |
7168 | (name "python-termcolor") | |
7169 | (version "1.1.0") | |
7170 | (source | |
7171 | (origin | |
7172 | (method url-fetch) | |
7173 | (uri (pypi-uri "termcolor" version)) | |
7174 | (sha256 | |
7175 | (base32 | |
7176 | "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x")))) | |
7177 | (build-system python-build-system) | |
7178 | (arguments | |
7179 | ;; There are no tests. | |
7180 | `(#:tests? #f)) | |
7181 | (home-page "https://pypi.python.org/pypi/termcolor") | |
7182 | (synopsis "ANSII Color formatting for terminal output") | |
7183 | (description | |
7184 | "This package provides ANSII Color formatting for output in terminals.") | |
7185 | (license license:expat))) | |
7186 | ||
7187 | (define-public python2-termcolor | |
7188 | (package-with-python2 python-termcolor)) | |
7189 | ||
7190 | (define-public python-libarchive-c | |
7191 | (package | |
7192 | (name "python-libarchive-c") | |
7193 | (version "2.8") | |
7194 | (source (origin | |
7195 | (method url-fetch) | |
7196 | (uri (pypi-uri "libarchive-c" version)) | |
7197 | (sha256 | |
7198 | (base32 | |
7199 | "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06")))) | |
7200 | (build-system python-build-system) | |
7201 | (arguments | |
7202 | '(#:phases (modify-phases %standard-phases | |
7203 | (add-before | |
7204 | 'build 'reference-libarchive | |
7205 | (lambda* (#:key inputs #:allow-other-keys) | |
7206 | ;; Retain the absolute file name of libarchive.so. | |
7207 | (let ((libarchive (assoc-ref inputs "libarchive"))) | |
7208 | (substitute* "libarchive/ffi.py" | |
7209 | (("find_library\\('archive'\\)") | |
7210 | (string-append "'" libarchive | |
7211 | "/lib/libarchive.so'")))))) | |
7212 | (replace 'check | |
7213 | (lambda _ (invoke "pytest" "-vv")))))) | |
7214 | (native-inputs | |
7215 | `(("python-mock" ,python-mock) | |
7216 | ("python-pytest" ,python-pytest))) | |
7217 | (inputs | |
7218 | `(("libarchive" ,libarchive))) | |
7219 | (home-page "https://github.com/Changaco/python-libarchive-c") | |
7220 | (synopsis "Python interface to libarchive") | |
7221 | (description | |
7222 | "This package provides Python bindings to libarchive, a C library to | |
7223 | access possibly compressed archives in many different formats. It uses | |
7224 | Python's @code{ctypes} foreign function interface (FFI).") | |
7225 | (license license:lgpl2.0+))) | |
7226 | ||
7227 | (define-public python2-libarchive-c | |
7228 | (package-with-python2 python-libarchive-c)) | |
7229 | ||
7230 | (define-public python-file | |
7231 | (package | |
7232 | (inherit file) | |
7233 | (name "python-file") | |
7234 | (build-system python-build-system) | |
7235 | (arguments | |
7236 | '(#:tests? #f ;no tests | |
7237 | #:configure-flags '("--single-version-externally-managed" "--root=/") | |
7238 | #:phases (modify-phases %standard-phases | |
7239 | (add-before 'build 'change-directory | |
7240 | (lambda _ | |
7241 | (chdir "python") | |
7242 | #t)) | |
7243 | (add-before 'build 'set-library-file-name | |
7244 | (lambda* (#:key inputs #:allow-other-keys) | |
7245 | (let ((file (assoc-ref inputs "file"))) | |
7246 | (substitute* "magic.py" | |
7247 | (("find_library\\('magic'\\)") | |
7248 | (string-append "'" file "/lib/libmagic.so'"))) | |
7249 | #t)))))) | |
7250 | (inputs `(("file" ,file))) | |
528ea990 LC |
7251 | (native-inputs (if (%current-target-system) |
7252 | `(("self" ,this-package)) | |
7253 | '())) | |
44d10b1f RW |
7254 | (synopsis "Python bindings to the libmagic file type guesser. Note that |
7255 | this module and the python-magic module both provide a \"magic.py\" file; | |
7256 | these two modules, which are different and were developed separately, both | |
7257 | serve the same purpose: provide Python bindings for libmagic."))) | |
7258 | ||
7259 | (define-public python2-file | |
7260 | (package-with-python2 python-file)) | |
7261 | ||
7262 | (define-public python-debian | |
7263 | (package | |
7264 | (name "python-debian") | |
7265 | (home-page "https://salsa.debian.org/python-debian-team/python-debian") | |
7266 | (version "0.1.28") | |
7267 | (source | |
7268 | (origin | |
7269 | (method url-fetch) | |
7270 | (uri (pypi-uri name version)) | |
7271 | (sha256 | |
7272 | (base32 | |
7273 | "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y")))) | |
7274 | (build-system python-build-system) | |
7275 | (propagated-inputs | |
7276 | `(("python-six" ,python-six))) | |
7277 | (synopsis "Debian package related modules") | |
7278 | (description | |
7279 | ;; XXX: Use @enumerate instead of @itemize to work around | |
7280 | ;; <http://bugs.gnu.org/21772>. | |
7281 | "This package provides Python modules that abstract many formats of | |
7282 | Debian-related files, such as: | |
7283 | ||
7284 | @enumerate | |
7285 | @item Debtags information; | |
7286 | @item @file{debian/changelog} files; | |
7287 | @item packages files, pdiffs; | |
7288 | @item control files of single or multiple RFC822-style paragraphs---e.g. | |
7289 | @file{debian/control}, @file{.changes}, @file{.dsc}; | |
7290 | @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to | |
7291 | contained files and meta-information. | |
7292 | @end enumerate\n") | |
7293 | ||
7294 | ;; Modules are either GPLv2+ or GPLv3+. | |
7295 | (license license:gpl3+))) | |
7296 | ||
7297 | (define-public python2-debian | |
7298 | (package-with-python2 python-debian)) | |
7299 | ||
7300 | (define-public python-nbformat | |
7301 | (package | |
7302 | (name "python-nbformat") | |
7303 | (version "4.4.0") | |
7304 | (source | |
7305 | (origin | |
7306 | (method url-fetch) | |
7307 | (uri (pypi-uri "nbformat" version)) | |
7308 | (sha256 | |
7309 | (base32 | |
7310 | "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp")))) | |
7311 | (build-system python-build-system) | |
7312 | (arguments `(#:tests? #f)) ; no test target | |
7313 | (propagated-inputs | |
7314 | `(("python-ipython-genutils" ,python-ipython-genutils) | |
7315 | ("python-jsonschema" ,python-jsonschema) | |
7316 | ("python-jupyter-core" ,python-jupyter-core) | |
7317 | ("python-traitlets" ,python-traitlets))) | |
7318 | (home-page "http://jupyter.org") | |
7319 | (synopsis "Jupyter Notebook format") | |
7320 | (description "This package provides the reference implementation of the | |
7321 | Jupyter Notebook format and Python APIs for working with notebooks.") | |
7322 | (license license:bsd-3))) | |
7323 | ||
7324 | (define-public python2-nbformat | |
7325 | (package-with-python2 python-nbformat)) | |
7326 | ||
7327 | (define-public python-bleach | |
7328 | (package | |
7329 | (name "python-bleach") | |
7330 | (version "1.4.3") | |
7331 | (source | |
7332 | (origin | |
7333 | (method url-fetch) | |
7334 | (uri (pypi-uri "bleach" version)) | |
7335 | (sha256 | |
7336 | (base32 | |
7337 | "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj")))) | |
7338 | (build-system python-build-system) | |
7339 | (propagated-inputs | |
7340 | `(("python-html5lib" ,python-html5lib-0.9) | |
7341 | ("python-six" ,python-six))) | |
7342 | (native-inputs | |
7343 | `(("python-nose" ,python-nose))) | |
7344 | (home-page "https://github.com/jsocol/bleach") | |
7345 | (synopsis "Whitelist-based HTML-sanitizing tool") | |
7346 | (description "Bleach is an easy whitelist-based HTML-sanitizing tool.") | |
7347 | (license license:asl2.0))) | |
7348 | ||
7349 | (define-public python2-bleach | |
7350 | (package-with-python2 python-bleach)) | |
7351 | ||
7352 | (define-public python-entrypoints | |
7353 | (package | |
7354 | (name "python-entrypoints") | |
a7f1b718 | 7355 | (version "0.3") |
44d10b1f RW |
7356 | (source |
7357 | (origin | |
7358 | (method url-fetch) | |
a7f1b718 | 7359 | (uri (pypi-uri "entrypoints" version)) |
44d10b1f RW |
7360 | (sha256 |
7361 | (base32 | |
a7f1b718 | 7362 | "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7")))) |
44d10b1f RW |
7363 | (build-system python-build-system) |
7364 | ;; The package does not come with a setup.py file, so we have to generate | |
7365 | ;; one ourselves. | |
7366 | (arguments | |
7367 | `(#:tests? #f | |
7368 | #:phases | |
7369 | (modify-phases %standard-phases | |
7370 | (add-after 'unpack 'create-setup.py | |
7371 | (lambda _ | |
7372 | (call-with-output-file "setup.py" | |
7373 | (lambda (port) | |
7374 | (format port "\ | |
7375 | from setuptools import setup | |
7376 | setup(name='entrypoints', version='~a', py_modules=['entrypoints']) | |
7377 | " ,version)))))))) | |
7378 | (home-page "https://github.com/takluyver/entrypoints") | |
7379 | (synopsis "Discover and load entry points from installed Python packages") | |
7380 | (description "Entry points are a way for Python packages to advertise | |
7381 | objects with some common interface. The most common examples are | |
7382 | @code{console_scripts} entry points, which define shell commands by | |
7383 | identifying a Python function to run. The @code{entrypoints} module contains | |
7384 | functions to find and load entry points.") | |
7385 | (license license:expat))) | |
7386 | ||
7387 | (define-public python2-entrypoints | |
7388 | (package-with-python2 python-entrypoints)) | |
7389 | ||
7390 | (define-public python-nbconvert | |
7391 | (package | |
7392 | (name "python-nbconvert") | |
7393 | (version "5.0.0b1") | |
7394 | (source | |
7395 | (origin | |
7396 | (method url-fetch) | |
7397 | (uri (pypi-uri "nbconvert" version)) | |
7398 | (sha256 | |
7399 | (base32 | |
7400 | "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp")))) | |
7401 | (build-system python-build-system) | |
7402 | (arguments | |
7403 | `(;; The "bdist_egg" target is disabled by default, causing the installation | |
7404 | ;; to fail. | |
7405 | #:configure-flags (list "bdist_egg") | |
7406 | ;; FIXME: 5 failures, 40 errors. | |
7407 | #:tests? #f)) | |
7408 | ;; #:phases | |
7409 | ;; (modify-phases %standard-phases | |
7410 | ;; (replace 'check | |
7411 | ;; (lambda _ | |
7412 | ;; (zero? (system* "py.test" "-v"))))) | |
7413 | (native-inputs | |
7414 | `(("python-pytest" ,python-pytest))) | |
7415 | (propagated-inputs | |
7416 | `(("python-bleach" ,python-bleach) | |
7417 | ("python-entrypoints" ,python-entrypoints) | |
7418 | ("python-jinja2" ,python-jinja2) | |
7419 | ("python-jupyter-core" ,python-jupyter-core) | |
7420 | ("python-mistune" ,python-mistune) | |
7421 | ("python-nbformat" ,python-nbformat) | |
7422 | ("python-pygments" ,python-pygments) | |
7423 | ("python-traitlets" ,python-traitlets))) | |
7424 | (home-page "http://jupyter.org") | |
7425 | (synopsis "Converting Jupyter Notebooks") | |
7426 | (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts | |
7427 | notebooks to various other formats via Jinja templates. It allows you to | |
7428 | convert an @code{.ipynb} notebook file into various static formats including: | |
7429 | ||
7430 | @enumerate | |
7431 | @item HTML | |
7432 | @item LaTeX | |
7433 | @item PDF | |
7434 | @item Reveal JS | |
7435 | @item Markdown (md) | |
7436 | @item ReStructured Text (rst) | |
7437 | @item executable script | |
7438 | @end enumerate\n") | |
7439 | (license license:bsd-3))) | |
7440 | ||
7441 | (define-public python2-nbconvert | |
7442 | (package-with-python2 python-nbconvert)) | |
7443 | ||
44d10b1f RW |
7444 | (define-public python-notebook |
7445 | (package | |
7446 | (name "python-notebook") | |
7447 | (version "5.7.4") | |
7448 | (source (origin | |
7449 | (method url-fetch) | |
7450 | (uri (pypi-uri "notebook" version)) | |
7451 | (sha256 | |
7452 | (base32 | |
7453 | "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r")))) | |
7454 | (build-system python-build-system) | |
7455 | (arguments | |
7456 | `(#:phases | |
7457 | (modify-phases %standard-phases | |
7458 | (replace 'check | |
7459 | (lambda _ | |
7460 | ;; These tests require a browser | |
7461 | (delete-file-recursively "notebook/tests/selenium") | |
7462 | ;; Some tests need HOME | |
7463 | (setenv "HOME" "/tmp") | |
7464 | ;; This file contains "warningfilters", which are not supported | |
7465 | ;; by this version of nose. | |
7466 | (delete-file "setup.cfg") | |
7467 | (with-directory-excursion "/tmp" | |
7468 | (invoke "nosetests" "-v")) | |
7469 | #t))))) | |
7470 | (propagated-inputs | |
7471 | `(("python-jupyter-core" ,python-jupyter-core) | |
7472 | ("python-nbformat" ,python-nbformat) | |
7473 | ("python-nbconvert" ,python-nbconvert) | |
7474 | ("python-prometheus-client" ,python-prometheus-client) | |
7475 | ("python-send2trash" ,python-send2trash) | |
7476 | ("python-terminado" ,python-terminado))) | |
7477 | (native-inputs | |
7478 | `(("python-nose" ,python-nose) | |
7479 | ("python-sphinx" ,python-sphinx) | |
7480 | ("python-requests" ,python-requests))) | |
7481 | (home-page "http://jupyter.org/") | |
7482 | (synopsis "Web-based notebook environment for interactive computing") | |
7483 | (description | |
7484 | "The Jupyter HTML notebook is a web-based notebook environment for | |
7485 | interactive computing.") | |
7486 | (properties `((python2-variant . ,(delay python2-notebook)))) | |
7487 | (license license:bsd-3))) | |
7488 | ||
7489 | (define-public python2-notebook | |
7490 | (let ((base (package-with-python2 | |
7491 | (strip-python2-variant python-notebook)))) | |
7492 | (package (inherit base) | |
7493 | (native-inputs | |
7494 | `(("python2-mock" ,python2-mock) | |
7495 | ,@(package-native-inputs base))) | |
7496 | (arguments | |
7497 | (substitute-keyword-arguments (package-arguments base) | |
7498 | ((#:phases phases) | |
7499 | `(modify-phases ,phases | |
7500 | (add-before 'check 'disable-test-case | |
7501 | ;; The test requires network access to localhost. Curiously it | |
7502 | ;; fails with Python 2 only. Simply make the test-case return | |
7503 | ;; immediately. | |
7504 | (lambda _ | |
7505 | (substitute* | |
7506 | "notebook/services/nbconvert/tests/test_nbconvert_api.py" | |
7507 | (("formats = self.nbconvert_api") "return #"))))))))))) | |
7508 | ||
7509 | (define-public python-widgetsnbextension | |
7510 | (package | |
7511 | (name "python-widgetsnbextension") | |
7512 | (version "3.4.2") | |
7513 | (source | |
7514 | (origin | |
7515 | (method url-fetch) | |
7516 | (uri (pypi-uri "widgetsnbextension" version)) | |
7517 | (sha256 | |
7518 | (base32 | |
7519 | "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs")))) | |
7520 | (build-system python-build-system) | |
7521 | (propagated-inputs | |
7522 | `(("python-ipykernel" ,python-ipykernel) | |
7523 | ("python-notebook" ,python-notebook))) | |
7524 | (native-inputs | |
7525 | `(("python-certifi" ,python-certifi) | |
7526 | ("python-nose" ,python-nose))) | |
7527 | (home-page "https://ipython.org") | |
7528 | (synopsis "IPython HTML widgets for Jupyter") | |
7529 | (description "This package provides interactive HTML widgets for Jupyter | |
7530 | notebooks.") | |
7531 | (license license:bsd-3))) | |
7532 | ||
7533 | (define-public python2-widgetsnbextension | |
7534 | (package-with-python2 python-widgetsnbextension)) | |
7535 | ||
7536 | (define-public python-ipywidgets | |
7537 | (package | |
7538 | (name "python-ipywidgets") | |
7539 | (version "5.2.2") | |
7540 | (source | |
7541 | (origin | |
7542 | (method url-fetch) | |
7543 | (uri (pypi-uri "ipywidgets" version)) | |
7544 | (sha256 | |
7545 | (base32 | |
7546 | "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms")))) | |
7547 | (build-system python-build-system) | |
7548 | (propagated-inputs | |
7549 | `(("python-ipython" ,python-ipython) | |
7550 | ("python-traitlets" ,python-traitlets) | |
7551 | ("python-widgetsnbextension" ,python-widgetsnbextension))) | |
7552 | (native-inputs | |
7553 | `(("python-nose" ,python-nose) | |
7554 | ("python-pytest" ,python-pytest))) | |
7555 | (home-page "https://ipython.org") | |
7556 | (synopsis "IPython HTML widgets for Jupyter") | |
7557 | (description "Ipywidgets are interactive HTML widgets for Jupyter | |
7558 | notebooks and the IPython kernel. Notebooks come alive when interactive | |
7559 | widgets are used. Users gain control of their data and can visualize changes | |
7560 | in the data.") | |
7561 | (license license:bsd-3))) | |
7562 | ||
7563 | (define-public python2-ipywidgets | |
7564 | (package-with-python2 python-ipywidgets)) | |
7565 | ||
7566 | (define-public python-jupyter-console | |
7567 | (package | |
7568 | (name "python-jupyter-console") | |
becb9cbf | 7569 | (version "6.0.0") |
44d10b1f RW |
7570 | (source |
7571 | (origin | |
7572 | (method url-fetch) | |
7573 | (uri (pypi-uri "jupyter_console" version)) | |
7574 | (sha256 | |
7575 | (base32 | |
becb9cbf | 7576 | "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h")))) |
44d10b1f | 7577 | (build-system python-build-system) |
44d10b1f RW |
7578 | (propagated-inputs |
7579 | `(("python-ipykernel" ,python-ipykernel) | |
7580 | ("python-jupyter-client" ,python-jupyter-client) | |
becb9cbf | 7581 | ("python-prompt-toolkit" ,python-prompt-toolkit) |
44d10b1f RW |
7582 | ("python-pygments" ,python-pygments))) |
7583 | (native-inputs | |
7584 | `(("python-nose" ,python-nose))) | |
7585 | (home-page "https://jupyter.org") | |
7586 | (synopsis "Jupyter terminal console") | |
7587 | (description "This package provides a terminal-based console frontend for | |
7588 | Jupyter kernels. It also allows for console-based interaction with non-Python | |
7589 | Jupyter kernels such as IJulia and IRKernel.") | |
7590 | (license license:bsd-3))) | |
7591 | ||
7592 | (define-public python2-jupyter-console | |
8e590c81 RW |
7593 | (package |
7594 | (name "python2-jupyter-console") | |
7595 | (version "5.2.0") | |
7596 | (source | |
7597 | (origin | |
7598 | (method url-fetch) | |
7599 | (uri (pypi-uri "jupyter_console" version)) | |
7600 | (sha256 | |
7601 | (base32 | |
7602 | "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal")))) | |
7603 | (build-system python-build-system) | |
7604 | ;; Tests only run in an TTY. | |
7605 | (arguments `(#:tests? #f)) | |
7606 | (propagated-inputs | |
7607 | `(("python2-ipykernel" ,python2-ipykernel) | |
7608 | ("python2-jupyter-client" ,python2-jupyter-client) | |
7609 | ("python2-prompt-toolkit" ,python2-prompt-toolkit-1) | |
7610 | ("python2-pygments" ,python2-pygments))) | |
7611 | (native-inputs | |
7612 | `(("python2-nose" ,python2-nose))) | |
7613 | (home-page "https://jupyter.org") | |
7614 | (synopsis "Jupyter terminal console") | |
7615 | (description "This package provides a terminal-based console frontend for | |
7616 | Jupyter kernels. It also allows for console-based interaction with non-Python | |
7617 | Jupyter kernels such as IJulia and IRKernel.") | |
7618 | (license license:bsd-3))) | |
44d10b1f RW |
7619 | |
7620 | ;; The python-ipython and python-jupyter-console require each other. To get | |
7621 | ;; the functionality in both packages working, strip down the | |
7622 | ;; python-jupyter-console package when using it as an input to python-ipython. | |
7623 | (define python-jupyter-console-minimal | |
7624 | (package | |
7625 | (inherit python-jupyter-console) | |
7626 | (name "python-jupyter-console-minimal") | |
7627 | (arguments | |
7628 | (substitute-keyword-arguments | |
7629 | (package-arguments python-jupyter-console) | |
7630 | ((#:phases phases) | |
7631 | `(modify-phases ,phases | |
7632 | (add-after 'install 'delete-bin | |
7633 | (lambda* (#:key outputs #:allow-other-keys) | |
7634 | ;; Delete the bin files, to avoid conflicts in profiles | |
7635 | ;; where python-ipython and python-jupyter-console are | |
7636 | ;; both present. | |
7637 | (delete-file-recursively | |
7638 | (string-append | |
7639 | (assoc-ref outputs "out") "/bin")))))))) | |
7640 | ;; Remove the python-ipython propagated input, to avoid the cycle | |
7641 | (propagated-inputs | |
7642 | (alist-delete | |
7643 | "python-ipython" | |
7644 | (package-propagated-inputs python-jupyter-console))))) | |
7645 | ||
7646 | (define-public python-qtconsole | |
7647 | (package | |
7648 | (name "python-qtconsole") | |
7649 | (version "4.4.3") | |
7650 | (source | |
7651 | (origin | |
7652 | (method url-fetch) | |
7653 | (uri (pypi-uri "qtconsole" version)) | |
7654 | (sha256 | |
7655 | (base32 | |
7656 | "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw")))) | |
7657 | (build-system python-build-system) | |
7658 | (arguments | |
7659 | ;; XXX: Tests are disabled, because this package needs python-ipython 7, | |
7660 | ;; but we only have the LTS version 5.x. This means that there might be | |
7661 | ;; runtime errors, but since this is a dependency of the Jupyter package, | |
7662 | ;; and Jupyter can be used without the qtconsole we can overlook this for | |
7663 | ;; now. | |
7664 | `(#:tests? #f | |
7665 | #:phases | |
7666 | (modify-phases %standard-phases | |
7667 | (add-before 'check 'pre-check | |
7668 | (lambda _ | |
7669 | (setenv "QT_QPA_PLATFORM" "offscreen") | |
7670 | #t))))) | |
7671 | (propagated-inputs | |
7672 | `(("python-ipykernel" ,python-ipykernel) | |
7673 | ("python-ipython" ,python-ipython))) | |
7674 | (native-inputs | |
7675 | `(("python-pytest" ,python-pytest))) | |
7676 | (home-page "http://jupyter.org") | |
7677 | (synopsis "Jupyter Qt console") | |
7678 | (description "This package provides a Qt-based console for Jupyter with | |
7679 | support for rich media output.") | |
7680 | (license license:bsd-3))) | |
7681 | ||
7682 | (define-public jupyter | |
7683 | (package | |
7684 | (name "jupyter") | |
7685 | (version "1.0.0") | |
7686 | (source | |
7687 | (origin | |
7688 | (method url-fetch) | |
7689 | (uri (pypi-uri "jupyter" version)) | |
7690 | (sha256 | |
7691 | (base32 | |
7692 | "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r")))) | |
7693 | (build-system python-build-system) | |
7694 | (arguments '(#:tests? #f)) ; there are none. | |
7695 | (propagated-inputs | |
7696 | `(("python-ipykernel" ,python-ipykernel) | |
7697 | ("python-ipywidgets" ,python-ipywidgets) | |
7698 | ("python-jupyter-console" ,python-jupyter-console) | |
7699 | ("python-nbconvert" ,python-nbconvert) | |
7700 | ("python-notebook" ,python-notebook) | |
7701 | ("python-qtconsole" ,python-qtconsole))) | |
7702 | (native-search-paths | |
7703 | (list (search-path-specification | |
7704 | (variable "JUPYTER_PATH") | |
7705 | (files '("share/jupyter"))))) | |
7706 | (home-page "https://jupyter.org") | |
7707 | (synopsis "Web application for interactive documents") | |
7708 | (description | |
7709 | "The Jupyter Notebook is a web application that allows you to create and | |
7710 | share documents that contain live code, equations, visualizations and | |
7711 | explanatory text. Uses include: data cleaning and transformation, numerical | |
7712 | simulation, statistical modeling, machine learning and much more.") | |
7713 | (license license:bsd-3))) | |
7714 | ||
7715 | (define-public python-chardet | |
7716 | (package | |
7717 | (name "python-chardet") | |
7718 | (version "3.0.4") | |
7719 | (source | |
7720 | (origin | |
7721 | (method url-fetch) | |
7722 | (uri (pypi-uri "chardet" version)) | |
7723 | (sha256 | |
7724 | (base32 | |
7725 | "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4")))) | |
7726 | (native-inputs | |
7727 | `(("python-hypothesis" ,python-hypothesis) | |
7728 | ("python-pytest" ,python-pytest) | |
7729 | ("python-pytest-runner" ,python-pytest-runner))) | |
7730 | (build-system python-build-system) | |
7731 | (home-page "https://github.com/chardet/chardet") | |
7732 | (synopsis "Universal encoding detector for Python 2 and 3") | |
7733 | (description | |
7734 | "This package provides @code{chardet}, a Python module that can | |
7735 | automatically detect a wide range of file encodings.") | |
7736 | (license license:lgpl2.1+))) | |
7737 | ||
7738 | (define-public python2-chardet | |
7739 | (package-with-python2 python-chardet)) | |
7740 | ||
7741 | (define-public python-docopt | |
7742 | (package | |
7743 | (name "python-docopt") | |
7744 | (version "0.6.2") | |
7745 | (source | |
7746 | (origin | |
7747 | (method url-fetch) | |
7748 | ;; The release on PyPI does not include tests. | |
7749 | (uri (string-append | |
7750 | "https://github.com/docopt/docopt/archive/" | |
7751 | version ".tar.gz")) | |
7752 | (file-name (string-append name "-" version ".tar.gz")) | |
7753 | (sha256 | |
7754 | (base32 | |
7755 | "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1")))) | |
7756 | (build-system python-build-system) | |
7757 | (native-inputs | |
7758 | `(("python-pytest" ,python-pytest))) | |
7759 | (arguments | |
7760 | `(#:phases | |
7761 | (modify-phases %standard-phases | |
7762 | (replace 'check | |
7763 | (lambda _ (invoke "py.test")))))) | |
7764 | (home-page "http://docopt.org") | |
7765 | (synopsis "Command-line interface description language for Python") | |
7766 | (description "This library allows the user to define a command-line | |
7767 | interface from a program's help message rather than specifying it | |
4ca7207b | 7768 | programmatically with command-line parsers like @code{getopt} and |
44d10b1f RW |
7769 | @code{argparse}.") |
7770 | (license license:expat))) | |
7771 | ||
7772 | (define-public python2-docopt | |
7773 | (package-with-python2 python-docopt)) | |
7774 | ||
7775 | (define-public python-pythondialog | |
7776 | (package | |
7777 | (name "python-pythondialog") | |
7778 | (version "3.4.0") | |
7779 | (source | |
7780 | (origin | |
7781 | (method url-fetch) | |
7782 | (uri (pypi-uri "pythondialog" version)) | |
7783 | (sha256 | |
7784 | (base32 | |
7785 | "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c")))) | |
7786 | (build-system python-build-system) | |
7787 | (arguments | |
7788 | `(#:phases | |
7789 | (modify-phases %standard-phases | |
7790 | (add-after 'unpack 'patch-path | |
7791 | (lambda* (#:key inputs #:allow-other-keys) | |
7792 | (let* ((dialog (assoc-ref inputs "dialog"))) | |
7793 | ;; Since this library really wants to grovel the search path, we | |
7794 | ;; must hardcode dialog's store path into it. | |
7795 | (substitute* "dialog.py" | |
7796 | (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)") | |
7797 | (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\""))) | |
7798 | #t)))) | |
7799 | #:tests? #f)) ; no test suite | |
7800 | (propagated-inputs | |
7801 | `(("dialog" ,dialog))) | |
7802 | (home-page "http://pythondialog.sourceforge.net/") | |
7803 | (synopsis "Python interface to the UNIX dialog utility") | |
7804 | (description "A Python wrapper for the dialog utility. Its purpose is to | |
7805 | provide an easy to use, pythonic and comprehensive Python interface to dialog. | |
7806 | This allows one to make simple text-mode user interfaces on Unix-like systems") | |
7807 | (license license:lgpl2.1) | |
7808 | (properties `((python2-variant . ,(delay python2-pythondialog)))))) | |
7809 | ||
7810 | (define-public python2-pythondialog | |
7811 | (let ((base (package-with-python2 (strip-python2-variant python-pythondialog)))) | |
7812 | (package | |
7813 | (inherit base) | |
7814 | (version (package-version python-pythondialog)) | |
7815 | (source (origin | |
7816 | (method url-fetch) | |
7817 | (uri (pypi-uri "python2-pythondialog" version)) | |
7818 | (sha256 | |
7819 | (base32 | |
7820 | "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9"))))))) | |
7821 | ||
7822 | (define-public python-configobj | |
7823 | (package | |
7824 | (name "python-configobj") | |
7825 | (version "5.0.6") | |
7826 | (source (origin | |
7827 | (method url-fetch) | |
b0758fbb | 7828 | (uri (pypi-uri "configobj" version)) |
44d10b1f RW |
7829 | (sha256 |
7830 | (base32 | |
7831 | "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2")) | |
7832 | ;; Patch setup.py so it looks for python-setuptools, which is | |
7833 | ;; required to parse the keyword 'install_requires' in setup.py. | |
7834 | (patches (search-patches "python-configobj-setuptools.patch")))) | |
7835 | (build-system python-build-system) | |
7836 | (propagated-inputs | |
7837 | `(("python-six" ,python-six))) | |
7838 | (synopsis "Config file reading, writing and validation") | |
7839 | (description "ConfigObj is a simple but powerful config file reader and | |
7840 | writer: an ini file round tripper. Its main feature is that it is very easy to | |
7841 | use, with a straightforward programmer’s interface and a simple syntax for | |
7842 | config files.") | |
7843 | (home-page "https://github.com/DiffSK/configobj") | |
7844 | (license license:bsd-3))) | |
7845 | ||
7846 | (define-public python2-configobj | |
7847 | (package-with-python2 python-configobj)) | |
7848 | ||
7849 | (define-public python-configargparse | |
7850 | (package | |
7851 | (name "python-configargparse") | |
86ae491f | 7852 | (version "0.14.0") |
44d10b1f RW |
7853 | (source (origin |
7854 | (method url-fetch) | |
7855 | (uri (pypi-uri "ConfigArgParse" version)) | |
7856 | (sha256 | |
7857 | (base32 | |
86ae491f | 7858 | "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif")))) |
44d10b1f RW |
7859 | (build-system python-build-system) |
7860 | (native-inputs | |
7861 | `(("python-pyyaml" ,python-pyyaml))) | |
7862 | (arguments | |
7863 | `(#:phases | |
7864 | (modify-phases %standard-phases | |
7865 | (replace 'check | |
7866 | (lambda _ | |
7867 | ;; Bypass setuptools-shim because one test relies on "setup.py" | |
7868 | ;; being the first argument passed to the python call. | |
7869 | ;; | |
7870 | ;; NOTE: Many tests do not run because they rely on Python's | |
7871 | ;; built-in test.test_argparse, but we remove the unit tests from | |
7872 | ;; our Python installation. | |
7873 | (invoke "python" "setup.py" "test")))))) | |
7874 | (synopsis "Replacement for argparse") | |
7875 | (description "A drop-in replacement for argparse that allows options to also | |
7876 | be set via config files and/or environment variables.") | |
7877 | (home-page "https://github.com/bw2/ConfigArgParse") | |
7878 | (license license:expat))) | |
7879 | ||
7880 | (define-public python2-configargparse | |
7881 | (package-with-python2 python-configargparse)) | |
7882 | ||
7883 | (define-public python-argparse-manpage | |
7884 | (package | |
7885 | (name "python-argparse-manpage") | |
7886 | (version "1.1") | |
7887 | (source | |
7888 | (origin | |
7889 | (method url-fetch) | |
7890 | (uri (pypi-uri "argparse-manpage" version)) | |
7891 | (sha256 | |
7892 | (base32 | |
7893 | "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p")))) | |
7894 | (build-system python-build-system) | |
7895 | (home-page "https://github.com/praiskup/argparse-manpage") | |
7896 | (synopsis "Build manual page from Python's ArgumentParser object") | |
7897 | (description | |
7898 | "This package provides tools to build manual pages from Python's | |
7899 | @code{ArgumentParser} object.") | |
7900 | (license license:asl2.0))) | |
7901 | ||
7902 | (define-public python2-contextlib2 | |
7903 | (package | |
7904 | (name "python2-contextlib2") | |
7905 | (version "0.5.5") | |
7906 | (source | |
7907 | (origin | |
7908 | (method url-fetch) | |
7909 | (uri (pypi-uri "contextlib2" version)) | |
7910 | (sha256 | |
7911 | (base32 | |
7912 | "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh")))) | |
7913 | (build-system python-build-system) | |
7914 | (arguments | |
7915 | `(#:python ,python-2 | |
7916 | #:phases | |
7917 | (modify-phases %standard-phases | |
7918 | (replace 'check | |
7919 | (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))) | |
7920 | (native-inputs | |
7921 | `(("python2-unittest2" ,python2-unittest2))) | |
7922 | (home-page "http://contextlib2.readthedocs.org/") | |
7923 | (synopsis "Tools for decorators and context managers") | |
7924 | (description "This module is primarily a backport of the Python | |
7925 | 3.2 contextlib to earlier Python versions. Like contextlib, it | |
7926 | provides utilities for common tasks involving decorators and context | |
7927 | managers. It also contains additional features that are not part of | |
7928 | the standard library.") | |
7929 | (license license:psfl))) | |
7930 | ||
7931 | (define-public python-texttable | |
7932 | (package | |
7933 | (name "python-texttable") | |
7934 | (version "0.8.7") | |
7935 | (source | |
7936 | (origin | |
7937 | (method url-fetch) | |
7938 | (uri (pypi-uri "texttable" version)) | |
7939 | (sha256 | |
7940 | (base32 | |
7941 | "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a")))) | |
7942 | (build-system python-build-system) | |
7943 | (arguments '(#:tests? #f)) ; no tests | |
7944 | (home-page "https://github.com/foutaise/texttable/") | |
7945 | (synopsis "Python module for creating simple ASCII tables") | |
7946 | (description "Texttable is a Python module for creating simple ASCII | |
7947 | tables.") | |
7948 | (license license:lgpl2.1+))) | |
7949 | ||
7950 | (define-public python2-texttable | |
7951 | (package-with-python2 python-texttable)) | |
7952 | ||
7953 | (define-public python-atomicwrites | |
7954 | (package | |
7955 | (name "python-atomicwrites") | |
7956 | (version "1.1.5") | |
7957 | (source (origin | |
7958 | (method url-fetch) | |
7959 | (uri (pypi-uri "atomicwrites" version)) | |
7960 | (sha256 | |
7961 | (base32 | |
7962 | "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214")))) | |
7963 | (build-system python-build-system) | |
7964 | (synopsis "Atomic file writes in Python") | |
7965 | (description "Library for atomic file writes using platform dependent tools | |
7966 | for atomic file system operations.") | |
7967 | (home-page "https://github.com/untitaker/python-atomicwrites") | |
7968 | (license license:expat))) | |
7969 | ||
7970 | (define-public python2-atomicwrites | |
7971 | (package-with-python2 python-atomicwrites)) | |
7972 | ||
7973 | (define-public python-click-threading | |
7974 | (package | |
7975 | (name "python-click-threading") | |
7976 | (version "0.4.4") | |
7977 | (source (origin | |
7978 | (method url-fetch) | |
7979 | (uri (pypi-uri "click-threading" version)) | |
7980 | (sha256 | |
7981 | (base32 | |
7982 | "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j")))) | |
7983 | (build-system python-build-system) | |
7984 | (propagated-inputs | |
7985 | `(("python-click" ,python-click))) | |
7986 | (synopsis "Utilities for multithreading in Click") | |
7987 | (description "This package provides utilities for multithreading in Click | |
7988 | applications.") | |
7989 | (home-page "https://github.com/click-contrib/click-threading") | |
7990 | (license license:expat))) | |
7991 | ||
7992 | (define-public python-click-log | |
7993 | (package | |
7994 | (name "python-click-log") | |
7995 | (version "0.3.2") | |
7996 | (source (origin | |
7997 | (method url-fetch) | |
7998 | (uri (pypi-uri "click-log" version)) | |
7999 | (sha256 | |
8000 | (base32 | |
8001 | "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n")))) | |
8002 | (build-system python-build-system) | |
8003 | (propagated-inputs | |
8004 | `(("python-click" ,python-click))) | |
8005 | (synopsis "Logging for click applications") | |
8006 | (description "This package provides a Python library for logging Click | |
8007 | applications.") | |
8008 | (home-page "https://github.com/click-contrib/click-log") | |
8009 | (license license:expat))) | |
8010 | ||
8011 | (define-public python-apipkg | |
8012 | (package | |
8013 | (name "python-apipkg") | |
8014 | (version "1.4") | |
8015 | (source (origin | |
8016 | (method url-fetch) | |
8017 | (uri (pypi-uri "apipkg" version)) | |
8018 | (sha256 | |
8019 | (base32 | |
8020 | "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f")))) | |
8021 | (build-system python-build-system) | |
8022 | (native-inputs | |
8023 | `(("python-pytest" ,python-pytest))) | |
8024 | (synopsis "Namespace control and lazy-import mechanism") | |
8025 | (description "With apipkg you can control the exported namespace of a Python | |
8026 | package and greatly reduce the number of imports for your users. It is a small | |
8027 | pure Python module that works on virtually all Python versions.") | |
8028 | (home-page "https://github.com/pytest-dev/apipkg") | |
8029 | (license license:expat))) | |
8030 | ||
8031 | (define-public python2-apipkg | |
8032 | (package-with-python2 python-apipkg)) | |
8033 | ||
8034 | (define-public python-execnet | |
8035 | (package | |
8036 | (name "python-execnet") | |
8037 | (version "1.4.1") | |
8038 | (source (origin | |
8039 | (method url-fetch) | |
8040 | (uri (pypi-uri "execnet" version)) | |
8041 | (sha256 | |
8042 | (base32 | |
8043 | "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn")))) | |
8044 | (build-system python-build-system) | |
8045 | (arguments | |
8046 | `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed | |
8047 | ;; The two test failures are caused by the lack of an `ssh` executable. | |
8048 | ;; The test suite can be run with pytest after the 'install' phase. | |
8049 | #:tests? #f)) | |
8050 | (native-inputs | |
8051 | `(("python-pytest" ,python-pytest) | |
8052 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
8053 | (propagated-inputs | |
8054 | `(("python-apipkg" ,python-apipkg))) | |
8055 | (synopsis "Rapid multi-Python deployment") | |
8056 | (description "Execnet provides a share-nothing model with | |
8057 | channel-send/receive communication for distributing execution across many | |
8058 | Python interpreters across version, platform and network barriers. It has a | |
8059 | minimal and fast API targeting the following uses: | |
8060 | @enumerate | |
8061 | @item distribute tasks to (many) local or remote CPUs | |
8062 | @item write and deploy hybrid multi-process applications | |
8063 | @item write scripts to administer multiple environments | |
8064 | @end enumerate") | |
8065 | (home-page "http://codespeak.net/execnet/") | |
8066 | (license license:expat))) | |
8067 | ||
8068 | (define-public python2-execnet | |
8069 | (package-with-python2 python-execnet)) | |
8070 | ||
8071 | (define-public python-icalendar | |
8072 | (package | |
8073 | (name "python-icalendar") | |
8074 | (version "4.0.3") | |
8075 | (source (origin | |
8076 | (method url-fetch) | |
8077 | (uri (pypi-uri "icalendar" version)) | |
8078 | (sha256 | |
8079 | (base32 | |
8080 | "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7")))) | |
8081 | (build-system python-build-system) | |
8082 | (propagated-inputs | |
8083 | `(("python-dateutil" ,python-dateutil) | |
8084 | ("python-pytz" ,python-pytz))) | |
8085 | (synopsis "Python library for parsing iCalendar files") | |
8086 | (description "The icalendar package is a parser/generator of iCalendar | |
8087 | files for use with Python.") | |
8088 | (home-page "https://github.com/collective/icalendar") | |
8089 | (license license:bsd-2))) | |
8090 | ||
44d10b1f RW |
8091 | (define-public python-args |
8092 | (package | |
8093 | (name "python-args") | |
8094 | (version "0.1.0") | |
8095 | (source (origin | |
8096 | (method url-fetch) | |
8097 | (uri (pypi-uri "args" version)) | |
8098 | (sha256 | |
8099 | (base32 | |
8100 | "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7")))) | |
8101 | (build-system python-build-system) | |
8102 | (home-page "https://github.com/kennethreitz/args") | |
8103 | (synopsis "Command-line argument parser") | |
8104 | (description | |
8105 | "This library provides a Python module to parse command-line arguments.") | |
8106 | (license license:bsd-3))) | |
8107 | ||
8108 | (define-public python2-args | |
8109 | (package-with-python2 python-args)) | |
8110 | ||
8111 | (define-public python-clint | |
8112 | (package | |
8113 | (name "python-clint") | |
8114 | (version "0.5.1") | |
8115 | (source (origin | |
8116 | (method url-fetch) | |
8117 | (uri (pypi-uri "clint" version)) | |
8118 | (sha256 | |
8119 | (base32 | |
8120 | "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5")))) | |
8121 | (build-system python-build-system) | |
8122 | (arguments | |
8123 | '(#:phases | |
8124 | (modify-phases %standard-phases | |
8125 | (replace 'check | |
8126 | (lambda _ (invoke "py.test" "-v")))))) | |
8127 | (native-inputs | |
8128 | `(("python-pytest" ,python-pytest))) | |
8129 | (propagated-inputs | |
8130 | `(("python-args" ,python-args))) | |
8131 | (home-page "https://github.com/kennethreitz/clint") | |
8132 | (synopsis "Command-line interface tools") | |
8133 | (description | |
8134 | "Clint is a Python module filled with a set of tools for developing | |
8135 | command-line applications, including tools for colored and indented | |
8136 | output, progress bar display, and pipes.") | |
8137 | (license license:isc))) | |
8138 | ||
8139 | (define-public python2-clint | |
8140 | (package-with-python2 python-clint)) | |
8141 | ||
44d10b1f RW |
8142 | (define-public python-rply |
8143 | (package | |
8144 | (name "python-rply") | |
8145 | (version "0.7.5") | |
8146 | (source (origin | |
8147 | (method url-fetch) | |
8148 | (uri (pypi-uri "rply" version)) | |
8149 | (sha256 | |
8150 | (base32 | |
8151 | "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh")))) | |
8152 | (build-system python-build-system) | |
8153 | (propagated-inputs | |
8154 | `(("python-appdirs" ,python-appdirs))) | |
8155 | (home-page "https://github.com/alex/rply") | |
8156 | (synopsis "Parser generator for Python") | |
8157 | (description | |
8158 | "This package provides a pure Python based parser generator, that also | |
8159 | works with RPython. It is a more-or-less direct port of David Bazzley's PLY, | |
8160 | with a new public API, and RPython support.") | |
8161 | (license license:bsd-3))) | |
8162 | ||
8163 | (define-public python2-rply | |
8164 | (package-with-python2 python-rply)) | |
8165 | ||
8166 | (define-public python-hy | |
8167 | (package | |
8168 | (name "python-hy") | |
8169 | (version "0.13.0") | |
8170 | (source (origin | |
8171 | (method url-fetch) | |
8172 | (uri (pypi-uri "hy" version)) | |
8173 | (sha256 | |
8174 | (base32 | |
8175 | "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8")))) | |
8176 | (build-system python-build-system) | |
8177 | (arguments | |
8178 | '(#:phases | |
8179 | (modify-phases %standard-phases | |
8180 | (replace 'check | |
8181 | (lambda _ | |
8182 | ;; Tests require write access to HOME. | |
8183 | (setenv "HOME" "/tmp") | |
8184 | (invoke "nosetests")))))) | |
8185 | (native-inputs | |
8186 | `(("python-coverage" ,python-coverage) | |
8187 | ("python-nose" ,python-nose))) | |
8188 | (propagated-inputs | |
8189 | `(("python-astor" ,python-astor) | |
8190 | ("python-clint" ,python-clint) | |
8191 | ("python-rply" ,python-rply))) | |
8192 | (home-page "http://hylang.org/") | |
8193 | (synopsis "Lisp frontend to Python") | |
8194 | (description | |
8195 | "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms | |
8196 | its Lisp code into the Python Abstract Syntax Tree, you have the whole world of | |
8197 | Python at your fingertips, in Lisp form.") | |
8198 | (license license:expat))) | |
8199 | ||
8200 | (define-public python2-hy | |
8201 | (package-with-python2 python-hy)) | |
8202 | ||
8203 | (define-public python2-functools32 | |
8204 | (package | |
8205 | (name "python2-functools32") | |
8206 | (version "3.2.3-2") | |
8207 | (source | |
8208 | (origin | |
8209 | (method url-fetch) | |
8210 | (uri (pypi-uri "functools32" version)) | |
8211 | (sha256 | |
8212 | (base32 | |
8213 | "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn")))) | |
8214 | (build-system python-build-system) | |
8215 | (arguments | |
8216 | `(#:python ,python-2 | |
8217 | #:tests? #f)) ; no test target | |
8218 | (home-page "https://github.com/MiCHiLU/python-functools32") | |
8219 | (synopsis | |
8220 | "Backport of the functools module from Python 3.2.3") | |
8221 | (description | |
8222 | "This package is a backport of the @code{functools} module from Python | |
8223 | 3.2.3 for use with older versions of Python and PyPy.") | |
8224 | (license license:expat))) | |
8225 | ||
8226 | (define-public python2-subprocess32 | |
8227 | (package | |
8228 | (name "python2-subprocess32") | |
8229 | (version "3.2.7") | |
8230 | (source (origin | |
8231 | (method url-fetch) | |
8232 | (uri (pypi-uri "subprocess32" version)) | |
8233 | (sha256 | |
8234 | (base32 | |
8235 | "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y")) | |
8236 | (patches | |
8237 | (search-patches "python2-subprocess32-disable-input-test.patch")))) | |
8238 | (build-system python-build-system) | |
8239 | (arguments | |
8240 | `(#:python ,python-2 | |
8241 | ;; The test suite fails with Python > 2.7.13: | |
8242 | ;; import test.support | |
8243 | ;; ImportError: No module named support | |
8244 | #:tests? #f | |
8245 | #:phases | |
8246 | (modify-phases %standard-phases | |
8247 | (add-after 'unpack 'patch-/bin/sh | |
8248 | (lambda _ | |
8249 | (substitute* '("subprocess32.py" | |
8250 | "test_subprocess32.py") | |
8251 | (("/bin/sh") (which "sh"))) | |
8252 | #t))))) | |
8253 | (home-page "https://github.com/google/python-subprocess32") | |
8254 | (synopsis "Backport of the subprocess module from Python 3.2") | |
8255 | (description | |
8256 | "This is a backport of the @code{subprocess} standard library module | |
8257 | from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some | |
8258 | new features. On POSIX systems it is guaranteed to be reliable when used | |
8259 | in threaded applications. It includes timeout support from Python 3.3 but | |
8260 | otherwise matches 3.2’s API.") | |
8261 | (license license:psfl))) | |
8262 | ||
8263 | (define-public python2-futures | |
8264 | (package | |
8265 | (name "python2-futures") | |
8266 | (version "3.2.0") | |
8267 | (source | |
8268 | (origin | |
8269 | (method url-fetch) | |
8270 | (uri (pypi-uri "futures" version)) | |
8271 | (sha256 | |
8272 | (base32 | |
8273 | "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y")))) | |
8274 | (build-system python-build-system) | |
8275 | (arguments `(#:python ,python-2 | |
8276 | ;; FIXME: Python 2.7.14 moved the test.support library, | |
8277 | ;; but our package has not yet been adjusted. Enable | |
8278 | ;; tests when the python2 package has been fixed. | |
8279 | #:tests? #f)) | |
8280 | (home-page "https://github.com/agronholm/pythonfutures") | |
8281 | (synopsis | |
8282 | "Backport of the concurrent.futures package from Python 3.2") | |
8283 | (description | |
8284 | "The concurrent.futures module provides a high-level interface for | |
8285 | asynchronously executing callables. This package backports the | |
8286 | concurrent.futures package from Python 3.2") | |
8287 | (license license:bsd-3))) | |
8288 | ||
8289 | (define-public python-promise | |
8290 | (package | |
8291 | (name "python-promise") | |
8292 | (version "0.4.2") | |
8293 | (source | |
8294 | (origin | |
8295 | (method url-fetch) | |
8296 | (uri (pypi-uri "promise" version)) | |
8297 | (sha256 | |
8298 | (base32 | |
8299 | "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h")))) | |
8300 | (build-system python-build-system) | |
8301 | ;; Tests wants python-futures, which is a python2 only program, and | |
8302 | ;; can't be found by python-promise at test time. | |
8303 | (arguments `(#:tests? #f)) | |
8304 | (home-page "https://github.com/syrusakbary/promise") | |
8305 | (synopsis "Promises/A+ implementation for Python") | |
8306 | (description | |
8307 | "Promises/A+ implementation for Python") | |
8308 | (properties `((python2-variant . ,(delay python2-promise)))) | |
8309 | (license license:expat))) | |
8310 | ||
8311 | (define-public python2-promise | |
8312 | (let ((promise (package-with-python2 | |
8313 | (strip-python2-variant python-promise)))) | |
8314 | (package (inherit promise) | |
8315 | (arguments (substitute-keyword-arguments (package-arguments promise) | |
8316 | ((#:tests? _) #t))) | |
8317 | (native-inputs | |
8318 | `(("python2-futures" ,python2-futures) | |
8319 | ("python2-pytest" ,python2-pytest) | |
8320 | ,@(package-native-inputs promise)))))) | |
8321 | ||
8322 | (define-public python-colorama | |
8323 | (package | |
8324 | (name "python-colorama") | |
8325 | (version "0.3.9") | |
8326 | (source | |
8327 | (origin | |
8328 | (method url-fetch) | |
8329 | (uri (pypi-uri "colorama" version)) | |
8330 | (sha256 | |
8331 | (base32 | |
8332 | "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8")))) | |
8333 | (build-system python-build-system) | |
8334 | (synopsis "Colored terminal text rendering for Python") | |
8335 | (description "Colorama is a Python library for rendering colored terminal | |
8336 | text.") | |
8337 | (home-page "https://pypi.python.org/pypi/colorama") | |
8338 | (license license:bsd-3))) | |
8339 | ||
8340 | (define-public python2-colorama | |
8341 | (package-with-python2 python-colorama)) | |
8342 | ||
8343 | (define-public python-rsa | |
8344 | (package | |
8345 | (name "python-rsa") | |
8346 | (version "3.4.2") | |
8347 | (source | |
8348 | (origin | |
8349 | (method url-fetch) | |
8350 | (uri (pypi-uri "rsa" version)) | |
8351 | (sha256 | |
8352 | (base32 | |
8353 | "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5")))) | |
8354 | (build-system python-build-system) | |
8355 | (propagated-inputs | |
8356 | `(("python-pyasn1" ,python-pyasn1))) | |
8357 | (synopsis "Pure-Python RSA implementation") | |
8358 | (description "Python-RSA is a pure-Python RSA implementation. It supports | |
8359 | encryption and decryption, signing and verifying signatures, and key | |
8360 | generation according to PKCS#1 version 1.5. It can be used as a Python | |
8361 | library as well as on the command line.") | |
8362 | (home-page "https://stuvel.eu/rsa") | |
8363 | (license license:asl2.0))) | |
8364 | ||
8365 | (define-public python2-rsa | |
8366 | (package-with-python2 python-rsa)) | |
8367 | ||
8368 | (define-public python-pluggy | |
8369 | (package | |
8370 | (name "python-pluggy") | |
8371 | (version "0.7.1") | |
8372 | (source | |
8373 | (origin | |
8374 | (method url-fetch) | |
8375 | (uri (pypi-uri "pluggy" version)) | |
8376 | (sha256 | |
8377 | (base32 | |
8378 | "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm")))) | |
8379 | (build-system python-build-system) | |
8380 | (native-inputs | |
8381 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
8382 | (synopsis "Plugin and hook calling mechanism for Python") | |
8383 | (description "Pluggy is an extraction of the plugin manager as used by | |
8384 | Pytest but stripped of Pytest specific details.") | |
8385 | (home-page "https://pypi.python.org/pypi/pluggy") | |
8386 | (license license:expat))) | |
8387 | ||
8388 | (define-public python2-pluggy | |
8389 | (package-with-python2 python-pluggy)) | |
8390 | ||
8391 | (define-public python-tox | |
8392 | (package | |
8393 | (name "python-tox") | |
8394 | (version "2.8.1") | |
8395 | (source | |
8396 | (origin | |
8397 | (method url-fetch) | |
8398 | (uri (pypi-uri "tox" version)) | |
8399 | (sha256 | |
8400 | (base32 | |
8401 | "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny")))) | |
8402 | (build-system python-build-system) | |
8403 | (arguments | |
8404 | ;; FIXME: Tests require pytest-timeout, which itself requires | |
8405 | ;; pytest>=2.8.0 for installation. | |
8406 | '(#:tests? #f)) | |
8407 | (propagated-inputs | |
8408 | `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0 | |
8409 | ("python-py" ,python-py) | |
8410 | ("python-virtualenv" ,python-virtualenv))) | |
8411 | (native-inputs | |
8412 | `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout) | |
8413 | ("python-pytest" ,python-pytest) ; >= 2.3.5 | |
8414 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
8415 | (home-page "http://tox.testrun.org/") | |
8416 | (synopsis "Virtualenv-based automation of test activities") | |
8417 | (description "Tox is a generic virtualenv management and test command line | |
8418 | tool. It can be used to check that a package installs correctly with | |
8419 | different Python versions and interpreters, or run tests in each type of | |
8420 | supported environment, or act as a frontend to continuous integration | |
8421 | servers.") | |
8422 | (license license:expat))) | |
8423 | ||
8424 | (define-public python2-tox | |
8425 | (package-with-python2 python-tox)) | |
8426 | ||
8427 | (define-public python-jmespath | |
8428 | (package | |
8429 | (name "python-jmespath") | |
8430 | (version "0.9.3") | |
8431 | (source | |
8432 | (origin | |
8433 | (method url-fetch) | |
8434 | (uri (pypi-uri "jmespath" version)) | |
8435 | (sha256 | |
8436 | (base32 | |
8437 | "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba")))) | |
8438 | (build-system python-build-system) | |
8439 | (native-inputs | |
8440 | `(("python-nose" ,python-nose))) | |
8441 | (synopsis "JSON Matching Expressions") | |
8442 | (description "JMESPath (pronounced “james path”) is a Python library that | |
8443 | allows one to declaratively specify how to extract elements from a JSON | |
8444 | document.") | |
8445 | (home-page "https://github.com/jmespath/jmespath.py") | |
8446 | (license license:expat))) | |
8447 | ||
8448 | (define-public python2-jmespath | |
8449 | (package-with-python2 python-jmespath)) | |
8450 | ||
8451 | (define-public python-botocore | |
8452 | (package | |
7bcf827c RW |
8453 | (name "python-botocore") |
8454 | (version "1.12.149") | |
8455 | (source | |
8456 | (origin | |
8457 | (method url-fetch) | |
8458 | (uri (pypi-uri "botocore" version)) | |
8459 | (sha256 | |
8460 | (base32 | |
8461 | "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf")))) | |
8462 | (build-system python-build-system) | |
8463 | (arguments | |
8464 | ;; FIXME: Many tests are failing. | |
8465 | '(#:tests? #f)) | |
8466 | (propagated-inputs | |
8467 | `(("python-dateutil" ,python-dateutil) | |
8468 | ("python-docutils" ,python-docutils) | |
8469 | ("python-jmespath" ,python-jmespath))) | |
8470 | (native-inputs | |
8471 | `(("python-mock" ,python-mock) | |
8472 | ("python-nose" ,python-nose) | |
8473 | ("behave" ,behave) | |
8474 | ("python-tox" ,python-tox) | |
8475 | ("python-urllib3" ,python-urllib3) | |
8476 | ("python-wheel" ,python-wheel))) | |
8477 | (home-page "https://github.com/boto/botocore") | |
8478 | (synopsis "Low-level interface to AWS") | |
8479 | (description "Botocore is a Python library that provides a low-level | |
44d10b1f | 8480 | interface to the Amazon Web Services (AWS) API.") |
7bcf827c | 8481 | (license license:asl2.0))) |
44d10b1f RW |
8482 | |
8483 | (define-public python2-botocore | |
8484 | (package-with-python2 python-botocore)) | |
8485 | ||
8486 | (define-public python-xdo | |
8487 | (package | |
8488 | (name "python-xdo") | |
8489 | (version "0.3") | |
8490 | (source (origin | |
8491 | (method url-fetch) | |
8492 | (uri (string-append | |
8493 | "http://http.debian.net/debian/pool/main/p/python-xdo/" | |
8494 | "python-xdo_" version ".orig.tar.gz")) | |
8495 | (sha256 | |
8496 | (base32 | |
8497 | "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0")))) | |
8498 | (build-system python-build-system) | |
8499 | (arguments | |
8500 | '(#:phases | |
8501 | (modify-phases %standard-phases | |
8502 | (add-before 'install 'patch-libxdo-path | |
8503 | ;; Hardcode the path of dynamically loaded libxdo library. | |
8504 | (lambda* (#:key inputs #:allow-other-keys) | |
8505 | (let ((libxdo (string-append | |
8506 | (assoc-ref inputs "xdotool") | |
8507 | "/lib/libxdo.so"))) | |
8508 | (substitute* "xdo/_xdo.py" | |
8509 | (("find_library\\(\"xdo\"\\)") | |
8510 | (simple-format #f "\"~a\"" libxdo))) | |
8511 | #t)))) | |
8512 | #:tests? #f)) ; no tests provided | |
8513 | (propagated-inputs | |
8514 | `(("python-six" ,python-six))) | |
8515 | (inputs | |
8516 | `(("xdotool" ,xdotool) | |
8517 | ("libX11" ,libx11))) | |
8518 | (home-page "https://tracker.debian.org/pkg/python-xdo") | |
8519 | (synopsis "Python library for simulating X11 keyboard/mouse input") | |
8520 | (description "Provides bindings to libxdo for manipulating X11 via simulated | |
8521 | input. (Note that this is mostly a legacy library; you may wish to look at | |
8522 | python-xdo for newer bindings.)") | |
8523 | (license license:bsd-3))) | |
8524 | ||
8525 | (define-public python2-xdo | |
8526 | (package-with-python2 python-xdo)) | |
8527 | ||
8528 | (define-public python-mako | |
8529 | (package | |
8530 | (name "python-mako") | |
b2965b26 | 8531 | (version "1.0.10") |
44d10b1f RW |
8532 | (source |
8533 | (origin | |
8534 | (method url-fetch) | |
8535 | (uri (pypi-uri "Mako" version)) | |
8536 | (sha256 | |
8537 | (base32 | |
b2965b26 | 8538 | "0r9rysn19fmrxnzfcn7sg20kjhcrx9qri0my9n5vdzp1g2g92rbi")))) |
44d10b1f RW |
8539 | (build-system python-build-system) |
8540 | (propagated-inputs | |
8541 | `(("python-markupsafe" ,python-markupsafe))) | |
8542 | (native-inputs | |
8543 | `(("python-mock" ,python-mock) | |
8544 | ("python-nose" ,python-nose) | |
8545 | ("python-pytest" ,python-pytest))) | |
7016e620 | 8546 | (home-page "https://www.makotemplates.org/") |
44d10b1f RW |
8547 | (synopsis "Templating language for Python") |
8548 | (description "Mako is a templating language for Python that compiles | |
8549 | templates into Python modules.") | |
8550 | (license license:expat))) | |
8551 | ||
8552 | (define-public python2-mako | |
8553 | (package-with-python2 python-mako)) | |
8554 | ||
8555 | (define-public python-waitress | |
8556 | (package | |
8557 | (name "python-waitress") | |
8558 | (version "1.1.0") | |
8559 | (source | |
8560 | (origin | |
8561 | (method url-fetch) | |
8562 | (uri (pypi-uri "waitress" version)) | |
8563 | (patches (search-patches "python-waitress-fix-tests.patch")) | |
8564 | (sha256 | |
8565 | (base32 | |
8566 | "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k")))) | |
8567 | (build-system python-build-system) | |
8568 | (home-page "https://github.com/Pylons/waitress") | |
8569 | (synopsis "Waitress WSGI server") | |
8570 | (description "Waitress is meant to be a production-quality pure-Python WSGI | |
8571 | server with very acceptable performance.") | |
8572 | (license license:zpl2.1))) | |
8573 | ||
8574 | (define-public python2-waitress | |
8575 | (package-with-python2 python-waitress)) | |
8576 | ||
8577 | (define-public python-pyquery | |
8578 | (package | |
8579 | (name "python-pyquery") | |
8580 | (version "1.2.17") | |
8581 | (source | |
8582 | (origin | |
8583 | (method url-fetch) | |
8584 | (uri (pypi-uri "pyquery" version)) | |
8585 | (sha256 | |
8586 | (base32 | |
8587 | "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a")))) | |
8588 | (build-system python-build-system) | |
8589 | (native-inputs | |
8590 | `(("python-webob" ,python-webob) | |
8591 | ("python-webtest" ,python-webtest))) | |
8592 | (propagated-inputs | |
8593 | `(("python-lxml" ,python-lxml) | |
8594 | ("python-cssselect" ,python-cssselect))) | |
8595 | (home-page "https://github.com/gawel/pyquery") | |
8596 | (synopsis "Make jQuery-like queries on xml documents") | |
8597 | (description "pyquery allows you to make jQuery queries on xml documents. | |
8598 | The API is as much as possible the similar to jQuery. pyquery uses lxml for | |
8599 | fast xml and html manipulation.") | |
8600 | (license license:bsd-3))) | |
8601 | ||
44d10b1f RW |
8602 | (define-public python-anyjson |
8603 | (package | |
8604 | (name "python-anyjson") | |
8605 | (version "0.3.3") | |
8606 | (source | |
8607 | (origin | |
8608 | (method url-fetch) | |
8609 | (uri (pypi-uri "anyjson" version)) | |
8610 | (sha256 | |
8611 | (base32 | |
8612 | "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p")))) | |
8613 | (build-system python-build-system) | |
8614 | (arguments | |
8615 | `(;; We could possibly get tests working, but on Python 3 it's not so easy. | |
8616 | ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or | |
8617 | ;; whatever) so this transformation needs to be done before the tests | |
8618 | ;; can be run. Maybe we could add a build step to transform beforehand | |
8619 | ;; but it could be annoying/difficult. | |
8620 | ;; We can enable tests for the Python 2 version, though, and do below. | |
8621 | #:tests? #f)) | |
8622 | (home-page "https://bitbucket.org/runeh/anyjson/") | |
8623 | (synopsis | |
8624 | "Wraps best available JSON implementation in a common interface") | |
8625 | (description | |
8626 | "Anyjson loads whichever is the fastest JSON module installed | |
8627 | and provides a uniform API regardless of which JSON implementation is used.") | |
8628 | (license license:bsd-3) | |
8629 | (properties `((python2-variant . ,(delay python2-anyjson)))))) | |
8630 | ||
8631 | (define-public python2-anyjson | |
8632 | (let ((anyjson (package-with-python2 | |
8633 | (strip-python2-variant python-anyjson)))) | |
8634 | (package | |
8635 | (inherit anyjson) | |
8636 | (arguments `(;; Unlike the python 3 variant, we do run tests. See above! | |
8637 | #:tests? #t | |
8638 | ,@(package-arguments anyjson))) | |
8639 | (native-inputs `(("python2-nose" ,python2-nose)))))) | |
8640 | ||
8641 | (define-public python-amqp | |
8642 | (package | |
8643 | (name "python-amqp") | |
8644 | (version "2.3.2") | |
8645 | (source | |
8646 | (origin | |
8647 | (method url-fetch) | |
8648 | (uri (pypi-uri "amqp" version)) | |
8649 | (sha256 | |
8650 | (base32 | |
8651 | "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87")))) | |
8652 | (build-system python-build-system) | |
8653 | (native-inputs | |
8654 | `(("python-case" ,python-case) | |
8655 | ("python-pytest-sugar" ,python-pytest-sugar) | |
8656 | ("python-mock" ,python-mock))) | |
8657 | (propagated-inputs | |
8658 | `(("python-vine" ,python-vine))) | |
8659 | (home-page "https://github.com/celery/py-amqp") | |
8660 | (synopsis | |
8661 | "Low-level AMQP client for Python (fork of amqplib)") | |
8662 | (description | |
8663 | "This is a fork of amqplib which was originally written by Barry Pederson. | |
8664 | It is maintained by the Celery project, and used by kombu as a pure python | |
8665 | alternative when librabbitmq is not available.") | |
8666 | (license license:lgpl2.1+) | |
8667 | (properties `((python2-variant . ,(delay python2-amqp)))))) | |
8668 | ||
8669 | (define-public python2-amqp | |
8670 | (let ((amqp (package-with-python2 | |
8671 | (strip-python2-variant python-amqp)))) | |
8672 | (package | |
8673 | (inherit amqp) | |
8674 | (arguments `(;; Tries to run coverage tests with nose-cover3, which seems | |
8675 | ;; unmaintained. Weirdly, does not do this on the python 3 | |
8676 | ;; version? | |
8677 | #:tests? #f | |
8678 | ,@(package-arguments amqp)))))) | |
8679 | ||
8680 | (define-public python-txamqp | |
8681 | (package | |
8682 | (name "python-txamqp") | |
8683 | (version "0.8.2") | |
8684 | (source | |
8685 | (origin | |
8686 | (method url-fetch) | |
8687 | (uri (pypi-uri "txAMQP" version)) | |
8688 | (sha256 | |
8689 | (base32 | |
8690 | "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4")))) | |
8691 | (build-system python-build-system) | |
8692 | (propagated-inputs | |
8693 | `(("python-six" ,python-six) | |
8694 | ("python-twisted" ,python-twisted))) | |
8695 | (home-page "https://github.com/txamqp/txamqp") | |
8696 | (synopsis "Communicate with AMQP peers and brokers using Twisted") | |
8697 | (description | |
8698 | "This package provides a Python library for communicating with AMQP peers | |
8699 | and brokers using the asynchronous networking framework Twisted. It contains | |
8700 | all the necessary code to connect, send and receive messages to/from an | |
8701 | AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It | |
8702 | also includes support for using Thrift RPC over AMQP in Twisted | |
8703 | applications.") | |
8704 | (license license:asl2.0))) | |
8705 | ||
8706 | (define-public python2-txamqp | |
8707 | (package-with-python2 python-txamqp)) | |
8708 | ||
8709 | (define-public python-kombu | |
8710 | (package | |
8711 | (name "python-kombu") | |
8712 | (version "4.2.2") | |
8713 | (source | |
8714 | (origin | |
8715 | (method url-fetch) | |
8716 | (uri (pypi-uri "kombu" version)) | |
8717 | (sha256 | |
8718 | (base32 | |
8719 | "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj")))) | |
8720 | (build-system python-build-system) | |
8721 | (native-inputs | |
8722 | `(("python-mock" ,python-mock) | |
8723 | ("python-case" ,python-case) | |
8724 | ("python-pyro4" ,python-pyro4) | |
8725 | ("python-pytest-sugar" ,python-pytest-sugar) | |
8726 | ("python-pytz" ,python-pytz))) | |
8727 | (propagated-inputs | |
8728 | `(("python-anyjson" ,python-anyjson) | |
8729 | ("python-amqp" ,python-amqp) | |
8730 | ("python-redis" ,python-redis))) | |
8731 | (home-page "https://kombu.readthedocs.io") | |
8732 | (synopsis "Message passing library for Python") | |
8733 | (description "The aim of Kombu is to make messaging in Python as easy as | |
8734 | possible by providing an idiomatic high-level interface for the AMQ protocol, | |
8735 | and also provide proven and tested solutions to common messaging problems. | |
8736 | AMQP is the Advanced Message Queuing Protocol, an open standard protocol for | |
8737 | message orientation, queuing, routing, reliability and security, for which the | |
8738 | RabbitMQ messaging server is the most popular implementation.") | |
8739 | (license license:bsd-3) | |
8740 | (properties `((python2-variant . ,(delay python2-kombu)))))) | |
8741 | ||
8742 | (define-public python2-kombu | |
8743 | (let ((kombu (package-with-python2 | |
8744 | (strip-python2-variant python-kombu)))) | |
8745 | (package | |
8746 | (inherit kombu) | |
8747 | (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2. | |
8748 | ;; It works fine on the python3 variant. | |
8749 | #:tests? #f | |
8750 | ,@(package-arguments kombu))) | |
8751 | (native-inputs `(("python2-unittest2" ,python2-unittest2) | |
8752 | ,@(package-native-inputs kombu)))))) | |
8753 | ||
8754 | (define-public python-billiard | |
8755 | (package | |
8756 | (name "python-billiard") | |
8757 | (version "3.5.0.5") | |
8758 | (source | |
8759 | (origin | |
8760 | (method url-fetch) | |
8761 | (uri (pypi-uri "billiard" version)) | |
8762 | (sha256 | |
8763 | (base32 | |
8764 | "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2")))) | |
8765 | (build-system python-build-system) | |
8766 | (native-inputs | |
8767 | `(("python-case" ,python-case) | |
8768 | ("python-pytest" ,python-pytest))) | |
8769 | (home-page "https://github.com/celery/billiard") | |
8770 | (synopsis | |
8771 | "Python multiprocessing fork with improvements and bugfixes") | |
8772 | (description | |
8773 | "Billiard is a fork of the Python 2.7 multiprocessing package. The | |
8774 | multiprocessing package itself is a renamed and updated version of R Oudkerk's | |
8775 | pyprocessing package. This standalone variant is intended to be compatible with | |
8776 | Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.") | |
8777 | (license license:bsd-3) | |
8778 | (properties `((python2-variant . ,(delay python2-billiard)))))) | |
8779 | ||
8780 | (define-public python2-billiard | |
8781 | (let ((billiard (package-with-python2 | |
8782 | (strip-python2-variant python-billiard)))) | |
8783 | (package | |
8784 | (inherit billiard) | |
8785 | (native-inputs `(("python2-unittest2" ,python2-unittest2) | |
8786 | ("python2-mock" ,python2-mock) | |
8787 | ,@(package-native-inputs billiard)))))) | |
8788 | ||
8789 | (define-public python-celery | |
8790 | (package | |
8791 | (name "python-celery") | |
8792 | (version "4.2.1") | |
8793 | (source | |
8794 | (origin | |
8795 | (method url-fetch) | |
8796 | (uri (pypi-uri "celery" version)) | |
8797 | (sha256 | |
8798 | (base32 | |
8799 | "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp")))) | |
8800 | (build-system python-build-system) | |
8801 | (arguments | |
8802 | '(;; TODO The tests fail with Python 3.7 | |
8803 | ;; https://github.com/celery/celery/issues/4849 | |
8804 | #:tests? #f | |
8805 | #:phases | |
8806 | (modify-phases %standard-phases | |
8807 | (add-after 'unpack 'patch-requirements | |
8808 | (lambda _ | |
8809 | (substitute* "requirements/test.txt" | |
8810 | (("pytest>=3\\.0,<3\\.3") | |
8811 | "pytest>=3.0")) | |
8812 | #t))))) | |
8813 | (native-inputs | |
8814 | `(("python-case" ,python-case) | |
8815 | ("python-pytest" ,python-pytest))) | |
8816 | (propagated-inputs | |
8817 | `(("python-pytz" ,python-pytz) | |
8818 | ("python-billiard" ,python-billiard) | |
8819 | ("python-kombu" ,python-kombu))) | |
8820 | (home-page "https://celeryproject.org") | |
8821 | (synopsis "Distributed Task Queue") | |
8822 | (description "Celery is an asynchronous task queue/job queue based on | |
8823 | distributed message passing. It is focused on real-time operation, but | |
8824 | supports scheduling as well. The execution units, called tasks, are executed | |
8825 | concurrently on a single or more worker servers using multiprocessing, | |
8826 | Eventlet, or gevent. Tasks can execute asynchronously (in the background) or | |
8827 | synchronously (wait until ready).") | |
8828 | (license license:bsd-3) | |
8829 | (properties `((python2-variant . ,(delay python2-celery)))))) | |
8830 | ||
8831 | (define-public python2-celery | |
8832 | (let ((celery (package-with-python2 | |
8833 | (strip-python2-variant python-celery)))) | |
8834 | (package | |
8835 | (inherit celery) | |
8836 | (native-inputs `(("python2-unittest2" ,python2-unittest2) | |
8837 | ("python2-mock" ,python2-mock) | |
8838 | ,@(package-native-inputs celery)))))) | |
8839 | ||
8840 | (define-public python-translitcodec | |
8841 | (package | |
8842 | (name "python-translitcodec") | |
8843 | (version "0.4.0") | |
8844 | (source | |
8845 | (origin | |
8846 | (method url-fetch) | |
8847 | (uri (pypi-uri "translitcodec" version)) | |
8848 | (sha256 | |
8849 | (base32 | |
8850 | "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki")))) | |
8851 | (build-system python-build-system) | |
8852 | (arguments | |
8853 | `(#:tests? #f)) ; no tests provided | |
8854 | (home-page | |
8855 | "https://github.com/claudep/translitcodec") | |
8856 | (synopsis | |
8857 | "Unicode to 8-bit charset transliteration codec") | |
8858 | (description | |
8859 | "This package contains codecs for transliterating ISO 10646 texts into | |
8860 | best-effort representations using smaller coded character sets (ASCII, | |
8861 | ISO 8859, etc.).") | |
8862 | (license license:expat))) | |
8863 | ||
8864 | (define-public python2-translitcodec | |
8865 | (package-with-python2 python-translitcodec)) | |
8866 | ||
8867 | (define-public python-editor | |
8868 | (package | |
8869 | (name "python-editor") | |
8870 | (version "0.5") | |
8871 | (source | |
8872 | (origin | |
8873 | (method url-fetch) | |
8874 | (uri (pypi-uri "python-editor" version)) | |
8875 | (sha256 | |
8876 | (base32 | |
8877 | "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n")))) | |
8878 | (build-system python-build-system) | |
8879 | (home-page | |
8880 | "https://github.com/fmoo/python-editor") | |
8881 | (synopsis | |
8882 | "Programmatically open an editor, capture the result") | |
8883 | (description | |
8884 | "python-editor is a library that provides the editor module for | |
8885 | programmatically interfacing with your system's $EDITOR.") | |
8886 | (license license:asl2.0))) | |
8887 | ||
8888 | (define-public python2-editor | |
8889 | (package-with-python2 python-editor)) | |
8890 | ||
44d10b1f RW |
8891 | (define-public python-vobject |
8892 | (package | |
8893 | (name "python-vobject") | |
8894 | (version "0.9.5") | |
8895 | (source (origin | |
8896 | (method url-fetch) | |
8897 | (uri (pypi-uri "vobject" version)) | |
8898 | (sha256 | |
8899 | (base32 | |
8900 | "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg")))) | |
8901 | (build-system python-build-system) | |
8902 | (arguments | |
8903 | '(;; The test suite relies on some non-portable Windows interfaces. | |
8904 | #:tests? #f)) | |
8905 | (propagated-inputs | |
8906 | `(("python-dateutil" ,python-dateutil) | |
8907 | ("python-pyicu" ,python-pyicu))) | |
8908 | (synopsis "Parse and generate vCard and vCalendar files") | |
8909 | (description "Vobject is intended to be a full featured Python package for | |
8910 | parsing and generating vCard and vCalendar files. Currently, iCalendar files | |
8911 | are supported and well tested. vCard 3.0 files are supported, and all data | |
8912 | should be imported, but only a few components are understood in a sophisticated | |
8913 | way.") | |
8914 | (home-page "http://eventable.github.io/vobject/") | |
8915 | (license license:asl2.0))) | |
8916 | ||
8917 | (define-public python2-vobject | |
8918 | (package-with-python2 python-vobject)) | |
8919 | ||
8920 | (define-public python-munkres | |
8921 | (package | |
8922 | (name "python-munkres") | |
8923 | (version "1.0.8") | |
8924 | (source (origin | |
8925 | (method url-fetch) | |
8926 | (uri (pypi-uri "munkres" version)) | |
8927 | (sha256 | |
8928 | (base32 | |
8929 | "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq")))) | |
8930 | (build-system python-build-system) | |
8931 | (arguments | |
8932 | '(#:tests? #f)) ; no test suite | |
8933 | (home-page "http://software.clapper.org/munkres/") | |
8934 | (synopsis "Implementation of the Munkres algorithm") | |
8935 | (description "The Munkres module provides an implementation of the Munkres | |
8936 | algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), | |
8937 | useful for solving the Assignment Problem.") | |
8938 | (license license:bsd-3))) | |
8939 | ||
8940 | (define-public python2-munkres | |
8941 | (package-with-python2 python-munkres)) | |
8942 | ||
8943 | (define-public python-whoosh | |
8944 | (package | |
8945 | (name "python-whoosh") | |
8946 | (version "2.7.4") | |
8947 | (source | |
8948 | (origin | |
8949 | (method url-fetch) | |
8950 | (uri (pypi-uri "Whoosh" version)) | |
8951 | (sha256 | |
8952 | (base32 | |
8953 | "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw")))) | |
8954 | (build-system python-build-system) | |
8955 | (native-inputs | |
8956 | `(("python-pytest" ,python-pytest))) | |
8957 | (home-page "https://bitbucket.org/mchaput/whoosh") | |
8958 | (synopsis "Full text indexing, search, and spell checking library") | |
8959 | (description | |
8960 | "Whoosh is a fast, pure-Python full text indexing, search, and spell | |
8961 | checking library.") | |
8962 | (license license:bsd-2))) | |
8963 | ||
8964 | (define-public python2-whoosh | |
8965 | (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh)))) | |
8966 | (package (inherit whoosh) | |
8967 | (propagated-inputs | |
8968 | `(("python2-backport-ssl-match-hostname" | |
8969 | ,python2-backport-ssl-match-hostname) | |
8970 | ,@(package-propagated-inputs whoosh)))))) | |
8971 | ||
8972 | (define-public python-pathlib | |
8973 | (package | |
8974 | (name "python-pathlib") | |
8975 | (version "1.0.1") | |
8976 | (source (origin | |
8977 | (method url-fetch) | |
8978 | (uri (pypi-uri "pathlib" version)) | |
8979 | (sha256 | |
8980 | (base32 | |
8981 | "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39")))) | |
8982 | (build-system python-build-system) | |
8983 | ;; The tests depend on the internal "test" module, which does not provide | |
8984 | ;; a stable interface. | |
8985 | (arguments `(#:tests? #f)) | |
8986 | (home-page "https://pathlib.readthedocs.org/") | |
8987 | (synopsis "Object-oriented file system paths") | |
8988 | (description "Pathlib offers a set of classes to handle file system paths. | |
8989 | It offers the following advantages over using string objects: | |
8990 | ||
8991 | @enumerate | |
8992 | @item No more cumbersome use of os and os.path functions. Everything can | |
8993 | be done easily through operators, attribute accesses, and method calls. | |
8994 | @item Embodies the semantics of different path types. For example, | |
8995 | comparing Windows paths ignores casing. | |
8996 | @item Well-defined semantics, eliminating any inconsistencies or | |
8997 | ambiguities (forward vs. backward slashes, etc.). | |
8998 | @end enumerate | |
8999 | ||
9000 | Note: In Python 3.4, pathlib is now part of the standard library. For other | |
9001 | Python versions please consider python-pathlib2 instead, which tracks the | |
9002 | standard library module. This module (python-pathlib) isn't maintained | |
9003 | anymore.") | |
9004 | (license license:expat))) | |
9005 | ||
9006 | (define-public python2-pathlib | |
9007 | (package-with-python2 python-pathlib)) | |
9008 | ||
9009 | (define-public python2-pathlib2 | |
9010 | (package | |
9011 | (name "python2-pathlib2") | |
9012 | (version "2.3.2") | |
9013 | (source (origin | |
9014 | (method url-fetch) | |
9015 | (uri (pypi-uri "pathlib2" version)) | |
9016 | (sha256 | |
9017 | (base32 | |
9018 | "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf")))) | |
9019 | (build-system python-build-system) | |
9020 | ;; We only need the the Python 2 variant, since for Python 3 our minimum | |
9021 | ;; version is 3.4 which already includes this package as part of the | |
9022 | ;; standard library. | |
9023 | (arguments | |
9024 | `(#:python ,python-2)) | |
9025 | (propagated-inputs | |
9026 | `(("python2-scandir" ,python2-scandir) | |
9027 | ("python2-six" ,python2-six))) | |
9028 | (home-page "https://pypi.python.org/pypi/pathlib2/") | |
9029 | (synopsis "Object-oriented file system paths - backport of standard | |
9030 | pathlib module") | |
9031 | (description "The goal of pathlib2 is to provide a backport of standard | |
9032 | pathlib module which tracks the standard library module, so all the newest | |
9033 | features of the standard pathlib can be used also on older Python versions. | |
9034 | ||
9035 | Pathlib offers a set of classes to handle file system paths. It offers the | |
9036 | following advantages over using string objects: | |
9037 | ||
9038 | @enumerate | |
9039 | @item No more cumbersome use of os and os.path functions. Everything can | |
9040 | be done easily through operators, attribute accesses, and method calls. | |
9041 | @item Embodies the semantics of different path types. For example, | |
9042 | comparing Windows paths ignores casing. | |
9043 | @item Well-defined semantics, eliminating any inconsistencies or | |
9044 | ambiguities (forward vs. backward slashes, etc.). | |
9045 | @end enumerate") | |
9046 | (license license:expat))) | |
9047 | ||
9048 | (define-public python2-pathlib2-bootstrap | |
9049 | (hidden-package | |
9050 | (package | |
9051 | (inherit python2-pathlib2) | |
9052 | (name "python2-pathlib2-bootstrap") | |
9053 | (propagated-inputs | |
9054 | `(("python2-scandir" ,python2-scandir) | |
9055 | ("python2-six" ,python2-six-bootstrap)))))) | |
9056 | ||
9057 | (define-public python-jellyfish | |
9058 | (package | |
9059 | (name "python-jellyfish") | |
9060 | (version "0.5.6") | |
9061 | (source (origin | |
9062 | (method url-fetch) | |
9063 | (uri (pypi-uri "jellyfish" version)) | |
9064 | (sha256 | |
9065 | (base32 | |
9066 | "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8")))) | |
9067 | (build-system python-build-system) | |
9068 | (native-inputs | |
9069 | `(("python-pytest" ,python-pytest))) | |
9070 | (home-page "https://github.com/jamesturk/jellyfish") | |
9071 | (synopsis "Approximate and phonetic matching of strings") | |
9072 | (description "Jellyfish uses a variety of string comparison and phonetic | |
9073 | encoding algorithms to do fuzzy string matching.") | |
9074 | (license license:bsd-2) | |
9075 | (properties `((python2-variant . ,(delay python2-jellyfish)))))) | |
9076 | ||
9077 | (define-public python2-jellyfish | |
9078 | (let ((jellyfish (package-with-python2 | |
9079 | (strip-python2-variant python-jellyfish)))) | |
9080 | (package (inherit jellyfish) | |
9081 | (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv) | |
9082 | ,@(package-native-inputs jellyfish)))))) | |
9083 | ||
9084 | (define-public python2-unicodecsv | |
9085 | (package | |
9086 | (name "python2-unicodecsv") | |
9087 | (version "0.14.1") | |
9088 | (source (origin | |
9089 | (method url-fetch) | |
9090 | ;; The test suite is not included in the PyPi release. | |
9091 | ;; https://github.com/jdunck/python-unicodecsv/issues/19 | |
9092 | (uri (string-append "https://github.com/jdunck/python-unicodecsv/" | |
9093 | "archive/" version ".tar.gz")) | |
9094 | (file-name (string-append name "-" version ".tar.gz")) | |
9095 | (sha256 | |
9096 | (base32 | |
9097 | "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w")))) | |
9098 | (build-system python-build-system) | |
9099 | (arguments | |
9100 | `(;; It supports Python 3, but Python 3 can already do Unicode CSV. | |
9101 | #:python ,python-2)) | |
9102 | (native-inputs | |
9103 | `(("python2-unittest2" ,python2-unittest2))) | |
9104 | (home-page "https://github.com/jdunck/python-unicodecsv") | |
9105 | (synopsis "Unicode CSV module for Python 2") | |
9106 | (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV | |
9107 | module, adding support for Unicode strings.") | |
9108 | (license license:bsd-2))) | |
9109 | ||
9110 | (define-public python-rarfile | |
9111 | (package | |
9112 | (name "python-rarfile") | |
9113 | (version "2.8") | |
9114 | (source (origin | |
9115 | (method url-fetch) | |
9116 | (uri (pypi-uri "rarfile" version)) | |
9117 | (sha256 | |
9118 | (base32 | |
9119 | "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra")))) | |
9120 | (build-system python-build-system) | |
9121 | (arguments | |
9122 | '(#:phases | |
9123 | (modify-phases %standard-phases | |
9124 | (replace 'check | |
9125 | ;; Many tests fail, but the installation proceeds. | |
e59dd341 | 9126 | (lambda _ (invoke "make" "-C" "test" "test")))))) |
44d10b1f RW |
9127 | (native-inputs |
9128 | `(("which" ,which))) ; required for tests | |
9129 | (propagated-inputs | |
9130 | `(("libarchive" ,libarchive))) | |
9131 | (home-page "https://github.com/markokr/rarfile") | |
9132 | (synopsis "RAR archive reader for Python") | |
9133 | (description "This is Python module for RAR archive reading. The interface | |
9134 | is made as zipfile like as possible.") | |
9135 | (license license:isc))) | |
9136 | ||
9137 | (define-public python2-rarfile | |
9138 | (package-with-python2 python-rarfile)) | |
9139 | ||
9140 | (define-public python-magic | |
9141 | (package | |
9142 | (name "python-magic") | |
9143 | (version "0.4.15") | |
9144 | (source | |
9145 | (origin | |
9146 | (method url-fetch) | |
9147 | (uri (pypi-uri "python-magic" version)) | |
9148 | (sha256 | |
9149 | (base32 | |
9150 | "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk")) | |
9151 | (file-name (string-append name "-" version "-checkout")))) | |
9152 | (build-system python-build-system) | |
9153 | (arguments | |
9154 | ;; The tests are unreliable, so don't run them. The tests fail | |
9155 | ;; under Python3 because they were written for Python2 and | |
9156 | ;; contain import statements that do not work in Python3. One of | |
9157 | ;; the tests fails under Python2 because its assertions are | |
9158 | ;; overly stringent; it relies on comparing output strings which | |
9159 | ;; are brittle and can change depending on the version of | |
9160 | ;; libmagic being used and the system on which the test is | |
9161 | ;; running. In my case, under GuixSD 0.10.0, only one test | |
9162 | ;; failed, and it seems to have failed only because the version | |
9163 | ;; of libmagic that is packaged in Guix outputs a slightly | |
9164 | ;; different (but not wrong) string than the one that the test | |
9165 | ;; expected. | |
9166 | '(#:tests? #f | |
9167 | #:phases (modify-phases %standard-phases | |
9168 | ;; Replace a specific method call with a hard-coded | |
9169 | ;; path to the necessary libmagic.so file in the | |
9170 | ;; store. If we don't do this, then the method call | |
9171 | ;; will fail to find the libmagic.so file, which in | |
9172 | ;; turn will cause any application using | |
9173 | ;; python-magic to fail. | |
9174 | (add-before 'build 'hard-code-path-to-libmagic | |
9175 | (lambda* (#:key inputs #:allow-other-keys) | |
9176 | (let ((file (assoc-ref inputs "file"))) | |
9177 | (substitute* "magic.py" | |
9178 | (("ctypes.util.find_library\\('magic'\\)") | |
9179 | (string-append "'" file "/lib/libmagic.so'"))) | |
9180 | #t))) | |
9181 | (add-before 'install 'disable-egg-compression | |
9182 | (lambda _ | |
9183 | (let ((port (open-file "setup.cfg" "a"))) | |
9184 | (display "\n[easy_install]\nzip_ok = 0\n" | |
9185 | port) | |
9186 | (close-port port) | |
9187 | #t)))))) | |
9188 | (inputs | |
9189 | ;; python-magic needs to be able to find libmagic.so. | |
9190 | `(("file" ,file))) | |
9191 | (home-page | |
9192 | "https://github.com/ahupp/python-magic") | |
9193 | (synopsis | |
9194 | "File type identification using libmagic") | |
9195 | (description | |
9196 | "This module uses ctypes to access the libmagic file type | |
9197 | identification library. It makes use of the local magic database and | |
9198 | supports both textual and MIME-type output. Note that this module and | |
9199 | the python-file module both provide a \"magic.py\" file; these two | |
9200 | modules, which are different and were developed separately, both serve | |
9201 | the same purpose: to provide Python bindings for libmagic.") | |
9202 | (license license:expat))) | |
9203 | ||
9204 | (define-public python2-magic | |
9205 | (package-with-python2 python-magic)) | |
9206 | ||
9207 | (define-public python2-s3cmd | |
9208 | (package | |
9209 | (name "python2-s3cmd") | |
9210 | (version "1.6.1") | |
9211 | (source | |
9212 | (origin | |
9213 | (method url-fetch) | |
9214 | (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/" | |
9215 | "s3cmd-" version ".tar.gz")) | |
9216 | (sha256 | |
9217 | (base32 | |
9218 | "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6")))) | |
9219 | (build-system python-build-system) | |
9220 | (arguments | |
9221 | ;; s3cmd is written for python2 only and contains no tests. | |
9222 | `(#:python ,python-2 | |
9223 | #:tests? #f)) | |
9224 | (propagated-inputs | |
9225 | `(("python2-dateutil" ,python2-dateutil) | |
9226 | ;; The python-file package also provides a magic.py module. | |
9227 | ;; This is an unfortunate state of affairs; however, s3cmd | |
9228 | ;; fails to install if it cannot find specifically the | |
9229 | ;; python-magic package. Thus we include it, instead of using | |
9230 | ;; python-file. Ironically, s3cmd sometimes works better | |
9231 | ;; without libmagic bindings at all: | |
9232 | ;; https://github.com/s3tools/s3cmd/issues/198 | |
9233 | ("python2-magic" ,python2-magic))) | |
9234 | (home-page "http://s3tools.org/s3cmd") | |
9235 | (synopsis "Command line tool for S3-compatible storage services") | |
9236 | (description | |
9237 | "S3cmd is a command line tool for uploading, retrieving and managing data | |
9238 | in storage services that are compatible with the Amazon Simple Storage | |
9239 | Service (S3) protocol, including S3 itself. It supports rsync-like backup, | |
9240 | GnuPG encryption, and more. It also supports management of Amazon's | |
9241 | CloudFront content delivery network.") | |
9242 | (license license:gpl2+))) | |
9243 | ||
9244 | (define-public python-pkgconfig | |
9245 | (package | |
9246 | (name "python-pkgconfig") | |
9247 | (version "1.3.1") | |
9248 | (source | |
9249 | (origin | |
9250 | (method url-fetch) | |
9251 | (uri (pypi-uri "pkgconfig" version)) | |
9252 | (sha256 | |
9253 | (base32 | |
9254 | "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb")))) | |
9255 | (build-system python-build-system) | |
9256 | (native-inputs | |
9257 | `(("python-nose" ,python-nose))) | |
9258 | (inputs | |
9259 | `(("pkg-config" ,pkg-config))) | |
9260 | (arguments | |
9261 | `(#:phases | |
9262 | (modify-phases %standard-phases | |
9263 | (add-before 'build 'patch | |
9264 | ;; Hard-code the path to pkg-config. | |
9265 | (lambda _ | |
9266 | (substitute* "pkgconfig/pkgconfig.py" | |
9267 | (("cmd = 'pkg-config") | |
9268 | (string-append "cmd = '" (which "pkg-config")))) | |
9269 | #t)) | |
9270 | (replace 'check | |
9271 | (lambda _ | |
9272 | (invoke "nosetests" "test.py")))))) | |
9273 | (home-page "https://github.com/matze/pkgconfig") | |
9274 | (synopsis "Python interface for pkg-config") | |
9275 | (description "This module provides a Python interface to pkg-config. It | |
9276 | can be used to find all pkg-config packages, check if a package exists, | |
9277 | check if a package meets certain version requirements, query CFLAGS and | |
9278 | LDFLAGS and parse the output to build extensions with setup.py.") | |
9279 | (license license:expat))) | |
9280 | ||
9281 | (define-public python2-pkgconfig | |
9282 | (package-with-python2 python-pkgconfig)) | |
9283 | ||
9284 | (define-public python-bz2file | |
9285 | (package | |
9286 | (name "python-bz2file") | |
9287 | (version "0.98") | |
9288 | (source | |
9289 | (origin | |
9290 | (method url-fetch) | |
9291 | (uri (pypi-uri "bz2file" version)) | |
9292 | (sha256 | |
9293 | (base32 | |
9294 | "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4")))) | |
9295 | (build-system python-build-system) | |
9296 | (arguments | |
9297 | `(#:tests? #f)) ; Tests use deprecated python modules. | |
9298 | (home-page "https://github.com/nvawda/bz2file") | |
9299 | (synopsis "Read and write bzip2-compressed files") | |
9300 | (description | |
9301 | "Bz2file is a Python library for reading and writing bzip2-compressed | |
9302 | files. It contains a drop-in replacement for the I/O interface in the | |
9303 | standard library's @code{bz2} module, including features from the latest | |
9304 | development version of CPython that are not available in older releases.") | |
9305 | (license license:asl2.0))) | |
9306 | ||
9307 | (define-public python2-bz2file | |
9308 | (package-with-python2 python-bz2file)) | |
9309 | ||
9310 | (define-public python-future | |
9311 | (package | |
9312 | (name "python-future") | |
d5d54030 | 9313 | (version "0.17.1") |
44d10b1f RW |
9314 | (source |
9315 | (origin | |
9316 | (method url-fetch) | |
9317 | (uri (pypi-uri "future" version)) | |
9318 | (sha256 | |
9319 | (base32 | |
d5d54030 | 9320 | "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137")))) |
44d10b1f RW |
9321 | (build-system python-build-system) |
9322 | ;; Many tests connect to the network or are otherwise flawed. | |
9323 | ;; https://github.com/PythonCharmers/python-future/issues/210 | |
9324 | (arguments | |
9325 | `(#:tests? #f)) | |
9326 | (home-page "http://python-future.org") | |
9327 | (synopsis "Single-source support for Python 3 and 2") | |
9328 | (description | |
9329 | "@code{python-future} is the missing compatibility layer between Python 2 and | |
9330 | Python 3. It allows you to use a single, clean Python 3.x-compatible codebase | |
9331 | to support both Python 2 and Python 3 with minimal overhead.") | |
9332 | (license license:expat))) | |
9333 | ||
9334 | (define-public python2-future | |
9335 | (package-with-python2 python-future)) | |
9336 | ||
9337 | (define-public python-cysignals | |
9338 | (package | |
9339 | (name "python-cysignals") | |
8e3e51df | 9340 | (version "1.9.0") |
44d10b1f RW |
9341 | (source |
9342 | (origin | |
9343 | (method url-fetch) | |
8e3e51df | 9344 | (uri (pypi-uri "cysignals" version)) |
44d10b1f RW |
9345 | (sha256 |
9346 | (base32 | |
8e3e51df | 9347 | "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2")))) |
44d10b1f RW |
9348 | (build-system python-build-system) |
9349 | (native-inputs | |
9350 | `(("python-cython" ,python-cython) | |
9351 | ("python-sphinx" ,python-sphinx))) | |
9352 | (inputs | |
9353 | `(("pari-gp" ,pari-gp))) | |
9354 | (arguments | |
9355 | `(#:modules ((guix build python-build-system) | |
9356 | ((guix build gnu-build-system) #:prefix gnu:) | |
9357 | (guix build utils)) | |
9358 | ;; FIXME: Tests are executed after installation and currently fail | |
9359 | ;; when not installing into standard locations; the author is working | |
9360 | ;; on a fix. | |
9361 | #:tests? #f | |
9362 | #:phases | |
9363 | (modify-phases %standard-phases | |
9364 | (add-before | |
9365 | 'build 'configure | |
9366 | (assoc-ref gnu:%standard-phases 'configure))))) | |
9367 | (home-page | |
9368 | "https://github.com/sagemath/cysignals") | |
9369 | (synopsis | |
9370 | "Handling of interrupts and signals for Cython") | |
9371 | (description | |
9372 | "The cysignals package provides mechanisms to handle interrupts (and | |
9373 | other signals and errors) in Cython code, using two related approaches, | |
9374 | for mixed Cython/Python code or external C libraries and pure Cython code, | |
9375 | respectively.") | |
9376 | (license license:lgpl3+))) | |
9377 | ||
9378 | (define-public python2-cysignals | |
9379 | (package-with-python2 python-cysignals)) | |
9380 | ||
9381 | (define-public python2-shedskin | |
9382 | (package | |
9383 | (name "python2-shedskin") | |
9384 | (version "0.9.4") | |
9385 | (source | |
9386 | (origin | |
9387 | (method url-fetch) | |
9388 | (uri (string-append "https://github.com/shedskin/shedskin/" | |
9389 | "releases/download/v" version | |
9390 | "/shedskin-" version ".tgz")) | |
9391 | (sha256 | |
9392 | (base32 | |
9393 | "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41")))) | |
9394 | (build-system python-build-system) | |
9395 | (arguments | |
9396 | `(#:python ,python-2 | |
9397 | #:phases (modify-phases %standard-phases | |
9398 | (add-after 'unpack 'fix-resulting-include-libs | |
9399 | (lambda* (#:key inputs #:allow-other-keys) | |
9400 | (let ((libgc (assoc-ref inputs "libgc")) | |
9401 | (pcre (assoc-ref inputs "pcre"))) | |
9402 | (substitute* "shedskin/makefile.py" | |
9403 | (("variable == 'CCFLAGS':[ ]*") | |
9404 | (string-append "variable == 'CCFLAGS':\n" | |
9405 | " line += ' -I " pcre "/include" | |
9406 | " -I " libgc "/include'")) | |
9407 | (("variable == 'LFLAGS':[ ]*") | |
9408 | (string-append "variable == 'LFLAGS':\n" | |
9409 | " line += ' -L" pcre "/lib" | |
9410 | " -L " libgc "/lib'"))) | |
9411 | #t)))))) | |
9412 | (inputs `(("pcre" ,pcre) | |
9413 | ("libgc" ,libgc))) | |
9414 | (home-page "https://shedskin.github.io/") | |
9415 | (synopsis "Experimental Python-2 to C++ Compiler") | |
9416 | (description (string-append "This is an experimental compiler for a subset of | |
9417 | Python. It generates C++ code and a Makefile.")) | |
9418 | (license (list license:gpl3 license:bsd-3 license:expat)))) | |
9419 | ||
9420 | (define-public python2-rope | |
9421 | (package | |
9422 | (name "python2-rope") | |
a9ba0a31 | 9423 | (version "0.11.0") |
44d10b1f RW |
9424 | (source |
9425 | (origin | |
9426 | (method url-fetch) | |
9427 | (uri (pypi-uri "rope" version)) | |
9428 | (sha256 | |
9429 | (base32 | |
a9ba0a31 | 9430 | "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251")))) |
44d10b1f | 9431 | (arguments |
afb29715 | 9432 | ;; Rope has only partial python3 support, see `python-rope' |
44d10b1f RW |
9433 | `(#:python ,python-2)) |
9434 | (build-system python-build-system) | |
9435 | (native-inputs | |
9436 | `(("python2-unittest2" ,python2-unittest2))) | |
9437 | (home-page "https://github.com/python-rope/rope") | |
9438 | (synopsis "Refactoring library for Python") | |
9439 | (description "Rope is a refactoring library for Python. It facilitates | |
9440 | the renaming, moving and extracting of attributes, functions, modules, fields | |
9441 | and parameters in Python 2 source code. These refactorings can also be applied | |
9442 | to occurrences in strings and comments.") | |
9443 | (license license:gpl2))) | |
9444 | ||
2c880ef4 LC |
9445 | (define-public python-rope |
9446 | (package | |
9447 | (inherit python2-rope) | |
9448 | (name "python-rope") | |
9449 | (arguments `(#:python ,python-wrapper | |
9450 | ;; XXX: Only partial python3 support, results in some failing | |
9451 | ;; tests: <https://github.com/python-rope/rope/issues/247>. | |
9452 | #:tests? #f)) | |
9453 | (properties `((python2-variant . ,(delay python2-rope)))))) | |
9454 | ||
44d10b1f RW |
9455 | (define-public python-py3status |
9456 | (package | |
9457 | (name "python-py3status") | |
77f3d303 | 9458 | (version "3.16") |
44d10b1f RW |
9459 | (source |
9460 | (origin | |
9461 | (method url-fetch) | |
9462 | (uri (pypi-uri "py3status" version)) | |
9463 | (sha256 | |
9464 | (base32 | |
77f3d303 | 9465 | "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g")))) |
44d10b1f RW |
9466 | (build-system python-build-system) |
9467 | (inputs | |
9468 | `(("file" ,file))) | |
9469 | (arguments | |
9470 | '(#:phases | |
9471 | (modify-phases %standard-phases | |
9472 | ;; 'file' is used for detection of configuration file encoding | |
9473 | ;; let's make link the dependency to particular input | |
9474 | (add-before 'build 'patch-file-path | |
9475 | (lambda* (#:key inputs #:allow-other-keys) | |
9476 | (let ((file-path (assoc-ref inputs "file"))) | |
9477 | (substitute* "py3status/parse_config.py" | |
9478 | (("\\['file', '-b'") | |
9479 | (string-append "['" file-path "/bin/file', '-b'"))) | |
9480 | #t)))) | |
9481 | #:tests? #f)) ; TODO: Requires many libraries not in Guix. | |
9482 | (home-page "https://github.com/ultrabug/py3status") | |
9483 | (synopsis "Extensible i3status wrapper written in Python") | |
9484 | (description "py3status is an i3status wrapper which extends i3status | |
9485 | functionality in a modular way, allowing you to extend your panel with your | |
9486 | own code, responding to click events and updating clock every second.") | |
9487 | (license license:bsd-3))) | |
9488 | ||
9489 | (define-public python-tblib | |
9490 | (package | |
9491 | (name "python-tblib") | |
9492 | (version "1.3.2") | |
9493 | (source (origin | |
9494 | (method url-fetch) | |
9495 | (uri (pypi-uri "tblib" version)) | |
9496 | (sha256 (base32 | |
9497 | "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3")))) | |
9498 | (build-system python-build-system) | |
9499 | (arguments | |
9500 | `(#:phases | |
9501 | (modify-phases %standard-phases | |
9502 | (add-before 'check 'adjust-tests | |
9503 | (lambda _ | |
9504 | (when (which "python3") | |
9505 | ;; Adjust the example output to match that of Python 3.7: | |
9506 | ;; <https://github.com/ionelmc/python-tblib/issues/36>. | |
9507 | (substitute* "README.rst" | |
9508 | (("Exception\\('fail',") "Exception('fail'")) | |
9509 | #t))) | |
9510 | (replace 'check | |
9511 | (lambda _ | |
9512 | ;; Upstream runs tests after installation and the package itself | |
9513 | ;; resides in a subdirectory. Extend PYTHONPATH so it will be | |
9514 | ;; found. | |
9515 | (setenv "PYTHONPATH" | |
9516 | (string-append (getcwd) "/build/lib:" | |
9517 | (getenv "PYTHONPATH"))) | |
9518 | (invoke "py.test" "-vv" "tests" "README.rst")))))) | |
9519 | (native-inputs | |
9520 | `(("python-pytest" ,python-pytest) | |
9521 | ("python-six" ,python-six))) | |
9522 | (home-page "https://github.com/ionelmc/python-tblib") | |
9523 | (synopsis "Traceback serialization library") | |
9524 | (description | |
9525 | "Traceback serialization allows you to: | |
9526 | ||
9527 | @enumerate | |
9528 | @item Pickle tracebacks and raise exceptions with pickled tracebacks in | |
9529 | different processes. This allows better error handling when running code over | |
9530 | multiple processes (imagine multiprocessing, billiard, futures, celery etc). | |
9531 | ||
9532 | @item Parse traceback strings and raise with the parsed tracebacks. | |
9533 | @end enumerate\n") | |
9534 | (license license:bsd-3))) | |
9535 | ||
9536 | (define-public python2-tblib | |
9537 | (package-with-python2 python-tblib)) | |
9538 | ||
9539 | (define-public python-greenlet | |
9540 | (package | |
9541 | (name "python-greenlet") | |
9542 | (version "0.4.15") | |
9543 | (source (origin | |
9544 | (method url-fetch) | |
9545 | (uri (pypi-uri "greenlet" version)) | |
9546 | (sha256 | |
9547 | (base32 | |
9548 | "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll")))) | |
9549 | (build-system python-build-system) | |
9550 | (home-page "https://greenlet.readthedocs.io/") | |
9551 | (synopsis "Lightweight in-process concurrent programming") | |
9552 | (description | |
9553 | "Greenlet package is a spin-off of Stackless, a version of CPython | |
9554 | that supports micro-threads called \"tasklets\". Tasklets run | |
9555 | pseudo-concurrently (typically in a single or a few OS-level threads) and | |
9556 | are synchronized with data exchanges on \"channels\".") | |
9557 | (license (list license:psfl license:expat)))) | |
9558 | ||
9559 | (define-public python2-greenlet | |
9560 | (package-with-python2 python-greenlet)) | |
9561 | ||
9562 | (define-public python-objgraph | |
9563 | (package | |
9564 | (name "python-objgraph") | |
9565 | (version "3.4.0") | |
9566 | (source | |
9567 | (origin | |
9568 | (method url-fetch) | |
9569 | (uri (pypi-uri "objgraph" version)) | |
9570 | (sha256 | |
9571 | (base32 | |
9572 | "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a")))) | |
9573 | (build-system python-build-system) | |
9574 | (propagated-inputs | |
9575 | `(("python-graphviz" ,python-graphviz))) | |
9576 | (native-inputs | |
9577 | `(("python-mock" ,python-mock) | |
9578 | ("graphviz" ,graphviz))) | |
9579 | (home-page "https://mg.pov.lt/objgraph/") | |
9580 | (synopsis "Draw Python object reference graphs with graphviz") | |
9581 | (description | |
9582 | "This package provides tools to draw Python object reference graphs with | |
9583 | graphviz.") | |
9584 | (license license:expat))) | |
9585 | ||
9586 | (define-public python-gevent | |
9587 | (package | |
9588 | (name "python-gevent") | |
9589 | (version "1.3.7") | |
9590 | (source (origin | |
9591 | (method url-fetch) | |
9592 | (uri (pypi-uri "gevent" version)) | |
9593 | (sha256 | |
9594 | (base32 | |
9595 | "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz")) | |
9596 | (modules '((guix build utils))) | |
9597 | (snippet | |
9598 | '(begin | |
9599 | ;; unbunding libev and c-ares | |
9600 | (delete-file-recursively "deps") | |
9601 | #t)))) | |
9602 | (build-system python-build-system) | |
9603 | (arguments | |
9604 | `(#:modules ((ice-9 ftw) | |
9605 | (ice-9 match) | |
9606 | (srfi srfi-26) | |
9607 | (guix build utils) | |
9608 | (guix build python-build-system)) | |
9609 | #:phases (modify-phases %standard-phases | |
9610 | (add-after 'unpack 'unpack-libev | |
9611 | (lambda* (#:key inputs #:allow-other-keys) | |
9612 | (mkdir-p "deps/libev") | |
9613 | ;; FIXME: gevent requires building libev, even though | |
9614 | ;; it only links against the proper one. | |
9615 | (invoke "tar" "-xf" (assoc-ref inputs "libev-source") | |
9616 | "--strip-components=1" "-C" "deps/libev"))) | |
9617 | (add-before 'patch-source-shebangs 'patch-hard-coded-paths | |
9618 | (lambda _ | |
9619 | (substitute* "src/gevent/subprocess.py" | |
9620 | (("/bin/sh") (which "sh"))) | |
9621 | (for-each (lambda (file) | |
9622 | (substitute* file | |
9623 | (("/bin/sh") (which "sh")) | |
9624 | (("/bin/true") (which "true")))) | |
9625 | (find-files "src/greentest" "\\.py$")) | |
9626 | #t)) | |
9627 | (add-before 'build 'do-not-use-bundled-sources | |
9628 | (lambda* (#:key inputs #:allow-other-keys) | |
9629 | (setenv "CONFIG_SHELL" (which "bash")) | |
9630 | (setenv "LIBEV_EMBED" "false") | |
9631 | (setenv "CARES_EMBED" "false") | |
9632 | (setenv "EMBED" "false") | |
9633 | ||
9634 | (let ((greenlet (string-append | |
9635 | (assoc-ref inputs "python-greenlet") | |
9636 | "/include"))) | |
9637 | (match (scandir greenlet | |
9638 | (lambda (item) | |
9639 | (string-prefix? "python" item))) | |
9640 | ((python) | |
9641 | (setenv "CPATH" | |
9642 | (string-append greenlet "/" python))))) | |
9643 | #t)) | |
9644 | (add-before 'check 'skip-timer-test | |
9645 | (lambda _ | |
9646 | ;; XXX: Skip 'TestTimerResolution', which appears to be | |
9647 | ;; unreliable. | |
9648 | (substitute* "src/greentest/test__core_timer.py" | |
9649 | (("not greentest.RUNNING_ON_CI") "False")) | |
9650 | #t)) | |
9651 | (replace 'check | |
9652 | (lambda _ | |
9653 | ;; Make sure the build directory is on PYTHONPATH. | |
9654 | (setenv "PYTHONPATH" | |
9655 | (string-append | |
9656 | (getenv "PYTHONPATH") ":" | |
9657 | (getcwd) "/build/" | |
9658 | (car (scandir "build" (cut string-prefix? "lib." <>))))) | |
9659 | (with-directory-excursion "src/greentest" | |
9660 | ;; XXX: Many tests require network access. Instead we only | |
9661 | ;; run known-good tests. Unfortunately we cannot use | |
9662 | ;; recursion here since this directory also contains | |
9663 | ;; Python-version-specific subfolders. | |
9664 | (apply invoke "python" "testrunner.py" "--config" | |
9665 | "known_failures.py" | |
9666 | (scandir "." (cut regexp-exec | |
9667 | (make-regexp "test_+(subprocess|core)") | |
9668 | <>))))))))) | |
9669 | (propagated-inputs | |
9670 | `(("python-greenlet" ,python-greenlet) | |
9671 | ("python-objgraph" ,python-objgraph))) | |
9672 | (native-inputs | |
9673 | `(("libev-source" ,(package-source libev)) | |
9674 | ("python-six" ,python-six))) | |
9675 | (inputs | |
9676 | `(("c-ares" ,c-ares) | |
9677 | ("libev" ,libev))) | |
9678 | (home-page "http://www.gevent.org/") | |
9679 | (synopsis "Coroutine-based network library") | |
9680 | (description | |
9681 | "gevent is a coroutine-based Python networking library that uses greenlet | |
9682 | to provide a high-level synchronous API on top of the libev event loop.") | |
9683 | (license license:expat) | |
9684 | (properties `((python2-variant . ,(delay python2-gevent)))))) | |
9685 | ||
9686 | (define-public python2-gevent | |
9687 | (let ((base (package-with-python2 | |
9688 | (strip-python2-variant python-gevent)))) | |
9689 | (package | |
9690 | (inherit base) | |
9691 | (native-inputs `(,@(package-native-inputs python-gevent) | |
9692 | ("python-mock" ,python2-mock)))))) | |
9693 | ||
9694 | (define-public python-fastimport | |
9695 | (package | |
9696 | (name "python-fastimport") | |
9697 | (version "0.9.6") | |
9698 | (source | |
9699 | (origin | |
9700 | (method url-fetch) | |
9701 | (uri (pypi-uri "fastimport" version)) | |
9702 | (sha256 | |
9703 | (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43")))) | |
9704 | (build-system python-build-system) | |
9705 | (home-page "https://github.com/jelmer/python-fastimport") | |
9706 | (synopsis "VCS fastimport parser and generator in Python") | |
9707 | (description "This package provides a parser for and generator of the Git | |
9708 | @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport} | |
9709 | format.") | |
9710 | (license license:gpl2+))) | |
9711 | ||
9712 | (define-public python2-fastimport | |
9713 | (package-with-python2 python-fastimport)) | |
9714 | ||
9715 | (define-public python-twisted | |
9716 | (package | |
9717 | (name "python-twisted") | |
0107c9b8 | 9718 | (version "19.2.1") |
44d10b1f RW |
9719 | (source (origin |
9720 | (method url-fetch) | |
9721 | (uri (pypi-uri "Twisted" version ".tar.bz2")) | |
9722 | (sha256 | |
9723 | (base32 | |
0107c9b8 | 9724 | "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s")))) |
44d10b1f RW |
9725 | (build-system python-build-system) |
9726 | (arguments | |
0107c9b8 | 9727 | '(#:tests? #f)) ; FIXME: some tests fail |
44d10b1f RW |
9728 | (propagated-inputs |
9729 | `(("python-zope-interface" ,python-zope-interface) | |
52ca1c4a | 9730 | ("python-pyhamcrest" ,python-pyhamcrest) |
44d10b1f | 9731 | ("python-incremental" ,python-incremental) |
e5ba2fe3 | 9732 | ("python-hyperlink" ,python-hyperlink) |
44d10b1f RW |
9733 | ("python-constantly" ,python-constantly) |
9734 | ("python-automat" ,python-automat))) | |
9735 | (home-page "https://twistedmatrix.com/") | |
9736 | (synopsis "Asynchronous networking framework written in Python") | |
9737 | (description | |
9738 | "Twisted is an extensible framework for Python programming, with special | |
9739 | focus on event-based network programming and multiprotocol integration.") | |
9740 | (license license:expat))) | |
9741 | ||
9742 | (define-public python2-twisted | |
9743 | (package-with-python2 python-twisted)) | |
9744 | ||
9745 | (define-public python-pika | |
9746 | (package | |
9747 | (name "python-pika") | |
9748 | (version "0.12.0") | |
9749 | (source | |
9750 | (origin | |
9751 | (method url-fetch) | |
9752 | (uri (pypi-uri "pika" version)) | |
9753 | (sha256 | |
9754 | (base32 | |
9755 | "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h")))) | |
9756 | (build-system python-build-system) | |
9757 | (native-inputs | |
9758 | `(("python-pyev" ,python-pyev) | |
9759 | ("python-tornado" ,python-tornado) | |
9760 | ("python-twisted" ,python-twisted))) | |
9761 | (home-page "https://pika.readthedocs.org") | |
9762 | (synopsis "Pure Python AMQP Client Library") | |
9763 | (description | |
9764 | "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing | |
9765 | Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying | |
9766 | network support library.") | |
9767 | (license license:bsd-3))) | |
9768 | ||
9769 | (define-public python2-pika | |
9770 | (package-with-python2 python-pika)) | |
9771 | ||
9772 | (define-public python-ply | |
9773 | (package | |
9774 | (name "python-ply") | |
9775 | (version "3.10") | |
9776 | (source | |
9777 | (origin | |
9778 | (method url-fetch) | |
9779 | (uri (pypi-uri "ply" version)) | |
9780 | (sha256 | |
9781 | (base32 | |
9782 | "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn")))) | |
9783 | (build-system python-build-system) | |
9784 | (home-page "http://www.dabeaz.com/ply/") | |
9785 | (synopsis "Python Lex & Yacc") | |
9786 | (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python. | |
9787 | It uses LR parsing and does extensive error checking.") | |
9788 | (license license:bsd-3))) | |
9789 | ||
9790 | (define-public python2-ply | |
9791 | (package-with-python2 python-ply)) | |
9792 | ||
9793 | (define-public python-tabulate | |
9794 | (package | |
9795 | (name "python-tabulate") | |
9796 | (version "0.7.7") | |
9797 | (source (origin | |
9798 | (method url-fetch) | |
9799 | (uri (pypi-uri "tabulate" version)) | |
9800 | (sha256 | |
9801 | (base32 | |
9802 | "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843")))) | |
9803 | (build-system python-build-system) | |
9804 | (arguments | |
9805 | ;; FIXME: The pypi release tarball is missing a 'test/common.py' | |
9806 | ;; and the latest release is not tagged in the upstream repository. | |
9807 | '(#:tests? #f)) | |
9808 | (home-page "https://bitbucket.org/astanin/python-tabulate") | |
9809 | (synopsis "Pretty-print tabular data") | |
9810 | (description | |
9811 | "Tabulate is a library and command-line utility to pretty-print tabular | |
9812 | data in Python.") | |
9813 | (license license:expat))) | |
9814 | ||
9815 | (define-public python2-tabulate | |
9816 | (package-with-python2 python-tabulate)) | |
9817 | ||
9818 | (define-public python-kazoo | |
9819 | (package | |
9820 | (name "python-kazoo") | |
9821 | (version "2.4.0") | |
9822 | (source | |
9823 | (origin | |
9824 | (method url-fetch) | |
9825 | (uri (pypi-uri "kazoo" version)) | |
9826 | (sha256 | |
9827 | (base32 | |
9828 | "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7")))) | |
9829 | (build-system python-build-system) | |
9830 | (arguments '(#:tests? #f)) ; XXX: needs zookeeper | |
9831 | (propagated-inputs | |
9832 | `(("python-six" ,python-six))) | |
9833 | (home-page "https://kazoo.readthedocs.org") | |
9834 | (synopsis "High-level Zookeeper client library") | |
9835 | (description | |
9836 | "Kazoo is a Python client library for the Apache Zookeeper distributed | |
9837 | application service. It is designed to be easy to use and to avoid common | |
9838 | programming errors.") | |
9839 | (license license:asl2.0))) | |
9840 | ||
9841 | (define-public python2-kazoo | |
9842 | (package-with-python2 python-kazoo)) | |
9843 | ||
9844 | (define-public python-pykafka | |
9845 | (package | |
9846 | (name "python-pykafka") | |
9847 | (version "2.4.0") | |
9848 | (source (origin | |
9849 | (method url-fetch) | |
0ca1d040 | 9850 | (uri (pypi-uri "pykafka" version)) |
44d10b1f RW |
9851 | (sha256 |
9852 | (base32 | |
9853 | "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv")))) | |
9854 | (build-system python-build-system) | |
9855 | (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc. | |
9856 | (propagated-inputs | |
9857 | `(("python-gevent" ,python-gevent) | |
9858 | ("python-kazoo" ,python-kazoo) | |
9859 | ("python-tabulate" ,python-tabulate))) | |
9860 | (inputs | |
9861 | `(("librdkafka" ,librdkafka))) | |
9862 | (home-page "https://pykafka.readthedocs.io/") | |
9863 | (synopsis "Apache Kafka client for Python") | |
9864 | (description | |
9865 | "PyKafka is a client for the Apache Kafka distributed messaging system. | |
9866 | It includes Python implementations of Kafka producers and consumers, which | |
9867 | are optionally backed by a C extension built on librdkafka.") | |
9868 | (license license:asl2.0))) | |
9869 | ||
9870 | (define-public python2-pykafka | |
9871 | (package-with-python2 python-pykafka)) | |
9872 | ||
9873 | (define-public python-wcwidth | |
9874 | (package | |
9875 | (name "python-wcwidth") | |
9876 | (version "0.1.7") | |
9877 | (source | |
9878 | (origin | |
9879 | (method url-fetch) | |
9880 | (uri (pypi-uri "wcwidth" version)) | |
9881 | (sha256 | |
9882 | (base32 | |
9883 | "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx")))) | |
9884 | (build-system python-build-system) | |
9885 | (home-page "https://github.com/jquast/wcwidth") | |
9886 | (synopsis "Measure number of terminal column cells of wide-character codes") | |
9887 | (description "Wcwidth measures the number of terminal column cells of | |
9888 | wide-character codes. It is useful for those implementing a terminal emulator, | |
9889 | or programs that carefully produce output to be interpreted by one. It is a | |
9890 | Python implementation of the @code{wcwidth} and @code{wcswidth} C functions | |
9891 | specified in POSIX.1-2001 and POSIX.1-2008.") | |
9892 | (license license:expat))) | |
9893 | ||
9894 | (define-public python2-wcwidth | |
9895 | (package-with-python2 python-wcwidth)) | |
9896 | ||
9897 | (define-public python2-jsonrpclib | |
9898 | (package | |
9899 | (name "python2-jsonrpclib") | |
9900 | (version "0.1.7") | |
9901 | (source (origin | |
9902 | (method url-fetch) | |
6571bba0 | 9903 | (uri (pypi-uri "jsonrpclib" version)) |
44d10b1f RW |
9904 | (sha256 |
9905 | (base32 | |
9906 | "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z")))) | |
9907 | (build-system python-build-system) | |
9908 | (arguments | |
9909 | `(#:tests? #f | |
9910 | #:python ,python-2)) | |
9911 | (home-page "https://github.com/joshmarshall/jsonrpclib/") | |
9912 | (synopsis "Implementation of JSON-RPC specification for Python") | |
9913 | (description | |
9914 | "This library is an implementation of the JSON-RPC specification. | |
9915 | It supports both the original 1.0 specification, as well as the | |
9916 | new (proposed) 2.0 spec, which includes batch submission, keyword arguments, | |
9917 | etc.") | |
9918 | (license license:asl2.0))) | |
9919 | ||
9920 | (define-public python-chai | |
9921 | (package | |
9922 | (name "python-chai") | |
9923 | (version "1.1.2") | |
9924 | (source (origin | |
9925 | (method url-fetch) | |
9926 | (uri (pypi-uri "chai" version)) | |
9927 | (sha256 | |
9928 | (base32 | |
9929 | "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz")))) | |
9930 | (build-system python-build-system) | |
9931 | (home-page "https://github.com/agoragames/chai") | |
9932 | (synopsis "Mocking framework for Python") | |
9933 | (description | |
9934 | "Chai provides an api for mocking, stubbing and spying your python | |
9935 | objects, patterned after the Mocha library for Ruby.") | |
9936 | (license license:bsd-3))) | |
9937 | ||
9938 | (define-public python2-chai | |
9939 | (package-with-python2 python-chai)) | |
9940 | ||
9941 | (define-public python-inflection | |
9942 | (package | |
9943 | (name "python-inflection") | |
9944 | (version "0.3.1") | |
9945 | (source | |
9946 | (origin (method url-fetch) | |
9947 | (uri (pypi-uri "inflection" version)) | |
9948 | (sha256 | |
9949 | (base32 | |
9950 | "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq")))) | |
9951 | (build-system python-build-system) | |
9952 | (native-inputs | |
9953 | `(("python-pytest" ,python-pytest))) | |
9954 | (home-page "https://github.com/jpvanhal/inflection") | |
9955 | (synopsis "Python string transformation library") | |
9956 | (description | |
9957 | "Inflection is a string transformation library. It singularizes | |
9958 | and pluralizes English words, and transforms strings from CamelCase to | |
9959 | underscored string.") | |
9960 | (license license:expat))) | |
9961 | ||
9962 | (define-public python2-inflection | |
9963 | (package-with-python2 python-inflection)) | |
9964 | ||
9965 | (define-public python-pylev | |
9966 | (package | |
9967 | (name "python-pylev") | |
9968 | (version "1.3.0") | |
9969 | (source (origin | |
9970 | (method url-fetch) | |
9971 | (uri (pypi-uri "pylev" version)) | |
9972 | (sha256 | |
9973 | (base32 | |
9974 | "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86")))) | |
9975 | (build-system python-build-system) | |
9976 | (home-page "https://github.com/toastdriven/pylev") | |
9977 | (synopsis "Levenshtein distance implementation in Python") | |
9978 | (description "Pure Python Levenshtein implementation, based off the | |
9979 | Wikipedia code samples at | |
9980 | @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.") | |
9981 | (license license:bsd-3))) | |
9982 | ||
9983 | (define-public python2-pylev | |
9984 | (package-with-python2 python-pylev)) | |
9985 | ||
9986 | (define-public python-cleo | |
9987 | (package | |
9988 | (name "python-cleo") | |
9989 | (version "0.6.1") | |
9990 | (source (origin | |
9991 | (method url-fetch) | |
9992 | (uri (pypi-uri "cleo" version)) | |
9993 | (sha256 | |
9994 | (base32 | |
9995 | "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7")))) | |
9996 | (build-system python-build-system) | |
9997 | (native-inputs | |
9998 | `(;; For testing | |
9999 | ("python-mock" ,python-mock) | |
10000 | ("python-pytest-mock" ,python-pytest-mock) | |
10001 | ("python-pytest" ,python-pytest))) | |
10002 | (propagated-inputs | |
10003 | `(("python-backpack" ,python-backpack) | |
10004 | ("python-pastel" ,python-pastel) | |
10005 | ("python-pylev" ,python-pylev))) | |
10006 | (home-page "https://github.com/sdispater/cleo") | |
10007 | (synopsis "Command-line arguments library for Python") | |
10008 | (description | |
10009 | "Cleo allows you to create command-line commands with signature in | |
10010 | docstring and colored output.") | |
10011 | (license license:expat))) | |
10012 | ||
10013 | (define-public python2-cleo | |
10014 | (package-with-python2 python-cleo)) | |
10015 | ||
10016 | (define-public python-lazy-object-proxy | |
10017 | (package | |
10018 | (name "python-lazy-object-proxy") | |
10019 | (version "1.3.1") | |
10020 | (source (origin | |
10021 | (method url-fetch) | |
10022 | (uri (pypi-uri "lazy-object-proxy" version)) | |
10023 | (sha256 | |
10024 | (base32 | |
10025 | "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb")))) | |
10026 | (build-system python-build-system) | |
10027 | (home-page "https://github.com/ionelmc/python-lazy-object-proxy") | |
10028 | (synopsis "Lazy object proxy for python") | |
10029 | (description | |
10030 | "Lazy object proxy is an object that wraps a callable but defers the call | |
10031 | until the object is actually required, and caches the result of said call.") | |
10032 | (license license:bsd-2))) | |
10033 | ||
10034 | (define-public python2-lazy-object-proxy | |
10035 | (package-with-python2 python-lazy-object-proxy)) | |
10036 | ||
10037 | (define-public python-dnspython | |
10038 | (package | |
10039 | (name "python-dnspython") | |
10040 | (version "1.15.0") | |
10041 | (source (origin | |
10042 | (method url-fetch) | |
10043 | (uri (string-append "http://www.dnspython.org/kits/" | |
10044 | version "/dnspython-" version ".tar.gz")) | |
10045 | (sha256 | |
10046 | (base32 | |
10047 | "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i")))) | |
10048 | (build-system python-build-system) | |
10049 | (arguments '(#:tests? #f)) ; XXX: requires internet access | |
10050 | (home-page "http://www.dnspython.org") | |
10051 | (synopsis "DNS toolkit for Python") | |
10052 | (description | |
10053 | "dnspython is a DNS toolkit for Python. It supports almost all record | |
10054 | types. It can be used for queries, zone transfers, and dynamic updates. | |
10055 | It supports TSIG authenticated messages and EDNS0.") | |
10056 | (license license:expat))) | |
10057 | ||
10058 | (define-public python2-dnspython | |
10059 | (package-with-python2 python-dnspython)) | |
10060 | ||
10061 | (define-public python-email-validator | |
10062 | (package | |
10063 | (name "python-email-validator") | |
10064 | (version "1.0.2") | |
10065 | (source | |
10066 | (origin (method url-fetch) | |
10067 | (uri (pypi-uri "email_validator" version)) | |
10068 | (sha256 | |
10069 | (base32 | |
10070 | "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6")))) | |
10071 | (build-system python-build-system) | |
10072 | (arguments | |
10073 | '(#:phases | |
10074 | (modify-phases %standard-phases | |
10075 | (add-before 'build 'use-dnspython | |
10076 | (lambda _ | |
10077 | (substitute* "setup.py" | |
10078 | (("dnspython3") "dnspython")) | |
10079 | #t))))) | |
10080 | (propagated-inputs | |
10081 | `(("python-dnspython" ,python-dnspython) | |
10082 | ("python-idna" ,python-idna))) | |
10083 | (home-page "https://github.com/JoshData/python-email-validator") | |
10084 | (synopsis "Email address validation library for Python") | |
10085 | (description | |
10086 | "This library validates email address syntax and deliverability.") | |
10087 | (license license:cc0))) | |
10088 | ||
10089 | (define-public python2-email-validator | |
10090 | (package-with-python2 python-email-validator)) | |
10091 | ||
10092 | (define-public python-ukpostcodeparser | |
10093 | (package | |
10094 | (name "python-ukpostcodeparser") | |
10095 | (version "1.0.3") | |
10096 | (source (origin | |
10097 | (method url-fetch) | |
10098 | (uri (pypi-uri "UkPostcodeParser" version)) | |
10099 | (sha256 | |
10100 | (base32 | |
10101 | "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd")))) | |
10102 | (build-system python-build-system) | |
10103 | (home-page "https://github.com/hamstah/ukpostcodeparser") | |
10104 | (synopsis "UK Postcode parser for Python") | |
10105 | (description | |
10106 | "This library provides the @code{parse_uk_postcode} function for | |
10107 | parsing UK postcodes.") | |
10108 | (license license:expat))) | |
10109 | ||
10110 | (define-public python2-ukpostcodeparser | |
10111 | (package-with-python2 python-ukpostcodeparser)) | |
10112 | ||
10113 | (define-public python-faker | |
10114 | (package | |
10115 | (name "python-faker") | |
10116 | (version "0.7.9") | |
10117 | (source (origin | |
10118 | (method url-fetch) | |
10119 | (uri (pypi-uri "Faker" version)) | |
10120 | (sha256 | |
10121 | (base32 | |
10122 | "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm")) | |
10123 | (patches | |
10124 | (search-patches "python-faker-fix-build-32bit.patch")) | |
10125 | (modules '((guix build utils))) | |
10126 | (snippet | |
10127 | '(begin | |
10128 | (for-each delete-file (find-files "." "\\.pyc$")) | |
10129 | #t)))) | |
10130 | (build-system python-build-system) | |
10131 | (arguments | |
10132 | '(#:phases | |
10133 | (modify-phases %standard-phases | |
10134 | (replace 'check | |
49ff8827 | 10135 | (lambda _ (invoke "python" "-m" "unittest" "-v" "tests")))))) |
44d10b1f RW |
10136 | (native-inputs |
10137 | `(;; For testing | |
10138 | ("python-email-validator" ,python-email-validator) | |
10139 | ("python-mock" ,python-mock) | |
10140 | ("python-ukpostcodeparser" ,python-ukpostcodeparser))) | |
10141 | (propagated-inputs | |
10142 | `(("python-dateutil" ,python-dateutil) | |
10143 | ("python-six" ,python-six))) | |
10144 | (home-page "https://github.com/joke2k/faker") | |
10145 | (synopsis "Python package that generates fake data") | |
10146 | (description | |
10147 | "Faker is a Python package that generates fake data such as names, | |
10148 | addresses, and phone numbers.") | |
10149 | (license license:expat) | |
10150 | (properties `((python2-variant . ,(delay python2-faker)))))) | |
10151 | ||
10152 | (define-public python2-faker | |
10153 | (let ((base (package-with-python2 (strip-python2-variant | |
10154 | python-faker)))) | |
10155 | (package | |
10156 | (inherit base) | |
10157 | (propagated-inputs | |
10158 | `(("python2-ipaddress" ,python2-ipaddress) | |
10159 | ,@(package-propagated-inputs base)))))) | |
10160 | ||
10161 | (define-public python-pyaml | |
10162 | (package | |
10163 | (name "python-pyaml") | |
10164 | (version "18.11.0") | |
10165 | (source (origin | |
10166 | (method url-fetch) | |
10167 | (uri (pypi-uri "pyaml" version)) | |
10168 | (sha256 | |
10169 | (base32 | |
10170 | "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr")))) | |
10171 | (build-system python-build-system) | |
10172 | (native-inputs | |
10173 | `(("python-unidecode" ,python-unidecode))) | |
10174 | (propagated-inputs | |
10175 | `(("python-pyyaml" ,python-pyyaml))) | |
10176 | (home-page "https://github.com/mk-fg/pretty-yaml") | |
10177 | (synopsis "YAML pretty-print library for Python") | |
10178 | (description | |
10179 | "pyaml is a PyYAML based python module to produce pretty and readable | |
10180 | YAML-serialized data.") | |
492e3a7a | 10181 | (license license:wtfpl2))) |
44d10b1f RW |
10182 | |
10183 | (define-public python2-pyaml | |
10184 | (package-with-python2 python-pyaml)) | |
10185 | ||
10186 | (define-public python-backpack | |
10187 | (package | |
10188 | (name "python-backpack") | |
10189 | (version "0.1") | |
10190 | (source | |
10191 | (origin | |
10192 | (method url-fetch) | |
10193 | (uri (pypi-uri "backpack" version)) | |
10194 | (sha256 | |
10195 | (base32 | |
10196 | "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1")))) | |
10197 | (build-system python-build-system) | |
10198 | (native-inputs | |
10199 | `(("python-pytest" ,python-pytest) | |
10200 | ("python-nose" ,python-nose))) | |
10201 | (propagated-inputs | |
10202 | `(("python-simplejson" ,python-simplejson))) | |
10203 | (home-page "https://github.com/sdispater/backpack") | |
10204 | (synopsis "Utilities for working with Python collections") | |
10205 | (description "Backpack provides some useful utilities for working with | |
10206 | collections of data.") | |
10207 | (license license:expat))) | |
10208 | ||
10209 | (define-public python2-backpack | |
10210 | (package-with-python2 python-backpack)) | |
10211 | ||
10212 | (define-public python-prompt-toolkit | |
10213 | (package | |
10214 | (name "python-prompt-toolkit") | |
10215 | (version "2.0.7") | |
10216 | (source | |
10217 | (origin | |
10218 | (method url-fetch) | |
10219 | (uri (pypi-uri "prompt_toolkit" version ".tar.gz")) | |
10220 | (sha256 | |
10221 | (base32 | |
10222 | "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx")))) | |
10223 | (build-system python-build-system) | |
10224 | (arguments | |
10225 | `(#:phases | |
10226 | (modify-phases %standard-phases | |
10227 | (delete 'check) | |
10228 | (add-after 'install 'post-install-check | |
10229 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
10230 | ;; HOME is needed for the test | |
10231 | ;; "test_pathcompleter_can_expanduser". | |
10232 | (setenv "HOME" "/tmp") | |
10233 | (add-installed-pythonpath inputs outputs) | |
10234 | (invoke "py.test")))))) | |
10235 | (propagated-inputs | |
10236 | `(("python-wcwidth" ,python-wcwidth) | |
10237 | ("python-six" ,python-six) | |
10238 | ("python-pygments" ,python-pygments))) | |
10239 | (native-inputs | |
10240 | `(("python-pytest" ,python-pytest))) | |
10241 | (home-page "https://github.com/jonathanslenders/python-prompt-toolkit") | |
10242 | (synopsis "Library for building command line interfaces in Python") | |
10243 | (description | |
10244 | "Prompt-Toolkit is a library for building interactive command line | |
10245 | interfaces in Python. It's like GNU Readline but it also features syntax | |
10246 | highlighting while typing, out-of-the-box multi-line input editing, advanced | |
10247 | code completion, incremental search, support for Chinese double-width | |
10248 | characters, mouse support, and auto suggestions.") | |
10249 | (license license:bsd-3))) | |
10250 | ||
10251 | (define-public python2-prompt-toolkit | |
10252 | (package-with-python2 python-prompt-toolkit)) | |
10253 | ||
10254 | (define-public python-prompt-toolkit-1 | |
10255 | (package (inherit python-prompt-toolkit) | |
10256 | (version "1.0.15") | |
10257 | (source | |
10258 | (origin | |
10259 | (method url-fetch) | |
10260 | (uri (pypi-uri "prompt_toolkit" version ".tar.gz")) | |
10261 | (sha256 | |
10262 | (base32 | |
10263 | "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5")))))) | |
10264 | ||
10265 | (define-public python2-prompt-toolkit-1 | |
10266 | (package-with-python2 python-prompt-toolkit-1)) | |
10267 | ||
10268 | (define-public python-jedi | |
10269 | (package | |
10270 | (name "python-jedi") | |
b8e5de56 | 10271 | (version "0.13.3") |
44d10b1f RW |
10272 | (source |
10273 | (origin | |
10274 | (method url-fetch) | |
10275 | (uri (pypi-uri "jedi" version)) | |
10276 | (sha256 | |
10277 | (base32 | |
b8e5de56 | 10278 | "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b")))) |
44d10b1f RW |
10279 | (build-system python-build-system) |
10280 | (arguments | |
b8e5de56 | 10281 | `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see: |
44d10b1f RW |
10282 | ;; https://github.com/davidhalter/jedi/issues/1263) |
10283 | #:tests? #f | |
10284 | #:phases | |
10285 | (modify-phases %standard-phases | |
10286 | (replace 'check | |
10287 | (lambda* (#:key tests? #:allow-other-keys) | |
10288 | (when tests? | |
10289 | (invoke "py.test" "-vv"))))))) | |
10290 | (native-inputs | |
10291 | `(("python-pytest" ,python-pytest) | |
10292 | ("python-docopt" ,python-docopt))) | |
10293 | (propagated-inputs | |
10294 | `(("python-parso" ,python-parso))) | |
10295 | (home-page "https://github.com/davidhalter/jedi") | |
10296 | (synopsis "Autocompletion and static analysis library for Python") | |
10297 | (description | |
10298 | "Jedi is a static analysis tool for Python that can be used in Integrated | |
10299 | Development Environments (@dfn{IDE}s) and text editors. It understands Python | |
10300 | on a deeper level than many other static analysis frameworks for Python. | |
10301 | ||
10302 | Jedi understands docstrings and you can use Jedi autocompletion in your REPL as | |
10303 | well.") | |
10304 | (license license:expat))) | |
10305 | ||
10306 | (define-public python2-jedi | |
b8e5de56 MC |
10307 | (let ((base (package-with-python2 (strip-python2-variant python-jedi)))) |
10308 | (package | |
10309 | (inherit base) | |
10310 | (arguments (substitute-keyword-arguments (package-arguments base) | |
10311 | ((#:tests? _) #t)))))) | |
44d10b1f RW |
10312 | |
10313 | (define-public ptpython | |
10314 | (package | |
10315 | (name "ptpython") | |
10316 | (version "0.34") | |
10317 | (source (origin | |
10318 | (method url-fetch) | |
10319 | (uri (pypi-uri "ptpython" version)) | |
10320 | (sha256 | |
10321 | (base32 | |
10322 | "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13")))) | |
10323 | (build-system python-build-system) | |
10324 | (arguments | |
10325 | '(#:tests? #f)) ; FIXME: No tests in pypi tarball. | |
10326 | (propagated-inputs | |
10327 | `(("python-docopt" ,python-docopt) | |
10328 | ("python-jedi" ,python-jedi) | |
10329 | ("python-prompt-toolkit" ,python-prompt-toolkit) | |
10330 | ("python-pygments" ,python-pygments))) | |
10331 | (home-page "https://github.com/jonathanslenders/ptpython") | |
10332 | (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features") | |
10333 | (description | |
10334 | "ptpython is a Python read-eval-print loop with IDE-like features. | |
10335 | It supports syntax highlighting, multiline editing, autocompletion, mouse, | |
10336 | color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters | |
10337 | etc.") | |
10338 | (license license:bsd-3) | |
10339 | (properties `((python2-variant . ,(delay ptpython-2)))))) | |
10340 | ||
10341 | (define-public ptpython-2 | |
10342 | (let ((base (package-with-python2 (strip-python2-variant ptpython)))) | |
10343 | (package | |
10344 | (inherit base) | |
10345 | (name "ptpython2")))) | |
10346 | ||
10347 | (define-public python-stem | |
10348 | (package | |
10349 | (name "python-stem") | |
e746d1c3 | 10350 | (version "1.7.1") |
44d10b1f RW |
10351 | (source |
10352 | (origin | |
10353 | (method url-fetch) | |
10354 | (uri (pypi-uri "stem" version)) | |
10355 | (sha256 | |
10356 | (base32 | |
e746d1c3 | 10357 | "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9")))) |
44d10b1f RW |
10358 | (build-system python-build-system) |
10359 | (arguments | |
10360 | `(#:phases | |
10361 | (modify-phases %standard-phases | |
10362 | (replace 'check | |
10363 | (lambda _ | |
10364 | (invoke "./run_tests.py" "--unit") | |
10365 | #t))))) | |
10366 | (native-inputs | |
10367 | `(("python-mock" ,python-mock) | |
10368 | ("python-pycodestyle" ,python-pycodestyle) | |
10369 | ("python-pyflakes" ,python-pyflakes))) | |
10370 | (home-page "https://stem.torproject.org/") | |
10371 | (synopsis | |
10372 | "Python controller library that allows applications to interact with Tor") | |
10373 | (description | |
10374 | "Stem is a Python controller library for Tor. With it you can use Tor's | |
10375 | control protocol to script against the Tor process and read descriptor data | |
10376 | relays publish about themselves.") | |
10377 | (license license:lgpl3))) | |
10378 | ||
10379 | (define-public python2-stem | |
10380 | (package-with-python2 python-stem)) | |
10381 | ||
10382 | (define-public python-pyserial | |
10383 | (package | |
10384 | (name "python-pyserial") | |
10385 | (version "3.1.1") | |
10386 | (source | |
10387 | (origin | |
10388 | (method url-fetch) | |
10389 | (uri (pypi-uri "pyserial" version)) | |
10390 | (sha256 | |
10391 | (base32 | |
10392 | "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn")))) | |
10393 | (build-system python-build-system) | |
10394 | (arguments | |
10395 | '(#:tests? #f)) ; FIXME: 3/49 tests are failing. | |
10396 | ;; #:phases | |
10397 | ;; (modify-phases %standard-phases | |
10398 | ;; (replace 'check | |
10399 | ;; (lambda _ | |
10400 | ;; (zero? (system* "python" "test/run_all_tests.py" "loop://"))))))) | |
10401 | (home-page | |
10402 | "https://github.com/pyserial/pyserial") | |
10403 | (synopsis "Python Serial Port Bindings") | |
10404 | (description "@code{pyserial} provide serial port bindings for Python. It | |
10405 | supports different byte sizes, stop bits, parity and flow control with RTS/CTS | |
10406 | and/or Xon/Xoff. The port is accessed in RAW mode.") | |
10407 | (license license:bsd-3))) | |
10408 | ||
10409 | (define-public python2-pyserial | |
10410 | (package-with-python2 python-pyserial)) | |
10411 | ||
10412 | (define-public python-kivy | |
10413 | (package | |
10414 | (name "python-kivy") | |
10415 | (version "1.10.1") | |
10416 | (source | |
10417 | (origin | |
10418 | (method url-fetch) | |
10419 | (uri (pypi-uri "Kivy" version)) | |
10420 | (file-name (string-append name "-" version ".tar.gz")) | |
10421 | (sha256 | |
10422 | (base32 | |
10423 | "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw")))) | |
10424 | (build-system python-build-system) | |
10425 | (arguments | |
10426 | `(#:tests? #f ; Tests require many optional packages | |
10427 | #:phases | |
10428 | (modify-phases %standard-phases | |
10429 | (add-after 'patch-generated-file-shebangs 'set-sdl-paths | |
10430 | (lambda* (#:key inputs #:allow-other-keys) | |
10431 | (setenv "KIVY_SDL2_PATH" | |
10432 | (string-append (assoc-ref inputs "sdl-union") | |
10433 | "/include/SDL2")) | |
10434 | #t))))) | |
10435 | (native-inputs | |
10436 | `(("git" ,git) | |
10437 | ("pkg-config" ,pkg-config) | |
10438 | ("python-cython" ,python-cython))) | |
10439 | (inputs | |
10440 | `(("gstreamer" ,gstreamer) | |
10441 | ("mesa" ,mesa) | |
10442 | ("sdl-union" | |
10443 | ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) | |
10444 | (home-page "http://kivy.org") | |
10445 | (synopsis | |
10446 | "Multitouch application framework") | |
10447 | (description | |
10448 | "A software library for rapid development of | |
10449 | hardware-accelerated multitouch applications.") | |
10450 | (license license:expat))) | |
10451 | ||
10452 | (define-public python2-kivy | |
10453 | (package-with-python2 python-kivy)) | |
10454 | ||
10455 | (define-public python-kivy-next | |
10456 | (deprecated-package "python-kivy-next" python-kivy)) | |
10457 | ||
10458 | (define-public python2-kivy-next | |
10459 | (deprecated-package "python2-kivy-next" python2-kivy)) | |
10460 | ||
10461 | (define-public python-binaryornot | |
10462 | (package | |
10463 | (name "python-binaryornot") | |
10464 | (version "0.4.4") | |
10465 | (source (origin | |
10466 | (method url-fetch) | |
10467 | (uri (pypi-uri "binaryornot" version)) | |
10468 | (sha256 | |
10469 | (base32 | |
10470 | "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m")))) | |
10471 | (build-system python-build-system) | |
10472 | (propagated-inputs | |
10473 | `(("python-chardet" ,python-chardet) | |
10474 | ("python-hypothesis" ,python-hypothesis))) | |
10475 | (home-page "https://github.com/audreyr/binaryornot") | |
10476 | (synopsis "Package to check if a file is binary or text") | |
10477 | (description "Ultra-lightweight pure Python package to check if a file is | |
10478 | binary or text.") | |
10479 | (license license:bsd-3) | |
10480 | (properties `((python2-variant . ,(delay python2-binaryornot)))))) | |
10481 | ||
10482 | (define-public python2-binaryornot | |
10483 | (let ((base (package-with-python2 (strip-python2-variant python-binaryornot)))) | |
10484 | (package (inherit base) | |
10485 | (propagated-inputs | |
10486 | `(("python2-enum34" ,python2-enum34) | |
10487 | ,@(package-propagated-inputs base)))))) | |
10488 | ||
10489 | (define-public python-nltk | |
10490 | (package | |
10491 | (name "python-nltk") | |
10492 | (version "3.2.1") | |
10493 | (source (origin | |
10494 | (method url-fetch) | |
10495 | (uri (pypi-uri "nltk" version)) | |
10496 | (sha256 | |
10497 | (base32 | |
10498 | "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym")))) | |
10499 | (build-system python-build-system) | |
10500 | (arguments | |
10501 | '(;; The tests require some extra resources to be downloaded. | |
10502 | ;; TODO Try packaging these resources. | |
10503 | #:tests? #f)) | |
10504 | (home-page "http://nltk.org/") | |
10505 | (synopsis "Natural Language Toolkit") | |
10506 | (description "It provides interfaces to over 50 corpora and lexical | |
10507 | resources such as WordNet, along with a suite of text processing libraries | |
10508 | for classification, tokenization, stemming, tagging, parsing, and semantic | |
10509 | reasoning, wrappers for natural language processing libraries.") | |
10510 | (license license:asl2.0))) | |
10511 | ||
10512 | (define-public python2-nltk | |
10513 | (package-with-python2 python-nltk)) | |
10514 | ||
10515 | (define-public python-pymongo | |
10516 | (package | |
10517 | (name "python-pymongo") | |
10518 | (version "3.7.2") | |
10519 | (source (origin | |
10520 | (method url-fetch) | |
10521 | (uri (pypi-uri "pymongo" version)) | |
10522 | (sha256 | |
10523 | (base32 | |
10524 | "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c")))) | |
10525 | (build-system python-build-system) | |
10526 | (propagated-inputs | |
10527 | `(("python-certifi" ,python-certifi))) | |
10528 | (home-page "https://github.com/mongodb/mongo-python-driver") | |
10529 | (synopsis "Python driver for MongoDB") | |
10530 | (description "Python driver for MongoDB.") | |
10531 | (license license:asl2.0))) | |
10532 | ||
10533 | (define-public python2-pymongo | |
10534 | (package-with-python2 python-pymongo)) | |
10535 | ||
44d10b1f RW |
10536 | (define-public python-consul |
10537 | (package | |
10538 | (name "python-consul") | |
10539 | (version "0.6.1") | |
10540 | (source | |
10541 | (origin | |
10542 | (method url-fetch) | |
10543 | (uri (pypi-uri "python-consul" version)) | |
10544 | (sha256 | |
10545 | (base32 | |
10546 | "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8")))) | |
10547 | (build-system python-build-system) | |
10548 | (arguments | |
10549 | '(#:tests? #f)) ; The tests are not distributed | |
10550 | (propagated-inputs | |
10551 | `(("python-requests" ,python-requests) | |
10552 | ("python-six" ,python-six))) | |
10553 | (home-page "https://github.com/cablehead/python-consul") | |
10554 | (synopsis "Python client for Consul") | |
10555 | (description | |
10556 | "Python client for @url{http://www.consul.io/,Consul}, a tool for service | |
10557 | discovery, monitoring and configuration.") | |
10558 | (license license:expat))) | |
10559 | ||
10560 | (define-public python2-consul | |
10561 | (package-with-python2 python-consul)) | |
10562 | ||
10563 | (define-public python-schematics | |
10564 | (package | |
10565 | (name "python-schematics") | |
10566 | (version "1.1.1") | |
10567 | (source | |
1961d187 TGR |
10568 | (origin |
10569 | (method git-fetch) | |
10570 | (uri (git-reference | |
10571 | (url "https://github.com/schematics/schematics.git") | |
10572 | (commit (string-append "v" version)))) | |
10573 | (file-name (git-file-name name version)) | |
10574 | (sha256 | |
10575 | (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd")))) | |
44d10b1f RW |
10576 | (build-system python-build-system) |
10577 | (propagated-inputs | |
10578 | `(("python-six" ,python-six))) | |
10579 | (arguments | |
1961d187 TGR |
10580 | ;; The tests require a bunch of not very nice packages with fixed |
10581 | ;; version requirements (e.g. python-coveralls). | |
10582 | `(#:tests? #f)) | |
44d10b1f RW |
10583 | (home-page "https://github.com/schematics/schematics") |
10584 | (synopsis "Python Data Structures for Humans") | |
10585 | (description "Python Data Structures for Humans.") | |
10586 | (license license:bsd-3))) | |
10587 | ||
10588 | (define-public python2-schematics | |
10589 | (package-with-python2 python-schematics)) | |
10590 | ||
10591 | (define-public python-odfpy | |
10592 | (package | |
10593 | (name "python-odfpy") | |
10594 | (version "1.3.3") | |
10595 | (source (origin | |
10596 | (method url-fetch) | |
10597 | (uri (pypi-uri "odfpy" version)) | |
10598 | (sha256 | |
10599 | (base32 | |
10600 | "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw")))) | |
10601 | (arguments | |
10602 | `(#:modules ((srfi srfi-1) | |
10603 | (guix build python-build-system) | |
10604 | (guix build utils)) | |
10605 | #:phases | |
10606 | (modify-phases %standard-phases | |
10607 | (replace 'check | |
10608 | ;; The test runner invokes python2 and python3 for test*.py. | |
10609 | ;; To avoid having both in inputs, we replicate it here. | |
10610 | (lambda _ | |
21ccc01d RW |
10611 | (for-each (lambda (test-file) (invoke "python" test-file)) |
10612 | (find-files "tests" "^test.*\\.py$")) | |
10613 | #t))))) | |
44d10b1f RW |
10614 | (build-system python-build-system) |
10615 | (home-page "https://github.com/eea/odfpy") | |
10616 | (synopsis "Python API and tools to manipulate OpenDocument files") | |
10617 | (description "Collection of libraries and utility programs written in | |
10618 | Python to manipulate OpenDocument 1.2 files.") | |
10619 | (license | |
10620 | ;; The software is mainly dual GPL2+ and ASL2.0, but includes a | |
10621 | ;; number of files with other licenses. | |
10622 | (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0)))) | |
10623 | ||
10624 | (define-public python2-odfpy | |
10625 | (package-with-python2 python-odfpy)) | |
10626 | ||
10627 | (define-public python-natsort | |
10628 | (package | |
10629 | (name "python-natsort") | |
10630 | (version "5.4.1") | |
10631 | (source (origin | |
10632 | (method url-fetch) | |
10633 | (uri (pypi-uri "natsort" version)) | |
10634 | (sha256 | |
10635 | (base32 | |
10636 | "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf")))) | |
10637 | (build-system python-build-system) | |
10638 | (arguments | |
10639 | `(#:modules ((guix build utils) | |
10640 | (guix build python-build-system) | |
10641 | (srfi srfi-1) | |
10642 | (srfi srfi-26) | |
10643 | (ice-9 ftw)) | |
10644 | #:phases | |
10645 | (modify-phases %standard-phases | |
10646 | (add-before 'check 'set-cachedir | |
10647 | ;; Tests require write access to $HOME by default | |
10648 | (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)) | |
10649 | (replace 'check | |
10650 | (lambda _ | |
10651 | (let ((cwd (getcwd))) | |
10652 | (setenv "PYTHONPATH" | |
10653 | (string-append | |
10654 | cwd "/build/" | |
10655 | (find (cut string-prefix? "lib" <>) | |
10656 | (scandir (string-append cwd "/build"))) | |
10657 | ":" | |
10658 | (getenv "PYTHONPATH"))) | |
10659 | (invoke "pytest" "-v"))))))) | |
10660 | (native-inputs | |
10661 | `(("python-hypothesis" ,python-hypothesis) | |
10662 | ("python-pytest-cov" ,python-pytest-cov) | |
10663 | ("python-pytest-mock" ,python-pytest-mock) | |
10664 | ("python-pytest" ,python-pytest))) | |
10665 | (propagated-inputs ; TODO: Add python-fastnumbers. | |
10666 | `(("python-pyicu" ,python-pyicu))) | |
10667 | (home-page "https://github.com/SethMMorton/natsort") | |
10668 | (synopsis "Natural sorting for python and shell") | |
10669 | (description | |
10670 | "Natsort lets you apply natural sorting on lists instead of | |
10671 | lexicographical. If you use the built-in @code{sorted} method in python | |
36a4366d EF |
10672 | on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4}, |
10673 | @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20}, | |
10674 | @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that | |
10675 | identifies numbers and sorts them separately from strings. It can also sort | |
10676 | version numbers, real numbers, mixed types and more, and comes with a shell | |
10677 | command @command{natsort} that exposes this functionality in the command line.") | |
44d10b1f RW |
10678 | (license license:expat) |
10679 | (properties `((python2-variant . ,(delay python2-natsort)))))) | |
10680 | ||
10681 | (define-public python2-natsort | |
10682 | (let ((base (package-with-python2 (strip-python2-variant python-natsort)))) | |
10683 | (package (inherit base) | |
10684 | (native-inputs | |
10685 | `(("python2-pathlib" ,python2-pathlib) | |
10686 | ,@(package-native-inputs base)))))) | |
10687 | ||
10688 | (define-public python-glances | |
10689 | (package | |
10690 | (name "python-glances") | |
10691 | (version "3.0.2") | |
10692 | (source | |
10693 | (origin | |
10694 | (method url-fetch) | |
10695 | (uri (pypi-uri "Glances" version)) | |
10696 | (sha256 | |
10697 | (base32 | |
10698 | "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy")))) | |
10699 | (build-system python-build-system) | |
10700 | (propagated-inputs | |
10701 | `(("python-psutil" ,python-psutil))) | |
10702 | (home-page | |
10703 | "https://github.com/nicolargo/glances") | |
10704 | (synopsis | |
10705 | "A cross-platform curses-based monitoring tool") | |
10706 | (description | |
10707 | "Glances is a curses-based monitoring tool for a wide variety of platforms. | |
10708 | Glances uses the PsUtil library to get information from your system. It monitors | |
10709 | CPU, load, memory, network bandwidth, disk I/O, disk use, and more.") | |
10710 | (license license:lgpl3+))) | |
10711 | ||
10712 | (define-public python2-glances | |
10713 | (package-with-python2 python-glances)) | |
10714 | ||
10715 | (define-public python-graphql-core | |
10716 | (package | |
10717 | (name "python-graphql-core") | |
10718 | (version "0.5.3") | |
10719 | (source | |
10720 | (origin | |
10721 | (method url-fetch) | |
10722 | (uri (pypi-uri "graphql-core" version)) | |
10723 | (sha256 | |
10724 | (base32 | |
10725 | "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0")))) | |
10726 | (build-system python-build-system) | |
10727 | (arguments | |
10728 | `(#:tests? #f ; Tests require the unpackaged pytest-benchmark. | |
10729 | #:phases | |
10730 | (modify-phases %standard-phases | |
10731 | (add-after 'unpack 'patch-hardcoded-version | |
10732 | (lambda _ (substitute* | |
10733 | "setup.py" | |
10734 | (("'gevent==1.1rc1'") "'gevent'")) | |
10735 | #t))))) | |
10736 | (native-inputs | |
10737 | `(("python-gevent" ,python-gevent) | |
10738 | ("python-mock" ,python-mock) | |
10739 | ("python-pytest-mock" ,python-pytest-mock))) | |
10740 | (propagated-inputs | |
10741 | `(("python-promise" ,python-promise) | |
10742 | ("python-six" ,python-six))) | |
10743 | (home-page "https://github.com/graphql-python/graphql-core") | |
10744 | (synopsis "GraphQL implementation for Python") | |
10745 | (description | |
10746 | "GraphQL implementation for Python. GraphQL is a data query language and | |
10747 | runtime designed and used to request and deliver data to mobile and web apps. | |
10748 | This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js} | |
10749 | to Python.") | |
10750 | (license license:expat))) | |
10751 | ||
10752 | (define-public python2-graphql-core | |
10753 | (package-with-python2 python-graphql-core)) | |
10754 | ||
10755 | (define-public python-graphql-relay | |
10756 | (package | |
10757 | (name "python-graphql-relay") | |
10758 | (version "0.4.5") | |
10759 | (source | |
10760 | (origin | |
10761 | (method url-fetch) | |
10762 | (uri (pypi-uri "graphql-relay" version)) | |
10763 | (sha256 | |
10764 | (base32 | |
10765 | "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7")))) | |
10766 | (build-system python-build-system) | |
10767 | (arguments | |
10768 | '(#:tests? #f)) ; The tests are not distributed | |
10769 | (propagated-inputs | |
10770 | `(("python-graphql-core" ,python-graphql-core) | |
10771 | ("python-promise" ,python-promise) | |
10772 | ("python-six" ,python-six))) | |
10773 | (home-page "https://github.com/graphql-python/graphql-relay-py") | |
10774 | (synopsis "Relay implementation for Python") | |
10775 | (description | |
10776 | "This is a library to allow the easy creation of Relay-compliant servers | |
10777 | using the GraphQL Python reference implementation of a GraphQL server. It | |
10778 | should be noted that the code is a exact port of the original | |
10779 | @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation} | |
10780 | from Facebook.") | |
10781 | (license license:expat))) | |
10782 | ||
10783 | (define-public python2-graphql-relay | |
10784 | (package-with-python2 python-graphql-relay)) | |
10785 | ||
10786 | (define-public python-graphene | |
10787 | (package | |
10788 | (name "python-graphene") | |
10789 | (version "0.10.2") | |
10790 | (source | |
10791 | (origin | |
10792 | (method url-fetch) | |
10793 | (uri (pypi-uri "graphene" version)) | |
10794 | (sha256 | |
10795 | (base32 | |
10796 | "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q")))) | |
10797 | (build-system python-build-system) | |
10798 | (propagated-inputs | |
10799 | `(("python-graphql-core" ,python-graphql-core) | |
10800 | ("python-graphql-relay" ,python-graphql-relay) | |
10801 | ("python-iso8601" ,python-iso8601) | |
10802 | ("python-promise" ,python-promise) | |
10803 | ("python-six" ,python-six))) | |
10804 | (arguments | |
10805 | `(#:tests? #f)) ; no tests/ in the PyPI tarball | |
10806 | (home-page "http://graphene-python.org/") | |
10807 | (synopsis "GraphQL Framework for Python") | |
10808 | (description | |
10809 | "Graphene is a Python library for building GraphQL schemas/types. | |
10810 | A GraphQL schema describes your data model, and provides a GraphQL server | |
10811 | with an associated set of resolve methods that know how to fetch data.") | |
10812 | (properties `((python2-variant . ,(delay python2-graphene)))) | |
10813 | (license license:expat))) | |
10814 | ||
10815 | (define-public python2-graphene | |
10816 | (let ((base (package-with-python2 | |
10817 | (strip-python2-variant python-graphene)))) | |
10818 | (package (inherit base) | |
10819 | (native-inputs | |
10820 | `(("python2-sqlalchemy" ,python2-sqlalchemy) | |
10821 | ,@(package-native-inputs base)))))) | |
10822 | ||
10823 | (define-public python-nautilus | |
10824 | (package | |
10825 | (name "python-nautilus") | |
10826 | (version "0.4.9") | |
10827 | (source | |
10828 | (origin | |
10829 | (method url-fetch) | |
10830 | (uri (pypi-uri "nautilus" version)) | |
10831 | (sha256 | |
10832 | (base32 | |
10833 | "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p")))) | |
10834 | (build-system python-build-system) | |
10835 | (arguments `(#:tests? #f)) ; fails to import test modules | |
10836 | (propagated-inputs | |
10837 | `(("python-bcrypt" ,python-bcrypt) | |
10838 | ("python-click" ,python-click) | |
10839 | ("python-consul" ,python-consul) | |
10840 | ("python-graphene" ,python-graphene) | |
10841 | ("python-jinja2" ,python-jinja2) | |
10842 | ("python-peewee" ,python-peewee) | |
10843 | ("python-pika" ,python-pika) | |
10844 | ("python-tornado" ,python-tornado) | |
10845 | ("python-wtforms" ,python-wtforms))) | |
10846 | (native-inputs | |
10847 | `(("python-nose2" ,python-nose2))) | |
10848 | (home-page "https://github.com/AlecAivazis/nautilus") | |
10849 | (synopsis "Library for creating microservice applications") | |
10850 | (description | |
10851 | "Nautilus is a framework for flux based microservices that looks to | |
10852 | provide extendible implementations of common aspects of a cloud so that you can | |
10853 | focus on building massively scalable web applications.") | |
10854 | (license license:expat))) | |
10855 | ||
10856 | (define-public python-snowballstemmer | |
10857 | (package | |
10858 | (name "python-snowballstemmer") | |
10859 | (version "1.2.1") | |
10860 | (source (origin | |
10861 | (method url-fetch) | |
10862 | (uri (pypi-uri "snowballstemmer" version)) | |
10863 | (sha256 | |
10864 | (base32 | |
10865 | "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi")))) | |
10866 | (build-system python-build-system) | |
10867 | (arguments | |
10868 | `(;; No tests exist | |
10869 | #:tests? #f)) | |
10870 | (home-page "https://github.com/shibukawa/snowball_py") | |
10871 | (synopsis "Snowball stemming library collection for Python") | |
10872 | (description "This package provides 16 word stemmer algorithms generated | |
10873 | from Snowball algorithms. It includes the 15 original ones plus the Poerter | |
10874 | English stemmer.") | |
10875 | (license license:bsd-3))) | |
10876 | ||
10877 | (define-public python2-snowballstemmer | |
10878 | (package-with-python2 python-snowballstemmer)) | |
10879 | ||
44d10b1f RW |
10880 | (define-public python-setproctitle |
10881 | (package | |
10882 | (name "python-setproctitle") | |
10883 | (version "1.1.10") | |
10884 | (source | |
10885 | (origin | |
10886 | (method url-fetch) | |
10887 | (uri (pypi-uri "setproctitle" version)) | |
10888 | (sha256 | |
10889 | (base32 | |
10890 | "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2")))) | |
10891 | (build-system python-build-system) | |
10892 | (arguments | |
10893 | '(#:phases | |
10894 | (modify-phases %standard-phases | |
10895 | (add-before 'check 'patch-Makefile | |
10896 | ;; Stricly this is only required for the python2 variant. | |
10897 | ;; But adding a phase in an inherited package seems to be | |
10898 | ;; cumbersum. So we patch even for python3. | |
10899 | (lambda _ | |
10900 | (let ((nose (assoc-ref %build-inputs "python2-nose"))) | |
10901 | (when nose | |
10902 | (substitute* "Makefile" | |
10903 | (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ") | |
10904 | (string-append nose "/bin/nosetests ")))) | |
10905 | #t))) | |
10906 | (replace 'check | |
10907 | (lambda _ | |
10908 | (setenv "PYTHON" (or (which "python3") (which "python"))) | |
10909 | (setenv "PYCONFIG" (or (which "python3-config") | |
10910 | (which "python-config"))) | |
10911 | (setenv "CC" "gcc") | |
10912 | ;; No need to extend PYTHONPATH to find the built package, since | |
10913 | ;; the Makefile will build anyway | |
10914 | (invoke "make" "check")))))) | |
10915 | (native-inputs | |
10916 | `(("procps" ,procps))) ; required for tests | |
10917 | (home-page | |
10918 | "https://github.com/dvarrazzo/py-setproctitle") | |
10919 | (synopsis | |
10920 | "Setproctitle implementation for Python to customize the process title") | |
10921 | (description "The library allows a process to change its title (as displayed | |
10922 | by system tools such as ps and top). | |
10923 | ||
10924 | Changing the title is mostly useful in multi-process systems, for | |
10925 | example when a master process is forked: changing the children's title | |
10926 | allows to identify the task each process is busy with. The technique | |
10927 | is used by PostgreSQL and the OpenSSH Server for example.") | |
10928 | (license license:bsd-3) | |
10929 | (properties `((python2-variant . ,(delay python2-setproctitle)))))) | |
10930 | ||
10931 | (define-public python2-setproctitle | |
10932 | (let ((base (package-with-python2 | |
10933 | (strip-python2-variant python-setproctitle)))) | |
10934 | (package | |
10935 | (inherit base) | |
10936 | (native-inputs `(("python2-nose" ,python2-nose) | |
10937 | ,@(package-native-inputs base)))))) | |
10938 | ||
10939 | (define-public python-validictory | |
10940 | (package | |
10941 | (name "python-validictory") | |
10942 | (version "1.0.1") | |
10943 | (source | |
10944 | (origin | |
10945 | (method url-fetch) | |
10946 | (uri (pypi-uri "validictory" version)) | |
10947 | (sha256 | |
10948 | (base32 | |
10949 | "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q")))) | |
10950 | (build-system python-build-system) | |
10951 | (arguments | |
10952 | '(#:phases | |
10953 | (modify-phases %standard-phases | |
10954 | (add-after 'unpack 'bootstrap | |
10955 | ;; Move the tests out of the package directory to avoid | |
10956 | ;; packaging them. | |
10957 | (lambda* _ | |
10958 | (rename-file "validictory/tests" "tests") | |
10959 | (delete-file "tests/__init__.py"))) | |
10960 | (replace 'check | |
10961 | (lambda _ | |
10962 | ;; Extend PYTHONPATH so the built package will be found. | |
10963 | (setenv "PYTHONPATH" | |
10964 | (string-append (getcwd) "/build/lib:" | |
10965 | (getenv "PYTHONPATH"))) | |
6568bd5d | 10966 | (invoke "py.test" "-vv" )))))) |
44d10b1f RW |
10967 | (native-inputs |
10968 | `(("python-pytest" ,python-pytest))) | |
10969 | (home-page | |
10970 | "https://github.com/jamesturk/validictory") | |
10971 | (synopsis "General purpose Python data validator") | |
10972 | (description "It allows validation of arbitrary Python data structures. | |
10973 | ||
10974 | The schema format is based on the JSON Schema | |
10975 | proposal (http://json-schema.org), so combined with json the library is also | |
10976 | useful as a validator for JSON data.") | |
10977 | (license license:expat))) | |
10978 | ||
10979 | (define-public python2-validictory | |
10980 | (package-with-python2 python-validictory)) | |
10981 | ||
10982 | (define-public python-pyelftools | |
10983 | (package | |
10984 | (name "python-pyelftools") | |
10985 | (version "0.25") | |
10986 | (source | |
10987 | (origin | |
10988 | (method url-fetch) | |
10989 | (uri (pypi-uri "pyelftools" version)) | |
10990 | (sha256 | |
10991 | (base32 | |
10992 | "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9")))) | |
10993 | (build-system python-build-system) | |
10994 | (arguments | |
10995 | `(#:phases | |
10996 | (modify-phases %standard-phases | |
10997 | (add-before 'check 'set-pythonpath | |
10998 | (lambda _ | |
10999 | (setenv "PYTHONPATH" | |
11000 | (string-append | |
11001 | (getcwd) "/test/" | |
11002 | ":" (getenv "PYTHONPATH"))) | |
11003 | #t))))) | |
11004 | (home-page | |
11005 | "https://github.com/eliben/pyelftools") | |
11006 | (synopsis | |
11007 | "Analyze binary and library file information") | |
11008 | (description "This Python library provides interfaces for parsing and | |
11009 | analyzing two binary and library file formats; the Executable and Linking | |
11010 | Format (ELF), and debugging information in the Debugging With Attributed | |
11011 | Record Format (DWARF).") | |
11012 | (license license:public-domain))) | |
11013 | ||
11014 | (define-public python-pyev | |
11015 | (package | |
11016 | (name "python-pyev") | |
11017 | (version "0.9.0") | |
11018 | (source | |
11019 | (origin | |
11020 | (method url-fetch) | |
11021 | (uri (pypi-uri "pyev" version)) | |
11022 | (sha256 | |
11023 | (base32 | |
11024 | "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx")))) | |
11025 | (build-system python-build-system) | |
11026 | (arguments | |
11027 | `(#:tests? #f ; no test suite | |
11028 | #:phases | |
11029 | (modify-phases %standard-phases | |
11030 | (add-after 'unpack 'patch | |
11031 | (lambda* (#:key inputs #:allow-other-keys) | |
11032 | (let ((libev (string-append (assoc-ref inputs "libev") | |
11033 | "/lib/libev.so.4"))) | |
11034 | (substitute* "setup.py" | |
11035 | (("libev_dll_name = find_library\\(\\\"ev\\\"\\)") | |
11036 | (string-append "libev_dll_name = \"" libev "\""))))))))) | |
11037 | (inputs | |
11038 | `(("libev" ,libev))) | |
11039 | (home-page "http://pythonhosted.org/pyev/") | |
11040 | (synopsis "Python libev interface") | |
11041 | (description "Pyev provides a Python interface to libev.") | |
11042 | (license license:gpl3))) | |
11043 | ||
11044 | (define-public python2-pyev | |
11045 | (package-with-python2 python-pyev)) | |
11046 | ||
11047 | (define-public python-imagesize | |
11048 | (package | |
11049 | (name "python-imagesize") | |
11050 | (version "1.1.0") | |
11051 | (source | |
11052 | (origin | |
11053 | (method url-fetch) | |
11054 | (uri (pypi-uri "imagesize" version)) | |
11055 | (sha256 | |
11056 | (base32 | |
11057 | "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk")))) | |
11058 | (build-system python-build-system) | |
11059 | (home-page "https://github.com/shibukawa/imagesize_py") | |
11060 | (synopsis "Gets image size of files in various formats in Python") | |
11061 | (description | |
11062 | "This package allows determination of image size from | |
11063 | PNG, JPEG, JPEG2000 and GIF files in pure Python.") | |
11064 | (license license:expat))) | |
11065 | ||
11066 | (define-public python2-imagesize | |
11067 | (package-with-python2 python-imagesize)) | |
11068 | ||
11069 | (define-public python-termstyle | |
11070 | (package | |
11071 | (name "python-termstyle") | |
11072 | (version "0.1.11") | |
11073 | (source | |
11074 | (origin | |
11075 | (method url-fetch) | |
11076 | (uri (pypi-uri "termstyle" version)) | |
11077 | (sha256 | |
11078 | (base32 | |
11079 | "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g")))) | |
11080 | (build-system python-build-system) | |
11081 | (arguments | |
11082 | '(#:phases | |
11083 | (modify-phases %standard-phases | |
11084 | (replace 'check | |
11085 | (lambda _ | |
831080a6 | 11086 | (invoke "python" "test3.py")))))) |
44d10b1f RW |
11087 | (home-page "https://github.com/gfxmonk/termstyle") |
11088 | (synopsis "Console text coloring for Python") | |
11089 | (description "This package provides console text coloring for Python.") | |
11090 | (license license:bsd-3))) | |
11091 | ||
11092 | (define-public python-argcomplete | |
11093 | (package | |
11094 | (name "python-argcomplete") | |
11095 | (version "1.7.0") | |
11096 | (source | |
11097 | (origin | |
11098 | (method url-fetch) | |
11099 | (uri (pypi-uri "argcomplete" version)) | |
11100 | (sha256 | |
11101 | (base32 | |
11102 | "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x")))) | |
11103 | (build-system python-build-system) | |
11104 | (native-inputs | |
11105 | `(("python-pexpect" ,python-pexpect) | |
11106 | ("tcsh" ,tcsh) | |
11107 | ("bash-full" ,bash))) ;full Bash for 'test_file_completion' | |
11108 | (home-page "https://github.com/kislyuk/argcomplete") | |
11109 | (synopsis "Shell tab completion for Python argparse") | |
11110 | (description "argcomplete provides extensible command line tab completion | |
11111 | of arguments and options for Python scripts using @code{argparse}. It's | |
11112 | particularly useful for programs with many options or sub-parsers that can | |
11113 | dynamically suggest completions; for example, when browsing resources over the | |
11114 | network.") | |
11115 | (license license:asl2.0))) | |
11116 | ||
11117 | (define-public python2-argcomplete | |
11118 | (package-with-python2 python-argcomplete)) | |
11119 | ||
11120 | (define-public python-xopen | |
11121 | (package | |
11122 | (name "python-xopen") | |
24d64989 | 11123 | (version "0.5.0") |
44d10b1f RW |
11124 | (source |
11125 | (origin | |
11126 | (method url-fetch) | |
11127 | (uri (pypi-uri "xopen" version)) | |
11128 | (sha256 | |
11129 | (base32 | |
24d64989 | 11130 | "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh")))) |
44d10b1f | 11131 | (build-system python-build-system) |
24d64989 RW |
11132 | (propagated-inputs |
11133 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
44d10b1f RW |
11134 | (home-page "https://github.com/marcelm/xopen/") |
11135 | (synopsis "Open compressed files transparently") | |
11136 | (description "This module provides an @code{xopen} function that works like | |
11137 | Python's built-in @code{open} function, but can also deal with compressed files. | |
11138 | Supported compression formats are gzip, bzip2 and, xz, and are automatically | |
11139 | recognized by their file extensions. The focus is on being as efficient as | |
11140 | possible on all supported Python versions.") | |
11141 | (license license:expat))) | |
11142 | ||
11143 | (define-public python2-xopen | |
11144 | (let ((base (package-with-python2 | |
11145 | (strip-python2-variant python-xopen)))) | |
11146 | (package | |
11147 | (inherit base) | |
11148 | (propagated-inputs `(("python2-bz2file" ,python2-bz2file) | |
11149 | ,@(package-propagated-inputs base)))))) | |
11150 | ||
11151 | (define-public python-cheetah | |
11152 | (package | |
11153 | (name "python-cheetah") | |
11154 | (version "3.1.0") | |
11155 | (source | |
11156 | (origin | |
11157 | (method url-fetch) | |
11158 | (uri (pypi-uri "Cheetah3" version)) | |
11159 | (sha256 | |
11160 | (base32 | |
11161 | "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9")))) | |
11162 | (build-system python-build-system) | |
11163 | (arguments | |
11164 | `(#:modules ((guix build utils) | |
11165 | (guix build python-build-system) | |
11166 | (ice-9 ftw) | |
11167 | (srfi srfi-1) | |
11168 | (srfi srfi-26)) | |
11169 | #:phases (modify-phases %standard-phases | |
11170 | (add-after 'unpack 'use-absolute-python | |
11171 | (lambda _ | |
11172 | (substitute* "Cheetah/CheetahWrapper.py" | |
11173 | (("#!/usr/bin/env python") | |
11174 | (string-append "#!" (which "python")))) | |
11175 | #t)) | |
11176 | (replace 'check | |
11177 | (lambda _ | |
11178 | (let ((cwd (getcwd))) | |
11179 | (setenv "PYTHONPATH" | |
11180 | (string-append | |
11181 | cwd "/build/" | |
11182 | (find (cut string-prefix? "lib" <>) | |
11183 | (scandir (string-append cwd "/build"))) | |
11184 | ":" (getenv "PYTHONPATH"))) | |
11185 | (setenv "PATH" | |
11186 | (string-append (getenv "PATH") | |
11187 | ":" cwd "/bin")) | |
11188 | (setenv "TMPDIR" "/tmp") | |
11189 | ||
11190 | (substitute* "Cheetah/Tests/Test.py" | |
11191 | (("unittest.TextTestRunner\\(\\)") | |
11192 | "unittest.TextTestRunner(verbosity=2)")) | |
11193 | ||
11194 | (invoke "python" "Cheetah/Tests/Test.py"))))))) | |
11195 | (propagated-inputs | |
11196 | `(("python-markdown" ,python-markdown))) ;optional | |
11197 | (home-page "http://cheetahtemplate.org/") | |
11198 | (synopsis "Template engine") | |
11199 | (description "Cheetah is a text-based template engine and Python code | |
11200 | generator. | |
11201 | ||
11202 | Cheetah can be used as a standalone templating utility or referenced as | |
11203 | a library from other Python applications. It has many potential uses, | |
11204 | but web developers looking for a viable alternative to ASP, JSP, PHP and | |
11205 | PSP are expected to be its principle user group. | |
11206 | ||
11207 | Features: | |
11208 | @enumerate | |
11209 | @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other | |
11210 | text-based format. | |
11211 | @item Cleanly separates content, graphic design, and program code. | |
11212 | @item Blends the power and flexibility of Python with a simple template language | |
11213 | that non-programmers can understand. | |
11214 | @item Gives template writers full access to any Python data structure, module, | |
11215 | function, object, or method in their templates. | |
11216 | @item Makes code reuse easy by providing an object-orientated interface to | |
11217 | templates that is accessible from Python code or other Cheetah templates. | |
11218 | One template can subclass another and selectively reimplement sections of it. | |
11219 | @item Provides a simple, yet powerful, caching mechanism that can dramatically | |
11220 | improve the performance of a dynamic website. | |
11221 | @item Compiles templates into optimized, yet readable, Python code. | |
11222 | @end enumerate") | |
11223 | (license (license:x11-style "file://LICENSE")))) | |
11224 | ||
11225 | (define-public python2-cheetah | |
11226 | (package-with-python2 python-cheetah)) | |
11227 | ||
11228 | (define-public python-dulwich | |
11229 | (package | |
11230 | (name "python-dulwich") | |
11231 | (version "0.18.6") | |
11232 | (source | |
11233 | (origin | |
11234 | (method url-fetch) | |
11235 | (uri (list (string-append "https://www.dulwich.io/releases/" | |
11236 | "dulwich-" version ".tar.gz") | |
11237 | (pypi-uri "dulwich" version))) | |
11238 | (sha256 | |
11239 | (base32 | |
11240 | "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q")))) | |
11241 | (build-system python-build-system) | |
11242 | (arguments | |
11243 | `(#:phases | |
11244 | (modify-phases %standard-phases | |
11245 | (add-before 'check 'fix-tests | |
11246 | (lambda* (#:key inputs #:allow-other-keys) | |
11247 | ;; The tests use Popen with a custom environment which doesn't | |
11248 | ;; include PATH. | |
11249 | (substitute* "dulwich/tests/compat/utils.py" | |
11250 | (("'git'") (string-append "'" | |
11251 | (which "git") | |
11252 | "'"))) | |
11253 | (substitute* '("dulwich/tests/test_repository.py" | |
11254 | "dulwich/tests/test_hooks.py") | |
11255 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
11256 | (setenv "TEST_RUNNER" "unittest") | |
11257 | (setenv "PYTHONHASHSEED" "random") | |
11258 | #t))))) | |
11259 | (propagated-inputs | |
11260 | `(("python-fastimport" ,python-fastimport))) | |
11261 | (native-inputs | |
11262 | `(("python-mock" ,python-mock) | |
11263 | ("python-geventhttpclient" ,python-geventhttpclient) | |
11264 | ("git" ,git))) | |
11265 | (home-page "https://www.dulwich.io/") | |
11266 | (synopsis "Git implementation in Python") | |
11267 | (description "Dulwich is an implementation of the Git file formats and | |
11268 | protocols written in pure Python.") | |
11269 | ;; Can be used with either license. | |
11270 | (license (list license:asl2.0 license:gpl2+)))) | |
11271 | ||
11272 | (define-public python2-dulwich | |
11273 | (package-with-python2 python-dulwich)) | |
11274 | ||
11275 | (define-public python-pbkdf2 | |
11276 | (package | |
11277 | (name "python-pbkdf2") | |
11278 | (version "1.3") | |
11279 | (source | |
11280 | (origin | |
11281 | (method url-fetch) | |
11282 | (uri (pypi-uri "pbkdf2" version)) | |
11283 | (sha256 | |
11284 | (base32 | |
11285 | "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc")))) | |
11286 | (build-system python-build-system) | |
11287 | (arguments | |
11288 | '(#:phases | |
11289 | (modify-phases %standard-phases | |
11290 | (replace 'check | |
11291 | (lambda _ | |
11292 | (setenv "PYTHONPATH" | |
11293 | (string-append (getcwd) "/build/lib:" | |
11294 | (getenv "PYTHONPATH"))) | |
ee2bb944 | 11295 | (invoke "python" "test/test_pbkdf2.py")))))) |
44d10b1f RW |
11296 | (propagated-inputs |
11297 | `(("python-pycrypto" ,python-pycrypto))) ; optional | |
11298 | (home-page "https://www.dlitz.net/software/python-pbkdf2/") | |
11299 | (synopsis "Password-based key derivation") | |
11300 | (description "This module implements the password-based key derivation | |
11301 | function, PBKDF2, specified in RSA PKCS#5 v2.0. | |
11302 | ||
11303 | PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which | |
11304 | is part of the RSA Public Key Cryptography Standards series. The provided | |
11305 | implementation takes a password or a passphrase and a salt value (and | |
11306 | optionally a iteration count, a digest module, and a MAC module) and provides | |
11307 | a file-like object from which an arbitrarly-sized key can be read.") | |
11308 | (license license:expat))) | |
11309 | ||
11310 | (define-public python2-pbkdf2 | |
11311 | (package-with-python2 python-pbkdf2)) | |
11312 | ||
11313 | (define-public python-qrcode | |
11314 | (package | |
11315 | (name "python-qrcode") | |
217ea1a1 | 11316 | (version "6.1") |
44d10b1f RW |
11317 | (source |
11318 | (origin | |
11319 | (method url-fetch) | |
11320 | (uri (pypi-uri "qrcode" version)) | |
11321 | (sha256 | |
217ea1a1 | 11322 | (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh")))) |
44d10b1f RW |
11323 | (build-system python-build-system) |
11324 | (arguments | |
11325 | ;; FIXME: Tests require packaging 'pymaging'. | |
11326 | '(#:tests? #f)) | |
11327 | (propagated-inputs | |
11328 | `(("python-lxml" ,python-lxml) ; for SVG output | |
11329 | ("python-pillow" ,python-pillow) ; for PNG output | |
11330 | ("python-six" ,python-six))) | |
44d10b1f RW |
11331 | (home-page "https://github.com/lincolnloop/python-qrcode") |
11332 | (synopsis "QR Code image generator") | |
11333 | (description "This package provides a pure Python QR Code generator | |
11334 | module. It uses the Python Imaging Library (PIL) to allow for the generation | |
11335 | of QR Codes. | |
11336 | ||
11337 | In addition this package provides a command line tool to generate QR codes and | |
11338 | either write these QR codes to a file or do the output as ascii art at the | |
11339 | console.") | |
11340 | (license license:bsd-3))) | |
11341 | ||
11342 | (define-public python2-qrcode | |
11343 | (package-with-python2 python-qrcode)) | |
11344 | ||
11345 | (define-public python-rst2ansi | |
11346 | (package | |
11347 | (name "python-rst2ansi") | |
11348 | (version "0.1.5") | |
11349 | (source | |
11350 | (origin | |
11351 | (method url-fetch) | |
11352 | (uri (pypi-uri "rst2ansi" version)) | |
11353 | (sha256 | |
11354 | (base32 | |
11355 | "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv")))) | |
11356 | (build-system python-build-system) | |
11357 | (propagated-inputs | |
11358 | `(("python-docutils" ,python-docutils))) | |
11359 | (home-page "https://github.com/Snaipe/python-rst-to-ansi") | |
11360 | (synopsis "Convert RST to ANSI-decorated console output") | |
11361 | (description | |
11362 | "Python module dedicated to rendering RST (reStructuredText) documents | |
11363 | to ansi-escaped strings suitable for display in a terminal.") | |
11364 | (license license:expat))) | |
11365 | ||
11366 | (define-public python-ansi2html | |
11367 | (package | |
11368 | (name "python-ansi2html") | |
11369 | (version "1.2.0") | |
11370 | (source | |
11371 | (origin | |
11372 | (method url-fetch) | |
11373 | (uri (pypi-uri "ansi2html" version)) | |
11374 | (sha256 | |
11375 | (base32 | |
11376 | "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y")))) | |
11377 | (build-system python-build-system) | |
11378 | (native-inputs | |
11379 | `(("python-mock" ,python-mock) | |
11380 | ("python-nose" ,python-nose))) | |
11381 | (propagated-inputs | |
11382 | `(("python-six" ,python-six))) | |
11383 | (home-page "https://github.com/ralphbean/ansi2html") | |
11384 | (synopsis "Convert ANSI-decorated console output to HTML") | |
11385 | (description | |
11386 | "@command{ansi2html} is a Python library and command line utility for | |
11387 | convering text with ANSI color codes to HTML or LaTeX.") | |
11388 | (license license:gpl3+))) | |
11389 | ||
11390 | (define-public python2-ansi2html | |
11391 | (package-with-python2 python-ansi2html)) | |
11392 | ||
11393 | (define-public python-ddt | |
11394 | (package | |
11395 | (name "python-ddt") | |
11396 | (version "1.1.3") | |
11397 | (source | |
11398 | (origin | |
11399 | (method url-fetch) | |
11400 | (uri (pypi-uri "ddt" version)) | |
11401 | (sha256 | |
11402 | (base32 | |
11403 | "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk")))) | |
11404 | (build-system python-build-system) | |
11405 | (native-inputs | |
11406 | `(("python-mock" ,python-mock) | |
11407 | ("python-nose" ,python-nose))) | |
11408 | (propagated-inputs | |
11409 | `(("python-six" ,python-six) | |
11410 | ("python-pyyaml" ,python-pyyaml))) | |
11411 | (home-page "https://github.com/txels/ddt") | |
11412 | (synopsis "Data-Driven Tests") | |
11413 | (description | |
11414 | "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by | |
11415 | running it with different test data, and make it appear as multiple test | |
11416 | cases.") | |
11417 | (license license:expat))) | |
11418 | ||
11419 | (define-public python2-ddt | |
11420 | (package-with-python2 python-ddt)) | |
11421 | ||
11422 | (define-public python-pycountry | |
11423 | (package | |
11424 | (name "python-pycountry") | |
11425 | (version "18.5.26") | |
11426 | (source | |
11427 | (origin | |
11428 | (method url-fetch) | |
11429 | (uri (pypi-uri "pycountry" version)) | |
11430 | (sha256 | |
11431 | (base32 | |
11432 | "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz")))) | |
11433 | (build-system python-build-system) | |
11434 | (home-page "https://bitbucket.org/flyingcircus/pycountry") | |
11435 | (synopsis "ISO databases for languages, countries, currencies, etc.") | |
11436 | (description | |
11437 | "@code{pycountry} provides the ISO databases for the standards: | |
11438 | @enumerate | |
11439 | @item 639-3 (Languages) | |
11440 | @item 3166 (Countries) | |
11441 | @item 3166-3 (Deleted Countries) | |
11442 | @item 3166-2 (Subdivisions of countries) | |
11443 | @item 4217 (Currencies) | |
11444 | @item 15924 (Scripts) | |
11445 | @end enumerate | |
11446 | It includes a copy from Debian’s pkg-isocodes and makes the data accessible | |
11447 | through a Python API.") | |
11448 | (license license:lgpl2.1+))) | |
11449 | ||
11450 | (define-public python2-pycountry | |
11451 | (package-with-python2 python-pycountry)) | |
11452 | ||
11453 | (define-public python-pycosat | |
11454 | (package | |
11455 | (name "python-pycosat") | |
11456 | (version "0.6.1") | |
11457 | (source | |
11458 | (origin | |
11459 | (method url-fetch) | |
11460 | (uri (pypi-uri "pycosat" version)) | |
11461 | (sha256 | |
11462 | (base32 | |
11463 | "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l")))) | |
11464 | ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/ | |
11465 | (build-system python-build-system) | |
11466 | (home-page "https://github.com/ContinuumIO/pycosat") | |
11467 | (synopsis "Bindings to picosat (a SAT solver)") | |
11468 | (description | |
11469 | "This package provides efficient Python bindings to @code{picosat} on | |
11470 | the C level. When importing pycosat, the @code{picosat} solver becomes part | |
11471 | of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability | |
11472 | Problem} (SAT) solver.") | |
11473 | (license license:expat))) | |
11474 | ||
11475 | (define-public python2-pycosat | |
11476 | (package-with-python2 python-pycosat)) | |
11477 | ||
11478 | (define-public python2-ruamel.ordereddict | |
11479 | (package | |
11480 | (name "python2-ruamel.ordereddict") | |
11481 | (version "0.4.9") | |
11482 | (source | |
11483 | (origin | |
11484 | (method url-fetch) | |
11485 | (uri (pypi-uri "ruamel.ordereddict" version)) | |
11486 | (sha256 | |
11487 | (base32 | |
11488 | "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h")))) | |
11489 | (build-system python-build-system) | |
11490 | (arguments | |
11491 | `(#:python ,python-2 | |
11492 | #:phases | |
11493 | (modify-phases %standard-phases | |
11494 | (delete 'check) | |
11495 | (add-after 'install 'check | |
11496 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
11497 | (add-installed-pythonpath inputs outputs) | |
f987ac30 | 11498 | (invoke "python" "test/testordereddict.py")))))) |
44d10b1f RW |
11499 | (home-page "https://bitbucket.org/ruamel/ordereddict") |
11500 | (synopsis "Version of dict that keeps keys in insertion order") | |
11501 | (description | |
11502 | "This is an implementation of an ordered dictionary with @dfn{Key | |
11503 | Insertion Order} (KIO: updates of values do not affect the position of the | |
11504 | key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is | |
11505 | removed and put at the back). The standard library module @code{OrderedDict}, | |
11506 | implemented later, implements a subset of @code{ordereddict} functionality. | |
11507 | Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted | |
11508 | Order} (KSO, no sorting function can be specified, but a transform can be | |
11509 | specified to apply on the key before comparison (e.g. @code{string.lower})).") | |
11510 | (license license:expat))) | |
11511 | ||
11512 | (define-public python-pypeg2 | |
11513 | (package | |
11514 | (name "python-pypeg2") | |
11515 | (version "2.15.2") | |
11516 | (source | |
11517 | (origin | |
11518 | (method url-fetch) | |
11519 | (uri (pypi-uri "pyPEG2" version)) | |
11520 | (sha256 | |
11521 | (base32 | |
11522 | "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b")))) | |
11523 | (build-system python-build-system) | |
11524 | (propagated-inputs `(("python-lxml" ,python-lxml))) | |
11525 | (arguments | |
11526 | ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35 | |
11527 | '(#:tests? #f)) | |
11528 | (home-page "https://fdik.org/pyPEG/") | |
11529 | (synopsis "Parsering Expression Grammars in Python") | |
11530 | (description "PyPEG is an intrinsic parser interpreter framework for | |
11531 | Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can | |
11532 | parse many formal languages.") | |
11533 | (license license:gpl2))) | |
11534 | ||
11535 | (define-public python-incremental | |
11536 | (package | |
11537 | (name "python-incremental") | |
11538 | (version "17.5.0") | |
11539 | (source | |
11540 | (origin | |
11541 | (method url-fetch) | |
11542 | (uri (pypi-uri "incremental" version)) | |
11543 | (sha256 | |
11544 | (base32 | |
11545 | "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv")))) | |
11546 | (build-system python-build-system) | |
11547 | (home-page "https://github.com/hawkowl/incremental") | |
11548 | (synopsis "Library for versioning Python projects") | |
11549 | (description "Incremental is a small library that versions your Python | |
11550 | projects.") | |
11551 | (license license:expat))) | |
11552 | ||
11553 | (define-public python2-incremental | |
11554 | (package-with-python2 python-incremental)) | |
11555 | ||
11556 | (define-public python-invoke | |
11557 | (package | |
11558 | (name "python-invoke") | |
11559 | (home-page "http://www.pyinvoke.org/") | |
11560 | (version "1.1.0") | |
11561 | (source (origin | |
11562 | (method url-fetch) | |
11563 | (uri (pypi-uri "invoke" version)) | |
11564 | (sha256 | |
11565 | (base32 | |
11566 | "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6")))) | |
11567 | (build-system python-build-system) | |
11568 | (arguments | |
11569 | ;; XXX: Requires many dependencies that are not yet in Guix. | |
11570 | `(#:tests? #f)) | |
11571 | (synopsis "Pythonic task execution") | |
11572 | (description | |
11573 | "Invoke is a Python task execution tool and library, drawing inspiration | |
11574 | from various sources to arrive at a powerful and clean feature set. It is | |
11575 | evolved from the Fabric project, but focuses on local and abstract concerns | |
11576 | instead of servers and network commands.") | |
11577 | (license license:bsd-3))) | |
11578 | ||
11579 | (define-public python2-invoke | |
11580 | (package-with-python2 python-invoke)) | |
11581 | ||
11582 | (define-public python-automat | |
11583 | (package | |
11584 | (name "python-automat") | |
919d80a0 | 11585 | (version "0.7.0") |
44d10b1f RW |
11586 | (source (origin |
11587 | (method url-fetch) | |
11588 | (uri (pypi-uri "Automat" version)) | |
11589 | (sha256 | |
11590 | (base32 | |
919d80a0 | 11591 | "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb")))) |
44d10b1f RW |
11592 | (build-system python-build-system) |
11593 | ;; We disable the tests because they require python-twisted, while | |
11594 | ;; python-twisted depends on python-automat. Twisted is optional, but the | |
11595 | ;; tests fail if it is not available. Also see | |
11596 | ;; <https://github.com/glyph/automat/issues/71>. | |
11597 | (arguments '(#:tests? #f)) | |
11598 | (native-inputs | |
11599 | `(("python-m2r" ,python-m2r) | |
11600 | ("python-setuptools-scm" ,python-setuptools-scm) | |
11601 | ("python-graphviz" ,python-graphviz))) | |
11602 | (propagated-inputs | |
11603 | `(("python-six" ,python-six) | |
11604 | ("python-attrs" ,python-attrs))) | |
11605 | (home-page "https://github.com/glyph/Automat") | |
11606 | (synopsis "Self-service finite-state machines") | |
11607 | (description "Automat is a library for concise, idiomatic Python | |
11608 | expression of finite-state automata (particularly deterministic finite-state | |
11609 | transducers).") | |
11610 | (license license:expat))) | |
11611 | ||
11612 | (define-public python2-automat | |
11613 | (package-with-python2 python-automat)) | |
11614 | ||
11615 | (define-public python-m2r | |
11616 | (package | |
11617 | (name "python-m2r") | |
bcfb8fac | 11618 | (version "0.2.1") |
44d10b1f RW |
11619 | (source (origin |
11620 | (method url-fetch) | |
11621 | (uri (pypi-uri "m2r" version)) | |
11622 | (sha256 | |
11623 | (base32 | |
bcfb8fac | 11624 | "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z")))) |
44d10b1f RW |
11625 | (build-system python-build-system) |
11626 | (propagated-inputs | |
11627 | `(("python-docutils" ,python-docutils) | |
11628 | ("python-mistune" ,python-mistune))) | |
11629 | (native-inputs | |
11630 | `(("python-pygments" ,python-pygments) | |
11631 | ("python-mock" ,python-mock))) | |
11632 | (home-page "https://github.com/miyakogi/m2r") | |
11633 | (synopsis "Markdown to reStructuredText converter") | |
11634 | (description "M2R converts a markdown file including reST markups to valid | |
11635 | reST format.") | |
11636 | (license license:expat))) | |
11637 | ||
11638 | (define-public python2-m2r | |
11639 | (package-with-python2 python-m2r)) | |
11640 | ||
11641 | (define-public python-constantly | |
11642 | (package | |
11643 | (name "python-constantly") | |
11644 | (version "15.1.0") | |
11645 | (source (origin | |
11646 | (method url-fetch) | |
11647 | (uri (pypi-uri "constantly" version)) | |
11648 | (sha256 | |
11649 | (base32 | |
11650 | "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq")))) | |
11651 | (build-system python-build-system) | |
11652 | (home-page "https://github.com/twisted/constantly") | |
11653 | (synopsis "Symbolic constants in Python") | |
11654 | (description "Constantly is a Python library that provides symbolic | |
11655 | constant support. It includes collections and constants with text, numeric, | |
11656 | and bit flag values.") | |
11657 | (license license:expat))) | |
11658 | ||
11659 | (define-public python2-constantly | |
11660 | (package-with-python2 python-constantly)) | |
11661 | ||
11662 | (define-public python-attrs | |
11663 | (package | |
11664 | (name "python-attrs") | |
67458e20 | 11665 | (version "19.1.0") |
44d10b1f RW |
11666 | (source (origin |
11667 | (method url-fetch) | |
11668 | (uri (pypi-uri "attrs" version)) | |
11669 | (sha256 | |
11670 | (base32 | |
67458e20 | 11671 | "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h")))) |
44d10b1f RW |
11672 | (build-system python-build-system) |
11673 | (arguments | |
11674 | `(#:modules ((guix build utils) | |
11675 | (guix build python-build-system) | |
11676 | (ice-9 ftw) | |
11677 | (srfi srfi-1) | |
11678 | (srfi srfi-26)) | |
11679 | #:phases (modify-phases %standard-phases | |
11680 | (replace 'check | |
11681 | (lambda _ | |
11682 | (let ((cwd (getcwd))) | |
11683 | (setenv "PYTHONPATH" | |
11684 | (string-append | |
11685 | cwd "/build/" | |
11686 | (find (cut string-prefix? "lib" <>) | |
11687 | (scandir (string-append cwd "/build"))) | |
11688 | ":" | |
11689 | (getenv "PYTHONPATH"))) | |
11690 | (invoke "python" "-m" "pytest"))))))) | |
11691 | (native-inputs | |
11692 | `(("python-coverage" ,python-coverage) | |
11693 | ("python-hypothesis" ,python-hypothesis) | |
11694 | ("python-pympler" ,python-pympler) | |
11695 | ("python-pytest" ,python-pytest) | |
11696 | ("python-six" ,python-six) | |
11697 | ("python-sphinx" ,python-sphinx) | |
11698 | ("python-zope-interface" ,python-zope-interface))) | |
11699 | (home-page "https://github.com/python-attrs/attrs/") | |
11700 | (synopsis "Attributes without boilerplate") | |
11701 | (description "@code{attrs} is a Python package with class decorators that | |
11702 | ease the chores of implementing the most common attribute-related object | |
11703 | protocols.") | |
11704 | (license license:expat))) | |
11705 | ||
11706 | (define-public python2-attrs | |
11707 | (package-with-python2 python-attrs)) | |
11708 | ||
11709 | (define-public python-attrs-bootstrap | |
11710 | (package | |
11711 | (inherit python-attrs) | |
11712 | (name "python-attrs-bootstrap") | |
11713 | ;; Keep this on a fixed version so python-attrs can be updated without | |
11714 | ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle. | |
11715 | (version "17.4.0") | |
11716 | (source (origin | |
11717 | (method url-fetch) | |
11718 | (uri (pypi-uri "attrs" version)) | |
11719 | (sha256 | |
11720 | (base32 | |
11721 | "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w")))) | |
11722 | (native-inputs `()) | |
11723 | (arguments `(#:tests? #f)))) | |
11724 | ||
11725 | (define-public python2-attrs-bootstrap | |
11726 | (package-with-python2 python-attrs-bootstrap)) | |
11727 | ||
11728 | (define-public python2-cliapp | |
11729 | (package | |
11730 | (name "python2-cliapp") | |
9064b84e | 11731 | (version "1.20180812.1") |
44d10b1f RW |
11732 | (source |
11733 | (origin | |
11734 | (method url-fetch) | |
11735 | (uri (string-append | |
11736 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-" | |
11737 | version ".tar.gz")) | |
11738 | (sha256 | |
11739 | (base32 | |
9064b84e | 11740 | "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x")))) |
44d10b1f RW |
11741 | (build-system python-build-system) |
11742 | (arguments | |
11743 | `(#:python ,python-2 | |
11744 | #:phases | |
11745 | (modify-phases %standard-phases | |
11746 | ;; check phase needs to be run before the build phase. If not, | |
11747 | ;; coverage-test-runner looks for tests for the built source files, | |
11748 | ;; and fails. | |
11749 | (delete 'check) | |
11750 | (add-before 'build 'check | |
11751 | (lambda _ | |
11752 | ;; Disable python3 tests | |
11753 | (substitute* "check" | |
11754 | (("python3") "# python3")) | |
6c826d32 | 11755 | (invoke "./check")))))) |
44d10b1f RW |
11756 | (native-inputs |
11757 | `(("python2-coverage-test-runner" ,python2-coverage-test-runner) | |
11758 | ("python2-pep8" ,python2-pep8))) | |
11759 | (propagated-inputs | |
11760 | `(("python2-pyaml" ,python2-pyaml))) | |
11761 | (home-page "https://liw.fi/cliapp/") | |
11762 | (synopsis "Python framework for command line programs") | |
11763 | (description "@code{python2-cliapp} is a python framework for | |
11764 | command line programs. It contains the typical stuff such programs | |
11765 | need to do, such as parsing the command line for options, and | |
11766 | iterating over input files.") | |
11767 | (license license:gpl2+))) | |
11768 | ||
11769 | (define-public python2-ttystatus | |
11770 | (package | |
11771 | (name "python2-ttystatus") | |
e516a9c2 | 11772 | (version "0.36") |
44d10b1f RW |
11773 | (source |
11774 | (origin | |
11775 | (method url-fetch) | |
11776 | (uri (string-append | |
11777 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-" | |
11778 | version ".tar.gz")) | |
11779 | (sha256 | |
11780 | (base32 | |
e516a9c2 | 11781 | "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by")))) |
44d10b1f RW |
11782 | (build-system python-build-system) |
11783 | (native-inputs | |
11784 | `(("python2-coverage-test-runner" ,python2-coverage-test-runner) | |
11785 | ("python2-pep8" ,python2-pep8))) | |
11786 | (arguments | |
11787 | `(#:python ,python-2 | |
11788 | #:phases | |
11789 | (modify-phases %standard-phases | |
11790 | ;; check phase needs to be run before the build phase. If not, | |
11791 | ;; coverage-test-runner looks for tests for the built source files, | |
11792 | ;; and fails. | |
11793 | (delete 'check) | |
11794 | (add-before 'build 'check | |
cbeee881 | 11795 | (lambda _ (invoke "make" "check")))))) |
44d10b1f RW |
11796 | (home-page "https://liw.fi/ttystatus/") |
11797 | (synopsis "Python library for showing progress reporting and | |
11798 | status updates on terminals") | |
11799 | (description "@code{python2-ttystatus} is a python library for | |
11800 | showing progress reporting and status updates on terminals, for | |
11801 | command line programs. Output is automatically adapted to the width | |
11802 | of the terminal: truncated if it does not fit, and resized if the | |
11803 | terminal size changes.") | |
11804 | (license license:gpl3+))) | |
11805 | ||
11806 | (define-public python2-tracing | |
11807 | (package | |
11808 | (name "python2-tracing") | |
11809 | (version "0.10") | |
11810 | (source | |
11811 | (origin | |
11812 | (method url-fetch) | |
11813 | (uri (string-append | |
11814 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-" | |
11815 | version ".tar.gz")) | |
11816 | (sha256 | |
11817 | (base32 | |
11818 | "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw")))) | |
11819 | (build-system python-build-system) | |
11820 | (arguments | |
11821 | `(#:python ,python-2)) | |
11822 | (home-page "https://liw.fi/tracing/") | |
11823 | (synopsis "Python debug logging helper") | |
11824 | (description "@code{python2-tracing} is a python library for | |
11825 | logging debug messages. It provides a way to turn debugging messages | |
11826 | on and off, based on the filename they occur in. It is much faster | |
11827 | than using @code{logging.Filter} to accomplish the same thing, which | |
11828 | matters when code is run in production mode. The actual logging still | |
11829 | happens using the @code{logging} library.") | |
11830 | (license license:gpl3+))) | |
11831 | ||
11832 | (define-public python2-larch | |
11833 | (package | |
11834 | (name "python2-larch") | |
11835 | (version "1.20151025") | |
11836 | (source | |
11837 | (origin | |
11838 | (method url-fetch) | |
11839 | (uri (string-append | |
11840 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-" | |
11841 | version ".tar.gz")) | |
11842 | (patches (search-patches | |
11843 | "python2-larch-coverage-4.0a6-compatibility.patch")) | |
11844 | (sha256 | |
11845 | (base32 | |
11846 | "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663")))) | |
11847 | (build-system python-build-system) | |
11848 | (arguments | |
11849 | `(#:python ,python-2 | |
11850 | #:phases | |
11851 | (modify-phases %standard-phases | |
11852 | ;; check phase needs to be run before the build phase. If not, | |
11853 | ;; coverage-test-runner looks for tests for the built source files, | |
11854 | ;; and fails. | |
11855 | (delete 'check) | |
11856 | (add-before 'build 'check | |
204ad455 | 11857 | (lambda _ (invoke "make" "check")))))) |
44d10b1f RW |
11858 | (native-inputs |
11859 | `(("cmdtest" ,cmdtest) | |
11860 | ("python2-coverage-test-runner" ,python2-coverage-test-runner))) | |
11861 | (propagated-inputs | |
11862 | `(("python2-tracing" ,python2-tracing))) | |
11863 | (home-page "https://liw.fi/larch/") | |
11864 | (synopsis "Python copy-on-write B-tree library") | |
11865 | (description "@code{python2-larch} is an implementation of | |
11866 | particular kind of B-tree, based on research by Ohad Rodeh. See | |
11867 | @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details | |
11868 | on the data structure. | |
11869 | ||
11870 | The distinctive feature of this B-tree is that a node is never | |
11871 | (conceptually) modified. Instead, all updates are done by | |
11872 | copy-on-write. This makes it easy to clone a tree, and modify only the | |
11873 | clone, while other processes access the original tree.") | |
11874 | (license license:gpl3+))) | |
11875 | ||
11876 | (define-public python-astroid | |
11877 | (package | |
11878 | (name "python-astroid") | |
11879 | (version "2.1.0") | |
11880 | (source | |
11881 | (origin | |
11882 | (method url-fetch) | |
11883 | (uri (pypi-uri "astroid" version)) | |
11884 | (sha256 | |
11885 | (base32 | |
11886 | "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m")))) | |
11887 | (build-system python-build-system) | |
11888 | (propagated-inputs | |
11889 | `(("python-lazy-object-proxy" ,python-lazy-object-proxy) | |
11890 | ("python-six" ,python-six) | |
11891 | ("python-wrapt" ,python-wrapt))) | |
11892 | (native-inputs | |
11893 | `(("python-dateutil" ,python-dateutil) | |
11894 | ("python-nose" ,python-nose) | |
11895 | ("python-pytest" ,python-pytest) | |
11896 | ("python-pytest-runner" ,python-pytest-runner))) | |
11897 | (arguments | |
11898 | `(#:phases | |
11899 | (modify-phases %standard-phases | |
11900 | (add-after 'unpack 'remove-spurious-test | |
11901 | (lambda _ | |
11902 | ;; This can be removed after upgrading from python-3.7 | |
11903 | ;; https://github.com/PyCQA/astroid/issues/593 | |
11904 | ;; https://bugs.python.org/issue34056 | |
11905 | (delete-file "astroid/tests/unittest_modutils.py") | |
11906 | #t)) | |
11907 | (replace 'check | |
11908 | (lambda _ | |
11909 | (invoke "pytest" "astroid")))))) | |
11910 | (home-page "https://github.com/PyCQA/astroid") | |
11911 | (synopsis "Common base representation of python source code for pylint and | |
11912 | other projects") | |
11913 | (description "@code{python-astroid} provides a common base representation | |
11914 | of python source code for projects such as pychecker, pyreverse, pylint, etc. | |
11915 | ||
11916 | It provides a compatible representation which comes from the _ast module. It | |
11917 | rebuilds the tree generated by the builtin _ast module by recursively walking | |
11918 | down the AST and building an extended ast. The new node classes have | |
11919 | additional methods and attributes for different usages. They include some | |
11920 | support for static inference and local name scopes. Furthermore, astroid | |
11921 | builds partial trees by inspecting living objects.") | |
11922 | (license license:lgpl2.1+) | |
11923 | (properties `((python2-variant . ,(delay python2-astroid)))))) | |
11924 | ||
11925 | (define-public python2-astroid | |
11926 | (let ((base (package-with-python2 | |
11927 | (strip-python2-variant python-astroid)))) | |
11928 | (package (inherit base) | |
11929 | ;; Version 2.x removes python2 support. | |
11930 | (version "1.6.5") | |
11931 | (source | |
11932 | (origin | |
11933 | (method url-fetch) | |
11934 | (uri (pypi-uri "astroid" version)) | |
11935 | (sha256 | |
11936 | (base32 | |
11937 | "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw")))) | |
11938 | (arguments | |
11939 | (substitute-keyword-arguments (package-arguments base) | |
11940 | ((#:phases phases) | |
11941 | `(modify-phases ,phases | |
11942 | (add-after 'unpack 'remove-spurious-test | |
11943 | (lambda _ | |
11944 | ;; https://github.com/PyCQA/astroid/issues/276 | |
11945 | (delete-file "astroid/tests/unittest_brain.py") | |
11946 | #t)) | |
11947 | (replace 'check | |
11948 | (lambda _ | |
11949 | (invoke"python" "-m" "unittest" "discover" | |
11950 | "-p" "unittest*.py"))))))) | |
11951 | (native-inputs `()) | |
11952 | (propagated-inputs | |
11953 | `(("python2-backports-functools-lru-cache" | |
11954 | ,python2-backports-functools-lru-cache) | |
11955 | ("python2-enum34" ,python2-enum34) | |
11956 | ("python2-singledispatch" ,python2-singledispatch) | |
11957 | ,@(package-propagated-inputs base)))))) | |
11958 | ||
11959 | (define-public python-isort | |
11960 | (package | |
11961 | (name "python-isort") | |
e2227b6a | 11962 | (version "4.3.4") |
44d10b1f RW |
11963 | (source |
11964 | (origin | |
e2227b6a EF |
11965 | (method git-fetch) |
11966 | (uri (git-reference | |
11967 | ;; Tests pass only from the Github sources | |
11968 | (url "https://github.com/timothycrosley/isort") | |
11969 | (commit version))) | |
11970 | (file-name (git-file-name name version)) | |
44d10b1f RW |
11971 | (sha256 |
11972 | (base32 | |
e2227b6a | 11973 | "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6")))) |
44d10b1f RW |
11974 | (build-system python-build-system) |
11975 | (native-inputs | |
11976 | `(("python-mock" ,python-mock) | |
11977 | ("python-pytest" ,python-pytest))) | |
11978 | (home-page "https://github.com/timothycrosley/isort") | |
11979 | (synopsis "Python utility/library to sort python imports") | |
11980 | (description "@code{python-isort} is a python utility/library to sort | |
11981 | imports alphabetically, and automatically separated into sections. It | |
11982 | provides a command line utility, a python library and plugins for various | |
11983 | editors.") | |
e2227b6a EF |
11984 | (license license:expat) |
11985 | (properties `((python2-variant . ,(delay python2-isort)))))) | |
44d10b1f RW |
11986 | |
11987 | (define-public python2-isort | |
e2227b6a EF |
11988 | (let ((base (package-with-python2 |
11989 | (strip-python2-variant python-isort)))) | |
11990 | (package (inherit base) | |
11991 | (native-inputs | |
11992 | `(("python2-futures" ,python2-futures) | |
11993 | ,@(package-native-inputs base)))))) | |
44d10b1f RW |
11994 | |
11995 | (define-public python2-backports-functools-lru-cache | |
11996 | (package | |
11997 | (name "python2-backports-functools-lru-cache") | |
11998 | (version "1.5") | |
11999 | (source | |
12000 | (origin | |
12001 | (method url-fetch) | |
12002 | ;; only the pypi tarballs contain the necessary metadata | |
12003 | (uri (pypi-uri "backports.functools_lru_cache" version)) | |
12004 | (sha256 | |
12005 | (base32 | |
12006 | "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x")))) | |
12007 | (build-system python-build-system) | |
12008 | (native-inputs | |
12009 | `(("python2-setuptools-scm" ,python2-setuptools-scm))) | |
12010 | (arguments | |
12011 | `(#:python ,python-2)) | |
12012 | (home-page "https://github.com/jaraco/backports.functools_lru_cache") | |
12013 | (synopsis "Backport of functools.lru_cache from Python 3.3") | |
12014 | (description "@code{python2-backports-functools-lru-cache} is a backport | |
12015 | of @code{functools.lru_cache} from python 3.3.") | |
12016 | (license license:expat))) | |
12017 | ||
12018 | (define-public python-configparser | |
12019 | (package | |
12020 | (name "python-configparser") | |
12021 | (version "3.5.0") | |
12022 | (source | |
12023 | (origin | |
12024 | (method url-fetch) | |
12025 | (uri (string-append | |
12026 | "https://bitbucket.org/ambv/configparser/get/" | |
12027 | version ".tar.bz2")) | |
12028 | (file-name (string-append name "-" version ".tar.gz")) | |
12029 | (sha256 | |
12030 | (base32 | |
12031 | "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa")))) | |
12032 | (build-system python-build-system) | |
809f003f | 12033 | (home-page "https://github.com/jaraco/configparser/") |
44d10b1f RW |
12034 | (synopsis "Backport of configparser from python 3.5") |
12035 | (description "@code{python-configparser} is a backport of | |
12036 | @code{configparser} from Python 3.5 so that it can be used directly | |
12037 | in other versions.") | |
12038 | (license license:expat))) | |
12039 | ||
12040 | (define-public python2-configparser | |
12041 | (package-with-python2 python-configparser)) | |
12042 | ||
12043 | (define-public python-mando | |
12044 | (package | |
12045 | (name "python-mando") | |
12046 | (version "0.6.4") | |
12047 | (source (origin | |
12048 | (method url-fetch) | |
12049 | (uri (pypi-uri "mando" version)) | |
12050 | (sha256 | |
12051 | (base32 | |
12052 | "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr")))) | |
12053 | (build-system python-build-system) | |
12054 | (propagated-inputs | |
12055 | `(("python-rst2ansi" ,python-rst2ansi) | |
12056 | ("python-six" ,python-six))) | |
12057 | (native-inputs | |
12058 | `(("python-pytest" ,python-pytest))) | |
12059 | (home-page "https://mando.readthedocs.org/") | |
12060 | (synopsis | |
12061 | "Wrapper around argparse, allowing creation of complete CLI applications") | |
12062 | (description | |
12063 | "This package is a wrapper around argparse, allowing you to write complete CLI | |
12064 | applications in seconds while maintaining all the flexibility.") | |
12065 | (license license:expat))) | |
12066 | ||
12067 | (define-public python2-mando | |
12068 | (package-with-python2 python-mando)) | |
12069 | ||
70daf82f RW |
12070 | (define-public python2-argparse |
12071 | (package | |
12072 | (name "python2-argparse") | |
12073 | (version "1.4.0") | |
12074 | (source | |
12075 | (origin | |
12076 | (method url-fetch) | |
12077 | (uri (pypi-uri "argparse" version)) | |
12078 | (sha256 | |
12079 | (base32 | |
12080 | "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32")))) | |
12081 | (build-system python-build-system) | |
12082 | (arguments | |
12083 | `(#:python ,python-2)) | |
12084 | (home-page "https://github.com/ThomasWaldmann/argparse/") | |
12085 | (synopsis "Python command-line parsing library") | |
12086 | (description | |
12087 | "This package is mostly for people who want to have @code{argparse} on | |
12088 | older Pythons because it was not part of the standard library back then.") | |
12089 | (license license:psfl))) | |
12090 | ||
44d10b1f RW |
12091 | (define-public python-fudge |
12092 | (package | |
12093 | (name "python-fudge") | |
12094 | ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2 | |
12095 | ;; package, which is currently the only use of this package. | |
12096 | (version "0.9.6") | |
12097 | (source | |
12098 | (origin | |
12099 | (method url-fetch) | |
12100 | (uri (pypi-uri "fudge" version)) | |
12101 | (sha256 | |
12102 | (base32 | |
12103 | "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l")))) | |
12104 | (build-system python-build-system) | |
12105 | (arguments | |
12106 | `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package. | |
12107 | (home-page "https://github.com/fudge-py/fudge") | |
12108 | (synopsis "Replace real objects with fakes/mocks/stubs while testing") | |
12109 | (description | |
12110 | "Fudge is a Python module for using fake objects (mocks and stubs) to | |
12111 | test real ones. | |
12112 | ||
12113 | In readable Python code, you declare the methods available on your fake object | |
12114 | and how they should be called. Then you inject that into your application and | |
12115 | start testing. This declarative approach means you don’t have to record and | |
12116 | playback actions and you don’t have to inspect your fakes after running code. | |
12117 | If the fake object was used incorrectly then you’ll see an informative | |
12118 | exception message with a traceback that points to the culprit.") | |
12119 | (license license:expat))) | |
12120 | ||
12121 | (define-public python2-fudge | |
12122 | (package-with-python2 python-fudge)) | |
12123 | ||
12124 | (define-public python-mwclient | |
12125 | (package | |
12126 | (name "python-mwclient") | |
12127 | (version "0.8.4") | |
12128 | (source | |
12129 | (origin | |
12130 | (method url-fetch) | |
12131 | ;; The PyPI version wouldn't contain tests. | |
12132 | (uri (string-append "https://github.com/mwclient/mwclient/archive/" | |
12133 | "v" version ".tar.gz")) | |
12134 | (file-name (string-append name "-" version ".tar.gz")) | |
12135 | (sha256 | |
12136 | (base32 | |
12137 | "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv")))) | |
12138 | (build-system python-build-system) | |
12139 | (propagated-inputs | |
12140 | `(("python-requests" ,python-requests) | |
12141 | ("python-requests-oauthlib" | |
12142 | ,python-requests-oauthlib) | |
12143 | ("python-six" ,python-six))) | |
12144 | (native-inputs | |
12145 | `(("python-mock" ,python-mock) | |
12146 | ("python-pytest" ,python-pytest) | |
12147 | ("python-pytest-pep8" ,python-pytest-pep8) | |
12148 | ("python-pytest-cache" ,python-pytest-cache) | |
12149 | ("python-pytest-cov" ,python-pytest-cov) | |
12150 | ("python-responses" ,python-responses))) | |
12151 | (home-page "https://github.com/btongminh/mwclient") | |
12152 | (synopsis "MediaWiki API client") | |
12153 | (description "This package provides a MediaWiki API client.") | |
12154 | (license license:expat))) | |
12155 | ||
12156 | (define-public python2-mwclient | |
12157 | (package-with-python2 python-mwclient)) | |
12158 | ||
12159 | (define-public python-utils | |
12160 | (package | |
12161 | (name "python-utils") | |
12162 | (version "2.1.0") | |
12163 | (source (origin | |
12164 | (method url-fetch) | |
12165 | (uri (pypi-uri "python-utils" version)) | |
12166 | (sha256 | |
12167 | (base32 | |
12168 | "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p")))) | |
12169 | (build-system python-build-system) | |
12170 | (native-inputs | |
12171 | `(("pytest-runner" ,python-pytest-runner) | |
12172 | ("pytest" ,python-pytest) | |
12173 | ("six" ,python-six))) | |
12174 | (home-page "https://github.com/WoLpH/python-utils") | |
12175 | (synopsis "Convenient utilities not included with the standard Python install") | |
12176 | (description | |
12177 | "Python Utils is a collection of small Python functions and classes which | |
12178 | make common patterns shorter and easier.") | |
12179 | (license license:bsd-2))) | |
12180 | ||
12181 | (define-public python2-utils | |
12182 | (package-with-python2 python-utils)) | |
12183 | ||
44d10b1f RW |
12184 | (define-public python-diff-match-patch |
12185 | (package | |
12186 | (name "python-diff-match-patch") | |
12187 | (version "20121119") | |
12188 | (source | |
12189 | (origin | |
12190 | (method url-fetch) | |
12191 | (uri (pypi-uri "diff-match-patch" version)) | |
12192 | (sha256 | |
12193 | (base32 | |
12194 | "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx")))) | |
12195 | (build-system python-build-system) | |
12196 | (home-page "https://code.google.com/p/google-diff-match-patch") | |
12197 | (synopsis "Synchronize plain text") | |
12198 | (description "Diff Match and Patch libraries offer robust algorithms to | |
12199 | perform the operations required for synchronizing plain text.") | |
12200 | (license license:asl2.0))) | |
12201 | ||
12202 | (define-public python2-diff-match-patch | |
12203 | (package-with-python2 python-diff-match-patch)) | |
12204 | ||
12205 | (define-public python-dirsync | |
12206 | (package | |
12207 | (name "python-dirsync") | |
12208 | (version "2.2.3") | |
12209 | (source | |
12210 | (origin | |
12211 | (method url-fetch) | |
12212 | (uri (pypi-uri "dirsync" version)) | |
12213 | (sha256 | |
12214 | (base32 | |
12215 | "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z")))) | |
12216 | (build-system python-build-system) | |
12217 | (propagated-inputs | |
12218 | `(("six" ,python-six))) | |
12219 | (home-page "https://bitbucket.org/tkhyn/dirsync") | |
12220 | (synopsis "Advanced directory tree synchronisation tool") | |
12221 | (description "Advanced directory tree synchronisation tool.") | |
12222 | (license license:expat))) | |
12223 | ||
12224 | (define-public python2-dirsync | |
12225 | (package-with-python2 python-dirsync)) | |
12226 | ||
12227 | (define-public python-levenshtein | |
12228 | (package | |
12229 | (name "python-levenshtein") | |
12230 | (version "0.12.0") | |
12231 | (source | |
12232 | (origin | |
12233 | (method url-fetch) | |
12234 | (uri (pypi-uri "python-Levenshtein" version)) | |
12235 | (sha256 | |
12236 | (base32 | |
12237 | "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3")))) | |
12238 | (build-system python-build-system) | |
12239 | (home-page "https://github.com/ztane/python-Levenshtein") | |
12240 | (synopsis "Fast computation of Levenshtein distance and string similarity") | |
12241 | (description | |
12242 | "The Levenshtein Python C extension module contains functions for fast computation of | |
12243 | @enumerate | |
12244 | @item Levenshtein (edit) distance, and edit operations | |
12245 | @item string similarity | |
12246 | @item approximate median strings, and generally string averaging | |
12247 | @item string sequence and set similarity | |
12248 | @end enumerate | |
12249 | It supports both normal and Unicode strings.") | |
12250 | (license license:gpl2+))) | |
12251 | ||
12252 | (define-public python2-levenshtein | |
12253 | (package-with-python2 python-levenshtein)) | |
12254 | ||
12255 | (define-public python-scandir | |
12256 | (package | |
12257 | (name "python-scandir") | |
12258 | (version "1.9.0") | |
12259 | (source | |
12260 | (origin | |
12261 | (method url-fetch) | |
12262 | (uri (pypi-uri "scandir" version)) | |
12263 | (sha256 | |
12264 | (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4")))) | |
12265 | (build-system python-build-system) | |
12266 | (arguments | |
12267 | `(#:phases (modify-phases %standard-phases | |
12268 | (replace 'check | |
12269 | (lambda _ | |
12270 | (invoke "python" "test/run_tests.py")))))) | |
12271 | (home-page "https://github.com/benhoyt/scandir") | |
12272 | (synopsis "Directory iteration function") | |
12273 | (description | |
12274 | "Directory iteration function like os.listdir(), except that instead of | |
12275 | returning a list of bare filenames, it yields DirEntry objects that include | |
12276 | file type and stat information along with the name. Using scandir() increases | |
12277 | the speed of os.walk() by 2-20 times (depending on the platform and file | |
12278 | system) by avoiding unnecessary calls to os.stat() in most cases. | |
12279 | ||
12280 | This package is part of the Python standard library since version 3.5.") | |
12281 | (license license:bsd-3))) | |
12282 | ||
12283 | (define-public python2-scandir | |
12284 | (package-with-python2 python-scandir)) | |
12285 | ||
12286 | (define-public python2-stemming | |
12287 | (package | |
12288 | (name "python2-stemming") | |
12289 | (version "1.0.1") | |
12290 | (source | |
12291 | (origin | |
12292 | (method url-fetch) | |
12293 | (uri (pypi-uri "stemming" version)) | |
12294 | (sha256 | |
12295 | (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr")))) | |
12296 | (build-system python-build-system) | |
12297 | (arguments | |
12298 | `(#:python ,python-2)) | |
12299 | (home-page "https://bitbucket.org/mchaput/stemming/overview") | |
12300 | (synopsis "Python implementations of various stemming algorithms") | |
12301 | (description | |
12302 | "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins | |
12303 | stemming algorithms for English. These implementations are straightforward and | |
12304 | efficient, unlike some Python versions of the same algorithms available on the | |
12305 | Web. This package is an extraction of the stemming code included in the Whoosh | |
12306 | search engine.") | |
12307 | (license license:public-domain))) | |
12308 | ||
12309 | (define-public python-factory-boy | |
12310 | (package | |
12311 | (name "python-factory-boy") | |
12312 | (version "2.8.1") | |
12313 | (source | |
12314 | (origin | |
12315 | (method url-fetch) | |
12316 | (uri (pypi-uri "factory_boy" version)) | |
12317 | (sha256 | |
12318 | (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56")))) | |
12319 | (build-system python-build-system) | |
12320 | (arguments | |
12321 | ;; Tests are not included in the tarball. | |
12322 | `(#:tests? #f)) | |
12323 | (propagated-inputs | |
12324 | `(("faker" ,python-faker))) | |
12325 | (home-page "https://github.com/benhoyt/scandir") | |
12326 | (synopsis "Versatile test fixtures replacement") | |
12327 | (description | |
12328 | "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl. | |
12329 | ||
12330 | As a fixtures replacement tool, it aims to replace static, hard to maintain | |
12331 | fixtures with easy-to-use factories for complex object. | |
12332 | ||
12333 | Instead of building an exhaustive test setup with every possible combination | |
12334 | of corner cases, factory_boy allows you to use objects customized for the | |
12335 | current test, while only declaring the test-specific fields") | |
12336 | (license license:expat))) | |
12337 | ||
12338 | (define-public python2-factory-boy | |
12339 | (package-with-python2 python-factory-boy)) | |
12340 | ||
12341 | (define-public python-translate-toolkit | |
12342 | (package | |
12343 | (name "python-translate-toolkit") | |
12344 | (version "2.1.0") | |
12345 | (source | |
12346 | (origin | |
12347 | (method url-fetch) | |
12348 | (uri (pypi-uri "translate-toolkit" version ".tar.bz2")) | |
12349 | (sha256 | |
12350 | (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq")))) | |
12351 | (build-system python-build-system) | |
12352 | (native-inputs | |
12353 | `(("python-pytest" ,python-pytest) | |
12354 | ("python-sphinx" ,python-sphinx))) | |
12355 | (propagated-inputs | |
12356 | `(("python-babel" ,python-babel) | |
12357 | ("python-beautifulsoup4" ,python-beautifulsoup4) | |
12358 | ("python-chardet" ,python-chardet) | |
12359 | ("python-diff-match-patch" ,python-diff-match-patch) | |
12360 | ("python-levenshtein" ,python-levenshtein) | |
12361 | ("python-lxml" ,python-lxml) | |
12362 | ("python-six" ,python-six) | |
12363 | ("python-vobject" ,python-vobject) | |
12364 | ("python-pyyaml" ,python-pyyaml))) | |
12365 | (arguments | |
12366 | ;; TODO: tests are not run, because they end with | |
12367 | ;; TypeError: parse() missing 2 required positional arguments: 'tree' and | |
12368 | ;; 'parse_funcs' | |
12369 | ;; during test setup. | |
12370 | `(#:tests? #f)) | |
18919cf9 | 12371 | (home-page "https://toolkit.translatehouse.org") |
44d10b1f RW |
12372 | (synopsis "Tools and API for translation and localization engineering") |
12373 | (description | |
12374 | "Tools and API for translation and localization engineering. It contains | |
12375 | several utilities, as well as an API for building localization tools.") | |
12376 | (license license:gpl2+))) | |
12377 | ||
12378 | (define-public python2-translate-toolkit | |
12379 | (package-with-python2 python-translate-toolkit)) | |
12380 | ||
12381 | (define-public python-packaging | |
12382 | (package | |
12383 | (name "python-packaging") | |
9dc6ff5a | 12384 | (version "19.0") |
44d10b1f RW |
12385 | (source |
12386 | (origin | |
12387 | (method url-fetch) | |
12388 | (uri (pypi-uri "packaging" version)) | |
12389 | (sha256 | |
12390 | (base32 | |
9dc6ff5a | 12391 | "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c")))) |
44d10b1f RW |
12392 | (build-system python-build-system) |
12393 | (arguments | |
12394 | `(#:phases (modify-phases %standard-phases | |
12395 | (replace 'check | |
12396 | (lambda _ (invoke "py.test" "-vv")))))) | |
12397 | (native-inputs | |
12398 | `(("python-pretend" ,python-pretend) | |
12399 | ("python-pytest" ,python-pytest))) | |
12400 | (propagated-inputs | |
12401 | `(("python-pyparsing" ,python-pyparsing) | |
12402 | ("python-six" ,python-six))) | |
12403 | (home-page "https://github.com/pypa/packaging") | |
12404 | (synopsis "Core utilities for Python packages") | |
12405 | (description "Packaging is a Python module for dealing with Python packages. | |
12406 | It offers an interface for working with package versions, names, and dependency | |
12407 | information.") | |
12408 | ;; From 'LICENSE': This software is made available under the terms of | |
12409 | ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD. | |
12410 | ;; Contributions to this software is made under the terms of *both* these | |
12411 | ;; licenses. | |
12412 | (license (list license:asl2.0 license:bsd-2)))) | |
12413 | ||
12414 | (define-public python2-packaging | |
12415 | (package-with-python2 python-packaging)) | |
12416 | ||
12417 | (define-public python-relatorio | |
12418 | (package | |
12419 | (name "python-relatorio") | |
12420 | (version "0.8.0") | |
12421 | (source | |
12422 | (origin | |
12423 | (method url-fetch) | |
12424 | (uri (pypi-uri "relatorio" version)) | |
12425 | (sha256 | |
12426 | (base32 | |
12427 | "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx")))) | |
12428 | (build-system python-build-system) | |
12429 | (propagated-inputs | |
12430 | `(("python-lxml" ,python-lxml) | |
12431 | ("python-genshi" ,python-genshi))) | |
12432 | (native-inputs | |
12433 | `(("python-magic" ,python-magic))) | |
12434 | (home-page "https://relatorio.tryton.org/") | |
12435 | (synopsis "Templating library able to output ODT and PDF files") | |
12436 | (description "Relatorio is a templating library which provides a way to | |
12437 | easily output ODT, ODS, PNG, SVG and several other kinds of files. Support | |
12438 | for more filetypes can be easily added by creating plugins for them.") | |
12439 | (license license:gpl3+))) | |
12440 | ||
12441 | (define-public python2-relatorio | |
12442 | (package-with-python2 python-relatorio)) | |
12443 | ||
12444 | (define-public python-radon | |
12445 | (package | |
12446 | (name "python-radon") | |
12447 | (version "2.2.0") | |
12448 | (source | |
12449 | (origin | |
12450 | (method url-fetch) | |
12451 | (uri (pypi-uri "radon" version)) | |
12452 | (sha256 | |
12453 | (base32 | |
12454 | "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym")))) | |
12455 | (build-system python-build-system) | |
12456 | (arguments | |
12457 | `(#:phases (modify-phases %standard-phases | |
12458 | (replace 'check | |
12459 | (lambda _ | |
12460 | (invoke "python" "radon/tests/run.py")))))) | |
12461 | (propagated-inputs | |
12462 | `(("python-colorama" ,python-colorama) | |
12463 | ("python-flake8-polyfill" ,python-flake8-polyfill) | |
12464 | ("python-mando" ,python-mando))) | |
12465 | (native-inputs | |
12466 | `(("python-pytest" ,python-pytest) | |
12467 | ("python-pytest-mock" ,python-pytest-mock))) | |
12468 | (home-page "https://radon.readthedocs.org/") | |
12469 | (synopsis "Code Metrics in Python") | |
12470 | (description "Radon is a Python tool which computes various code metrics. | |
12471 | Supported metrics are: | |
12472 | @itemize @bullet | |
12473 | @item raw metrics: SLOC, comment lines, blank lines, &c. | |
12474 | @item Cyclomatic Complexity (i.e. McCabe’s Complexity) | |
12475 | @item Halstead metrics (all of them) | |
12476 | @item the Maintainability Index (a Visual Studio metric) | |
12477 | @end itemize") | |
12478 | (license license:expat))) | |
12479 | ||
12480 | (define-public python2-radon | |
12481 | (package-with-python2 python-radon)) | |
12482 | ||
12483 | (define-public python-sure | |
12484 | (package | |
12485 | (name "python-sure") | |
12486 | (version "1.4.11") | |
12487 | (source | |
12488 | (origin | |
12489 | (method url-fetch) | |
12490 | (uri (pypi-uri "sure" version)) | |
12491 | (sha256 | |
12492 | (base32 | |
12493 | "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w")))) | |
12494 | (build-system python-build-system) | |
12495 | (propagated-inputs | |
12496 | `(("python-mock" ,python-mock) | |
12497 | ("python-six" ,python-six))) | |
12498 | (native-inputs | |
12499 | `(("python-nose" ,python-nose))) | |
12500 | (home-page "https://github.com/gabrielfalcao/sure") | |
12501 | (synopsis "Automated testing library in python for python") | |
12502 | (description | |
12503 | "Sure is a python library that leverages a DSL for writing assertions. | |
12504 | Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.") | |
12505 | (license license:gpl3+))) | |
12506 | ||
12507 | (define-public python2-sure | |
12508 | (package-with-python2 python-sure)) | |
12509 | ||
12510 | (define-public python2-couleur | |
12511 | ;; This package does not seem to support python3 at all, hence, | |
12512 | ;; only the python2 variant definition is provided. | |
12513 | (package | |
12514 | (name "python2-couleur") | |
12515 | (version "0.6.2") | |
12516 | (source | |
12517 | (origin | |
12518 | (method url-fetch) | |
12519 | (uri (pypi-uri "couleur" version)) | |
12520 | (sha256 | |
12521 | (base32 | |
12522 | "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1")))) | |
12523 | (build-system python-build-system) | |
12524 | (arguments | |
12525 | `(#:python ,python-2)) | |
12526 | (home-page "https://github.com/gabrielfalcao/couleur") | |
12527 | (synopsis | |
12528 | "ANSI terminal tool for python, colored shell and other handy fancy features") | |
12529 | (description | |
12530 | "@code{Couleur} provides python programs a way to use the ANSI features in a unix | |
12531 | terminal such as coloured output in the shell, overwriting output, indentation, etc.") | |
12532 | ;; README.md says ASL2.0, but all source code headers are LGPL3+. | |
12533 | ;; https://github.com/gabrielfalcao/couleur/issues/11 | |
12534 | (license license:lgpl3+))) | |
12535 | ||
12536 | (define-public python-misaka | |
12537 | (package | |
12538 | (name "python-misaka") | |
0dcb3412 | 12539 | (version "2.1.1") |
44d10b1f RW |
12540 | (source |
12541 | (origin | |
12542 | (method url-fetch) | |
12543 | (uri (pypi-uri "misaka" version)) | |
12544 | (sha256 | |
12545 | (base32 | |
0dcb3412 | 12546 | "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2")))) |
44d10b1f RW |
12547 | (build-system python-build-system) |
12548 | (arguments | |
12549 | `(;; Line 37 of setup.py calls self.run_command('develop') | |
12550 | ;; in the 'check' phase. This command seems to be trying | |
12551 | ;; to write to | |
12552 | ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/ | |
12553 | ;; for which it does not have the permission to write. | |
12554 | #:tests? #f)) | |
12555 | (propagated-inputs | |
12556 | `(("python-cffi" ,python-cffi))) | |
12557 | (home-page "https://github.com/FSX/misaka") | |
12558 | (synopsis "Python binding for Hoedown") | |
12559 | (description | |
12560 | "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing | |
12561 | library written in C. It features a fast HTML renderer and functionality to make custom | |
12562 | renderers (e.g. man pages or LaTeX).") | |
12563 | (license license:expat))) | |
12564 | ||
12565 | (define-public python2-misaka | |
12566 | (package-with-python2 python-misaka)) | |
12567 | ||
12568 | (define-public python2-steadymark | |
12569 | ;; This is forced into being a python2 only variant | |
12570 | ;; due to its dependence on couleur that has no support | |
12571 | ;; for python3 | |
12572 | (package | |
12573 | (name "python2-steadymark") | |
12574 | (version "0.7.3") | |
12575 | (source | |
12576 | (origin | |
12577 | (method url-fetch) | |
12578 | (uri (pypi-uri "steadymark" version)) | |
12579 | (sha256 | |
12580 | (base32 | |
12581 | "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v")))) | |
12582 | (build-system python-build-system) | |
12583 | (native-inputs | |
12584 | `(("python-couleur" ,python2-couleur) | |
12585 | ("python-sure" ,python2-sure) | |
12586 | ("python-misaka" ,python2-misaka))) | |
12587 | (arguments | |
12588 | `(#:python ,python-2 | |
12589 | #:phases | |
12590 | (modify-phases %standard-phases | |
12591 | (add-before 'build 'patch-setup-py | |
12592 | (lambda _ | |
12593 | ;; Update requirements from dependency==version | |
12594 | ;; to dependency>=version | |
12595 | (substitute* "setup.py" | |
12596 | (("==") ">=")) | |
12597 | #t))))) | |
12598 | (home-page "https://github.com/gabrielfalcao/steadymark") | |
12599 | (synopsis "Markdown-based test runner for python") | |
12600 | (description | |
12601 | "@code{Steadymark} allows documentation to be written in github-flavoured | |
12602 | markdown. The documentation may contain snippets of code surrounded by python | |
12603 | code blocks and @code{Steadymark} will find these snippets and run them, making | |
12604 | sure that there are no old malfunctional examples in the documentation examples.") | |
12605 | (license license:expat))) | |
12606 | ||
12607 | (define-public python-jsonpointer | |
12608 | (package | |
12609 | (name "python-jsonpointer") | |
12610 | (version "1.10") | |
12611 | (source | |
12612 | (origin | |
12613 | (method url-fetch) | |
12614 | (uri (pypi-uri "jsonpointer" version)) | |
12615 | (sha256 | |
12616 | (base32 | |
12617 | "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz")))) | |
12618 | (build-system python-build-system) | |
12619 | (home-page "https://github.com/stefankoegl/python-json-pointer") | |
12620 | (synopsis "Identify specific nodes in a JSON document") | |
12621 | (description "@code{jsonpointer} allows you to access specific nodes | |
12622 | by path in a JSON document (see RFC 6901).") | |
12623 | (license license:bsd-3))) | |
12624 | ||
12625 | (define-public python2-jsonpointer | |
12626 | (package-with-python2 python-jsonpointer)) | |
12627 | ||
12628 | (define-public python-jsonpatch | |
12629 | (package | |
12630 | (name "python-jsonpatch") | |
12631 | (version "1.16") | |
12632 | (source | |
12633 | (origin | |
12634 | (method url-fetch) | |
12635 | ;; pypi version lacks tests.js | |
12636 | (uri (string-append "https://github.com/stefankoegl/python-json-patch/" | |
12637 | "archive/v" version ".tar.gz")) | |
12638 | (file-name (string-append name "-" version ".tar.gz")) | |
12639 | (sha256 | |
12640 | (base32 | |
12641 | "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5")))) | |
12642 | (build-system python-build-system) | |
12643 | (native-inputs | |
12644 | `(("python-jsonpointer" ,python-jsonpointer))) | |
12645 | (home-page "https://github.com/stefankoegl/python-json-patch") | |
12646 | (synopsis "Applying JSON Patches in Python 2.6+ and 3.x") | |
12647 | (description "@code{jsonpatch} is a library and program that allows | |
12648 | applying JSON Patches according to RFC 6902.") | |
12649 | (license license:bsd-3))) | |
12650 | ||
12651 | (define-public python2-jsonpatch | |
12652 | (package-with-python2 python-jsonpatch)) | |
12653 | ||
12654 | (define-public python-jsonpatch-0.4 | |
12655 | (package (inherit python-jsonpatch) | |
12656 | (name "python-jsonpatch") | |
12657 | (version "0.4") | |
12658 | (source | |
12659 | (origin | |
12660 | (method url-fetch) | |
12661 | (uri (string-append "https://github.com/stefankoegl/python-json-patch/" | |
12662 | "archive/v" version ".tar.gz")) | |
12663 | (file-name (string-append name "-" version ".tar.gz")) | |
12664 | (sha256 | |
12665 | (base32 | |
12666 | "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d")))))) | |
12667 | ||
12668 | (define-public python2-jsonpatch-0.4 | |
12669 | (package-with-python2 python-jsonpatch-0.4)) | |
12670 | ||
12671 | (define-public python-rfc3986 | |
12672 | (package | |
12673 | (name "python-rfc3986") | |
12674 | (version "1.1.0") | |
12675 | (source (origin | |
12676 | (method url-fetch) | |
12677 | (uri (pypi-uri "rfc3986" version)) | |
12678 | (sha256 | |
12679 | (base32 | |
12680 | "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44")))) | |
12681 | (build-system python-build-system) | |
12682 | (arguments | |
12683 | `(#:modules ((guix build utils) | |
12684 | (guix build python-build-system) | |
12685 | (ice-9 ftw) | |
12686 | (srfi srfi-1) | |
12687 | (srfi srfi-26)) | |
12688 | #:phases | |
12689 | (modify-phases %standard-phases | |
12690 | (replace 'check | |
12691 | (lambda _ | |
12692 | (let ((cwd (getcwd))) | |
12693 | (setenv "PYTHONPATH" | |
12694 | (string-append cwd "/build/" | |
12695 | (find (cut string-prefix? "lib" <>) | |
12696 | (scandir (string-append cwd "/build"))) | |
12697 | ":" | |
12698 | (getenv "PYTHONPATH"))) | |
12699 | (invoke "pytest" "-v"))))))) | |
12700 | (native-inputs | |
12701 | `(("python-pytest" ,python-pytest))) | |
12702 | (home-page "https://rfc3986.readthedocs.io/") | |
12703 | (synopsis "Parse and validate URI references") | |
12704 | (description | |
12705 | "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including | |
12706 | validation and authority parsing. This module also supports RFC@tie{}6874 | |
12707 | which adds support for zone identifiers to IPv6 addresses.") | |
12708 | (license license:asl2.0))) | |
12709 | ||
12710 | (define-public python2-rfc3986 | |
12711 | (package-with-python2 python-rfc3986)) | |
12712 | ||
12713 | (define-public python-rfc3987 | |
12714 | (package | |
12715 | (name "python-rfc3987") | |
12716 | (version "1.3.7") | |
12717 | (source | |
12718 | (origin | |
12719 | (method url-fetch) | |
12720 | (uri (pypi-uri "rfc3987" version)) | |
12721 | (sha256 | |
12722 | (base32 | |
12723 | "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi")))) | |
12724 | (build-system python-build-system) | |
12725 | (home-page "https://pypi.python.org/pypi/rfc3987") | |
12726 | (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)") | |
12727 | (description "@code{rfc3987} provides routines for parsing and | |
12728 | validation of URIs (see RFC 3986) and IRIs (see RFC 3987).") | |
12729 | (license license:gpl3+))) | |
12730 | ||
12731 | (define-public python2-rfc3987 | |
12732 | (package-with-python2 python-rfc3987)) | |
12733 | ||
12734 | (define-public python-validate-email | |
12735 | (package | |
12736 | (name "python-validate-email") | |
12737 | (version "1.3") | |
12738 | (source | |
12739 | (origin | |
12740 | (method url-fetch) | |
12741 | (uri (pypi-uri "validate_email" version)) | |
12742 | (sha256 | |
12743 | (base32 | |
12744 | "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq")))) | |
12745 | (build-system python-build-system) | |
12746 | (home-page "https://github.com/syrusakbary/validate_email") | |
12747 | (synopsis "Verifies if an email address is valid and really exists") | |
12748 | (description "@code{validate_email} can be used to verify if an email | |
12749 | address is valid and really exists.") | |
12750 | (license license:lgpl3+))) | |
12751 | ||
12752 | (define-public python2-validate-email | |
12753 | (package-with-python2 python-validate-email)) | |
12754 | ||
12755 | (define-public python-flex | |
12756 | (package | |
12757 | (name "python-flex") | |
12758 | (version "6.10.0") | |
12759 | (source | |
12760 | (origin | |
12761 | (method url-fetch) | |
12762 | (uri (pypi-uri "flex" version)) | |
12763 | (sha256 | |
12764 | (base32 | |
12765 | "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk")))) | |
12766 | (build-system python-build-system) | |
12767 | (propagated-inputs | |
12768 | `(("python-click" ,python-click) | |
12769 | ("python-iso8601" ,python-iso8601) | |
12770 | ("python-jsonpointer" ,python-jsonpointer) | |
12771 | ("python-pyyaml" ,python-pyyaml) | |
12772 | ("python-requests" ,python-requests) | |
12773 | ("python-rfc3987" ,python-rfc3987) | |
12774 | ("python-six" ,python-six) | |
12775 | ("python-validate-email" ,python-validate-email))) | |
12776 | (home-page "https://github.com/pipermerriam/flex") | |
12777 | (synopsis "Validates Swagger schemata") | |
12778 | (description "@code{flex} can be used to validate Swagger schemata.") | |
12779 | (license license:bsd-3))) | |
12780 | ||
12781 | (define-public python2-flex | |
12782 | (package-with-python2 python-flex)) | |
12783 | ||
12784 | (define-public python-marshmallow | |
12785 | (package | |
12786 | (name "python-marshmallow") | |
12787 | (version "3.0.0b14") | |
12788 | (source | |
12789 | (origin | |
12790 | (method url-fetch) | |
12791 | (uri (pypi-uri "marshmallow" version)) | |
12792 | (sha256 | |
12793 | (base32 | |
12794 | "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3")))) | |
12795 | (build-system python-build-system) | |
12796 | (propagated-inputs | |
12797 | `(("python-dateutil" ,python-dateutil) | |
12798 | ("python-simplejson" ,python-simplejson))) | |
12799 | (native-inputs | |
12800 | `(("python-pytest" ,python-pytest) | |
12801 | ("python-pytz" ,python-pytz))) | |
12802 | (home-page "https://github.com/marshmallow-code/marshmallow") | |
12803 | (synopsis "Convert complex datatypes to and from native | |
12804 | Python datatypes.") | |
12805 | (description "@code{marshmallow} provides a library for converting | |
12806 | complex datatypes to and from native Python datatypes.") | |
12807 | (license license:expat))) | |
12808 | ||
12809 | (define-public python2-marshmallow | |
12810 | (package-with-python2 python-marshmallow)) | |
12811 | ||
12812 | (define-public python-apispec | |
12813 | (package | |
12814 | (name "python-apispec") | |
12815 | (version "0.25.3") | |
12816 | (source | |
12817 | (origin | |
12818 | (method url-fetch) | |
12819 | (uri (pypi-uri "apispec" version)) | |
12820 | (sha256 | |
12821 | (base32 | |
12822 | "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9")))) | |
12823 | (build-system python-build-system) | |
12824 | (propagated-inputs | |
12825 | `(("python-pyyaml" ,python-pyyaml))) | |
12826 | (native-inputs | |
12827 | `(("python-pytest" ,python-pytest) | |
12828 | ("python-flask" ,python-flask) | |
12829 | ("python-marshmallow" ,python-marshmallow) | |
12830 | ("python-tornado" ,python-tornado) | |
12831 | ("python-bottle" ,python-bottle) | |
12832 | ("python-mock" ,python-mock))) | |
12833 | (home-page "https://github.com/marshmallow-code/apispec") | |
12834 | (synopsis "Swagger 2.0 API specification generator") | |
12835 | (description "@code{python-apispec} is a pluggable API specification | |
12836 | generator. Currently supports the OpenAPI specification (f.k.a. | |
12837 | Swagger 2.0).") | |
12838 | (license license:expat))) | |
12839 | ||
12840 | (define-public python2-apispec | |
12841 | (package-with-python2 python-apispec)) | |
12842 | ||
12843 | (define-public python-flasgger | |
12844 | (package | |
12845 | (name "python-flasgger") | |
12846 | (version "0.6.3") | |
12847 | (source | |
12848 | (origin | |
1a04d421 TGR |
12849 | (method git-fetch) |
12850 | (uri (git-reference | |
12851 | (url "https://github.com/rochacbruno/flasgger.git") | |
12852 | (commit version))) | |
12853 | (file-name (git-file-name name version)) | |
44d10b1f | 12854 | (sha256 |
1a04d421 | 12855 | (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn")))) |
44d10b1f RW |
12856 | (build-system python-build-system) |
12857 | (arguments | |
12858 | `(#:phases | |
12859 | (modify-phases %standard-phases | |
12860 | (replace 'check | |
12861 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
12862 | (substitute* "Makefile" | |
12863 | (("flake8 flasgger --ignore=F403") | |
12864 | "flake8 flasgger --ignore=E731,F403")) | |
12865 | (setenv "PYTHONPATH" (string-append (getcwd) | |
12866 | ":" | |
12867 | (getenv "PYTHONPATH"))) | |
ac599a09 | 12868 | (invoke "py.test")))))) |
44d10b1f RW |
12869 | (propagated-inputs |
12870 | `(("python-flask" ,python-flask) | |
12871 | ("python-pyyaml" ,python-pyyaml) | |
12872 | ("python-jsonschema" ,python-jsonschema) | |
12873 | ("python-mistune" ,python-mistune) | |
12874 | ("python-six" ,python-six))) | |
12875 | (native-inputs | |
12876 | `(("python-decorator" ,python-decorator) | |
12877 | ("python-flake8" ,python-flake8) | |
12878 | ("python-flask-restful" ,python-flask-restful) | |
12879 | ("python-flex" ,python-flex) | |
12880 | ("python-pytest" ,python-pytest) | |
12881 | ("python-pytest-cov" ,python-pytest-cov) | |
12882 | ("python-marshmallow" ,python-marshmallow) | |
12883 | ("python-apispec" ,python-apispec))) | |
12884 | (home-page "https://github.com/rochacbruno/flasgger/") | |
12885 | (synopsis "Extract Swagger specs from your Flask project") | |
12886 | (description "@code{python-flasgger} allows extracting Swagger specs | |
12887 | from your Flask project. It is a fork of Flask-Swagger.") | |
12888 | (license license:expat))) | |
12889 | ||
12890 | (define-public python2-flasgger | |
12891 | (package-with-python2 python-flasgger)) | |
12892 | ||
12893 | (define-public python-swagger-spec-validator | |
12894 | (package | |
12895 | (name "python-swagger-spec-validator") | |
12896 | (version "2.1.0") | |
12897 | (source | |
12898 | (origin | |
12899 | (method url-fetch) | |
12900 | (uri (pypi-uri "swagger-spec-validator" version)) | |
12901 | (sha256 | |
12902 | (base32 | |
12903 | "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw")))) | |
12904 | (build-system python-build-system) | |
12905 | (propagated-inputs | |
12906 | `(("python-jsonschema" ,python-jsonschema) | |
12907 | ("python-six" ,python-six))) | |
12908 | (home-page | |
12909 | "https://github.com/Yelp/swagger_spec_validator") | |
12910 | (synopsis "Validation of Swagger specifications") | |
12911 | (description "@code{swagger_spec_validator} provides a library for | |
12912 | validating Swagger API specifications.") | |
12913 | (license license:asl2.0))) | |
12914 | ||
12915 | (define-public python2-swagger-spec-validator | |
12916 | (package-with-python2 python-swagger-spec-validator)) | |
12917 | ||
12918 | (define-public python-apache-libcloud | |
12919 | (package | |
12920 | (name "python-apache-libcloud") | |
12921 | (version "2.4.0") | |
12922 | (source | |
12923 | (origin | |
12924 | (method url-fetch) | |
12925 | (uri (pypi-uri "apache-libcloud" version)) | |
12926 | (sha256 | |
12927 | (base32 | |
12928 | "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j")))) | |
12929 | (build-system python-build-system) | |
12930 | (arguments | |
12931 | `(#:phases | |
12932 | (modify-phases %standard-phases | |
12933 | (add-after 'unpack 'patch-ssh | |
12934 | (lambda* (#:key inputs #:allow-other-keys) | |
12935 | (substitute* "libcloud/compute/ssh.py" | |
12936 | (("'ssh'") (string-append "'" (assoc-ref inputs "openssh") | |
12937 | "/bin/ssh" "'"))) | |
12938 | #t)) | |
12939 | (add-after 'unpack 'patch-tests | |
12940 | (lambda _ | |
12941 | (substitute* "./libcloud/test/test_file_fixtures.py" | |
12942 | ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>. | |
12943 | (("def _ascii") "def _raw_data(self, method, url, body, headers): | |
12944 | return (httplib.OK, | |
12945 | \"1234abcd\", | |
12946 | {\"test\": \"value\"}, | |
12947 | httplib.responses[httplib.OK]) | |
12948 | def _ascii")) | |
12949 | (substitute* "libcloud/test/compute/test_ssh_client.py" | |
12950 | (("class ShellOutSSHClientTests") | |
12951 | "@unittest.skip(\"Guix container doesn't have ssh service\") | |
12952 | class ShellOutSSHClientTests") | |
12953 | ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>. | |
12954 | (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'") | |
12955 | (("'.xF0', '.x90', '.x8D', '.x88'") | |
12956 | "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'")) | |
12957 | #t)) | |
12958 | (add-before 'check 'copy-secret | |
12959 | (lambda _ | |
12960 | (copy-file "libcloud/test/secrets.py-dist" | |
12961 | "libcloud/test/secrets.py") | |
12962 | #t))))) | |
12963 | (inputs | |
12964 | `(("openssh" ,openssh))) | |
12965 | (propagated-inputs | |
12966 | `(("python-paramiko" ,python-paramiko) | |
12967 | ("python-requests" ,python-requests))) | |
12968 | (native-inputs | |
12969 | `(("python-lockfile" ,python-lockfile) | |
12970 | ("python-mock" ,python-mock) | |
12971 | ("python-pytest" ,python-pytest) | |
12972 | ("python-pytest-runner" ,python-pytest-runner) | |
12973 | ("python-requests-mock" ,python-requests-mock))) | |
12974 | (home-page "https://libcloud.apache.org/") | |
12975 | (synopsis "Unified Cloud API") | |
12976 | (description "@code{libcloud} is a Python library for interacting with | |
12977 | many of the popular cloud service providers using a unified API.") | |
12978 | (license license:asl2.0))) | |
12979 | ||
12980 | (define-public python2-apache-libcloud | |
12981 | (package-with-python2 python-apache-libcloud)) | |
12982 | ||
12983 | (define-public python-smmap2 | |
12984 | (package | |
12985 | (name "python-smmap2") | |
12986 | (version "2.0.3") | |
12987 | (source | |
12988 | (origin | |
12989 | (method url-fetch) | |
12990 | (uri (pypi-uri "smmap2" version)) | |
12991 | (sha256 | |
12992 | (base32 | |
12993 | "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7")))) | |
12994 | (build-system python-build-system) | |
12995 | (native-inputs | |
12996 | `(("python-nosexcover" ,python-nosexcover))) | |
12997 | (home-page "https://github.com/Byron/smmap") | |
12998 | (synopsis "Python sliding window memory map manager") | |
12999 | (description "@code{smmap2} is a pure Python implementation of a sliding | |
13000 | window memory map manager.") | |
13001 | (license license:bsd-3))) | |
13002 | ||
13003 | (define-public python2-smmap2 | |
13004 | (package-with-python2 python-smmap2)) | |
13005 | ||
13006 | (define-public python-regex | |
13007 | (package | |
13008 | (name "python-regex") | |
c187c9d7 | 13009 | (version "2019.04.14") |
44d10b1f RW |
13010 | (source (origin |
13011 | (method url-fetch) | |
13012 | (uri (pypi-uri "regex" version)) | |
13013 | (sha256 | |
13014 | (base32 | |
c187c9d7 BT |
13015 | "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m")))) |
13016 | ;; TODO: Fix and enable regex_test.py tests that complain about the | |
13017 | ;; test.support module not existing. | |
44d10b1f RW |
13018 | (build-system python-build-system) |
13019 | (home-page "https://bitbucket.org/mrabarnett/mrab-regex") | |
13020 | (synopsis "Alternative regular expression module") | |
13021 | (description "This regular expression implementation is backwards- | |
13022 | compatible with the standard @code{re} module, but offers additional | |
13023 | functionality like full case-folding for case-insensitive matches in Unicode.") | |
13024 | (license license:psfl))) | |
13025 | ||
13026 | (define-public python2-regex | |
13027 | (package-with-python2 python-regex)) | |
13028 | ||
13029 | (define-public python2-pyopengl | |
13030 | (package | |
13031 | (name "python2-pyopengl") | |
13032 | (version "3.1.0") | |
13033 | (source | |
13034 | (origin | |
13035 | (method url-fetch) | |
13036 | (uri (pypi-uri "PyOpenGL" version)) | |
13037 | (sha256 | |
13038 | (base32 | |
13039 | "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv")))) | |
13040 | (arguments | |
13041 | `(#:python ,python-2)) | |
13042 | (build-system python-build-system) | |
13043 | (home-page "http://pyopengl.sourceforge.net") | |
13044 | (synopsis "Standard OpenGL bindings for Python") | |
13045 | (description | |
13046 | "PyOpenGL is the most common cross platform Python binding to OpenGL and | |
13047 | related APIs. The binding is created using the standard @code{ctypes} | |
13048 | library.") | |
13049 | (license license:bsd-3))) | |
13050 | ||
13051 | (define-public python2-pyopengl-accelerate | |
13052 | (package | |
13053 | (inherit python2-pyopengl) | |
13054 | (name "python2-pyopengl-accelerate") | |
13055 | (version "3.1.0") | |
13056 | (source | |
13057 | (origin | |
13058 | (method url-fetch) | |
13059 | (uri (pypi-uri "PyOpenGL-accelerate" version)) | |
13060 | (sha256 | |
13061 | (base32 | |
13062 | "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj")))) | |
13063 | (synopsis "Acceleration code for PyOpenGL") | |
13064 | (description | |
13065 | "This is the Cython-coded accelerator module for PyOpenGL."))) | |
13066 | ||
13067 | (define-public python-rencode | |
13068 | (package | |
13069 | (name "python-rencode") | |
13070 | (version "1.0.5") | |
13071 | (source | |
13072 | (origin | |
13073 | (method url-fetch) | |
13074 | (uri (pypi-uri "rencode" version)) | |
13075 | (sha256 | |
13076 | (base32 | |
13077 | "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv")))) | |
13078 | (build-system python-build-system) | |
13079 | (arguments | |
13080 | `(#:phases | |
13081 | (modify-phases %standard-phases | |
13082 | (add-before 'check 'delete-bogus-test | |
13083 | ;; This test requires /home/aresch/Downloads, which is not provided by | |
13084 | ;; the build environment. | |
13085 | (lambda _ | |
13086 | (delete-file "rencode/t.py") | |
13087 | #t))))) | |
13088 | (native-inputs `(("pkg-config" ,pkg-config) | |
13089 | ("python-cython" ,python-cython))) | |
13090 | (home-page "https://github.com/aresch/rencode") | |
13091 | (synopsis "Serialization of heterogeneous data structures") | |
13092 | (description | |
13093 | "The @code{rencode} module is a data structure serialization library, | |
13094 | similar to @code{bencode} from the BitTorrent project. For complex, | |
13095 | heterogeneous data structures with many small elements, r-encoding stake up | |
13096 | significantly less space than b-encodings. This version of rencode is a | |
13097 | complete rewrite in Cython to attempt to increase the performance over the | |
13098 | pure Python module.") | |
13099 | (license license:bsd-3))) | |
13100 | ||
13101 | (define-public python2-rencode | |
13102 | (package-with-python2 python-rencode)) | |
13103 | ||
13104 | (define-public python-xenon | |
13105 | (package | |
13106 | (name "python-xenon") | |
13107 | (version "0.5.4") | |
13108 | (source | |
13109 | (origin | |
13110 | (method url-fetch) | |
13111 | (uri (pypi-uri "xenon" version)) | |
13112 | (sha256 | |
13113 | (base32 | |
13114 | "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc")))) | |
13115 | (build-system python-build-system) | |
13116 | (native-inputs | |
13117 | `(("python-pyyaml" ,python-pyyaml) | |
13118 | ("python-radon" ,python-radon) | |
13119 | ("python-requests" ,python-requests) | |
13120 | ("python-flake8" ,python-flake8) | |
13121 | ("python-tox" ,python-tox))) | |
13122 | (arguments | |
13123 | `(#:phases | |
13124 | (modify-phases %standard-phases | |
13125 | (add-before 'build 'patch-test-requirements | |
13126 | (lambda _ | |
13127 | ;; Remove httpretty dependency for tests. | |
13128 | (substitute* "setup.py" | |
13129 | (("httpretty") "")) | |
13130 | #t))))) | |
13131 | (home-page "https://xenon.readthedocs.org/") | |
13132 | (synopsis "Monitor code metrics for Python on your CI server") | |
13133 | (description | |
13134 | "Xenon is a monitoring tool based on Radon. It monitors code complexity. | |
13135 | Ideally, @code{xenon} is run every time code is committed. Through command | |
13136 | line options, various thresholds can be set for the complexity of code. It | |
13137 | will fail (i.e. it will exit with a non-zero exit code) when any of these | |
13138 | requirements is not met.") | |
13139 | (license license:expat))) | |
13140 | ||
13141 | (define-public python2-xenon | |
13142 | (package-with-python2 python-xenon)) | |
13143 | ||
13144 | (define-public python-pysocks | |
13145 | (package | |
13146 | (name "python-pysocks") | |
b8725cdf | 13147 | (version "1.7.0") |
44d10b1f RW |
13148 | (source |
13149 | (origin | |
13150 | (method url-fetch) | |
13151 | (uri (pypi-uri "PySocks" version)) | |
13152 | (sha256 | |
13153 | (base32 | |
b8725cdf | 13154 | "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr")))) |
44d10b1f RW |
13155 | (build-system python-build-system) |
13156 | (arguments `(#:tests? #f)) | |
13157 | (home-page "https://github.com/Anorov/PySocks") | |
13158 | (synopsis "SOCKS client module") | |
13159 | (description "@code{pysocks} is an updated and semi-actively maintained | |
13160 | version of @code{SocksiPy} with bug fixes and extra features.") | |
13161 | (license license:bsd-3))) | |
13162 | ||
13163 | (define-public python2-pysocks | |
13164 | (package-with-python2 python-pysocks)) | |
13165 | ||
13166 | (define-public python-pydiff | |
13167 | (package | |
13168 | (name "python-pydiff") | |
13169 | (version "0.2") | |
13170 | (source | |
13171 | (origin | |
13172 | (method url-fetch) | |
13173 | (uri (pypi-uri "pydiff" version)) | |
13174 | (sha256 | |
13175 | (base32 | |
13176 | "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44")))) | |
13177 | (build-system python-build-system) | |
13178 | (home-page "https://github.com/myint/pydiff") | |
13179 | (synopsis "Library to diff two Python files at the bytecode level") | |
13180 | (description | |
13181 | "@code{pydiff} makes it easy to look for actual code changes while | |
13182 | ignoring formatting changes.") | |
13183 | (license license:expat))) | |
13184 | ||
13185 | (define-public python2-pydiff | |
13186 | (package-with-python2 python-pydiff)) | |
13187 | ||
13188 | (define-public python-tqdm | |
13189 | (package | |
13190 | (name "python-tqdm") | |
13191 | (version "4.19.6") | |
13192 | (source | |
13193 | (origin | |
13194 | (method url-fetch) | |
13195 | (uri (pypi-uri "tqdm" version)) | |
13196 | (sha256 | |
13197 | (base32 | |
13198 | "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y")))) | |
13199 | (build-system python-build-system) | |
13200 | (native-inputs | |
13201 | `(("python-flake8" ,python-flake8) | |
13202 | ("python-nose" ,python-nose) | |
13203 | ("python-coverage" ,python-coverage))) | |
13204 | (home-page "https://github.com/tqdm/tqdm") | |
13205 | (synopsis "Fast, extensible progress meter") | |
13206 | (description | |
13207 | "Make loops show a progress bar on the console by just wrapping any | |
13208 | iterable with @code{|tqdm(iterable)|}. Offers many options to define | |
13209 | design and layout.") | |
13210 | (license (list license:mpl2.0 license:expat)))) | |
13211 | ||
13212 | (define-public python2-tqdm | |
13213 | (package-with-python2 python-tqdm)) | |
13214 | ||
13215 | (define-public python-pkginfo | |
13216 | (package | |
13217 | (name "python-pkginfo") | |
13218 | (version "1.4.2") | |
13219 | (source | |
13220 | (origin | |
13221 | (method url-fetch) | |
13222 | (uri (pypi-uri "pkginfo" version)) | |
13223 | (sha256 | |
13224 | (base32 | |
13225 | "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q")))) | |
13226 | (build-system python-build-system) | |
13227 | (arguments | |
13228 | ;; The tests are broken upstream. | |
13229 | '(#:tests? #f)) | |
13230 | (home-page | |
13231 | "https://code.launchpad.net/~tseaver/pkginfo/trunk") | |
13232 | (synopsis | |
13233 | "Query metadatdata from sdists, bdists, and installed packages") | |
13234 | (description | |
13235 | "API to query the distutils metadata written in @file{PKG-INFO} inside a | |
13236 | source distriubtion (an sdist) or a binary distribution (e.g., created by | |
13237 | running bdist_egg). It can also query the EGG-INFO directory of an installed | |
13238 | distribution, and the *.egg-info stored in a \"development checkout\" (e.g, | |
13239 | created by running @code{python setup.py develop}).") | |
13240 | (license license:expat))) | |
13241 | ||
13242 | (define-public python2-pkginfo | |
13243 | (package-with-python2 python-pkginfo)) | |
13244 | ||
13245 | (define-public python-twine | |
13246 | (package | |
13247 | (name "python-twine") | |
13248 | (version "1.9.1") | |
13249 | (source | |
13250 | (origin | |
13251 | (method url-fetch) | |
13252 | (uri (pypi-uri "twine" version)) | |
13253 | (sha256 | |
13254 | (base32 | |
13255 | "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a")))) | |
13256 | (build-system python-build-system) | |
13257 | (propagated-inputs | |
13258 | `(("python-tqdm" ,python-tqdm) | |
13259 | ("python-pkginfo" ,python-pkginfo) | |
13260 | ("python-requests" ,python-requests) | |
13261 | ("python-requests-toolbelt" ,python-requests-toolbelt))) | |
13262 | (home-page "https://github.com/pypa/twine") | |
13263 | (synopsis "Collection of utilities for interacting with PyPI") | |
13264 | (description | |
13265 | "@code{twine} currently supports registering projects and uploading | |
13266 | distributions. It authenticates the user over HTTPS, allows them to pre-sign | |
13267 | their files and supports any packaging format (including wheels).") | |
13268 | (license license:asl2.0))) | |
13269 | ||
13270 | (define-public python2-twine | |
13271 | (package-with-python2 python-twine)) | |
13272 | ||
13273 | (define-public python-linecache2 | |
13274 | (package | |
13275 | (name "python-linecache2") | |
13276 | (version "1.0.0") | |
13277 | (source | |
13278 | (origin | |
13279 | (method url-fetch) | |
13280 | (uri (pypi-uri "linecache2" version)) | |
13281 | (sha256 | |
13282 | (base32 | |
13283 | "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb")))) | |
13284 | (build-system python-build-system) | |
13285 | (arguments | |
13286 | `(;; The tests depend on unittest2, and our version is a bit too old. | |
13287 | #:tests? #f)) | |
13288 | (native-inputs | |
13289 | `(("python-pbr" ,python-pbr-minimal))) | |
13290 | (home-page | |
13291 | "https://github.com/testing-cabal/linecache2") | |
13292 | (synopsis "Backports of the linecache module") | |
13293 | (description | |
13294 | "The linecache module allows one to get any line from any file, while | |
13295 | attempting to optimize internally, using a cache, the common case where many | |
13296 | lines are read from a single file.") | |
13297 | (license license:psfl))) | |
13298 | ||
13299 | (define-public python2-linecache2 | |
13300 | (package-with-python2 python-linecache2)) | |
13301 | ||
13302 | (define-public python-traceback2 | |
13303 | (package | |
13304 | (name "python-traceback2") | |
13305 | (version "1.4.0") | |
13306 | (source | |
13307 | (origin | |
13308 | (method url-fetch) | |
13309 | (uri (pypi-uri "traceback2" version)) | |
13310 | (sha256 | |
13311 | (base32 | |
13312 | "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05")))) | |
13313 | (build-system python-build-system) | |
13314 | (arguments | |
13315 | `(;; python-traceback2 and python-unittest2 depend on one another. | |
13316 | #:tests? #f)) | |
13317 | (native-inputs | |
13318 | `(("python-pbr" ,python-pbr-minimal))) | |
13319 | (propagated-inputs | |
13320 | `(("python-linecache2" ,python-linecache2))) | |
13321 | (home-page | |
13322 | "https://github.com/testing-cabal/traceback2") | |
13323 | (synopsis "Backports of the traceback module") | |
13324 | (description | |
13325 | "This module provides a standard interface to extract, format and print | |
13326 | stack traces of Python programs. It exactly mimics the behavior of the Python | |
13327 | interpreter when it prints a stack trace.") | |
13328 | (license license:psfl))) | |
13329 | ||
13330 | (define-public python2-traceback2 | |
13331 | (package-with-python2 python-traceback2)) | |
13332 | ||
13333 | (define-public python-ratelimiter | |
13334 | (package | |
13335 | (name "python-ratelimiter") | |
13336 | (version "1.2.0") | |
13337 | (source | |
13338 | (origin | |
13339 | (method url-fetch) | |
13340 | (uri (pypi-uri "ratelimiter" version)) | |
13341 | (sha256 | |
13342 | (base32 | |
13343 | "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p")))) | |
13344 | (build-system python-build-system) | |
13345 | (arguments | |
13346 | '(#:tests? #f)) ; There are no tests in the pypi archive. | |
13347 | (home-page "https://github.com/RazerM/ratelimiter") | |
13348 | (synopsis "Simple rate limiting object") | |
13349 | (description | |
13350 | "The @code{ratelimiter} module ensures that an operation will not be | |
13351 | executed more than a given number of times during a given period.") | |
13352 | (license license:asl2.0))) | |
13353 | ||
13354 | (define-public python2-ratelimiter | |
13355 | (package-with-python2 python-ratelimiter)) | |
13356 | ||
13357 | (define-public python-dukpy | |
13358 | (package | |
13359 | (name "python-dukpy") | |
13360 | (version "0.3") | |
13361 | (source | |
13362 | (origin | |
5b77ebe1 TGR |
13363 | (method git-fetch) |
13364 | (uri (git-reference | |
13365 | (url "https://github.com/kovidgoyal/dukpy.git") | |
13366 | (commit (string-append "v" version)))) | |
13367 | (file-name (git-file-name name version)) | |
44d10b1f | 13368 | (sha256 |
5b77ebe1 | 13369 | (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls")))) |
44d10b1f RW |
13370 | (build-system python-build-system) |
13371 | (home-page "https://github.com/kovidgoyal/dukpy") | |
13372 | (synopsis "Run JavaScript in python") | |
13373 | (description | |
13374 | "dukpy is a JavaScript runtime environment for Python using the duktape | |
13375 | embeddable JavaScript engine.") | |
13376 | ;; Dukpy is licensed under MIT like the embedded duktape library, | |
13377 | ;; with 'errors.c' as GPL3. | |
13378 | (license (list license:expat license:gpl3)))) | |
13379 | ||
13380 | (define-public python2-dukpy | |
13381 | (package-with-python2 python-dukpy)) | |
13382 | ||
13383 | (define-public python-jsonrpclib-pelix | |
13384 | (package | |
13385 | (name "python-jsonrpclib-pelix") | |
13386 | (version "0.3.2") | |
13387 | (source | |
13388 | (origin | |
13389 | (method url-fetch) | |
13390 | (uri (pypi-uri "jsonrpclib-pelix" version)) | |
13391 | (sha256 | |
13392 | (base32 | |
13393 | "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl")))) | |
13394 | (build-system python-build-system) | |
13395 | (arguments | |
13396 | `(#:tests? #f)) ; no tests in PyPI tarball | |
13397 | (home-page "https://github.com/tcalmant/jsonrpclib/") | |
13398 | (synopsis "JSON-RPC 2.0 client library for Python") | |
13399 | (description | |
13400 | "This library implements the JSON-RPC v2.0 | |
13401 | specification (backwards-compatible) as a client library for Python. This | |
13402 | version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote | |
13403 | services.") | |
13404 | (license license:asl2.0))) | |
13405 | ||
13406 | (define-public python2-jsonrpclib-pelix | |
13407 | (package-with-python2 python-jsonrpclib-pelix)) | |
13408 | ||
13409 | (define-public python-setuptools-scm-git-archive | |
13410 | (package | |
13411 | (name "python-setuptools-scm-git-archive") | |
13412 | (version "1.0") | |
13413 | (source | |
13414 | (origin | |
13415 | (method url-fetch) | |
13416 | (uri (pypi-uri "setuptools_scm_git_archive" version)) | |
13417 | (sha256 | |
13418 | (base32 | |
13419 | "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj")))) | |
13420 | (build-system python-build-system) | |
13421 | (native-inputs | |
13422 | `(("python-pytest" ,python-pytest))) | |
13423 | (propagated-inputs | |
13424 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
13425 | (home-page "https://github.com/Changaco/setuptools_scm_git_archive/") | |
13426 | (synopsis "Setuptools_scm plugin for git archives") | |
13427 | (description | |
13428 | "The setuptools_scm_git_archive package is a plugin to | |
13429 | setuptools_scm, which supports obtaining versions from git archives that | |
13430 | belong to tagged versions.") | |
13431 | (license license:expat))) | |
13432 | ||
13433 | (define-public python2-setuptools-scm-git-archive | |
13434 | (package-with-python2 python-setuptools-scm-git-archive)) | |
13435 | ||
13436 | (define-public python-pyclipper | |
13437 | (package | |
13438 | (name "python-pyclipper") | |
13439 | (version "1.1.0.post1") | |
13440 | (source | |
13441 | (origin | |
13442 | (method url-fetch) | |
13443 | (uri (pypi-uri "pyclipper" version ".zip")) | |
13444 | (sha256 | |
13445 | (base32 | |
13446 | "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa")) | |
13447 | (modules '((guix build utils))) | |
13448 | (snippet | |
13449 | '(begin | |
13450 | ;; This file is generated by Cython. | |
13451 | (delete-file "pyclipper/pyclipper.cpp") #t)))) | |
13452 | (build-system python-build-system) | |
13453 | (arguments | |
13454 | `(#:phases | |
13455 | (modify-phases %standard-phases | |
13456 | (add-before 'build 'cythonize-sources | |
13457 | (lambda _ | |
13458 | (with-directory-excursion "pyclipper" | |
13459 | (invoke "cython" "--cplus" "pyclipper.pyx"))))))) | |
13460 | (propagated-inputs | |
13461 | `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive))) | |
13462 | (native-inputs | |
13463 | `(("python-cython" ,python-cython) | |
13464 | ("python-pytest" ,python-pytest) | |
13465 | ("python-pytest-runner" ,python-pytest-runner) | |
13466 | ("python-unittest2" ,python-unittest2) | |
13467 | ("unzip" ,unzip))) | |
13468 | (home-page "https://github.com/greginvm/pyclipper") | |
13469 | (synopsis "Wrapper for Angus Johnson's Clipper library") | |
13470 | (description | |
13471 | "Pyclipper is a Cython wrapper for the C++ translation of the | |
13472 | Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).") | |
13473 | (license license:expat))) | |
13474 | ||
13475 | (define-public python2-pyclipper | |
13476 | (package-with-python2 python-pyclipper)) | |
13477 | ||
13478 | (define-public python2-booleanoperations | |
13479 | (package | |
13480 | (name "python2-booleanoperations") | |
13481 | (version "0.7.1") | |
13482 | (source | |
13483 | (origin | |
13484 | (method url-fetch) | |
13485 | (uri (pypi-uri "booleanOperations" version ".zip")) | |
13486 | (sha256 | |
13487 | (base32 | |
13488 | "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn")))) | |
13489 | (build-system python-build-system) | |
13490 | (arguments | |
13491 | `(#:python ,python-2)) | |
13492 | (native-inputs | |
13493 | `(("unzip" ,unzip) | |
13494 | ("python2-pytest" ,python2-pytest) | |
13495 | ("python2-pytest-runner" ,python2-pytest-runner))) | |
13496 | (propagated-inputs | |
13497 | `(("python-fonttools" ,python2-fonttools) | |
13498 | ("python-pyclipper" ,python2-pyclipper) | |
13499 | ("python-ufolib" ,python2-ufolib))) | |
13500 | (home-page "https://github.com/typemytype/booleanOperations") | |
13501 | (synopsis "Boolean operations on paths") | |
13502 | (description | |
13503 | "BooleanOperations provides a Python library that enables | |
13504 | boolean operations on paths.") | |
13505 | (license license:expat))) | |
13506 | ||
13507 | (define-public python-tempdir | |
13508 | (package | |
13509 | (name "python-tempdir") | |
13510 | (version "0.7.1") | |
13511 | (source | |
13512 | (origin | |
13513 | (method url-fetch) | |
13514 | (uri (pypi-uri "tempdir" version)) | |
13515 | (sha256 | |
13516 | (base32 | |
13517 | "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8")))) | |
13518 | (build-system python-build-system) | |
13519 | (home-page "https://pypi.org/project/tempdir/") | |
13520 | (arguments | |
13521 | ;; the package has no tests | |
13522 | '(#:tests? #f)) | |
13523 | (synopsis "Python library for managing temporary directories") | |
13524 | (description | |
13525 | "This library manages temporary directories that are automatically | |
13526 | deleted with all their contents when they are no longer needed. It is | |
13527 | particularly convenient for use in tests.") | |
13528 | (license license:expat))) | |
13529 | ||
13530 | (define-public python2-tempdir | |
13531 | (package-with-python2 python-tempdir)) | |
13532 | ||
13533 | (define-public python-activepapers | |
13534 | (package | |
13535 | (name "python-activepapers") | |
13536 | (version "0.2.2") | |
13537 | (source | |
13538 | (origin | |
13539 | (method url-fetch) | |
13540 | (uri (pypi-uri "ActivePapers.Py" version)) | |
13541 | (sha256 | |
13542 | (base32 | |
13543 | "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8")))) | |
13544 | (build-system python-build-system) | |
13545 | (arguments | |
13546 | `(#:modules ((ice-9 ftw) | |
13547 | (srfi srfi-1) | |
13548 | (guix build utils) | |
13549 | (guix build python-build-system)) | |
13550 | ||
13551 | #:phases | |
13552 | (modify-phases %standard-phases | |
13553 | (add-after 'unpack 'delete-python2-code | |
13554 | (lambda _ | |
13555 | (for-each delete-file | |
13556 | '("lib/activepapers/builtins2.py" | |
13557 | "lib/activepapers/standardlib2.py" | |
13558 | "lib/activepapers/utility2.py")))) | |
13559 | (replace 'check | |
13560 | (lambda _ | |
13561 | ;; Deactivate the test cases that download files | |
13562 | (setenv "NO_NETWORK_ACCESS" "1") | |
13563 | ;; For some strange reason, some tests fail if nosetests runs all | |
13564 | ;; test modules in a single execution. They pass if each test | |
13565 | ;; module is run individually. | |
13566 | (for-each (lambda (filename) | |
13567 | (invoke "nosetests" | |
13568 | (string-append "tests/" filename))) | |
13569 | (scandir "tests" | |
13570 | (lambda (filename) | |
13571 | (string-suffix? ".py" filename))))))))) | |
13572 | (native-inputs | |
13573 | `(("python-tempdir" ,python-tempdir) | |
13574 | ("python-nose" ,python-nose))) | |
13575 | (propagated-inputs | |
13576 | `(("python-h5py" ,python-h5py))) | |
13577 | (home-page "http://www.activepapers.org/") | |
13578 | (synopsis "Executable papers for scientific computing") | |
13579 | (description | |
13580 | "ActivePapers is a tool for working with executable papers, which | |
13581 | combine data, code, and documentation in single-file packages, | |
13582 | suitable for publication as supplementary material or on repositories | |
13583 | such as figshare or Zenodo.") | |
13584 | (properties `((python2-variant . ,(delay python2-activepapers)))) | |
13585 | (license license:bsd-3))) | |
13586 | ||
13587 | (define-public python2-activepapers | |
13588 | (let ((base (package-with-python2 | |
13589 | (strip-python2-variant python-activepapers)))) | |
13590 | (package | |
13591 | (inherit base) | |
13592 | (arguments | |
13593 | (substitute-keyword-arguments (package-arguments base) | |
13594 | ((#:phases phases) | |
13595 | `(modify-phases ,phases | |
13596 | (delete 'delete-python2-code) | |
13597 | (add-after 'unpack 'delete-python3-code | |
13598 | (lambda _ | |
13599 | (for-each delete-file | |
13600 | '("lib/activepapers/builtins3.py" | |
13601 | "lib/activepapers/standardlib3.py" | |
13602 | "lib/activepapers/utility3.py"))))))))))) | |
13603 | ||
13604 | (define-public python-semver | |
13605 | (package | |
13606 | (name "python-semver") | |
13607 | (version "2.7.9") | |
13608 | (source | |
13609 | (origin | |
13610 | (method url-fetch) | |
13611 | (uri (pypi-uri "semver" version)) | |
13612 | (sha256 | |
13613 | (base32 | |
13614 | "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz")))) | |
13615 | (build-system python-build-system) | |
13616 | (arguments | |
13617 | `(#:phases | |
13618 | (modify-phases %standard-phases | |
13619 | (add-after 'unpack 'patch-test-requirements | |
13620 | (lambda _ | |
13621 | (substitute* "setup.py" | |
13622 | ;; Our Python is new enough. | |
13623 | (("'virtualenv<14\\.0\\.0'") "'virtualenv'")) | |
13624 | #t))))) | |
13625 | (native-inputs | |
13626 | `(("python-tox" ,python-tox) | |
13627 | ("python-virtualenv" ,python-virtualenv))) | |
13628 | (home-page "https://github.com/k-bx/python-semver") | |
13629 | (synopsis "Python helper for Semantic Versioning") | |
13630 | (description "This package provides a Python library for | |
13631 | @url{Semantic Versioning, http://semver.org/}.") | |
13632 | (license license:bsd-3))) | |
13633 | ||
13634 | (define-public python2-semver | |
13635 | (package-with-python2 python-semver)) | |
13636 | ||
13637 | (define-public python-pyro4 | |
13638 | (package | |
13639 | (name "python-pyro4") | |
ad1acb81 | 13640 | (version "4.75") |
44d10b1f RW |
13641 | (source |
13642 | (origin | |
13643 | (method url-fetch) | |
13644 | (uri (pypi-uri "Pyro4" version)) | |
13645 | (sha256 | |
ad1acb81 | 13646 | (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq")))) |
44d10b1f RW |
13647 | (build-system python-build-system) |
13648 | (propagated-inputs | |
13649 | `(("python-serpent" ,python-serpent))) | |
13650 | (home-page "https://pyro4.readthedocs.io") | |
13651 | (synopsis "Distributed object middleware for Python") | |
13652 | (description | |
13653 | "Pyro enables you to build applications in which objects can talk to each | |
13654 | other over the network. You can just use normal Python method calls to call | |
13655 | objects on other machines, also known as remote procedure calls (RPC).") | |
13656 | (license license:expat))) | |
13657 | ||
13658 | (define-public python2-pyro | |
13659 | (package | |
13660 | (name "python2-pyro") | |
13661 | (version "3.16") | |
13662 | (source | |
13663 | (origin | |
13664 | (method url-fetch) | |
13665 | (uri (pypi-uri "Pyro" version)) | |
13666 | (file-name (string-append "Pyro-" version ".tar.gz")) | |
13667 | (sha256 | |
13668 | (base32 | |
13669 | "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v")))) | |
13670 | (build-system python-build-system) | |
13671 | (arguments | |
13672 | ;; Pyro is not compatible with Python 3 | |
13673 | `(#:python ,python-2 | |
13674 | ;; Pyro has no test cases for automatic execution | |
13675 | #:tests? #f)) | |
13676 | (home-page "http://pythonhosted.org/Pyro/") | |
13677 | (synopsis "Distributed object manager for Python") | |
13678 | (description "Pyro is a Distributed Object Technology system | |
13679 | written in Python that is designed to be easy to use. It resembles | |
13680 | Java's Remote Method Invocation (RMI). It has less similarity to CORBA, | |
13681 | which is a system and language independent Distributed Object Technology | |
13682 | and has much more to offer than Pyro or RMI. Pyro 3.x is no | |
13683 | longer maintained. New projects should use Pyro4 instead, which | |
13684 | is the new Pyro version that is actively developed.") | |
13685 | (license license:expat))) | |
13686 | ||
13687 | (define-public python2-scientific | |
13688 | (package | |
13689 | (name "python2-scientific") | |
13690 | (version "2.9.4") | |
13691 | (source | |
13692 | (origin | |
13693 | (method url-fetch) | |
13694 | (uri (string-append "https://bitbucket.org/khinsen/" | |
13695 | "scientificpython/downloads/ScientificPython-" | |
13696 | version ".tar.gz")) | |
13697 | (file-name (string-append "ScientificPython-" version ".tar.gz")) | |
13698 | (sha256 | |
13699 | (base32 | |
13700 | "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3")))) | |
13701 | (build-system python-build-system) | |
13702 | (inputs | |
13703 | `(("netcdf" ,netcdf))) | |
13704 | (propagated-inputs | |
13705 | `(("python-numpy" ,python2-numpy-1.8) | |
13706 | ("python-pyro" ,python2-pyro))) | |
13707 | (arguments | |
13708 | ;; ScientificPython is not compatible with Python 3 | |
13709 | `(#:python ,python-2 | |
13710 | #:tests? #f ; No test suite | |
13711 | #:phases | |
13712 | (modify-phases %standard-phases | |
13713 | (replace 'build | |
13714 | (lambda* (#:key inputs #:allow-other-keys) | |
77e61e25 RW |
13715 | (invoke "python" "setup.py" "build" |
13716 | (string-append "--netcdf_prefix=" | |
13717 | (assoc-ref inputs "netcdf")))))))) | |
44d10b1f RW |
13718 | (home-page "https://bitbucket.org/khinsen/scientificpython") |
13719 | (synopsis "Python modules for scientific computing") | |
13720 | (description "ScientificPython is a collection of Python modules that are | |
13721 | useful for scientific computing. Most modules are rather general (Geometry, | |
13722 | physical units, automatic derivatives, ...) whereas others are more | |
13723 | domain-specific (e.g. netCDF and PDB support). The library is currently | |
13724 | not actively maintained and works only with Python 2 and NumPy < 1.9.") | |
13725 | (license license:cecill-c))) | |
13726 | ||
13727 | (define-public python2-mmtk | |
13728 | (package | |
13729 | (name "python2-mmtk") | |
13730 | (version "2.7.11") | |
13731 | (source | |
13732 | (origin | |
13733 | (method url-fetch) | |
13734 | (uri (string-append "https://bitbucket.org/khinsen/" | |
13735 | "mmtk/downloads/MMTK-" version ".tar.gz")) | |
13736 | (file-name (string-append "MMTK-" version ".tar.gz")) | |
13737 | (sha256 | |
13738 | (base32 | |
13739 | "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862")))) | |
13740 | (build-system python-build-system) | |
13741 | (native-inputs | |
13742 | `(("netcdf" ,netcdf))) | |
13743 | (propagated-inputs | |
13744 | `(("python-scientific" ,python2-scientific) | |
13745 | ("python-tkinter" ,python-2 "tk"))) | |
13746 | (arguments | |
13747 | `(#:python ,python-2 | |
13748 | #:tests? #f | |
13749 | #:phases | |
13750 | (modify-phases %standard-phases | |
13751 | (add-before 'build 'includes-from-scientific | |
13752 | (lambda* (#:key inputs #:allow-other-keys) | |
13753 | (mkdir-p "Include/Scientific") | |
13754 | (copy-recursively | |
13755 | (string-append | |
13756 | (assoc-ref inputs "python-scientific") | |
13757 | "/include/python2.7/Scientific") | |
13758 | "Include/Scientific")))))) | |
13759 | (home-page "http://dirac.cnrs-orleans.fr/MMTK") | |
13760 | (synopsis "Python library for molecular simulation") | |
13761 | (description "MMTK is a library for molecular simulations with an emphasis | |
13762 | on biomolecules. It provides widely used methods such as Molecular Dynamics | |
13763 | and normal mode analysis, but also basic routines for implementing new methods | |
13764 | for simulation and analysis. The library is currently not actively maintained | |
13765 | and works only with Python 2 and NumPy < 1.9.") | |
13766 | (license license:cecill-c))) | |
13767 | ||
13768 | (define-public python-phonenumbers | |
13769 | (package | |
13770 | (name "python-phonenumbers") | |
13771 | (version "8.9.1") | |
13772 | (source | |
13773 | (origin | |
13774 | (method url-fetch) | |
13775 | (uri (pypi-uri "phonenumbers" version)) | |
13776 | (sha256 | |
13777 | (base32 | |
13778 | "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1")))) | |
13779 | (build-system python-build-system) | |
13780 | (home-page | |
13781 | "https://github.com/daviddrysdale/python-phonenumbers") | |
13782 | (synopsis | |
13783 | "Python library for dealing with international phone numbers") | |
13784 | (description | |
13785 | "This package provides a Python port of Google's libphonenumber library.") | |
13786 | (license license:asl2.0))) | |
13787 | ||
13788 | (define-public python2-phonenumbers | |
13789 | (package-with-python2 python-phonenumbers)) | |
13790 | ||
13791 | (define-public python-send2trash | |
13792 | (package | |
13793 | (name "python-send2trash") | |
d9b0216b | 13794 | (version "1.5.0") |
44d10b1f | 13795 | (source |
d9b0216b | 13796 | (origin (method git-fetch) |
44d10b1f | 13797 | ;; Source tarball on PyPI doesn't include tests. |
d9b0216b RW |
13798 | (uri (git-reference |
13799 | (url "https://github.com/hsoft/send2trash.git") | |
13800 | (commit version))) | |
13801 | (file-name (git-file-name name version)) | |
44d10b1f RW |
13802 | (sha256 |
13803 | (base32 | |
d9b0216b | 13804 | "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v")))) |
44d10b1f RW |
13805 | (build-system python-build-system) |
13806 | (arguments | |
13807 | '(#:phases | |
13808 | (modify-phases %standard-phases | |
13809 | (add-before 'check 'pre-check | |
13810 | (lambda _ | |
13811 | (mkdir-p "/tmp/foo") | |
13812 | (setenv "HOME" "/tmp/foo") | |
13813 | #t))))) | |
13814 | (home-page "https://github.com/hsoft/send2trash") | |
13815 | (synopsis "Send files to the user's @file{~/Trash} directory") | |
13816 | (description "This package provides a Python library to send files to the | |
13817 | user's @file{~/Trash} directory.") | |
20b3fde7 | 13818 | (properties `((python2-variant . ,(delay python2-send2trash)))) |
44d10b1f RW |
13819 | (license license:bsd-3))) |
13820 | ||
13821 | (define-public python2-send2trash | |
13822 | (package | |
f32164ab | 13823 | (inherit (package-with-python2 (strip-python2-variant python-send2trash))) |
44d10b1f RW |
13824 | (arguments |
13825 | (substitute-keyword-arguments (package-arguments python-send2trash) | |
13826 | ((#:phases phases) | |
13827 | `(modify-phases ,phases | |
13828 | (add-before 'check 'setenv | |
13829 | (lambda _ | |
13830 | (setenv "PYTHONPATH" | |
13831 | (string-append (getcwd) ":" (getenv "PYTHONPATH"))) | |
4782a06f | 13832 | #t)))))))) |
44d10b1f RW |
13833 | |
13834 | (define-public python-yapf | |
13835 | (package | |
13836 | (name "python-yapf") | |
13837 | (version "0.24.0") | |
13838 | (source | |
13839 | (origin | |
13840 | (method url-fetch) | |
13841 | (uri (pypi-uri "yapf" version)) | |
13842 | (sha256 | |
13843 | (base32 | |
13844 | "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf")))) | |
13845 | (build-system python-build-system) | |
13846 | (home-page "https://github.com/google/yapf") | |
13847 | (synopsis "Formatter for Python code") | |
13848 | (description "YAPF is a formatter for Python code. It's based off of | |
13849 | @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm | |
13850 | takes the code and reformats it to the best formatting that conforms to the | |
13851 | style guide, even if the original code didn't violate the style guide.") | |
13852 | (license license:asl2.0))) | |
13853 | ||
13854 | (define-public python2-yapf | |
13855 | (package-with-python2 python-yapf)) | |
13856 | ||
13857 | (define-public python-gyp | |
13858 | (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f") | |
13859 | (revision "0")) | |
13860 | (package | |
13861 | (name "python-gyp") | |
13862 | ;; Google does not release versions, | |
13863 | ;; based on second most recent commit date. | |
13864 | (version (git-version "0.0.0" revision commit)) | |
13865 | (source | |
13866 | (origin | |
13867 | ;; Google does not release tarballs, | |
13868 | ;; git checkout is needed. | |
13869 | (method git-fetch) | |
13870 | (uri (git-reference | |
13871 | (url "https://chromium.googlesource.com/external/gyp") | |
13872 | (commit commit))) | |
13873 | (file-name (git-file-name name version)) | |
13874 | (sha256 | |
13875 | (base32 | |
13876 | "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9")))) | |
13877 | (build-system python-build-system) | |
13878 | (home-page "https://gyp.gsrc.io/") | |
13879 | (synopsis "GYP is a Meta-Build system") | |
13880 | (description | |
13881 | "GYP builds build systems for large, cross platform applications. | |
13882 | It can be used to generate XCode projects, Visual Studio projects, Ninja build | |
13883 | files, and Makefiles.") | |
13884 | (license license:bsd-3)))) | |
13885 | ||
13886 | (define-public python2-gyp | |
13887 | (package-with-python2 python-gyp)) | |
13888 | ||
13889 | (define-public python-whatever | |
13890 | (package | |
13891 | (name "python-whatever") | |
13892 | (version "0.5") | |
13893 | (source | |
13894 | (origin | |
13895 | (method url-fetch) | |
13896 | (uri (string-append "https://github.com/Suor/whatever/archive/" version | |
13897 | ".tar.gz")) | |
13898 | (sha256 | |
13899 | (base32 | |
13900 | "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap")) | |
13901 | (file-name (string-append name "-" version ".tar.gz")))) | |
13902 | (build-system python-build-system) | |
13903 | (arguments | |
13904 | `(#:phases | |
13905 | (modify-phases %standard-phases | |
13906 | (replace 'check | |
13907 | (lambda _ | |
13908 | (invoke "py.test")))))) | |
13909 | (native-inputs | |
13910 | `(("python-pytest" ,python-pytest))) | |
13911 | (home-page "http://github.com/Suor/whatever") | |
13912 | (synopsis "Make anonymous functions by partial application of operators") | |
13913 | (description "@code{whatever} provides an easy way to make anonymous | |
13914 | functions by partial application of operators.") | |
13915 | (license license:bsd-3))) | |
13916 | ||
13917 | (define-public python2-whatever | |
13918 | (package-with-python2 python-whatever)) | |
13919 | ||
13920 | (define-public python-funcy | |
13921 | (package | |
13922 | (name "python-funcy") | |
9e396ab8 | 13923 | (version "1.11") |
44d10b1f RW |
13924 | (source |
13925 | (origin | |
a85c6027 TGR |
13926 | (method git-fetch) |
13927 | (uri (git-reference | |
13928 | (url "https://github.com/Suor/funcy.git") | |
13929 | (commit version))) | |
44d10b1f | 13930 | (sha256 |
a85c6027 TGR |
13931 | (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw")) |
13932 | (file-name (git-file-name name version)))) | |
44d10b1f RW |
13933 | (build-system python-build-system) |
13934 | (arguments | |
13935 | `(#:phases | |
13936 | (modify-phases %standard-phases | |
13937 | (replace 'check | |
13938 | (lambda _ | |
13939 | (invoke "py.test")))))) | |
13940 | (native-inputs | |
13941 | `(("python-pytest" ,python-pytest) | |
13942 | ("python-whatever" ,python-whatever))) | |
13943 | (home-page "http://github.com/Suor/funcy") | |
13944 | (synopsis "Functional tools") | |
13945 | (description "@code{funcy} is a library that provides functional tools. | |
13946 | Examples are: | |
13947 | @enumerate | |
13948 | @item merge - Merges collections of the same type | |
13949 | @item walk - Type-preserving map | |
13950 | @item select - Selects a part of a collection | |
13951 | @item take - Takes the first n items of a collection | |
13952 | @item first - Takes the first item of a collection | |
13953 | @item remove - Predicated-removes items of a collection | |
13954 | @item concat - Concatenates two collections | |
13955 | @item flatten - Flattens a collection with subcollections | |
13956 | @item distinct - Returns only distinct items | |
13957 | @item split - Predicated-splits a collection | |
13958 | @item split_at - Splits a collection at a given item | |
13959 | @item group_by - Groups items by group | |
13960 | @item pairwise - Pairs off adjacent items | |
13961 | @item partial - Partially-applies a function | |
13962 | @item curry - Curries a function | |
13963 | @item compose - Composes functions | |
13964 | @item complement - Complements a predicate | |
13965 | @item all_fn - \"all\" with predicate | |
13966 | @end enumerate") | |
13967 | (license license:bsd-3))) | |
13968 | ||
13969 | (define-public python2-funcy | |
13970 | (package-with-python2 python-funcy)) | |
13971 | ||
13972 | (define-public python-isoweek | |
13973 | (package | |
13974 | (name "python-isoweek") | |
13975 | (version "1.3.3") | |
13976 | (source | |
13977 | (origin | |
13978 | (method url-fetch) | |
13979 | (uri (pypi-uri "isoweek" version)) | |
13980 | (sha256 | |
13981 | (base32 | |
13982 | "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk")))) | |
13983 | (build-system python-build-system) | |
13984 | (home-page "https://github.com/gisle/isoweek") | |
13985 | (synopsis "Objects representing a week") | |
13986 | (description "The @code{isoweek} module provide the class Week that | |
13987 | implements the week definition of ISO 8601. This standard also defines | |
13988 | a notation for identifying weeks; yyyyWww (where the W is a literal). | |
13989 | Week instances stringify to this form.") | |
13990 | (license license:bsd-3))) | |
13991 | ||
13992 | (define-public python2-isoweek | |
13993 | (package-with-python2 python-isoweek)) | |
13994 | ||
13995 | (define-public python-tokenize-rt | |
13996 | (package | |
13997 | (name "python-tokenize-rt") | |
13998 | (version "2.0.1") | |
13999 | (source | |
14000 | (origin | |
14001 | (method url-fetch) | |
14002 | (uri (pypi-uri "tokenize-rt" version)) | |
14003 | (sha256 | |
14004 | (base32 | |
14005 | "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw")))) | |
14006 | (build-system python-build-system) | |
14007 | (home-page "https://github.com/asottile/tokenize-rt") | |
14008 | (synopsis "Wrapper around the stdlib tokenize which roundtrips.") | |
14009 | (description | |
14010 | "This Python library is a wrapper around @code{tokenize} from the Python | |
14011 | standard library. It provides two additional tokens @code{ESCAPED_NL} and | |
14012 | @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens} | |
14013 | and @code{tokens_to_src} to roundtrip.") | |
14014 | (license license:expat))) | |
14015 | ||
14016 | (define-public python-future-fstrings | |
14017 | (package | |
14018 | (name "python-future-fstrings") | |
14019 | (version "0.4.1") | |
14020 | (source | |
14021 | (origin | |
14022 | (method url-fetch) | |
14023 | (uri (pypi-uri "future_fstrings" version)) | |
14024 | (sha256 | |
14025 | (base32 | |
14026 | "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47")))) | |
14027 | (build-system python-build-system) | |
14028 | (propagated-inputs | |
14029 | `(("python-tokenize-rt" ,python-tokenize-rt))) | |
14030 | (home-page "https://github.com/asottile/future-fstrings") | |
14031 | (synopsis "Backport of fstrings to Python < 3.6") | |
14032 | (description | |
14033 | "This package provides a UTF-8 compatible encoding | |
14034 | @code{future_fstrings}, which performs source manipulation. It decodes the | |
14035 | source bytes using the UTF-8 encoding and then rewrites Python 3.6 style | |
14036 | @code{f} strings.") | |
14037 | (license license:expat))) | |
14038 | ||
dae2eb1c MC |
14039 | (define-public python-typed-ast |
14040 | (package | |
14041 | (name "python-typed-ast") | |
14042 | (version "1.3.5") | |
14043 | (source | |
14044 | (origin | |
14045 | (method url-fetch) | |
14046 | (uri (pypi-uri "typed-ast" version)) | |
14047 | (sha256 | |
14048 | (base32 | |
14049 | "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak")))) | |
14050 | (build-system python-build-system) | |
14051 | (arguments | |
14052 | `(#:modules ((guix build utils) | |
14053 | (guix build python-build-system) | |
14054 | (ice-9 ftw) | |
14055 | (srfi srfi-1) | |
14056 | (srfi srfi-26)) | |
14057 | #:phases | |
14058 | (modify-phases %standard-phases | |
14059 | (replace 'check | |
14060 | (lambda _ | |
14061 | (let ((cwd (getcwd))) | |
14062 | (setenv "PYTHONPATH" | |
14063 | (string-append cwd "/build/" | |
14064 | (find (cut string-prefix? "lib" <>) | |
14065 | (scandir (string-append cwd "/build"))) | |
14066 | ":" | |
14067 | (getenv "PYTHONPATH")))) | |
14068 | (invoke "pytest") | |
14069 | #t))))) | |
14070 | (native-inputs `(("python-pytest" ,python-pytest))) | |
14071 | (home-page "https://github.com/python/typed_ast") | |
14072 | (synopsis "Fork of Python @code{ast} modules with type comment support") | |
14073 | (description "This package provides a parser similar to the standard | |
14074 | @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast} | |
14075 | include PEP 484 type comments and are independent of the version of Python | |
14076 | under which they are run. The @code{typed_ast} parsers produce the standard | |
14077 | Python AST (plus type comments), and are both fast and correct, as they are | |
14078 | based on the CPython 2.7 and 3.7 parsers.") | |
14079 | ;; See the file "LICENSE" for the details. | |
14080 | (license (list license:psfl | |
14081 | license:asl2.0 | |
14082 | license:expat)))) ;ast27/Parser/spark.py | |
14083 | ||
44d10b1f RW |
14084 | (define-public python-typing |
14085 | (package | |
14086 | (name "python-typing") | |
14087 | (version "3.6.6") | |
14088 | (source | |
14089 | (origin | |
14090 | (method url-fetch) | |
14091 | (uri (pypi-uri "typing" version)) | |
14092 | (sha256 | |
14093 | (base32 | |
14094 | "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0")))) | |
14095 | (build-system python-build-system) | |
14096 | (home-page "https://docs.python.org/3/library/typing.html") | |
14097 | (synopsis "Type hints for Python") | |
14098 | (description "This is a backport of the standard library @code{typing} | |
14099 | module to Python versions older than 3.5. Typing defines a standard notation | |
14100 | for Python function and variable type annotations. The notation can be used | |
14101 | for documenting code in a concise, standard format, and it has been designed | |
14102 | to also be used by static and runtime type checkers, static analyzers, IDEs | |
14103 | and other tools.") | |
14104 | (license license:psfl))) | |
14105 | ||
14106 | (define-public python2-typing | |
14107 | (package-with-python2 python-typing)) | |
14108 | ||
f89d443b VC |
14109 | (define-public python-typing-extensions |
14110 | (package | |
14111 | (name "python-typing-extensions") | |
14112 | (version "3.7.2") | |
14113 | (source | |
14114 | (origin | |
14115 | (method url-fetch) | |
14116 | (uri (pypi-uri "typing_extensions" version)) | |
14117 | (sha256 | |
14118 | (base32 | |
14119 | "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v")))) | |
14120 | (build-system python-build-system) | |
14121 | (home-page | |
14122 | "https://github.com/python/typing/blob/master/typing_extensions/README.rst") | |
14123 | (synopsis "Experimental type hints for Python") | |
14124 | (description | |
14125 | "The typing_extensions module contains additional @code{typing} hints not | |
14126 | yet present in the of the @code{typing} standard library. | |
14127 | Included are implementations of: | |
14128 | @enumerate | |
14129 | @item ClassVar | |
14130 | @item ContextManager | |
14131 | @item Counter | |
14132 | @item DefaultDict | |
14133 | @item Deque | |
14134 | @item NewType | |
14135 | @item NoReturn | |
14136 | @item overload | |
14137 | @item Protocol | |
14138 | @item runtime | |
14139 | @item Text | |
14140 | @item Type | |
14141 | @item TYPE_CHECKING | |
14142 | @item AsyncGenerator | |
14143 | @end enumerate\n") | |
14144 | (license license:psfl))) | |
14145 | ||
44d10b1f RW |
14146 | (define-public bpython |
14147 | (package | |
14148 | (name "bpython") | |
14149 | (version "0.17.1") | |
14150 | (source | |
14151 | (origin | |
14152 | (method url-fetch) | |
14153 | (uri (pypi-uri "bpython" version)) | |
14154 | (sha256 | |
14155 | (base32 | |
14156 | "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9")))) | |
14157 | (build-system python-build-system) | |
14158 | (arguments | |
14159 | `(#:phases | |
14160 | (modify-phases %standard-phases | |
14161 | (add-after 'unpack 'remove-failing-test | |
14162 | (lambda _ | |
14163 | ;; Remove failing test. FIXME: make it pass | |
14164 | (delete-file "bpython/test/test_args.py") | |
14165 | #t)) | |
14166 | (add-after 'wrap 'add-aliases | |
14167 | ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc. | |
14168 | (lambda* (#:key outputs #:allow-other-keys) | |
14169 | (let ((out (assoc-ref outputs "out"))) | |
14170 | (for-each | |
14171 | (lambda (old new) | |
14172 | (symlink old (string-append out "/bin/" new))) | |
14173 | '("bpython" "bpython-curses" "bpython-urwid" "bpdb") | |
14174 | '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3"))) | |
14175 | #t))))) | |
14176 | (propagated-inputs | |
14177 | `(("python-pygments" ,python-pygments) | |
14178 | ("python-requests" ,python-requests) | |
14179 | ("python-babel" ,python-babel) ; optional, for internationalization | |
14180 | ("python-curtsies" ,python-curtsies) ; >= 0.1.18 | |
14181 | ("python-greenlet" ,python-greenlet) | |
14182 | ("python-urwid" ,python-urwid) ; for bpython-urwid only | |
14183 | ("python-six" ,python-six))) | |
14184 | (native-inputs | |
14185 | `(("python-sphinx" ,python-sphinx) | |
14186 | ("python-mock" ,python-mock))) | |
14187 | (home-page "https://bpython-interpreter.org/") | |
14188 | (synopsis "Fancy interface to the Python interpreter") | |
14189 | (description "Bpython is a fancy interface to the Python | |
14190 | interpreter. bpython's main features are | |
14191 | ||
14192 | @enumerate | |
14193 | @item in-line syntax highlighting, | |
14194 | @item readline-like autocomplete with suggestions displayed as you type, | |
14195 | @item expected parameter list for any Python function, | |
14196 | @item \"rewind\" function to pop the last line of code from memory and | |
14197 | re-evaluate, | |
14198 | @item send the code you've entered off to a pastebin, | |
14199 | @item save the code you've entered to a file, and | |
14200 | @item auto-indentation. | |
14201 | @end enumerate") | |
14202 | (license license:expat))) | |
14203 | ||
14204 | (define-public bpython2 | |
14205 | (let ((base (package-with-python2 | |
14206 | (strip-python2-variant bpython)))) | |
14207 | (package (inherit base) | |
14208 | (name "bpython2") | |
14209 | (arguments | |
14210 | `(#:python ,python-2 | |
14211 | #:phases | |
14212 | (modify-phases %standard-phases | |
14213 | (add-after 'unpack 'remove-failing-test | |
14214 | (lambda _ | |
14215 | ;; Remove failing test. FIXME: make it pass | |
14216 | (delete-file "bpython/test/test_args.py") | |
14217 | ;; Disable failing test-cases (renaming inhibits they are | |
14218 | ;; discovered) | |
14219 | (substitute* "bpython/test/test_curtsies_repl.py" | |
14220 | (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b) | |
14221 | (string-append a "xxx_off_" b)) | |
14222 | (("^(\\s*def )(test_complex\\W)" _ a b) | |
14223 | (string-append a "xxx_off_" b))) | |
14224 | #t)) | |
14225 | (add-before 'build 'rename-scripts | |
14226 | ;; rename the scripts to bypthon2, bpdb2, etc. | |
14227 | (lambda _ | |
14228 | (substitute* "setup.py" | |
14229 | (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest) | |
14230 | (string-append name "2" rest "\n")) | |
14231 | (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest) | |
14232 | (string-append name "2" (or sub "") rest "\n"))) | |
14233 | #t)))))))) | |
14234 | ||
14235 | (define-public python-pyinotify | |
14236 | (package | |
14237 | (name "python-pyinotify") | |
14238 | (version "0.9.6") | |
14239 | (source (origin | |
14240 | (method url-fetch) | |
14241 | (uri (pypi-uri "pyinotify" version)) | |
14242 | (sha256 | |
14243 | (base32 | |
14244 | "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw")))) | |
14245 | (build-system python-build-system) | |
14246 | (arguments `(#:tests? #f)) ;no tests | |
14247 | (home-page "https://github.com/seb-m/pyinotify") | |
14248 | (synopsis "Python library for monitoring inotify events") | |
14249 | (description | |
14250 | "@code{pyinotify} provides a Python interface for monitoring | |
14251 | file system events on Linux.") | |
14252 | (license license:expat))) | |
14253 | ||
14254 | (define-public python2-pyinotify | |
14255 | (package-with-python2 python-pyinotify)) | |
14256 | ||
14257 | ;; Ada parser uses this version. | |
14258 | (define-public python2-quex-0.67.3 | |
14259 | (package | |
14260 | (name "python2-quex") | |
14261 | (version "0.67.3") | |
14262 | (source | |
14263 | (origin | |
14264 | (method url-fetch) | |
14265 | (uri (string-append "mirror://sourceforge/quex/HISTORY/" | |
14266 | (version-major+minor version) | |
14267 | "/quex-" version ".zip")) | |
14268 | (sha256 | |
14269 | (base32 | |
14270 | "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw")))) | |
14271 | (build-system python-build-system) | |
14272 | (native-inputs | |
14273 | `(("unzip" ,unzip))) | |
14274 | (arguments | |
14275 | `(#:python ,python-2 | |
14276 | #:tests? #f | |
14277 | #:phases | |
14278 | (modify-phases %standard-phases | |
14279 | (delete 'configure) | |
14280 | (delete 'build) | |
14281 | (replace 'install | |
14282 | (lambda* (#:key outputs #:allow-other-keys) | |
14283 | (let* ((out (assoc-ref outputs "out")) | |
14284 | (share/quex (string-append out "/share/quex")) | |
14285 | (bin (string-append out "/bin"))) | |
14286 | (copy-recursively "." share/quex) | |
14287 | (mkdir-p bin) | |
14288 | (symlink (string-append share/quex "/quex-exe.py") | |
14289 | (string-append bin "/quex")) | |
14290 | #t)))))) | |
14291 | (native-search-paths | |
14292 | (list (search-path-specification | |
14293 | (variable "QUEX_PATH") | |
14294 | (files '("share/quex"))))) | |
14295 | (home-page "http://quex.sourceforge.net/") | |
14296 | (synopsis "Lexical analyzer generator in Python") | |
14297 | (description "@code{quex} is a lexical analyzer generator in Python.") | |
14298 | (license license:lgpl2.1+))) ; Non-military | |
14299 | ||
14300 | (define-public python2-quex | |
14301 | (package (inherit python2-quex-0.67.3) | |
14302 | (name "python2-quex") | |
14303 | (version "0.68.1") | |
14304 | (source | |
14305 | (origin | |
14306 | (method url-fetch) | |
14307 | (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz")) | |
14308 | (sha256 | |
14309 | (base32 | |
14310 | "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j")) | |
14311 | (file-name (string-append name "-" version ".tar.gz")))))) | |
14312 | ||
14313 | (define-public python-more-itertools | |
14314 | (package | |
14315 | (name "python-more-itertools") | |
14316 | (version "4.3.0") | |
14317 | (source | |
14318 | (origin | |
14319 | (method url-fetch) | |
14320 | (uri (pypi-uri "more-itertools" version)) | |
14321 | (sha256 | |
14322 | (base32 | |
14323 | "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4")))) | |
14324 | (build-system python-build-system) | |
14325 | (arguments | |
14326 | `(,@(if (any (cute string-prefix? <> (or (%current-system) | |
14327 | (%current-target-system))) | |
14328 | '("armhf" "i686")) | |
14329 | '(#:phases | |
14330 | (modify-phases %standard-phases | |
14331 | ;; This is required for 32-bit hardware. | |
14332 | ;; TODO: Try to remove this when upgrading. | |
14333 | (add-after 'unpack 'patch-test | |
14334 | (lambda _ | |
14335 | (substitute* "more_itertools/tests/test_more.py" | |
14336 | (("10 \\*\\* 10") "9 ** 9")) | |
14337 | #t)))) | |
14338 | '()))) | |
14339 | (propagated-inputs | |
14340 | `(("python-six" ,python-six-bootstrap))) | |
14341 | (home-page "https://github.com/erikrose/more-itertools") | |
14342 | (synopsis "More routines for operating on iterables, beyond itertools") | |
14343 | (description "Python's built-in @code{itertools} module implements a | |
14344 | number of iterator building blocks inspired by constructs from APL, Haskell, | |
14345 | and SML. @code{more-itertools} includes additional building blocks for | |
14346 | working with iterables.") | |
14347 | (license license:expat))) | |
14348 | ||
14349 | (define-public python2-more-itertools | |
14350 | (package-with-python2 python-more-itertools)) | |
14351 | ||
14352 | (define-public python-latexcodec | |
14353 | (package | |
14354 | (name "python-latexcodec") | |
91b61f02 | 14355 | (version "1.0.6") |
44d10b1f RW |
14356 | (source |
14357 | (origin | |
14358 | (method url-fetch) | |
14359 | (uri (pypi-uri "latexcodec" version)) | |
14360 | (sha256 | |
91b61f02 | 14361 | (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81")))) |
44d10b1f RW |
14362 | (build-system python-build-system) |
14363 | (inputs | |
14364 | `(("python-six" ,python-six))) | |
14365 | (home-page "https://readthedocs.org/projects/latexcodec/") | |
14366 | (synopsis "Work with LaTeX code in Python") | |
14367 | (description "Lexer and codec to work with LaTeX code in Python.") | |
14368 | (license license:expat))) | |
14369 | ||
14370 | (define-public python-pybtex | |
14371 | (package | |
14372 | (name "python-pybtex") | |
14373 | (version "0.21") | |
14374 | (source | |
14375 | (origin | |
14376 | (method url-fetch) | |
14377 | (uri (pypi-uri "pybtex" version)) | |
14378 | (sha256 | |
14379 | (base32 | |
14380 | "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg")))) | |
14381 | (build-system python-build-system) | |
14382 | (native-inputs | |
14383 | `(("python-nose" ,python-nose))) | |
14384 | (inputs | |
14385 | `(("python-latexcodec" ,python-latexcodec) | |
14386 | ("python-pyyaml" ,python-pyyaml) | |
14387 | ("python-six" ,python-six))) | |
14388 | (arguments | |
14389 | `(#:test-target "nosetests")) | |
14390 | (home-page "https://pybtex.org/") | |
14391 | (synopsis "BibTeX-compatible bibliography processor") | |
14392 | (description "Pybtex is a BibTeX-compatible bibliography processor written | |
14393 | in Python. You can simply type pybtex instead of bibtex.") | |
14394 | (license license:expat))) | |
14395 | ||
14396 | (define-public python-onetimepass | |
14397 | (package | |
14398 | (name "python-onetimepass") | |
14399 | (version "1.0.1") | |
14400 | (source | |
14401 | (origin | |
14402 | (method url-fetch) | |
14403 | (uri (pypi-uri "onetimepass" version)) | |
14404 | (sha256 | |
14405 | (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5")))) | |
14406 | (build-system python-build-system) | |
14407 | (propagated-inputs `(("python-six" ,python-six))) | |
14408 | (home-page "https://github.com/tadeck/onetimepass/") | |
14409 | (synopsis "One-time password library") | |
14410 | (description "Python one-time password library for HMAC-based (HOTP) and | |
14411 | time-based (TOTP) passwords.") | |
14412 | (license license:expat))) | |
14413 | ||
14414 | (define-public python-parso | |
14415 | (package | |
14416 | (name "python-parso") | |
14417 | (version "0.3.1") | |
14418 | (source | |
14419 | (origin | |
14420 | (method url-fetch) | |
14421 | (uri (pypi-uri "parso" version)) | |
14422 | (sha256 | |
14423 | (base32 | |
14424 | "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m")))) | |
14425 | (native-inputs | |
14426 | `(("python-pytest" ,python-pytest))) | |
14427 | (build-system python-build-system) | |
14428 | (home-page "https://github.com/davidhalter/parso") | |
14429 | (synopsis "Python Parser") | |
14430 | (description "Parso is a Python parser that supports error recovery and | |
14431 | round-trip parsing for different Python versions (in multiple Python versions). | |
14432 | Parso is also able to list multiple syntax errors in your Python file.") | |
14433 | (license license:expat))) | |
14434 | ||
14435 | (define-public python2-parso | |
14436 | (package-with-python2 python-parso)) | |
14437 | ||
14438 | (define-public python-async-generator | |
14439 | (package | |
14440 | (name "python-async-generator") | |
94fcbf8d | 14441 | (version "1.10") |
44d10b1f RW |
14442 | (source |
14443 | (origin | |
14444 | (method url-fetch) | |
14445 | (uri (pypi-uri "async_generator" version)) | |
14446 | (sha256 | |
14447 | (base32 | |
94fcbf8d | 14448 | "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf")))) |
44d10b1f RW |
14449 | (build-system python-build-system) |
14450 | (native-inputs | |
14451 | `(("python-pytest" ,python-pytest))) | |
14452 | (home-page "https://github.com/python-trio/async_generator") | |
14453 | (synopsis "Async generators and context managers for Python 3.5+") | |
14454 | (description "@code{async_generator} back-ports Python 3.6's native async | |
14455 | generators and Python 3.7's context managers into Python 3.5.") | |
14456 | ;; Dual licensed. | |
14457 | (license (list license:expat license:asl2.0)))) | |
14458 | ||
14459 | (define-public python-async-timeout | |
14460 | (package | |
14461 | (name "python-async-timeout") | |
14462 | (version "3.0.1") | |
14463 | (source | |
14464 | (origin | |
14465 | (method url-fetch) | |
14466 | (uri (pypi-uri "async-timeout" version)) | |
14467 | (sha256 | |
14468 | (base32 | |
14469 | "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c")))) | |
14470 | (build-system python-build-system) | |
14471 | (home-page "https://github.com/aio-libs/async_timeout/") | |
14472 | (synopsis "Timeout context manager for asyncio programs") | |
14473 | (description "@code{async-timeout} provides a timeout timeout context | |
14474 | manager compatible with @code{asyncio}.") | |
14475 | (license license:asl2.0))) | |
14476 | ||
14477 | (define-public python-glob2 | |
14478 | (package | |
14479 | (name "python-glob2") | |
14480 | (version "0.6") | |
8fa2bcc7 TGR |
14481 | (source |
14482 | (origin | |
14483 | (method git-fetch) | |
14484 | (uri (git-reference | |
14485 | (url "https://github.com/miracle2k/python-glob2.git") | |
14486 | (commit version))) | |
14487 | (file-name (git-file-name name version)) | |
14488 | (sha256 | |
14489 | (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163")))) | |
44d10b1f RW |
14490 | (build-system python-build-system) |
14491 | (home-page "https://github.com/miracle2k/python-glob2/") | |
14492 | (synopsis "Extended Version of the python buildin glob module") | |
14493 | (description "This is an extended version of the Python | |
14494 | @url{http://docs.python.org/library/glob.html, built-in glob module} which | |
14495 | adds: | |
14496 | ||
14497 | @itemize | |
14498 | @item The ability to capture the text matched by glob patterns, and return | |
14499 | those matches alongside the file names. | |
14500 | @item A recursive @code{**} globbing syntax, akin for example to the | |
14501 | @code{globstar} option of Bash. | |
14502 | @item The ability to replace the file system functions used, in order to glob | |
14503 | on virtual file systems. | |
14504 | @item Compatible with Python 2 and Python 3 (tested with 3.3). | |
14505 | @end itemize | |
14506 | ||
14507 | Glob2 currently based on the glob code from Python 3.3.1.") | |
14508 | (license license:bsd-2))) | |
14509 | ||
14510 | (define-public python2-glob2 | |
14511 | (package-with-python2 python-glob2)) | |
14512 | ||
14513 | (define-public python-gipc | |
14514 | (package | |
14515 | (name "python-gipc") | |
14516 | (version "0.6.0") | |
14517 | (source | |
14518 | (origin | |
14519 | (method url-fetch) | |
14520 | (uri (pypi-uri "gipc" version ".zip")) | |
14521 | (sha256 | |
14522 | (base32 | |
14523 | "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2")))) | |
14524 | (build-system python-build-system) | |
14525 | (native-inputs | |
14526 | `(("unzip" ,unzip))) | |
14527 | (propagated-inputs | |
14528 | `(("python-gevent" ,python-gevent))) | |
14529 | (home-page "http://gehrcke.de/gipc") | |
14530 | (synopsis "Child process management in the context of gevent") | |
14531 | (description "Usage of Python's multiprocessing package in a | |
14532 | gevent-powered application may raise problems. With @code{gipc}, | |
14533 | process-based child processes can safely be created anywhere within a | |
14534 | gevent-powered application.") | |
14535 | (license license:expat))) | |
14536 | ||
14537 | (define-public python2-gipc | |
14538 | (package-with-python2 python-gipc)) | |
14539 | ||
14540 | (define-public python-fusepy | |
14541 | (package | |
14542 | (name "python-fusepy") | |
14543 | (version "2.0.4") | |
14544 | (source | |
14545 | (origin | |
14546 | (method url-fetch) | |
14547 | (uri (pypi-uri "fusepy" version)) | |
14548 | (sha256 | |
14549 | (base32 | |
14550 | "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h")))) | |
14551 | (build-system python-build-system) | |
14552 | (arguments | |
14553 | `(#:phases | |
14554 | (modify-phases %standard-phases | |
14555 | (add-before 'build 'set-library-file-name | |
14556 | (lambda* (#:key inputs #:allow-other-keys) | |
14557 | (let ((fuse (assoc-ref inputs "fuse"))) | |
14558 | (substitute* "fuse.py" | |
14559 | (("find_library\\('fuse'\\)") | |
14560 | (string-append "'" fuse "/lib/libfuse.so'"))) | |
14561 | #t)))))) | |
14562 | (propagated-inputs | |
14563 | `(("fuse" ,fuse))) | |
14564 | (home-page "https://github.com/fusepy/fusepy") | |
14565 | (synopsis "Simple ctypes bindings for FUSE") | |
14566 | (description "Python module that provides a simple interface to FUSE and | |
14567 | MacFUSE. The binding is created using the standard @code{ctypes} library.") | |
14568 | (license license:isc))) | |
14569 | ||
14570 | (define-public python2-fusepy | |
14571 | (package-with-python2 python-fusepy)) | |
14572 | ||
14573 | (define-public python2-gdrivefs | |
14574 | (package | |
14575 | (name "python2-gdrivefs") | |
14576 | (version "0.14.9") | |
14577 | (source | |
14578 | (origin | |
14579 | (method url-fetch) | |
14580 | (uri (pypi-uri "gdrivefs" version)) | |
14581 | (sha256 | |
14582 | (base32 | |
14583 | "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7")))) | |
14584 | (build-system python-build-system) | |
14585 | (arguments | |
14586 | `(#:python ,python-2 | |
14587 | #:phases | |
14588 | (modify-phases %standard-phases | |
14589 | (add-before 'build 'patch-setup-py | |
14590 | (lambda _ | |
14591 | ;; Update requirements from dependency==version | |
14592 | ;; to dependency>=version | |
14593 | (substitute* "gdrivefs/resources/requirements.txt" | |
14594 | (("==") ">=")) | |
14595 | #t))))) | |
14596 | (native-inputs | |
14597 | `(("python2-gipc" ,python2-gipc) | |
14598 | ("python2-gevent" ,python2-gevent) | |
14599 | ("python2-greenlet" ,python2-greenlet) | |
14600 | ("python2-httplib2" ,python2-httplib2) | |
14601 | ("python2-uritemplate" ,python2-uritemplate) | |
14602 | ("python2-oauth2client" ,python2-oauth2client) | |
14603 | ("python2-six" ,python2-six))) | |
14604 | (propagated-inputs | |
14605 | `(("python2-dateutil" ,python2-dateutil) | |
14606 | ("python2-fusepy" ,python2-fusepy) | |
14607 | ("python2-google-api-client" ,python2-google-api-client))) | |
14608 | (home-page "https://github.com/dsoprea/GDriveFS") | |
14609 | (synopsis "Mount Google Drive as a local file system") | |
14610 | (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive | |
14611 | under Python 2.7.") | |
14612 | (license license:gpl2))) | |
14613 | ||
14614 | (define-public pybind11 | |
14615 | (package | |
14616 | (name "pybind11") | |
14617 | (version "2.2.4") | |
14618 | (source (origin | |
14619 | (method git-fetch) | |
14620 | (uri (git-reference | |
14621 | (url "https://github.com/pybind/pybind11.git") | |
14622 | (commit (string-append "v" version)))) | |
14623 | (sha256 | |
14624 | (base32 | |
14625 | "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv")) | |
14626 | (file-name (git-file-name name version)))) | |
14627 | (build-system cmake-build-system) | |
14628 | (native-inputs | |
14629 | `(("python" ,python) | |
14630 | ("python-pytest" ,python-pytest))) | |
14631 | (arguments | |
14632 | `(#:test-target "check")) | |
14633 | (home-page "https://github.com/pybind/pybind11/") | |
14634 | (synopsis "Seamless operability between C++11 and Python") | |
14635 | (description "pybind11 is a lightweight header-only library that exposes | |
14636 | C++ types in Python and vice versa, mainly to create Python bindings of | |
14637 | existing C++ code. Its goals and syntax are similar to the excellent | |
14638 | Boost.Python library by David Abrahams: to minimize boilerplate code in | |
14639 | traditional extension modules by inferring type information using compile-time | |
14640 | introspection.") | |
14641 | (license license:expat))) | |
14642 | ||
14643 | (define-public python-fasteners | |
14644 | (package | |
14645 | (name "python-fasteners") | |
14646 | (version "0.14.1") | |
14647 | (source | |
14648 | (origin | |
14649 | (method url-fetch) | |
14650 | (uri (pypi-uri "fasteners" version)) | |
14651 | (sha256 | |
14652 | (base32 | |
14653 | "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22")))) | |
14654 | (build-system python-build-system) | |
14655 | (propagated-inputs | |
14656 | `(("python-monotonic" ,python-monotonic) | |
14657 | ("python-six" ,python-six) | |
14658 | ("python-testtools" ,python-testtools))) | |
14659 | (home-page "https://github.com/harlowja/fasteners") | |
14660 | (synopsis "Python package that provides useful locks") | |
14661 | (description | |
14662 | "This package provides a Python program that provides following locks: | |
14663 | ||
14664 | @itemize | |
14665 | @item Locking decorator | |
14666 | @item Reader-writer locks | |
14667 | @item Inter-process locks | |
14668 | @item Generic helpers | |
14669 | @end itemize\n") | |
14670 | (properties `((python2-variant . ,(delay python2-fasteners)))) | |
14671 | (license license:asl2.0))) | |
14672 | ||
14673 | (define-public python2-fasteners | |
14674 | (let ((base (package-with-python2 (strip-python2-variant python-fasteners)))) | |
14675 | (package | |
14676 | (inherit base) | |
14677 | (propagated-inputs | |
14678 | `(("python2-futures" ,python2-futures) | |
14679 | ,@(package-propagated-inputs base)))))) | |
14680 | ||
14681 | (define-public python-requests-file | |
14682 | (package | |
14683 | (name "python-requests-file") | |
14684 | (version "1.4.3") | |
14685 | (source | |
14686 | (origin | |
14687 | (method url-fetch) | |
14688 | (uri (pypi-uri "requests-file" version)) | |
14689 | (sha256 | |
14690 | (base32 | |
14691 | "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g")))) | |
14692 | (build-system python-build-system) | |
14693 | (propagated-inputs | |
14694 | `(("python-requests" ,python-requests) | |
14695 | ("python-six" ,python-six))) | |
14696 | (home-page | |
14697 | "https://github.com/dashea/requests-file") | |
14698 | (synopsis "File transport adapter for Requests") | |
14699 | (description | |
14700 | "Requests-File is a transport adapter for use with the Requests Python | |
52beae7b | 14701 | library to allow local file system access via @code{file://} URLs.") |
44d10b1f RW |
14702 | (license license:asl2.0))) |
14703 | ||
14704 | (define-public python2-requests-file | |
14705 | (package-with-python2 python-requests-file)) | |
14706 | ||
14707 | (define-public python-tldextract | |
14708 | (package | |
14709 | (name "python-tldextract") | |
14710 | (version "2.2.0") | |
14711 | (source | |
14712 | (origin | |
14713 | (method url-fetch) | |
14714 | (uri (pypi-uri "tldextract" version)) | |
14715 | (sha256 | |
14716 | (base32 | |
14717 | "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99")))) | |
14718 | (build-system python-build-system) | |
14719 | (native-inputs | |
14720 | `(("python-pytest" ,python-pytest) | |
14721 | ("python-responses" ,python-responses))) | |
14722 | (propagated-inputs | |
14723 | `(("python-idna" ,python-idna) | |
14724 | ("python-requests" ,python-requests) | |
14725 | ("python-requests-file" ,python-requests-file))) | |
14726 | (home-page | |
14727 | "https://github.com/john-kurkowski/tldextract") | |
14728 | (synopsis | |
14729 | "Separate the TLD from the registered domain and subdomains of a URL") | |
14730 | (description | |
14731 | "TLDExtract accurately separates the TLD from the registered domain and | |
14732 | subdomains of a URL, using the Public Suffix List. By default, this includes | |
14733 | the public ICANN TLDs and their exceptions. It can optionally support the | |
14734 | Public Suffix List's private domains as well.") | |
14735 | (license license:bsd-3))) | |
14736 | ||
14737 | (define-public python2-tldextract | |
14738 | (package-with-python2 python-tldextract)) | |
14739 | ||
14740 | (define-public python-pynamecheap | |
14741 | (package | |
14742 | (name "python-pynamecheap") | |
14743 | (version "0.0.3") | |
14744 | (source | |
14745 | (origin | |
14746 | (method url-fetch) | |
14747 | (uri (pypi-uri "PyNamecheap" version)) | |
14748 | (sha256 | |
14749 | (base32 | |
14750 | "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l")))) | |
14751 | (build-system python-build-system) | |
14752 | (propagated-inputs | |
14753 | `(("python-requests" ,python-requests))) | |
14754 | (home-page | |
14755 | "https://github.com/Bemmu/PyNamecheap") | |
14756 | (synopsis | |
14757 | "Namecheap API client in Python") | |
14758 | (description | |
14759 | "PyNamecheap is a Namecheap API client in Python.") | |
14760 | (license license:expat))) | |
14761 | ||
14762 | (define-public python2-pynamecheap | |
14763 | (package-with-python2 python-pynamecheap)) | |
14764 | ||
14765 | (define-public python-dns-lexicon | |
14766 | (package | |
14767 | (name "python-dns-lexicon") | |
14768 | (version "2.4.0") | |
14769 | (source | |
14770 | (origin | |
14771 | (method url-fetch) | |
14772 | (uri (pypi-uri "dns-lexicon" version)) | |
14773 | (sha256 | |
14774 | (base32 | |
14775 | "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m")))) | |
14776 | (build-system python-build-system) | |
14777 | (arguments | |
14778 | `(#:tests? #f)) ;requires internet access | |
14779 | (propagated-inputs | |
14780 | `(("python-future" ,python-future) | |
14781 | ("python-pynamecheap" ,python-pynamecheap) | |
14782 | ("python-requests" ,python-requests) | |
14783 | ("python-tldextract" ,python-tldextract) | |
14784 | ("python-urllib3" ,python-urllib3))) | |
14785 | (home-page "https://github.com/AnalogJ/lexicon") | |
14786 | (synopsis | |
14787 | "Manipulate DNS records on various DNS providers") | |
14788 | (description | |
14789 | "Lexicon provides a way to manipulate DNS records on multiple DNS | |
14790 | providers in a standardized way. It has a CLI but it can also be used as a | |
14791 | Python library. It was designed to be used in automation, specifically with | |
14792 | Let's Encrypt.") | |
14793 | (license license:expat))) | |
14794 | ||
14795 | (define-public python2-dns-lexicon | |
14796 | (package-with-python2 python-dns-lexicon)) | |
14797 | ||
14798 | (define-public python-commandlines | |
14799 | (package | |
14800 | (name "python-commandlines") | |
14801 | (version "0.4.1") | |
14802 | (source | |
14803 | (origin | |
14804 | (method url-fetch) | |
14805 | (uri (pypi-uri "commandlines" version)) | |
14806 | (sha256 | |
14807 | (base32 | |
14808 | "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6")))) | |
14809 | (build-system python-build-system) | |
14810 | (home-page "https://github.com/chrissimpkins/commandlines") | |
14811 | (synopsis "Command line argument to object parsing library") | |
14812 | (description | |
14813 | "@code{Commandlines} is a Python library for command line application | |
14814 | development that supports command line argument parsing, command string | |
14815 | validation testing and application logic.") | |
14816 | (license license:expat))) | |
14817 | ||
14818 | ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with | |
14819 | ;; python-numba. They have a very unflexible relationship. | |
14820 | (define-public python-numba | |
14821 | (package | |
14822 | (name "python-numba") | |
7757e6d8 | 14823 | (version "0.42.0") |
44d10b1f RW |
14824 | (source |
14825 | (origin | |
14826 | (method url-fetch) | |
14827 | (uri (pypi-uri "numba" version)) | |
14828 | (sha256 | |
14829 | (base32 | |
7757e6d8 | 14830 | "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x")))) |
44d10b1f RW |
14831 | (build-system python-build-system) |
14832 | (arguments | |
14833 | `(#:modules ((guix build utils) | |
14834 | (guix build python-build-system) | |
14835 | (ice-9 ftw) | |
14836 | (srfi srfi-1) | |
14837 | (srfi srfi-26)) | |
14838 | #:phases | |
14839 | (modify-phases %standard-phases | |
14840 | (add-after 'unpack 'disable-proprietary-features | |
14841 | (lambda _ | |
14842 | (setenv "NUMBA_DISABLE_HSA" "1") | |
14843 | (setenv "NUMBA_DISABLE_CUDA" "1") | |
14844 | #t)) | |
14845 | (add-after 'unpack 'remove-failing-tests | |
14846 | (lambda _ | |
14847 | ;; FIXME: these tests fail for unknown reasons: | |
14848 | ;; test_non_writable_pycache, test_non_creatable_pycache, and | |
14849 | ;; test_frozen (all in numba.tests.test_dispatcher.TestCache). | |
14850 | (substitute* "numba/tests/test_dispatcher.py" | |
14851 | (("def test(_non_writable_pycache)" _ m) | |
14852 | (string-append "def guix_skip" m)) | |
14853 | (("def test(_non_creatable_pycache)" _ m) | |
14854 | (string-append "def guix_skip" m)) | |
14855 | (("def test(_frozen)" _ m) | |
14856 | (string-append "def guix_skip" m))) | |
14857 | ||
14858 | ;; These tests fail because we don't run the tests from the build | |
14859 | ;; directory: test_setup_py_distutils, test_setup_py_setuptools | |
14860 | ;; They ar in numba.tests.test_pycc.TestDistutilsSupport. | |
14861 | (substitute* "numba/tests/test_pycc.py" | |
14862 | (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m) | |
14863 | (string-append "def guix_skip" m))) | |
14864 | #t)) | |
14865 | (replace 'check | |
14866 | (lambda _ | |
14867 | (let ((cwd (getcwd))) | |
14868 | (setenv "PYTHONPATH" | |
14869 | (string-append cwd "/build/" | |
14870 | (find (cut string-prefix? "lib" <>) | |
14871 | (scandir (string-append cwd "/build"))) | |
14872 | ":" | |
14873 | (getenv "PYTHONPATH"))) | |
14874 | ;; Something is wrong with the PYTHONPATH when running the | |
14875 | ;; tests from the build directory, as it complains about not being | |
14876 | ;; able to import certain modules. | |
14877 | (with-directory-excursion "/tmp" | |
14878 | (invoke "python3" "-m" "numba.runtests" "-v" "-m"))) | |
14879 | #t))))) | |
14880 | (propagated-inputs | |
14881 | `(("python-llvmlite" ,python-llvmlite) | |
14882 | ("python-numpy" ,python-numpy) | |
14883 | ("python-singledispatch" ,python-singledispatch))) | |
14884 | ;; Needed for tests. | |
14885 | (inputs | |
14886 | `(("python-jinja2" ,python-jinja2) | |
14887 | ("python-pygments" ,python-pygments))) | |
14888 | (home-page "https://numba.pydata.org") | |
14889 | (synopsis "Compile Python code using LLVM") | |
14890 | (description "Numba gives you the power to speed up your applications with | |
14891 | high performance functions written directly in Python. With a few | |
14892 | annotations, array-oriented and math-heavy Python code can be just-in-time | |
14893 | compiled to native machine instructions, similar in performance to C, C++ and | |
14894 | Fortran, without having to switch languages or Python interpreters. | |
14895 | ||
14896 | Numba works by generating optimized machine code using the LLVM compiler | |
14897 | infrastructure at import time, runtime, or statically (using the included pycc | |
14898 | tool).") | |
14899 | (license license:bsd-3))) | |
14900 | ||
14901 | (define-public python-anndata | |
14902 | (package | |
14903 | (name "python-anndata") | |
8c9372c1 | 14904 | (version "0.6.18") |
44d10b1f RW |
14905 | (source |
14906 | (origin | |
14907 | (method url-fetch) | |
14908 | (uri (pypi-uri "anndata" version)) | |
14909 | (sha256 | |
14910 | (base32 | |
8c9372c1 | 14911 | "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73")))) |
44d10b1f RW |
14912 | (build-system python-build-system) |
14913 | (propagated-inputs | |
14914 | `(("python-h5py" ,python-h5py) | |
14915 | ("python-natsort" ,python-natsort) | |
14916 | ("python-pandas" ,python-pandas) | |
14917 | ("python-scipy" ,python-scipy))) | |
14918 | (home-page "https://github.com/theislab/anndata") | |
14919 | (synopsis "Annotated data for data analysis pipelines") | |
14920 | (description "Anndata is a package for simple (functional) high-level APIs | |
14921 | for data analysis pipelines. In this context, it provides an efficient, | |
14922 | scalable way of keeping track of data together with learned annotations and | |
14923 | reduces the code overhead typically encountered when using a mostly | |
14924 | object-oriented library such as @code{scikit-learn}.") | |
14925 | (license license:bsd-3))) | |
14926 | ||
14927 | (define-public python-dill | |
14928 | (package | |
14929 | (name "python-dill") | |
c60b15cc | 14930 | (version "0.2.9") |
44d10b1f RW |
14931 | (source |
14932 | (origin | |
14933 | (method url-fetch) | |
14934 | (uri (pypi-uri "dill" version)) | |
14935 | (sha256 | |
c60b15cc | 14936 | (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn")))) |
44d10b1f | 14937 | (build-system python-build-system) |
c60b15cc | 14938 | ;; FIXME: The check phase fails with "don't know how to make test from: …". |
44d10b1f RW |
14939 | (arguments '(#:tests? #f)) |
14940 | (home-page "https://pypi.org/project/dill") | |
14941 | (synopsis "Serialize all of Python") | |
14942 | (description "Dill extends Python's @code{pickle} module for serializing | |
14943 | and de-serializing Python objects to the majority of the built-in Python | |
14944 | types. Dill provides the user the same interface as the @code{pickle} module, | |
14945 | and also includes some additional features. In addition to pickling Python | |
14946 | objects, @code{dill} provides the ability to save the state of an interpreter | |
61985d65 | 14947 | session in a single command. Hence, it would be feasible to save a |
44d10b1f RW |
14948 | interpreter session, close the interpreter, ship the pickled file to another |
14949 | computer, open a new interpreter, unpickle the session and thus continue from | |
14950 | the saved state of the original interpreter session.") | |
14951 | (license license:bsd-3))) | |
14952 | ||
14953 | (define-public python-multiprocess | |
14954 | (package | |
14955 | (name "python-multiprocess") | |
14956 | (version "0.70.6.1") | |
14957 | (source | |
14958 | (origin | |
14959 | (method url-fetch) | |
14960 | (uri (pypi-uri "multiprocess" version)) | |
14961 | (sha256 | |
14962 | (base32 | |
14963 | "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq")))) | |
14964 | (build-system python-build-system) | |
14965 | (propagated-inputs | |
14966 | `(("python-dill" ,python-dill))) | |
14967 | (home-page "https://pypi.org/project/multiprocess") | |
14968 | (synopsis "Multiprocessing and multithreading in Python") | |
14969 | (description | |
14970 | "This package is a fork of the multiprocessing Python package, a package | |
14971 | which supports the spawning of processes using the API of the standard | |
14972 | library's @code{threading} module.") | |
14973 | (license license:bsd-3))) | |
14974 | ||
14975 | (define-public python-toolz | |
14976 | (package | |
14977 | (name "python-toolz") | |
14978 | (version "0.9.0") | |
14979 | (source | |
14980 | (origin | |
14981 | (method url-fetch) | |
14982 | (uri (pypi-uri "toolz" version)) | |
14983 | (sha256 | |
14984 | (base32 | |
14985 | "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj")))) | |
14986 | (build-system python-build-system) | |
14987 | ;; FIXME: tests cannot be computed: "Can't perform this operation for | |
14988 | ;; unregistered loader type" | |
14989 | (arguments '(#:tests? #f)) | |
14990 | (home-page "https://github.com/pytoolz/toolz/") | |
14991 | (synopsis "List processing tools and functional utilities") | |
14992 | (description | |
14993 | "This package provides a set of utility functions for iterators, | |
14994 | functions, and dictionaries.") | |
14995 | (license license:bsd-3))) | |
14996 | ||
14997 | (define-public python2-toolz | |
14998 | (package-with-python2 python-toolz)) | |
14999 | ||
15000 | (define-public python-cytoolz | |
15001 | (package | |
15002 | (name "python-cytoolz") | |
15003 | (version "0.9.0.1") | |
15004 | (source | |
15005 | (origin | |
15006 | (method url-fetch) | |
15007 | (uri (pypi-uri "cytoolz" version)) | |
15008 | (sha256 | |
15009 | (base32 | |
15010 | "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44")))) | |
15011 | (build-system python-build-system) | |
15012 | ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute | |
15013 | ;; 'exceptions'" | |
15014 | (arguments '(#:tests? #f)) | |
15015 | (propagated-inputs | |
15016 | `(("python-toolz" ,python-toolz))) | |
15017 | (native-inputs | |
15018 | `(("python-cython" ,python-cython))) | |
15019 | (home-page "https://github.com/pytoolz/cytoolz") | |
15020 | (synopsis "High performance functional utilities") | |
15021 | (description | |
15022 | "The cytoolz package implements the same API as provided by toolz. The | |
15023 | main differences are that @code{cytoolz} is faster and cytoolz offers a C API | |
15024 | that is accessible to other projects developed in Cython.") | |
15025 | (license license:bsd-3))) | |
15026 | ||
15027 | (define-public python-sortedcontainers | |
15028 | (package | |
15029 | (name "python-sortedcontainers") | |
15030 | (version "2.0.4") | |
15031 | (source | |
15032 | (origin | |
15033 | (method url-fetch) | |
15034 | (uri (pypi-uri "sortedcontainers" version)) | |
15035 | (sha256 | |
15036 | (base32 | |
15037 | "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0")))) | |
15038 | (build-system python-build-system) | |
15039 | (native-inputs | |
15040 | `(("python-tox" ,python-tox))) | |
15041 | (home-page "http://www.grantjenks.com/docs/sortedcontainers/") | |
15042 | (synopsis "Sorted List, Sorted Dict, Sorted Set") | |
15043 | (description | |
15044 | "This package provides a sorted collections library, written in | |
15045 | pure-Python.") | |
15046 | (license license:asl2.0))) | |
15047 | ||
15048 | (define-public python-cloudpickle | |
15049 | (package | |
15050 | (name "python-cloudpickle") | |
15051 | (version "0.6.1") | |
15052 | (source | |
15053 | (origin | |
15054 | (method url-fetch) | |
15055 | (uri (pypi-uri "cloudpickle" version)) | |
15056 | (sha256 | |
15057 | (base32 | |
15058 | "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi")))) | |
15059 | (build-system python-build-system) | |
15060 | ;; FIXME: there are 5 errors in 122 tests: | |
15061 | ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest) | |
15062 | ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest) | |
15063 | ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest) | |
15064 | ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest) | |
15065 | ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests) | |
15066 | ;; TypeError: cannot serialize '_io.BufferedRandom' object | |
15067 | (arguments '(#:tests? #f)) | |
15068 | (native-inputs | |
15069 | `(("python-pytest" ,python-pytest) | |
15070 | ("python-mock" ,python-mock) | |
15071 | ("python-tornado" ,python-tornado))) | |
15072 | (home-page "https://github.com/cloudpipe/cloudpickle") | |
15073 | (synopsis "Extended pickling support for Python objects") | |
15074 | (description | |
15075 | "Cloudpickle makes it possible to serialize Python constructs not | |
15076 | supported by the default pickle module from the Python standard library. It | |
15077 | is especially useful for cluster computing where Python expressions are | |
15078 | shipped over the network to execute on remote hosts, possibly close to the | |
15079 | data.") | |
15080 | (license license:bsd-3))) | |
15081 | ||
15082 | (define-public python2-cloudpickle | |
15083 | (package-with-python2 python-cloudpickle)) | |
15084 | ||
15085 | (define-public python-locket | |
15086 | (package | |
15087 | (name "python-locket") | |
15088 | (version "0.2.0") | |
15089 | (source | |
15090 | (origin | |
15091 | (method url-fetch) | |
15092 | (uri (pypi-uri "locket" version)) | |
15093 | (sha256 | |
15094 | (base32 | |
15095 | "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz")))) | |
15096 | (build-system python-build-system) | |
15097 | (home-page "https://github.com/mwilliamson/locket.py") | |
15098 | (synopsis "File-based locks for Python") | |
15099 | (description | |
15100 | "Locket implements a lock that can be used by multiple processes provided | |
15101 | they use the same path.") | |
15102 | (license license:bsd-2))) | |
15103 | ||
15104 | (define-public python2-locket | |
15105 | (package-with-python2 python-locket)) | |
15106 | ||
15107 | (define-public python-blosc | |
15108 | (package | |
15109 | (name "python-blosc") | |
15110 | (version "1.5.1") | |
15111 | (source | |
15112 | (origin | |
15113 | (method url-fetch) | |
15114 | (uri (pypi-uri "blosc" version)) | |
15115 | (sha256 | |
15116 | (base32 | |
15117 | "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw")))) | |
15118 | (build-system python-build-system) | |
15119 | ;; FIXME: all tests pass, but then this error is printed: | |
15120 | ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test | |
15121 | (arguments '(#:tests? #f)) | |
15122 | (propagated-inputs | |
15123 | `(("python-numpy" ,python-numpy))) | |
15124 | (home-page "https://github.com/blosc/python-blosc") | |
15125 | (synopsis "Python wrapper for the Blosc data compressor library") | |
15126 | (description "Blosc is a high performance compressor optimized for binary | |
15127 | data. It has been designed to transmit data to the processor cache faster | |
15128 | than the traditional, non-compressed, direct memory fetch approach via a | |
15129 | @code{memcpy()} system call. | |
15130 | ||
15131 | Blosc works well for compressing numerical arrays that contains data with | |
15132 | relatively low entropy, like sparse data, time series, grids with | |
15133 | regular-spaced values, etc. | |
15134 | ||
15135 | This Python package wraps the Blosc library.") | |
15136 | (license license:bsd-3))) | |
15137 | ||
15138 | (define-public python2-blosc | |
15139 | (package-with-python2 python-blosc)) | |
15140 | ||
15141 | (define-public python-partd | |
15142 | (package | |
15143 | (name "python-partd") | |
15144 | (version "0.3.9") | |
15145 | (source | |
15146 | (origin | |
15147 | (method url-fetch) | |
15148 | (uri (pypi-uri "partd" version)) | |
15149 | (sha256 | |
15150 | (base32 | |
15151 | "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz")))) | |
15152 | (build-system python-build-system) | |
15153 | (propagated-inputs | |
15154 | `(("python-blosc" ,python-blosc) | |
15155 | ("python-locket" ,python-locket) | |
15156 | ("python-numpy" ,python-numpy) | |
15157 | ("python-pandas" ,python-pandas) | |
15158 | ("python-pyzmq" ,python-pyzmq) | |
15159 | ("python-toolz" ,python-toolz))) | |
15160 | (home-page "https://github.com/dask/partd/") | |
15161 | (synopsis "Appendable key-value storage") | |
15162 | (description "Partd stores key-value pairs. Values are raw bytes. We | |
15163 | append on old values. Partd excels at shuffling operations.") | |
15164 | (license license:bsd-3))) | |
15165 | ||
15166 | (define-public python2-partd | |
15167 | (package-with-python2 python-partd)) | |
15168 | ||
15169 | (define-public python-dask | |
15170 | (package | |
15171 | (name "python-dask") | |
0998175f | 15172 | (version "1.2.2") |
44d10b1f RW |
15173 | (source |
15174 | (origin | |
15175 | (method url-fetch) | |
15176 | (uri (pypi-uri "dask" version)) | |
15177 | (sha256 | |
0998175f | 15178 | (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y")))) |
44d10b1f RW |
15179 | (build-system python-build-system) |
15180 | ;; A single test out of 5000+ fails. This test is marked as xfail when | |
15181 | ;; pytest-xdist is used. | |
15182 | (arguments | |
15183 | `(#:phases | |
15184 | (modify-phases %standard-phases | |
15185 | (add-after 'unpack 'disable-broken-test | |
15186 | (lambda _ | |
15187 | (substitute* "dask/tests/test_threaded.py" | |
15188 | (("def test_interrupt\\(\\)" m) | |
15189 | (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" | |
15190 | m))) | |
15191 | (when (which "python2") | |
15192 | ;; This test fails with recent Pandas: | |
15193 | ;; <https://github.com/dask/dask/issues/3794>. | |
15194 | (substitute* "dask/dataframe/tests/test_dataframe.py" | |
15195 | (("def test_info\\(\\)" m) | |
15196 | (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" | |
15197 | m)))) | |
15198 | #t)) | |
15199 | (replace 'check | |
15200 | (lambda _ (invoke "pytest" "-vv")))))) | |
15201 | (propagated-inputs | |
15202 | `(("python-cloudpickle" ,python-cloudpickle) | |
15203 | ("python-numpy" ,python-numpy) | |
15204 | ("python-pandas" ,python-pandas) | |
15205 | ("python-partd" ,python-partd) | |
15206 | ("python-toolz" ,python-toolz) | |
15207 | ("python-pyyaml" ,python-pyyaml))) | |
15208 | (native-inputs | |
15209 | `(("python-pytest" ,python-pytest) | |
15210 | ("python-pytest-runner" ,python-pytest-runner))) | |
15211 | (home-page "https://github.com/dask/dask/") | |
15212 | (synopsis "Parallel computing with task scheduling") | |
15213 | (description | |
15214 | "Dask is a flexible parallel computing library for analytics. It | |
15215 | consists of two components: dynamic task scheduling optimized for computation, | |
15216 | and large data collections like parallel arrays, dataframes, and lists that | |
15217 | extend common interfaces like NumPy, Pandas, or Python iterators to | |
15218 | larger-than-memory or distributed environments. These parallel collections | |
15219 | run on top of the dynamic task schedulers. ") | |
15220 | (license license:bsd-3))) | |
15221 | ||
15222 | (define-public python2-dask | |
15223 | (package-with-python2 python-dask)) | |
15224 | ||
15225 | (define-public python-ilinkedlist | |
15226 | (package | |
15227 | (name "python-ilinkedlist") | |
15228 | (version "0.4.0") | |
15229 | (source | |
15230 | (origin | |
15231 | (method url-fetch) | |
15232 | (uri (pypi-uri "ilinkedlist" version)) | |
15233 | (sha256 | |
15234 | (base32 | |
15235 | "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l")))) | |
15236 | (build-system python-build-system) | |
15237 | (native-inputs `(("python-pytest" ,python-pytest))) | |
15238 | (inputs `(("python" ,python))) | |
15239 | (home-page "https://github.com/luther9/ilinkedlist-py") | |
15240 | (synopsis "Immutable linked list library") | |
15241 | (description | |
15242 | "This is a implementation of immutable linked lists for Python. It | |
15243 | contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes. | |
15244 | Since a linked list is treated as immutable, it is hashable, and its length | |
15245 | can be retrieved in constant time. Some of the terminology is inspired by | |
15246 | LISP. It is possible to create an improper list by creating a @code{Pair} | |
15247 | with a non-list @code{cdr}.") | |
15248 | (license license:gpl3+))) | |
15249 | ||
15250 | (define-public python-readlike | |
15251 | (package | |
15252 | (name "python-readlike") | |
15253 | (version "0.1.3") | |
15254 | (source | |
15255 | (origin | |
15256 | (method url-fetch) | |
15257 | (uri (pypi-uri "readlike" version)) | |
15258 | (sha256 | |
15259 | (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4")))) | |
15260 | (build-system python-build-system) | |
15261 | (home-page "https://github.com/jangler/readlike") | |
15262 | (synopsis "GNU Readline-like line editing module") | |
15263 | (description | |
15264 | "This Python module provides line editing functions similar to the default | |
15265 | Emacs-style ones of GNU Readline. Unlike the Python standard library's | |
15266 | @code{readline} package, this one allows access to those capabilties in settings | |
15267 | outside of a standard command-line interface. It is especially well-suited to | |
15268 | interfacing with Urwid, due to a shared syntax for describing key inputs. | |
15269 | ||
15270 | Currently, all stateless Readline commands are implemented. Yanking and history | |
15271 | are not supported.") | |
15272 | (license license:expat))) | |
15273 | ||
15274 | (define-public python2-readlike | |
15275 | (package-with-python2 python-readlike)) | |
15276 | ||
15277 | (define-public python-reparser | |
15278 | (package | |
15279 | (name "python-reparser") | |
15280 | (version "1.4.3") | |
15281 | (source | |
15282 | (origin | |
15283 | (method url-fetch) | |
15284 | (uri (pypi-uri "ReParser" version)) | |
15285 | (sha256 | |
15286 | (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776")))) | |
15287 | (build-system python-build-system) | |
15288 | (home-page "https://github.com/xmikos/reparser") | |
15289 | (synopsis "Simple lexer/parser for inline markup based on regular expressions") | |
15290 | (description | |
15291 | "This Python library provides a simple lexer/parser for inline markup based | |
15292 | on regular expressions.") | |
15293 | (license license:expat))) | |
15294 | ||
15295 | (define-public python2-reparser | |
15296 | (let ((reparser (package-with-python2 | |
15297 | (strip-python2-variant python-reparser)))) | |
15298 | (package (inherit reparser) | |
15299 | (propagated-inputs | |
15300 | `(("python2-enum34" ,python2-enum34) | |
15301 | ,@(package-propagated-inputs reparser)))))) | |
15302 | ||
15303 | (define-public python-precis-i18n | |
15304 | (package | |
15305 | (name "python-precis-i18n") | |
15306 | (version "1.0.0") | |
15307 | (source | |
15308 | (origin | |
15309 | (method url-fetch) | |
15310 | (uri (pypi-uri "precis_i18n" version)) | |
15311 | (sha256 | |
15312 | (base32 | |
15313 | "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2")))) | |
15314 | (build-system python-build-system) | |
15315 | (home-page "https://github.com/byllyfish/precis_i18n") | |
15316 | (synopsis "Implementation of the PRECIS framework") | |
15317 | (description | |
15318 | "This module implements the PRECIS Framework as described in RFC 8264, | |
15319 | RFC 8265 and RFC 8266.") | |
15320 | (license license:expat))) | |
15321 | ||
d0446c4b RW |
15322 | (define-public python-absl-py |
15323 | (package | |
15324 | (name "python-absl-py") | |
15325 | (version "0.6.1") | |
15326 | (source | |
15327 | (origin | |
15328 | (method url-fetch) | |
15329 | (uri (pypi-uri "absl-py" version)) | |
15330 | (sha256 | |
15331 | (base32 | |
15332 | "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7")))) | |
15333 | (build-system python-build-system) | |
15334 | (propagated-inputs | |
15335 | `(("python-six" ,python-six))) | |
15336 | (home-page "https://github.com/abseil/abseil-py") | |
15337 | (synopsis "Abseil Python common libraries") | |
15338 | (description | |
15339 | "This package provides the Abseil Python Common Libraries, a collection | |
15340 | of Python libraries for building Python applications.") | |
15341 | (license license:asl2.0))) | |
15342 | ||
81bed4e9 RW |
15343 | (define-public python-astor |
15344 | (package | |
15345 | (name "python-astor") | |
15346 | (version "0.7.1") | |
15347 | (source | |
15348 | (origin | |
15349 | (method url-fetch) | |
15350 | (uri (pypi-uri "astor" version)) | |
15351 | (sha256 | |
15352 | (base32 | |
15353 | "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm")))) | |
15354 | (build-system python-build-system) | |
15355 | ;; FIXME: There are two errors and two test failures. | |
15356 | (arguments `(#:tests? #f)) | |
15357 | (home-page "https://github.com/berkerpeksag/astor") | |
39ee82ff | 15358 | (synopsis "Read and write Python ASTs") |
81bed4e9 | 15359 | (description "Astor is designed to allow easy manipulation of Python |
39ee82ff | 15360 | source via the Abstract Syntax Tree.") |
81bed4e9 RW |
15361 | (license license:bsd-3))) |
15362 | ||
39ee82ff RW |
15363 | (define-public python2-astor |
15364 | (package-with-python2 python-astor)) | |
15365 | ||
22e623ae RW |
15366 | (define-public python-grpcio |
15367 | (package | |
15368 | (name "python-grpcio") | |
15369 | (version "1.17.1") | |
15370 | (source | |
15371 | (origin | |
15372 | (method url-fetch) | |
15373 | (uri (pypi-uri "grpcio" version)) | |
15374 | (sha256 | |
15375 | (base32 | |
15376 | "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx")))) | |
15377 | (build-system python-build-system) | |
15378 | (propagated-inputs | |
15379 | `(("python-six" ,python-six))) | |
15380 | (home-page "https://grpc.io") | |
15381 | (synopsis "HTTP/2-based RPC framework") | |
15382 | (description "This package provides a Python library for communicating | |
15383 | with the HTTP/2-based RPC framework gRPC.") | |
15384 | (license license:asl2.0))) | |
15385 | ||
79869f80 RW |
15386 | (define-public python-astunparse |
15387 | (package | |
15388 | (name "python-astunparse") | |
47d79541 | 15389 | (version "1.6.2") |
79869f80 RW |
15390 | (source |
15391 | (origin | |
15392 | (method url-fetch) | |
15393 | (uri (pypi-uri "astunparse" version)) | |
15394 | (sha256 | |
47d79541 | 15395 | (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys")))) |
79869f80 | 15396 | (build-system python-build-system) |
47d79541 | 15397 | (arguments '(#:tests? #f)) ; there are none |
79869f80 RW |
15398 | (propagated-inputs |
15399 | `(("python-six" ,python-six) | |
15400 | ("python-wheel" ,python-wheel))) | |
15401 | (home-page "https://github.com/simonpercivall/astunparse") | |
15402 | (synopsis "AST unparser for Python") | |
15403 | (description "This package provides an AST unparser for Python. It is a | |
15404 | factored out version of @code{unparse} found in the Python source | |
15405 | distribution.") | |
15406 | (license license:bsd-3))) | |
15407 | ||
2884aac0 RW |
15408 | (define-public python-gast |
15409 | (package | |
15410 | (name "python-gast") | |
bd300261 | 15411 | (version "0.2.2") |
2884aac0 RW |
15412 | (source |
15413 | (origin | |
15414 | (method url-fetch) | |
15415 | (uri (pypi-uri "gast" version)) | |
15416 | (sha256 | |
bd300261 | 15417 | (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy")))) |
2884aac0 RW |
15418 | (build-system python-build-system) |
15419 | (propagated-inputs | |
15420 | `(("python-astunparse" ,python-astunparse))) | |
15421 | (home-page "https://pypi.org/project/gast/") | |
15422 | (synopsis "Generic Python AST that abstracts the underlying Python version") | |
15423 | (description | |
15424 | "GAST provides a compatibility layer between the AST of various Python | |
15425 | versions, as produced by @code{ast.parse} from the standard @code{ast} | |
15426 | module.") | |
15427 | (license license:bsd-3))) | |
15428 | ||
44d10b1f RW |
15429 | (define-public python-wikidata |
15430 | (package | |
15431 | (name "python-wikidata") | |
15432 | (version "0.6.1") | |
15433 | (source | |
15434 | (origin | |
15435 | (method url-fetch) | |
15436 | (uri (pypi-uri "Wikidata" version)) | |
15437 | (sha256 | |
15438 | (base32 | |
15439 | "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9")))) | |
15440 | (build-system python-build-system) | |
15441 | (propagated-inputs | |
15442 | `(("python-babel" ,python-babel))) | |
15443 | (home-page "https://github.com/dahlia/wikidata") | |
15444 | (synopsis "Wikidata client library") | |
15445 | (description | |
15446 | "This package provides a Python interface to | |
15447 | @url{https://www.wikidata.org/, Wikidata}.") | |
15448 | (properties '((upstream-name . "Wikidata"))) | |
15449 | (license license:gpl3+))) | |
15450 | ||
15451 | (define-public python-doctest-ignore-unicode | |
15452 | (package | |
15453 | (name "python-doctest-ignore-unicode") | |
15454 | (version "0.1.2") | |
15455 | (source | |
15456 | (origin | |
15457 | (method url-fetch) | |
15458 | (uri (pypi-uri "doctest-ignore-unicode" version)) | |
15459 | (sha256 | |
15460 | (base32 | |
15461 | "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w")))) | |
15462 | (build-system python-build-system) | |
15463 | (native-inputs | |
15464 | `(("python-nose" ,python-nose))) | |
15465 | (home-page "https://github.com/gnublade/doctest-ignore-unicode") | |
15466 | (synopsis "Ignore Unicode literal prefixes in doctests") | |
15467 | (description | |
15468 | "This package adds support for a flag to ignore Unicode literal prefixes | |
15469 | in doctests.") | |
15470 | (license license:asl2.0))) | |
15471 | ||
15472 | (define-public python-attr | |
15473 | (package | |
15474 | (name "python-attr") | |
15475 | (version "0.3.1") | |
15476 | (source | |
15477 | (origin | |
15478 | (method url-fetch) | |
15479 | (uri (pypi-uri "attr" version)) | |
15480 | (sha256 | |
15481 | (base32 | |
15482 | "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch")))) | |
15483 | (build-system python-build-system) | |
15484 | (home-page "https://github.com/denis-ryzhkov/attr") | |
15485 | (synopsis "Decorator for attributes of target function or class") | |
15486 | (description "Simple decorator to set attributes of target function or | |
15487 | class in a @acronym{DRY, Don't Repeat Yourself} way.") | |
15488 | (license license:expat))) | |
f98232a3 VC |
15489 | |
15490 | (define-public python-construct | |
15491 | (package | |
15492 | (name "python-construct") | |
15493 | (version "2.9.45") | |
15494 | (source | |
15495 | (origin | |
15496 | (method url-fetch) | |
15497 | (uri (pypi-uri "construct" version)) | |
15498 | (sha256 | |
15499 | (base32 | |
15500 | "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92")))) | |
15501 | (build-system python-build-system) | |
15502 | (arguments | |
15503 | `(#:tests? #f)) ; No tests exist. | |
15504 | (propagated-inputs | |
15505 | `(("python-extras" ,python-extras) | |
15506 | ("python-arrow" ,python-arrow) | |
15507 | ("python-numpy" ,python-numpy) | |
15508 | ("python-ruamel.yaml" ,python-ruamel.yaml))) | |
15509 | (home-page "http://construct.readthedocs.io") | |
15510 | (synopsis "Declarative and symmetrical parser and builder for binary data") | |
15511 | (description | |
15512 | "This package provides both simple, atomic constructs (such as | |
15513 | integers of various sizes), as well as composite ones which allow you | |
15514 | form hierarchical and sequential structures of increasing complexity. | |
15515 | It features bit and byte granularity, easy debugging and testing, an | |
15516 | easy-to-extend subclass system, and lots of primitive constructs to | |
15517 | make your work easier.") | |
15518 | (license license:expat))) | |
b742c006 LF |
15519 | |
15520 | (define-public python-humanize | |
15521 | (package | |
15522 | (name "python-humanize") | |
15523 | (version "0.5.1") | |
15524 | (source | |
15525 | (origin | |
15526 | (method url-fetch) | |
15527 | (uri (pypi-uri "humanize" version)) | |
15528 | (sha256 | |
15529 | (base32 | |
15530 | "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4")))) | |
15531 | (arguments | |
15532 | '(#:tests? #f)) ; tests not in pypi archive | |
15533 | (build-system python-build-system) | |
15534 | (home-page "https://github.com/jmoiron/humanize") | |
15535 | (synopsis "Print numerical information in a human-readable form") | |
15536 | (description "This package provides a Python module that displays numbers | |
15537 | and dates in \"human readable\" forms. For example, it would display | |
15538 | \"12345591313\" as \"12.3 billion\".") | |
15539 | (license license:expat))) | |
d5bbf66d LF |
15540 | |
15541 | (define-public python-txaio | |
15542 | (package | |
15543 | (name "python-txaio") | |
15544 | (version "18.8.1") | |
15545 | (source | |
15546 | (origin | |
15547 | (method url-fetch) | |
15548 | (uri (pypi-uri "txaio" version)) | |
15549 | (sha256 | |
15550 | (base32 | |
15551 | "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7")))) | |
15552 | (build-system python-build-system) | |
15553 | (propagated-inputs | |
15554 | `(("python-twisted" ,python-twisted) | |
15555 | ("python-six" ,python-six))) | |
15556 | (home-page "https://github.com/crossbario/txaio") | |
15557 | (synopsis "Compatibility layer between Python asyncio and Twisted") | |
15558 | (description "Txaio provides a compatibility layer between the Python | |
15559 | @code{asyncio} module and @code{Twisted}.") | |
15560 | (license license:expat))) | |
963dfd3a RW |
15561 | |
15562 | (define-public python-toolshed | |
15563 | (package | |
15564 | (name "python-toolshed") | |
15565 | (version "0.4.6") | |
15566 | (source | |
15567 | (origin | |
15568 | (method url-fetch) | |
15569 | (uri (pypi-uri "toolshed" version)) | |
15570 | (sha256 | |
15571 | (base32 | |
15572 | "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3")))) | |
15573 | (build-system python-build-system) | |
15574 | (native-inputs | |
15575 | `(("python-nose" ,python-nose))) | |
15576 | (home-page "https://github.com/brentp/toolshed/") | |
15577 | (synopsis "Collection of modules and functions for working with data") | |
15578 | (description "This is a collection of well-tested, simple modules and | |
15579 | functions that aim to reduce boilerplate when working with data.") | |
15580 | (license license:bsd-2))) | |
c91ecf2d RW |
15581 | |
15582 | (define-public python-annoy | |
15583 | (package | |
15584 | (name "python-annoy") | |
15585 | (version "1.15.1") | |
15586 | (source | |
15587 | (origin | |
15588 | (method url-fetch) | |
15589 | (uri (pypi-uri "annoy" version)) | |
15590 | (sha256 | |
15591 | (base32 | |
15592 | "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp")))) | |
15593 | (build-system python-build-system) | |
15594 | (native-inputs | |
15595 | `(("python-nose" ,python-nose))) | |
15596 | (home-page "https://github.com/spotify/annoy/") | |
15597 | (synopsis "Approximate nearest neighbors library") | |
15598 | (description | |
15599 | "Annoy is a C++ library with Python bindings to search for points in | |
15600 | space that are close to a given query point. It also creates large read-only | |
15601 | file-based data structures that are @code{mmap}ped into memory so that many | |
15602 | processes may share the same data.") | |
15603 | (license license:asl2.0))) | |
412342d1 | 15604 | |
79bfa422 | 15605 | (define-public python-pylzma |
412342d1 | 15606 | (package |
79bfa422 DM |
15607 | (name "python-pylzma") |
15608 | (version "0.5.0") | |
15609 | (source | |
15610 | (origin | |
15611 | (method url-fetch) | |
15612 | (uri (pypi-uri "pylzma" version)) | |
15613 | (sha256 | |
15614 | (base32 | |
15615 | "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q")))) | |
412342d1 | 15616 | (build-system python-build-system) |
79bfa422 DM |
15617 | (home-page "http://www.joachim-bauch.de/projects/pylzma/") |
15618 | (synopsis "Python bindings for the LZMA library by Igor Pavlov.") | |
15619 | (description "This package provides Python bindings for the LZMA library | |
15620 | by Igor Pavlov.") | |
15621 | (license license:lgpl2.1+))) | |
15622 | ||
15623 | (define-public python2-pylzma | |
15624 | (package-with-python2 python-pylzma)) |