Commit | Line | Data |
---|---|---|
44d10b1f RW |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
ae8db9ce | 3 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 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> | |
02422b3b | 10 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> |
44d10b1f RW |
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> | |
11e46326 | 17 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
44d10b1f RW |
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> | |
8581b40d | 22 | ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com> |
44d10b1f RW |
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> | |
fd5c264a | 29 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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 | 33 | ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net> |
7261bdca | 34 | ;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu> |
783d1d40 | 35 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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> | |
a0b2accf | 41 | ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
44d10b1f RW |
42 | ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org> |
43 | ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> | |
e2ebbbcc | 44 | ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net> |
44d10b1f RW |
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> | |
a2548a3b | 54 | ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
44d10b1f | 55 | ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> |
85cfb0e9 | 56 | ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org> |
bd137055 | 57 | ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
44d10b1f RW |
58 | ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com> |
59 | ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org> | |
046dd621 | 60 | ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org> |
a91f4eba | 61 | ;;; Copyright © 2019 Sam <smbaines8@gmail.com> |
8c141421 | 62 | ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us> |
f825e605 | 63 | ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net> |
fb236fdd | 64 | ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> |
edeb04bf | 65 | ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com> |
e308b4f0 | 66 | ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com> |
30e7c03a | 67 | ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> |
c1bbef69 | 68 | ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz> |
ba42a6bf | 69 | ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org> |
dbcef44a | 70 | ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de> |
479f4013 | 71 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
da8ca4c3 | 72 | ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com> |
44d10b1f RW |
73 | ;;; |
74 | ;;; This file is part of GNU Guix. | |
75 | ;;; | |
76 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
77 | ;;; under the terms of the GNU General Public License as published by | |
78 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
79 | ;;; your option) any later version. | |
80 | ;;; | |
81 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
82 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
83 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
84 | ;;; GNU General Public License for more details. | |
85 | ;;; | |
86 | ;;; You should have received a copy of the GNU General Public License | |
87 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
88 | ||
89 | (define-module (gnu packages python-xyz) | |
90 | #:use-module ((guix licenses) #:prefix license:) | |
91 | #:use-module (gnu packages) | |
92 | #:use-module (gnu packages algebra) | |
93 | #:use-module (gnu packages adns) | |
94 | #:use-module (gnu packages attr) | |
95 | #:use-module (gnu packages backup) | |
96 | #:use-module (gnu packages bash) | |
97 | #:use-module (gnu packages check) | |
98 | #:use-module (gnu packages compression) | |
99 | #:use-module (gnu packages crypto) | |
100 | #:use-module (gnu packages databases) | |
f825e605 | 101 | #:use-module (gnu packages dbm) |
2cbede59 | 102 | #:use-module (gnu packages enchant) |
44d10b1f RW |
103 | #:use-module (gnu packages file) |
104 | #:use-module (gnu packages fontutils) | |
105 | #:use-module (gnu packages gcc) | |
106 | #:use-module (gnu packages geo) | |
107 | #:use-module (gnu packages ghostscript) | |
108 | #:use-module (gnu packages gl) | |
109 | #:use-module (gnu packages glib) | |
e2ebbbcc | 110 | #:use-module (gnu packages gnome) |
44d10b1f RW |
111 | #:use-module (gnu packages graphviz) |
112 | #:use-module (gnu packages graphics) | |
113 | #:use-module (gnu packages gstreamer) | |
114 | #:use-module (gnu packages gtk) | |
115 | #:use-module (gnu packages icu4c) | |
116 | #:use-module (gnu packages image) | |
117 | #:use-module (gnu packages imagemagick) | |
72c2478a | 118 | #:use-module (gnu packages kerberos) |
44d10b1f RW |
119 | #:use-module (gnu packages libevent) |
120 | #:use-module (gnu packages libffi) | |
121 | #:use-module (gnu packages linux) | |
122 | #:use-module (gnu packages llvm) | |
123 | #:use-module (gnu packages man) | |
124 | #:use-module (gnu packages maths) | |
42f0b0c2 | 125 | #:use-module (gnu packages monitoring) |
44d10b1f RW |
126 | #:use-module (gnu packages multiprecision) |
127 | #:use-module (gnu packages networking) | |
128 | #:use-module (gnu packages ncurses) | |
129 | #:use-module (gnu packages openstack) | |
130 | #:use-module (gnu packages pcre) | |
131 | #:use-module (gnu packages perl) | |
132 | #:use-module (gnu packages pkg-config) | |
133 | #:use-module (gnu packages python) | |
d362b11d | 134 | #:use-module (gnu packages python-check) |
15b65617 | 135 | #:use-module (gnu packages python-compression) |
44d10b1f | 136 | #:use-module (gnu packages python-crypto) |
ca7c3653 | 137 | #:use-module (gnu packages python-science) |
44d10b1f RW |
138 | #:use-module (gnu packages python-web) |
139 | #:use-module (gnu packages qt) | |
140 | #:use-module (gnu packages readline) | |
141 | #:use-module (gnu packages sdl) | |
142 | #:use-module (gnu packages search) | |
143 | #:use-module (gnu packages shells) | |
9d0c291e | 144 | #:use-module (gnu packages sphinx) |
44d10b1f RW |
145 | #:use-module (gnu packages ssh) |
146 | #:use-module (gnu packages terminals) | |
147 | #:use-module (gnu packages tex) | |
148 | #:use-module (gnu packages texinfo) | |
149 | #:use-module (gnu packages time) | |
150 | #:use-module (gnu packages tls) | |
151 | #:use-module (gnu packages version-control) | |
152 | #:use-module (gnu packages video) | |
153 | #:use-module (gnu packages web) | |
154 | #:use-module (gnu packages base) | |
155 | #:use-module (gnu packages xml) | |
156 | #:use-module (gnu packages xorg) | |
157 | #:use-module (gnu packages xdisorg) | |
158 | #:use-module (gnu packages tcl) | |
159 | #:use-module (gnu packages bdw-gc) | |
f98232a3 | 160 | #:use-module (gnu packages serialization) |
44d10b1f RW |
161 | #:use-module (guix packages) |
162 | #:use-module (guix download) | |
163 | #:use-module (guix git-download) | |
a042d348 | 164 | #:use-module (guix hg-download) |
44d10b1f RW |
165 | #:use-module (guix utils) |
166 | #:use-module (guix build-system gnu) | |
167 | #:use-module (guix build-system cmake) | |
168 | #:use-module (guix build-system python) | |
169 | #:use-module (guix build-system trivial) | |
170 | #:use-module (srfi srfi-1) | |
171 | #:use-module (srfi srfi-26)) | |
172 | ||
173 | (define-public python-psutil | |
174 | (package | |
175 | (name "python-psutil") | |
e9119ac1 | 176 | (version "5.6.5") |
44d10b1f RW |
177 | (source |
178 | (origin | |
179 | (method url-fetch) | |
180 | (uri (pypi-uri "psutil" version)) | |
181 | (sha256 | |
e9119ac1 | 182 | (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh")))) |
44d10b1f RW |
183 | (build-system python-build-system) |
184 | (arguments | |
185 | ;; FIXME: some tests does not return and times out. | |
186 | '(#:tests? #f)) | |
187 | (home-page "https://www.github.com/giampaolo/psutil") | |
188 | (synopsis "Library for retrieving information on running processes") | |
189 | (description | |
190 | "psutil (Python system and process utilities) is a library for retrieving | |
191 | information on running processes and system utilization (CPU, memory, disks, | |
192 | network) in Python. It is useful mainly for system monitoring, profiling and | |
193 | limiting process resources and management of running processes. It implements | |
194 | many functionalities offered by command line tools such as: ps, top, lsof, | |
195 | netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime, | |
196 | pidof, tty, taskset, pmap.") | |
197 | (properties `((python2-variant . ,(delay python2-psutil)))) | |
198 | (license license:bsd-3))) | |
199 | ||
200 | (define-public python2-psutil | |
201 | (let ((base (package-with-python2 (strip-python2-variant python-psutil)))) | |
202 | (package | |
203 | (inherit base) | |
204 | (propagated-inputs | |
205 | `(("python2-enum34" ,python2-enum34) ;optional | |
206 | ,@(package-propagated-inputs base)))))) | |
207 | ||
208 | (define-public python-shapely | |
209 | (package | |
210 | (name "python-shapely") | |
6d94465b | 211 | (version "1.6.4.post2") |
44d10b1f RW |
212 | (source |
213 | (origin | |
214 | (method url-fetch) | |
215 | (uri (pypi-uri "Shapely" version)) | |
216 | (sha256 | |
217 | (base32 | |
6d94465b | 218 | "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64")))) |
44d10b1f RW |
219 | (build-system python-build-system) |
220 | (native-inputs | |
221 | `(("python-cython" ,python-cython) | |
222 | ("python-matplotlib" ,python-matplotlib) | |
223 | ("python-pytest" ,python-pytest) | |
224 | ("python-pytest-cov" ,python-pytest-cov))) | |
225 | (inputs | |
226 | `(("geos" ,geos))) | |
227 | (propagated-inputs | |
228 | `(("python-numpy" ,python-numpy))) | |
229 | (arguments | |
230 | `(#:phases | |
231 | (modify-phases %standard-phases | |
232 | (add-after 'unpack 'patch-geos-path | |
233 | (lambda* (#:key inputs #:allow-other-keys) | |
234 | (let ((geos (assoc-ref inputs "geos")) | |
235 | (glibc (assoc-ref inputs ,(if (%current-target-system) | |
236 | "cross-libc" "libc")))) | |
237 | (substitute* "shapely/geos.py" | |
238 | (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)") | |
239 | (string-append "_lgeos = load_dll('geos_c', fallbacks=['" | |
240 | geos "/lib/libgeos_c.so'])")) | |
241 | (("free = load_dll\\('c'\\)\\.free") | |
242 | (string-append "free = load_dll('c', fallbacks=['" | |
243 | glibc "/lib/libc.so.6']).free")))) | |
244 | #t))))) | |
245 | (home-page "https://github.com/Toblerity/Shapely") | |
246 | (synopsis "Library for the manipulation and analysis of geometric objects") | |
247 | (description "Shapely is a Python package for manipulation and analysis of | |
248 | planar geometric objects. It is based on the @code{GEOS} library.") | |
249 | (license license:bsd-3))) | |
250 | ||
a91f4eba S |
251 | (define-public python-shortuuid |
252 | (package | |
253 | (name "python-shortuuid") | |
254 | (version "0.5.0") | |
255 | (source | |
256 | (origin | |
257 | (method url-fetch) | |
258 | (uri (pypi-uri "shortuuid" version)) | |
259 | (sha256 | |
260 | (base32 | |
261 | "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh")))) | |
262 | (build-system python-build-system) | |
263 | (native-inputs | |
264 | `(("python-pep8" ,python-pep8))) | |
265 | (home-page "https://github.com/skorokithakis/shortuuid") | |
266 | (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs") | |
267 | (description | |
268 | "@code{shortuuid} is a Python library for generating concise, unambiguous | |
269 | and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid} | |
270 | module and then similar looking characters are removed.") | |
271 | (license license:bsd-3))) | |
272 | ||
44d10b1f RW |
273 | (define-public python-logwrap |
274 | (package | |
275 | (name "python-logwrap") | |
276 | (version "3.2.1") | |
277 | (source | |
278 | (origin | |
279 | (method url-fetch) | |
280 | (uri (pypi-uri "logwrap" version ".zip")) | |
281 | (sha256 | |
282 | (base32 | |
283 | "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra")))) | |
284 | (build-system python-build-system) | |
285 | (propagated-inputs | |
286 | `(("python-six" ,python-six) | |
287 | ("python-typing" ,python-typing))) | |
288 | (native-inputs | |
289 | `(("unzip" ,unzip) | |
290 | ("python-cython" ,python-cython) | |
291 | ("python-pytest" ,python-pytest) | |
292 | ("python-pytest-cov" ,python-pytest-cov) | |
293 | ("python-pytest-runner" ,python-pytest-runner))) | |
294 | (home-page "https://github.com/penguinolog/logwrap") | |
295 | (synopsis "Decorator for logging function arguments") | |
296 | (description "This package provides a decorator to log function arguments | |
297 | and function call return values in a human-readable way.") | |
298 | (license license:asl2.0))) | |
299 | ||
300 | (define-public python2-shapely | |
301 | (package-with-python2 python-shapely)) | |
302 | ||
303 | (define-public python-clyent | |
304 | (package | |
305 | (name "python-clyent") | |
306 | (version "1.2.1") | |
307 | (source | |
308 | (origin | |
309 | (method url-fetch) | |
310 | (uri (pypi-uri "clyent" version)) | |
311 | (sha256 | |
312 | (base32 | |
313 | "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj")))) | |
314 | (build-system python-build-system) | |
315 | (native-inputs | |
316 | `(("python-mock" ,python-mock))) | |
317 | (home-page "https://github.com/binstar/clyent") | |
318 | (synopsis "Command line client library") | |
319 | (description "Clyent is a Python command line utiliy library. It is used | |
320 | by @code{binstar}, @code{binstar-build} and @code{chalmers}.") | |
321 | (license license:bsd-3))) | |
322 | ||
323 | (define-public python2-clyent | |
324 | (package-with-python2 python-clyent)) | |
325 | ||
326 | (define-public python-babel | |
327 | (package | |
328 | (name "python-babel") | |
93253411 | 329 | (version "2.7.0") |
44d10b1f RW |
330 | (source |
331 | (origin | |
332 | (method url-fetch) | |
333 | (uri (pypi-uri "Babel" version)) | |
334 | (sha256 | |
335 | (base32 | |
93253411 | 336 | "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8")))) |
44d10b1f RW |
337 | (build-system python-build-system) |
338 | (native-inputs | |
339 | `(("python-freezegun" ,python-freezegun) | |
340 | ("python-pytest" ,python-pytest))) | |
341 | (propagated-inputs | |
342 | `(("python-pytz" ,python-pytz))) | |
343 | (arguments | |
344 | `(#:phases (modify-phases %standard-phases | |
345 | (replace 'check | |
8acd1e90 MB |
346 | (lambda _ |
347 | (invoke "pytest" "-vv" "-k" | |
348 | (string-append | |
349 | ;; XXX: These tests fail when using Pytest 4.x and | |
350 | ;; Babel 2.6.0. Try removing this for later versions. | |
351 | "not test_no_inherit_metazone_marker_never_in_output" | |
352 | " and not test_smoke_dates" | |
353 | " and not test_smoke_numbers"))))))) | |
44d10b1f RW |
354 | (home-page "http://babel.pocoo.org/") |
355 | (synopsis | |
356 | "Tools for internationalizing Python applications") | |
357 | (description | |
358 | "Babel is composed of two major parts: | |
359 | - tools to build and work with gettext message catalogs | |
360 | - a Python interface to the CLDR (Common Locale Data Repository), providing | |
361 | access to various locale display names, localized number and date formatting, | |
362 | etc. ") | |
363 | (license license:bsd-3))) | |
364 | ||
365 | (define-public python2-babel | |
366 | (package-with-python2 python-babel)) | |
367 | ||
93253411 MB |
368 | ;; Sphinx < 2.0 requires this version. Remove once no longer needed. |
369 | (define-public python2-babel-2.6 | |
370 | (package | |
371 | (inherit python2-babel) | |
372 | (version "2.6.0") | |
373 | (source (origin | |
374 | (method url-fetch) | |
375 | (uri (pypi-uri "Babel" version)) | |
376 | (sha256 | |
377 | (base32 | |
378 | "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc")))))) | |
379 | ||
44d10b1f RW |
380 | (define-public python2-backport-ssl-match-hostname |
381 | (package | |
382 | (name "python2-backport-ssl-match-hostname") | |
383 | (version "3.5.0.1") | |
384 | (source | |
385 | (origin | |
386 | (method url-fetch) | |
2c1f0d09 | 387 | (uri (pypi-uri "backports.ssl_match_hostname" version)) |
44d10b1f RW |
388 | (sha256 |
389 | (base32 | |
390 | "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh")))) | |
391 | (build-system python-build-system) | |
392 | (arguments | |
393 | `(#:python ,python-2 | |
394 | #:tests? #f)) ; no test target | |
395 | (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname") | |
396 | (synopsis "Backport of ssl.match_hostname() function from Python 3.5") | |
397 | (description | |
398 | "This backport brings the ssl.match_hostname() function to users of | |
399 | earlier versions of Python. The function checks the hostname in the | |
400 | certificate returned by the server to which a connection has been established, | |
401 | and verifies that it matches the intended target hostname.") | |
402 | (license license:psfl))) | |
403 | ||
dc827867 TGR |
404 | (define-public python-boolean.py |
405 | (package | |
406 | (name "python-boolean.py") | |
407 | (version "3.6") | |
408 | (source | |
409 | (origin | |
410 | ;; There's no source tarball on PyPI. | |
411 | (method git-fetch) | |
412 | (uri (git-reference | |
413 | (url "https://github.com/bastikr/boolean.py") | |
414 | (commit (string-append "v" version)))) | |
415 | (file-name (git-file-name name version)) | |
416 | (sha256 | |
417 | (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs")))) | |
418 | (build-system python-build-system) | |
419 | (home-page "https://github.com/bastikr/boolean.py") | |
420 | (synopsis "Boolean algebra in one Python module") | |
421 | (description | |
422 | "This is a small Python library that implements boolean algebra. | |
423 | It defines two base elements, @code{TRUE} and @code{FALSE}, and a | |
424 | @code{Symbol} class that can take on one of these two values. Calculations | |
425 | are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other | |
426 | compositions like @code{XOR} and @code{NAND} are emulated on top of them. | |
427 | Expressions are constructed from parsed strings or directly in Python.") | |
428 | (license license:bsd-2))) | |
429 | ||
44d10b1f RW |
430 | (define-public python-hdf4 |
431 | (package | |
432 | (name "python-hdf4") | |
433 | (version "0.9") | |
434 | (source | |
435 | (origin | |
436 | (method url-fetch) | |
437 | (uri (pypi-uri name version)) | |
438 | (sha256 | |
439 | (base32 | |
440 | "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks")))) | |
441 | (build-system python-build-system) | |
442 | (native-inputs `(("nose" ,python-nose))) | |
443 | (propagated-inputs `(("numpy" ,python-numpy))) | |
444 | (inputs | |
445 | `(("hdf4" ,hdf4) | |
446 | ("libjpeg" ,libjpeg) | |
447 | ("zlib" ,zlib))) | |
448 | (arguments | |
449 | `(#:phases | |
450 | (modify-phases %standard-phases | |
451 | (replace 'check | |
452 | (lambda _ | |
453 | ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes | |
454 | ;; on to import numpy. Somehow this works on their CI system. | |
455 | ;; Let's just manage PYTHONPATH here instead. | |
456 | (substitute* "runexamples.sh" | |
457 | (("export PYTHONPATH=.*") "")) | |
458 | (setenv "PYTHONPATH" | |
459 | (string-append (getcwd) ":" | |
460 | (getenv "PYTHONPATH"))) | |
461 | (invoke "./runexamples.sh") | |
462 | (invoke "nosetests" "-v")))))) | |
463 | (home-page "https://github.com/fhs/python-hdf4") | |
464 | (synopsis "Python interface to the NCSA HDF4 library") | |
465 | (description | |
466 | "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library, | |
467 | which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s. | |
468 | NetCDF files can also be read and modified. Python-HDF4 is a fork of | |
469 | @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.") | |
470 | (license license:expat))) | |
471 | ||
472 | (define-public python2-hdf4 | |
473 | (package-with-python2 python-hdf4)) | |
474 | ||
475 | (define-public python-h5py | |
476 | (package | |
477 | (name "python-h5py") | |
24ce6421 | 478 | (version "2.10.0") |
44d10b1f RW |
479 | (source |
480 | (origin | |
481 | (method url-fetch) | |
482 | (uri (pypi-uri "h5py" version)) | |
483 | (sha256 | |
484 | (base32 | |
24ce6421 | 485 | "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4")))) |
44d10b1f RW |
486 | (build-system python-build-system) |
487 | (arguments | |
488 | `(#:tests? #f ; no test target | |
489 | #:phases | |
490 | (modify-phases %standard-phases | |
491 | (add-after 'unpack 'fix-hdf5-paths | |
492 | (lambda* (#:key inputs #:allow-other-keys) | |
493 | (let ((prefix (assoc-ref inputs "hdf5"))) | |
494 | (substitute* "setup_build.py" | |
495 | (("\\['/opt/local/lib', '/usr/local/lib'\\]") | |
496 | (string-append "['" prefix "/lib" "']")) | |
497 | (("'/opt/local/include', '/usr/local/include'") | |
498 | (string-append "'" prefix "/include" "'"))) | |
499 | (substitute* "setup_configure.py" | |
500 | (("\\['/usr/local/lib', '/opt/local/lib'\\]") | |
501 | (string-append "['" prefix "/lib" "']"))) | |
502 | #t)))))) | |
503 | (propagated-inputs | |
504 | `(("python-six" ,python-six) | |
505 | ("python-numpy" ,python-numpy))) | |
506 | (inputs | |
24ce6421 | 507 | `(("hdf5" ,hdf5-1.10))) |
44d10b1f RW |
508 | (native-inputs |
509 | `(("python-cython" ,python-cython) | |
24ce6421 RW |
510 | ("python-pkgconfig" ,python-pkgconfig) |
511 | ("pkg-config" ,pkg-config))) | |
efc0a587 | 512 | (home-page "https://www.h5py.org/") |
44d10b1f RW |
513 | (synopsis "Read and write HDF5 files from Python") |
514 | (description | |
515 | "The h5py package provides both a high- and low-level interface to the | |
516 | HDF5 library from Python. The low-level interface is intended to be a | |
517 | complete wrapping of the HDF5 API, while the high-level component supports | |
518 | access to HDF5 files, datasets and groups using established Python and NumPy | |
519 | concepts.") | |
520 | (license license:bsd-3))) | |
521 | ||
522 | (define-public python2-h5py | |
523 | (package-with-python2 python-h5py)) | |
524 | ||
8b89dedc RW |
525 | (define-public python-sh |
526 | (package | |
527 | (name "python-sh") | |
528 | (version "1.12.14") | |
529 | (source | |
530 | (origin | |
531 | (method url-fetch) | |
532 | (uri (pypi-uri "sh" version)) | |
533 | (sha256 | |
534 | (base32 | |
535 | "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm")))) | |
536 | (build-system python-build-system) | |
fd3638d8 EF |
537 | (arguments |
538 | '(#:phases | |
539 | (modify-phases %standard-phases | |
540 | (replace 'check | |
541 | (lambda _ | |
ca983a2f NG |
542 | ;; XXX: A Python 2 test fails when HOME=/homeless-shelter. |
543 | (setenv "HOME" "/tmp") | |
fd3638d8 EF |
544 | (invoke "python" "sh.py" "test")))))) |
545 | (native-inputs | |
546 | `(("python-coverage" ,python-coverage))) | |
8b89dedc RW |
547 | (home-page "https://github.com/amoffat/sh") |
548 | (synopsis "Python subprocess replacement") | |
549 | (description "This package provides a replacement for Python's | |
550 | @code{subprocess} feature.") | |
551 | (license license:expat))) | |
552 | ||
3869effd RW |
553 | (define-public python2-sh |
554 | (package-with-python2 python-sh)) | |
555 | ||
d362b11d RW |
556 | (define-public python-cftime |
557 | (package | |
558 | (name "python-cftime") | |
da107cf5 | 559 | (version "1.0.4.2") |
d362b11d RW |
560 | (source |
561 | (origin | |
562 | (method url-fetch) | |
563 | (uri (pypi-uri "cftime" version)) | |
564 | (sha256 | |
da107cf5 | 565 | (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs")))) |
d362b11d RW |
566 | (build-system python-build-system) |
567 | (propagated-inputs | |
568 | `(("python-numpy" ,python-numpy))) | |
569 | (native-inputs | |
570 | `(("python-coveralls" ,python-coveralls) | |
571 | ("python-cython" ,python-cython) | |
572 | ("python-pytest-cov" ,python-pytest-cov))) | |
573 | (home-page "https://github.com/Unidata/cftime") | |
574 | (synopsis "Library for time handling") | |
575 | (description | |
576 | "This package provides time-handling functionality that used to be part | |
577 | of the netcdf4 package before.") | |
578 | ;; This package claims to include code under the GPLv3 but is released | |
579 | ;; under ISC. | |
580 | (license (list license:isc license:gpl3+)))) | |
581 | ||
44d10b1f RW |
582 | (define-public python-netcdf4 |
583 | (package | |
584 | (name "python-netcdf4") | |
93e7b209 | 585 | (version "1.4.2") |
44d10b1f RW |
586 | (source |
587 | (origin | |
588 | (method url-fetch) | |
589 | (uri (pypi-uri "netCDF4" version)) | |
590 | (sha256 | |
591 | (base32 | |
93e7b209 | 592 | "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r")))) |
44d10b1f | 593 | (build-system python-build-system) |
93e7b209 RW |
594 | (arguments |
595 | '(#:phases | |
596 | (modify-phases %standard-phases | |
597 | (add-after 'unpack 'configure-locations | |
598 | (lambda* (#:key inputs #:allow-other-keys) | |
599 | (setenv "HDF5_DIR" (assoc-ref inputs "hdf5")) | |
600 | #t))))) | |
44d10b1f RW |
601 | (native-inputs |
602 | `(("python-cython" ,python-cython))) | |
603 | (propagated-inputs | |
93e7b209 RW |
604 | `(("python-numpy" ,python-numpy) |
605 | ("python-cftime" ,python-cftime))) | |
44d10b1f RW |
606 | (inputs |
607 | `(("netcdf" ,netcdf) | |
608 | ("hdf4" ,hdf4) | |
609 | ("hdf5" ,hdf5))) | |
93e7b209 | 610 | (home-page "https://github.com/Unidata/netcdf4-python") |
44d10b1f RW |
611 | (synopsis "Python/numpy interface to the netCDF library") |
612 | (description "Netcdf4-python is a Python interface to the netCDF C | |
613 | library. netCDF version 4 has many features not found in earlier | |
614 | versions of the library and is implemented on top of HDF5. This module | |
615 | can read and write files in both the new netCDF 4 and the old netCDF 3 | |
616 | format, and can create files that are readable by HDF5 clients. The | |
617 | API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar | |
618 | to users of that module.") | |
619 | ;; The software is mainly ISC, but includes some files covered | |
620 | ;; by the Expat license. | |
621 | (license (list license:isc license:expat)))) | |
622 | ||
623 | (define-public python2-netcdf4 | |
624 | (package-with-python2 python-netcdf4)) | |
625 | ||
d6803445 TGR |
626 | (define-public python-license-expression |
627 | (package | |
628 | (name "python-license-expression") | |
629 | (version "0.999") | |
630 | (source | |
631 | (origin | |
632 | (method url-fetch) | |
633 | (uri (pypi-uri "license-expression" version)) | |
634 | (sha256 | |
635 | (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf")))) | |
636 | (build-system python-build-system) | |
637 | (propagated-inputs | |
638 | `(("python-boolean.py" ,python-boolean.py))) | |
639 | (home-page "https://github.com/nexB/license-expression") | |
640 | (synopsis "Apply boolean logic to license expressions") | |
641 | (description | |
642 | "This Python module defines a tiny language to evaluate and compare | |
643 | license expressions using boolean logic. Logical combinations of licenses can | |
644 | be tested for equality, containment, and equivalence. They can be normalised | |
645 | and simplified. It supports SPDX license expressions as well as other naming | |
646 | conventions and aliases in the same expression.") | |
647 | (license license:gpl2+))) | |
648 | ||
44d10b1f RW |
649 | (define-public python-lockfile |
650 | (package | |
651 | (name "python-lockfile") | |
652 | (version "0.12.2") | |
653 | (source | |
654 | (origin | |
655 | (method url-fetch) | |
8318bf07 | 656 | (uri (pypi-uri "lockfile" version)) |
44d10b1f RW |
657 | (sha256 |
658 | (base32 | |
659 | "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba")))) | |
660 | (build-system python-build-system) | |
661 | (arguments '(#:test-target "check")) | |
662 | (native-inputs | |
663 | `(("python-pbr" ,python-pbr))) | |
664 | (home-page "https://launchpad.net/pylockfile") | |
665 | (synopsis "Platform-independent file locking module") | |
666 | (description | |
667 | "The lockfile package exports a LockFile class which provides a simple | |
668 | API for locking files.") | |
669 | (license license:expat))) | |
670 | ||
671 | (define-public python2-lockfile | |
672 | (package-with-python2 python-lockfile)) | |
673 | ||
6e792089 JK |
674 | (define-public python-filelock |
675 | (package | |
676 | (name "python-filelock") | |
677 | (version "3.0.12") | |
678 | (source | |
679 | (origin | |
680 | (method url-fetch) | |
681 | (uri (pypi-uri "filelock" version)) | |
682 | (sha256 | |
683 | (base32 | |
684 | "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q")))) | |
685 | (build-system python-build-system) | |
686 | (home-page | |
687 | "https://github.com/benediktschmitt/py-filelock") | |
688 | (synopsis "Platform independent file lock") | |
689 | (description "@code{filelock} contains a single module implementing | |
690 | a platform independent file lock in Python, which provides a simple way of | |
691 | inter-process communication.") | |
692 | (license license:unlicense))) | |
693 | ||
44d10b1f RW |
694 | (define-public python-semantic-version |
695 | (package | |
696 | (name "python-semantic-version") | |
697 | (version "2.6.0") | |
698 | (source | |
699 | (origin | |
700 | (method url-fetch) | |
701 | (uri (pypi-uri "semantic_version" version)) | |
702 | (sha256 | |
703 | (base32 | |
704 | "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra")))) | |
705 | (build-system python-build-system) | |
706 | (arguments | |
707 | `(#:tests? #f)) ; PyPI tarball lacks tests | |
708 | (home-page "https://github.com/rbarrois/python-semanticversion") | |
709 | (synopsis "Semantic versioning module for Python") | |
710 | (description | |
711 | "The @code{semantic_version} class is a small library for handling | |
712 | @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python. | |
713 | ||
714 | It can compare versions, generate a new version that represents a bump in one of | |
715 | the version levels, and check whether any given string is a proper semantic | |
716 | version identifier.") | |
717 | (license license:bsd-3))) | |
718 | ||
719 | (define-public python2-semantic-version | |
720 | (package-with-python2 python-semantic-version)) | |
721 | ||
722 | (define-public python-serpent | |
723 | (package | |
724 | (name "python-serpent") | |
fa9d14ac | 725 | (version "1.28") |
44d10b1f RW |
726 | (source |
727 | (origin | |
728 | (method url-fetch) | |
729 | (uri (pypi-uri "serpent" version)) | |
730 | (sha256 | |
fa9d14ac | 731 | (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk")))) |
44d10b1f | 732 | (build-system python-build-system) |
fa9d14ac TGR |
733 | (native-inputs |
734 | `(("python-attrs" ,python-attrs) | |
735 | ("python-pytz" ,python-pytz))) | |
44d10b1f RW |
736 | (home-page "https://github.com/irmen/Serpent") |
737 | (synopsis "Serializer for literal Python expressions") | |
738 | (description | |
1d3c7803 TGR |
739 | "Serpent provides @code{ast.literal_eval()}-compatible object tree |
740 | serialization. It serializes an object tree into bytes (an utf-8 encoded | |
741 | string) that can be decoded and then passed as-is to @code{ast.literal_eval()} | |
742 | to rebuild the original object tree. | |
743 | ||
744 | Because only safe literals are encoded, it is safe to send serpent data to | |
745 | other machines, such as over the network.") | |
44d10b1f RW |
746 | (license license:expat))) |
747 | ||
748 | (define-public python-setuptools | |
749 | (package | |
750 | (name "python-setuptools") | |
e39d4933 | 751 | (version "41.0.1") |
44d10b1f RW |
752 | (source |
753 | (origin | |
754 | (method url-fetch) | |
755 | (uri (pypi-uri "setuptools" version ".zip")) | |
756 | (sha256 | |
757 | (base32 | |
e39d4933 | 758 | "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2")) |
44d10b1f RW |
759 | (modules '((guix build utils))) |
760 | (snippet | |
761 | '(begin | |
762 | ;; Remove included binaries which are used to build self-extracting | |
763 | ;; installers for Windows. | |
764 | ;; TODO: Find some way to build them ourself so we can include them. | |
765 | (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$")) | |
766 | #t)))) | |
767 | (build-system python-build-system) | |
768 | ;; FIXME: Tests require pytest, which itself relies on setuptools. | |
769 | ;; One could bootstrap with an internal untested setuptools. | |
770 | (arguments | |
771 | `(#:tests? #f)) | |
e85af137 | 772 | (home-page "https://pypi.org/project/setuptools/") |
44d10b1f RW |
773 | (synopsis |
774 | "Library designed to facilitate packaging Python projects") | |
775 | (description | |
776 | "Setuptools is a fully-featured, stable library designed to facilitate | |
777 | packaging Python projects, where packaging includes: | |
778 | Python package and module definitions, | |
779 | distribution package metadata, | |
780 | test hooks, | |
781 | project installation, | |
782 | platform-specific details, | |
783 | Python 3 support.") | |
784 | ;; TODO: setuptools now bundles the following libraries: | |
785 | ;; packaging, pyparsing, six and appdirs. How to unbundle? | |
786 | (license (list license:psfl ; setuptools itself | |
787 | license:expat ; six, appdirs, pyparsing | |
788 | license:asl2.0 ; packaging is dual ASL2/BSD-2 | |
789 | license:bsd-2)))) | |
790 | ||
791 | (define-public python2-setuptools | |
792 | (package-with-python2 python-setuptools)) | |
793 | ||
0fdec2a3 MB |
794 | ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow. |
795 | (define-public python-setuptools-for-tensorflow | |
796 | (hidden-package | |
797 | (package | |
798 | (inherit python-setuptools) | |
799 | (version "39.1.0") | |
800 | (source (origin | |
801 | (inherit (package-source python-setuptools)) | |
802 | (uri (pypi-uri "setuptools" version ".zip")) | |
803 | (sha256 | |
804 | (base32 | |
805 | "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65"))))))) | |
806 | ||
44d10b1f RW |
807 | (define-public python-uniseg |
808 | (package | |
809 | (name "python-uniseg") | |
810 | (version "0.7.1") | |
811 | (source | |
812 | (origin | |
813 | (method url-fetch) | |
814 | (uri (pypi-uri "uniseg" version ".zip")) | |
815 | (sha256 | |
816 | (base32 | |
817 | "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2")))) | |
818 | (build-system python-build-system) | |
819 | (arguments | |
820 | '(#:tests? #f)) ; The test suite requires network access. | |
821 | (native-inputs | |
822 | `(("unzip" ,unzip))) | |
823 | (home-page | |
824 | "https://bitbucket.org/emptypage/uniseg-python") | |
825 | (synopsis | |
826 | "Python library to determine Unicode text segmentations") | |
827 | (description | |
828 | "Uniseg is a Python package used to determine Unicode text segmentations. | |
829 | Supported segmentations include: | |
830 | @enumerate | |
831 | @item @dfn{Code point} (any value in the Unicode codespace) | |
832 | @item @dfn{Grapheme cluster} (user-perceived character made of a single or | |
833 | multiple Unicode code points, e.g. \"G\" + acute-accent) | |
834 | @item Word break | |
835 | @item Sentence break | |
836 | @item Line break | |
837 | @end enumerate") | |
838 | (license license:expat))) | |
839 | ||
840 | (define-public python2-uniseg | |
841 | (package-with-python2 python-uniseg)) | |
842 | ||
843 | (define-public python-humanfriendly | |
844 | (package | |
845 | (name "python-humanfriendly") | |
846 | (version "4.4.1") | |
847 | (source | |
848 | (origin | |
849 | (method url-fetch) | |
850 | (uri (pypi-uri "humanfriendly" version)) | |
851 | (sha256 | |
852 | (base32 | |
853 | "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi")))) | |
854 | (build-system python-build-system) | |
855 | (arguments | |
856 | `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly. | |
857 | #:tests? #f)) | |
858 | (propagated-inputs | |
859 | `(("python-monotonic" ,python-monotonic))) | |
860 | (home-page "https://humanfriendly.readthedocs.io") | |
861 | (synopsis "Human-friendly input and output in Python") | |
862 | (description | |
863 | "The functions and classes in @code{humanfriendly} can be used to make | |
864 | text interfaces more user-friendly. It includes tools to parse and format | |
865 | numbers, file sizes, and timespans, timers for long-running operations, menus | |
866 | to allow the user to choose from a list of options, and terminal interaction | |
867 | helpers.") | |
868 | (license license:expat))) | |
869 | ||
870 | (define-public python2-humanfriendly | |
871 | (package-with-python2 python-humanfriendly)) | |
872 | ||
873 | (define-public python-capturer | |
874 | (package | |
875 | (name "python-capturer") | |
876 | (version "2.4") | |
877 | (source | |
878 | (origin | |
879 | (method url-fetch) | |
880 | (uri (pypi-uri "capturer" version)) | |
881 | (sha256 | |
882 | (base32 | |
883 | "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089")))) | |
884 | (build-system python-build-system) | |
885 | (arguments | |
886 | `(#:tests? #f)) | |
887 | (propagated-inputs | |
888 | `(("python-humanfriendly" ,python-humanfriendly))) | |
889 | (home-page "https://capturer.readthedocs.io") | |
890 | (synopsis "Capture stdout and stderr streams of the current process") | |
891 | (description | |
892 | "The capturer package makes it easy to capture the stdout and stderr | |
893 | streams of the current process and subprocesses. Output can be relayed | |
894 | to the terminal in real time but is also available to the Python program | |
895 | for additional processing.") | |
896 | (license license:expat))) | |
897 | ||
898 | (define-public python2-capturer | |
899 | (package-with-python2 python-capturer)) | |
900 | ||
901 | (define-public python-case | |
902 | (package | |
903 | (name "python-case") | |
904 | (version "1.5.3") | |
905 | (source | |
906 | (origin | |
907 | (method url-fetch) | |
908 | (uri (pypi-uri "case" version)) | |
909 | (sha256 | |
910 | (base32 | |
911 | "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8")))) | |
912 | (build-system python-build-system) | |
913 | (propagated-inputs | |
914 | `(("python-mock" ,python-mock) | |
915 | ("python-nose" ,python-nose) | |
916 | ("python-six" ,python-six) | |
917 | ("python-unittest2" ,python-unittest2))) | |
918 | (native-inputs | |
919 | `(("python-coverage" ,python-coverage))) | |
920 | (home-page "https://github.com/celery/case") | |
921 | (synopsis "Unittest utilities and convenience methods") | |
922 | (description | |
923 | "The @code{case} package provides utilities on top of unittest, including | |
924 | some helpful Python 2 compatibility convenience methods.") | |
925 | (license license:bsd-3))) | |
926 | ||
927 | (define-public python-verboselogs | |
928 | (package | |
929 | (name "python-verboselogs") | |
930 | (version "1.7") | |
931 | (source | |
932 | (origin | |
933 | (method url-fetch) | |
934 | (uri (pypi-uri "verboselogs" version)) | |
935 | (sha256 | |
936 | (base32 | |
937 | "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3")))) | |
938 | (build-system python-build-system) | |
1760c970 MO |
939 | (arguments |
940 | `(#:phases | |
941 | (modify-phases %standard-phases | |
942 | (replace 'check | |
943 | (lambda _ | |
944 | ;; Do not run pylint plugin test, as astroid is an old | |
945 | ;; unsupported version. | |
946 | (invoke "pytest" "-v" "-k" "not test_pylint_plugin" | |
947 | "verboselogs/tests.py")))))) | |
44d10b1f RW |
948 | (native-inputs |
949 | `(("python-mock" ,python-mock) | |
1760c970 | 950 | ("python-pytest" ,python-pytest))) |
44d10b1f RW |
951 | (home-page "https://verboselogs.readthedocs.io") |
952 | (synopsis "Verbose logging level for Python's logging module") | |
953 | (description | |
954 | "The @code{verboselogs} package extends Python's @code{logging} module to | |
955 | add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.") | |
956 | (license license:expat))) | |
957 | ||
958 | (define-public python2-verboselogs | |
959 | (package-with-python2 python-verboselogs)) | |
960 | ||
961 | (define-public python-coloredlogs | |
962 | (package | |
963 | (name "python-coloredlogs") | |
b2b8a39c | 964 | (version "10.0") |
44d10b1f RW |
965 | (source |
966 | (origin | |
967 | (method url-fetch) | |
968 | (uri (pypi-uri "coloredlogs" version)) | |
969 | (sha256 | |
970 | (base32 | |
b2b8a39c | 971 | "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq")))) |
44d10b1f RW |
972 | (build-system python-build-system) |
973 | (arguments | |
974 | `(;Tests require some updated modules | |
975 | #:tests? #f)) | |
976 | (propagated-inputs | |
977 | `(("python-capturer" ,python-capturer))) | |
978 | (home-page "https://coloredlogs.readthedocs.io") | |
979 | (synopsis "Colored stream handler for Python's logging module") | |
980 | (description | |
981 | "The @code{coloredlogs} package enables colored terminal output for | |
982 | Python's logging module. The @code{ColoredFormatter} class inherits from | |
983 | @code{logging.Formatter} and uses ANSI escape sequences to render your logging | |
984 | messages in color.") | |
985 | (license license:expat))) | |
986 | ||
987 | (define-public python2-coloredlogs | |
988 | (package-with-python2 python-coloredlogs)) | |
989 | ||
af760990 VC |
990 | (define-public python-editorconfig |
991 | (package | |
992 | (name "python-editorconfig") | |
993 | (version "0.12.2") | |
994 | (source | |
995 | (origin | |
996 | (method url-fetch) | |
997 | (uri (pypi-uri "EditorConfig" version)) | |
998 | (sha256 | |
999 | (base32 | |
1000 | "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv")))) | |
1001 | (build-system python-build-system) | |
1002 | (home-page "https://editorconfig.org/") | |
1003 | (synopsis "EditorConfig bindings for python") | |
1004 | (description "The EditorConfig project consists of a file format for | |
1005 | defining coding styles and a collection of text editor plugins that enable | |
1006 | editors to read the file format and adhere to defined styles. EditorConfig | |
1007 | files are easily readable and they work nicely with version control systems.") | |
1008 | ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2. | |
1009 | (license (list license:bsd-2 license:psfl)))) | |
1010 | ||
4caf37b0 MC |
1011 | (define-public python-et-xmlfile |
1012 | (package | |
1013 | (name "python-et-xmlfile") | |
1014 | (version "1.0.1") | |
1015 | (source | |
1016 | (origin | |
1017 | (method url-fetch) | |
1018 | (uri (pypi-uri "et_xmlfile" version)) | |
1019 | (sha256 | |
1020 | (base32 | |
1021 | "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1")))) | |
1022 | (build-system python-build-system) | |
1023 | (arguments | |
1024 | `(#:phases (modify-phases %standard-phases | |
1025 | (replace 'check | |
1026 | (lambda _ | |
1027 | (invoke "pytest")))))) | |
1028 | (native-inputs | |
1029 | `(("python-pytest" ,python-pytest) | |
1030 | ("python-lxml" ,python-lxml))) ;used for the tests | |
1031 | (home-page "https://bitbucket.org/openpyxl/et_xmlfile") | |
1032 | (synopsis "Low memory implementation of @code{lxml.xmlfile}") | |
1033 | (description "This Python library is based upon the @code{xmlfile} module | |
1034 | from @code{lxml}. It aims to provide a low memory, compatible implementation | |
1035 | of @code{xmlfile}.") | |
1036 | (license license:expat))) | |
1037 | ||
1038 | (define-public python2-et-xmlfile | |
1039 | (package-with-python2 python-et-xmlfile)) | |
1040 | ||
a042d348 MC |
1041 | (define-public python-openpyxl |
1042 | (package | |
1043 | (name "python-openpyxl") | |
441e6d93 | 1044 | (version "2.6.2") |
a042d348 MC |
1045 | (source |
1046 | (origin | |
1047 | ;; We use the upstream repository, as the tests are not included in the | |
1048 | ;; PyPI releases. | |
1049 | (method hg-fetch) | |
1050 | (uri (hg-reference | |
1051 | (url "https://bitbucket.org/openpyxl/openpyxl") | |
1052 | (changeset version))) | |
1053 | (file-name (string-append name "-" version "-checkout")) | |
1054 | (sha256 | |
441e6d93 | 1055 | (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w")))) |
a042d348 MC |
1056 | (build-system python-build-system) |
1057 | (arguments | |
1058 | `(#:phases (modify-phases %standard-phases | |
1059 | (replace 'check | |
1060 | (lambda _ | |
1061 | (invoke "pytest")))))) | |
1062 | (native-inputs | |
1063 | ;; For the test suite. | |
1064 | `(("python-lxml" ,python-lxml) | |
1065 | ("python-pillow" ,python-pillow) | |
1066 | ("python-pytest" ,python-pytest))) | |
1067 | (propagated-inputs | |
1068 | `(("python-et-xmlfile" ,python-et-xmlfile) | |
1069 | ("python-jdcal" ,python-jdcal))) | |
1070 | (home-page "https://openpyxl.readthedocs.io") | |
1071 | (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files") | |
1072 | (description "This Python library allows reading and writing to the Excel XLSX, XLSM, | |
1073 | XLTX and XLTM file formats that are defined by the Office Open XML (OOXML) | |
1074 | standard.") | |
1075 | (license license:expat))) | |
1076 | ||
44d10b1f RW |
1077 | (define-public python-eventlet |
1078 | (package | |
1079 | (name "python-eventlet") | |
c9876c9b | 1080 | (version "0.25.1") |
44d10b1f RW |
1081 | (source |
1082 | (origin | |
1083 | (method url-fetch) | |
1084 | (uri (pypi-uri "eventlet" version)) | |
1085 | (sha256 | |
1086 | (base32 | |
c9876c9b | 1087 | "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c")))) |
44d10b1f RW |
1088 | (build-system python-build-system) |
1089 | (propagated-inputs | |
1090 | `(("python-greenlet" ,python-greenlet))) | |
1091 | (arguments | |
1092 | ;; TODO: Requires unpackaged 'enum-compat'. | |
1093 | '(#:tests? #f)) | |
bff36617 | 1094 | (home-page "https://eventlet.net") |
44d10b1f RW |
1095 | (synopsis "Concurrent networking library for Python") |
1096 | (description | |
1097 | "Eventlet is a concurrent networking library for Python that | |
1098 | allows you to change how you run your code, not how you write it. | |
1099 | It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O. | |
1100 | Coroutines ensure that the developer uses a blocking style of programming | |
1101 | that is similar to threading, but provide the benefits of non-blocking I/O. | |
1102 | The event dispatch is implicit, which means you can easily use @code{Eventlet} | |
1103 | from the Python interpreter, or as a small part of a larger application.") | |
1104 | (license license:expat))) | |
1105 | ||
1106 | (define-public python2-eventlet | |
1107 | (let ((base (package-with-python2 | |
1108 | (strip-python2-variant python-eventlet)))) | |
1109 | (package (inherit base) | |
1110 | (propagated-inputs | |
1111 | `(("python2-enum34" ,python2-enum34) | |
1112 | ,@(package-propagated-inputs base)))))) | |
1113 | ||
1114 | (define-public python-six | |
1115 | (package | |
1116 | (name "python-six") | |
6c58a06e | 1117 | (version "1.12.0") |
44d10b1f RW |
1118 | (source |
1119 | (origin | |
1120 | (method url-fetch) | |
1121 | (uri (pypi-uri "six" version)) | |
1122 | (sha256 | |
1123 | (base32 | |
6c58a06e | 1124 | "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni")))) |
44d10b1f RW |
1125 | (build-system python-build-system) |
1126 | (arguments | |
1127 | `(#:phases | |
1128 | (modify-phases %standard-phases | |
1129 | (replace 'check | |
1130 | (lambda _ | |
1131 | (invoke "py.test" "-v")))))) | |
1132 | (native-inputs | |
1133 | `(("python-py" ,python-py) | |
1134 | ("python-pytest" ,python-pytest-bootstrap))) | |
e85af137 | 1135 | (home-page "https://pypi.org/project/six/") |
44d10b1f RW |
1136 | (synopsis "Python 2 and 3 compatibility utilities") |
1137 | (description | |
1138 | "Six is a Python 2 and 3 compatibility library. It provides utility | |
1139 | functions for smoothing over the differences between the Python versions with | |
1140 | the goal of writing Python code that is compatible on both Python versions. | |
1141 | Six supports every Python version since 2.5. It is contained in only one | |
1142 | Python file, so it can be easily copied into your project.") | |
1143 | (license license:x11))) | |
1144 | ||
1145 | (define-public python2-six | |
1146 | (package-with-python2 python-six)) | |
1147 | ||
1148 | (define-public python-six-bootstrap | |
1149 | (package | |
1150 | (inherit python-six) | |
1151 | (name "python-six-bootstrap") | |
1152 | (native-inputs `()) | |
1153 | (arguments `(#:tests? #f)))) | |
1154 | ||
1155 | (define-public python2-six-bootstrap | |
1156 | (package-with-python2 python-six-bootstrap)) | |
1157 | ||
1158 | (define-public python-schedule | |
1159 | (package | |
1160 | (name "python-schedule") | |
1161 | (version "0.4.3") | |
1162 | (source | |
1163 | (origin | |
1164 | (method url-fetch) | |
1165 | (uri (pypi-uri "schedule" version)) | |
1166 | (sha256 | |
1167 | (base32 | |
1168 | "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i")))) | |
1169 | (build-system python-build-system) | |
1170 | (native-inputs | |
1171 | `(("python-pytest" ,python-pytest) | |
1172 | ("python-mock" ,python-mock))) | |
1173 | (home-page "https://github.com/dbader/schedule") | |
1174 | (synopsis "Schedule periodic function calls in Python") | |
1175 | (description | |
1176 | "Schedule is an in-process scheduler for periodic jobs that uses the | |
1177 | builder pattern for configuration. Schedule lets you run Python functions (or | |
1178 | any other callable) periodically at pre-determined intervals using a simple, | |
1179 | human-friendly syntax.") | |
1180 | (license license:expat))) | |
1181 | ||
1182 | (define-public python2-schedule | |
1183 | (package-with-python2 python-schedule)) | |
1184 | ||
44d10b1f RW |
1185 | (define-public python2-mechanize |
1186 | (package | |
1187 | (name "python2-mechanize") | |
1188 | (version "0.2.5") | |
1189 | (source | |
1190 | (origin | |
1191 | (method url-fetch) | |
1cc184e6 | 1192 | (uri (pypi-uri "mechanize" version)) |
44d10b1f RW |
1193 | (sha256 |
1194 | (base32 | |
1195 | "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf")))) | |
1196 | (build-system python-build-system) | |
1197 | (arguments | |
1198 | `(#:python ,python-2 ; apparently incompatible with Python 3 | |
1199 | #:tests? #f)) | |
1200 | ;; test fails with message | |
1201 | ;; AttributeError: 'module' object has no attribute 'test_pullparser' | |
1202 | ;; (python-3.3.2) or | |
1203 | ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet' | |
1204 | ;; (python-2.7.5). | |
1205 | ;; The source code is from March 2011 and probably not up-to-date | |
1206 | ;; with respect to python unit tests. | |
1207 | (home-page "http://wwwsearch.sourceforge.net/mechanize/") | |
1208 | (synopsis | |
1209 | "Stateful programmatic web browsing in Python") | |
1210 | (description | |
1211 | "Mechanize implements stateful programmatic web browsing in Python, | |
1212 | after Andy Lester’s Perl module WWW::Mechanize.") | |
1213 | (license (license:non-copyleft | |
1214 | "file://COPYING" | |
1215 | "See COPYING in the distribution.")))) | |
1216 | ||
1217 | ||
1218 | (define-public python-simplejson | |
1219 | (package | |
1220 | (name "python-simplejson") | |
1221 | (version "3.14.0") | |
1222 | (source | |
1223 | (origin | |
1224 | (method url-fetch) | |
1225 | (uri (pypi-uri "simplejson" version)) | |
1226 | (sha256 | |
1227 | (base32 | |
1228 | "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy")))) | |
1229 | (build-system python-build-system) | |
1230 | (home-page "http://simplejson.readthedocs.org/en/latest/") | |
1231 | (synopsis | |
1232 | "Json library for Python") | |
1233 | (description | |
1234 | "JSON (JavaScript Object Notation) is a subset of JavaScript | |
1235 | syntax (ECMA-262 3rd edition) used as a lightweight data interchange | |
1236 | format. | |
1237 | ||
1238 | Simplejson exposes an API familiar to users of the standard library marshal | |
1239 | and pickle modules. It is the externally maintained version of the json | |
1240 | library contained in Python 2.6, but maintains compatibility with Python 2.5 | |
1241 | and (currently) has significant performance advantages, even without using | |
1242 | the optional C extension for speedups. Simplejson is also supported on | |
1243 | Python 3.3+.") | |
1244 | (license license:x11))) | |
1245 | ||
1246 | (define-public python2-simplejson | |
1247 | (package-with-python2 python-simplejson)) | |
1248 | ||
1249 | ||
1250 | (define-public python-pyicu | |
1251 | (package | |
1252 | (name "python-pyicu") | |
dc23bb45 | 1253 | (version "2.3.1") |
44d10b1f RW |
1254 | (source |
1255 | (origin | |
1256 | (method url-fetch) | |
1257 | (uri (pypi-uri "PyICU" version)) | |
1258 | (sha256 | |
1259 | (base32 | |
dc23bb45 | 1260 | "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx")))) |
44d10b1f RW |
1261 | (build-system python-build-system) |
1262 | (inputs | |
1263 | `(("icu4c" ,icu4c))) | |
1264 | (native-inputs | |
1265 | `(("python-pytest" ,python-pytest) | |
1266 | ("python-six" ,python-six))) | |
1267 | (home-page "https://github.com/ovalhub/pyicu") | |
1268 | (synopsis "Python extension wrapping the ICU C++ API") | |
1269 | (description | |
1270 | "PyICU is a python extension wrapping the ICU C++ API.") | |
1271 | (properties `((python2-variant . ,(delay python2-pyicu)))) | |
1272 | (license license:x11))) | |
1273 | ||
1274 | (define-public python2-pyicu | |
1275 | (let ((base (package-with-python2 | |
1276 | (strip-python2-variant python-pyicu)))) | |
1277 | (package | |
1278 | (inherit base) | |
1279 | (arguments | |
1280 | `(,@(package-arguments base) | |
1281 | #:phases | |
1282 | (modify-phases %standard-phases | |
1283 | (add-before 'check 'delete-failing-test | |
1284 | (λ _ | |
1285 | ;; XXX: This fails due to Unicode issues unique to Python 2, | |
1286 | ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>. | |
1287 | (delete-file "test/test_Script.py") | |
1288 | #t)))))))) | |
1289 | ||
1290 | (define-public python2-dogtail | |
1291 | ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and | |
1292 | ;; spaces in indentation" with Python 3. | |
1293 | (package | |
1294 | (name "python2-dogtail") | |
1295 | (version "0.9.9") | |
1296 | (source (origin | |
1297 | (method url-fetch) | |
1298 | (uri (pypi-uri "dogtail" version)) | |
1299 | (sha256 | |
1300 | (base32 | |
1301 | "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x")))) | |
1302 | (build-system python-build-system) | |
1303 | (arguments `(#:python ,python-2 | |
1304 | #:tests? #f)) ; invalid command "test" | |
1305 | ;; Currently no offical homepage. | |
e85af137 | 1306 | (home-page "https://pypi.org/project/dogtail/") |
44d10b1f RW |
1307 | (synopsis "GUI test tool and automation framework written in Python") |
1308 | (description | |
1309 | "Dogtail is a GUI test tool and automation framework written in Python. | |
1310 | It uses Accessibility (a11y) technologies to communicate with desktop | |
1311 | applications. dogtail scripts are written in Python and executed like any | |
1312 | other Python program.") | |
1313 | (license license:gpl2+))) | |
1314 | ||
1315 | (define-public python-empy | |
1316 | (package | |
1317 | (name "python-empy") | |
0f6d5115 | 1318 | (version "3.3.3") |
44d10b1f RW |
1319 | (source (origin |
1320 | (method url-fetch) | |
1321 | (uri (string-append "http://www.alcyone.com/software/empy/empy-" | |
1322 | version ".tar.gz")) | |
1323 | (sha256 | |
1324 | (base32 | |
0f6d5115 | 1325 | "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq")))) |
44d10b1f RW |
1326 | (build-system python-build-system) |
1327 | (arguments | |
0f6d5115 | 1328 | `(#:tests? #f)) ; python2 only |
44d10b1f RW |
1329 | (home-page "http://www.alcyone.com/software/empy/") |
1330 | (synopsis "Templating system for Python") | |
1331 | (description | |
1332 | "EmPy is a system for embedding Python expressions and statements in | |
1333 | template text; it takes an EmPy source file, processes it, and produces | |
1334 | output. This is accomplished via expansions, which are special signals to the | |
1335 | EmPy system and are set off by a special prefix (by default the at sign, @@). | |
1336 | EmPy can expand arbitrary Python expressions and statements in this way, as | |
1337 | well as a variety of special forms. Textual data not explicitly delimited in | |
1338 | this way is sent unaffected to the output, allowing Python to be used in | |
1339 | effect as a markup language. Also supported are callbacks via hooks, | |
1340 | recording and playback via diversions, and dynamic, chainable filters. The | |
1341 | system is highly configurable via command line options and embedded | |
1342 | commands.") | |
1343 | (license license:lgpl2.1+))) | |
1344 | ||
1345 | (define-public python2-empy | |
0f064242 TGR |
1346 | (let ((base (package-with-python2 (strip-python2-variant python-empy)))) |
1347 | (package | |
1348 | (inherit base) | |
1349 | (arguments `(,@(package-arguments base) | |
1350 | #:tests? #t))))) | |
44d10b1f RW |
1351 | |
1352 | (define-public python2-element-tree | |
1353 | (package | |
1354 | (name "python2-element-tree") | |
1355 | (version "1.2.6") | |
1356 | (source (origin | |
1357 | (method url-fetch) | |
1358 | (uri (string-append | |
1359 | "http://effbot.org/media/downloads/elementtree-" | |
1360 | version "-20050316.tar.gz")) | |
1361 | (sha256 | |
1362 | (base32 | |
1363 | "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj")))) | |
1364 | (build-system python-build-system) | |
1365 | (arguments | |
1366 | `(#:python ,python-2 ; seems to be part of Python 3 | |
1367 | #:tests? #f)) ; no 'test' sub-command | |
1368 | (synopsis "Toolkit for XML processing in Python") | |
1369 | (description | |
1370 | "ElementTree is a Python library supporting lightweight XML processing.") | |
1371 | (home-page "http://effbot.org/zone/element-index.htm") | |
1372 | (license (license:x11-style | |
1373 | "http://docs.python.org/2/license.html" | |
1374 | "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\".")))) | |
1375 | ||
1376 | (define-public python2-pybugz | |
1377 | (package | |
1378 | (name "python2-pybugz") | |
1379 | (version "0.6.11") | |
1380 | (source (origin | |
1381 | (method url-fetch) | |
1382 | (uri (string-append | |
1383 | "http://bits.liquidx.net/projects/pybugz/pybugz-" | |
1384 | version ".tar.gz")) | |
1385 | (sha256 | |
1386 | (base32 | |
1387 | "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd")) | |
1388 | (patches (search-patches "pybugz-stty.patch" | |
1389 | "pybugz-encode-error.patch")))) | |
1390 | (build-system python-build-system) | |
1391 | (arguments | |
1392 | `(#:python ,python-2 ; SyntaxError with Python 3 | |
1393 | #:tests? #f)) ; no 'test' sub-command | |
1394 | (propagated-inputs | |
1395 | `(("element-tree" ,python2-element-tree))) | |
1396 | (synopsis "Python and command-line interface to Bugzilla") | |
1397 | (description | |
1398 | "PyBugz is a Python library and command-line tool to query the Bugzilla | |
1399 | bug tracking system. It is meant as an aid to speed up interaction with the | |
1400 | bug tracker.") | |
1401 | (home-page "http://www.liquidx.net/pybugz/") | |
1402 | (license license:gpl2))) | |
1403 | ||
1404 | (define-public python2-enum | |
1405 | (package | |
1406 | (name "python2-enum") | |
1407 | (version "0.4.6") | |
1408 | (source (origin | |
1409 | (method url-fetch) | |
1410 | (uri (pypi-uri "enum" version)) | |
1411 | (sha256 | |
1412 | (base32 | |
1413 | "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl")))) | |
1414 | (build-system python-build-system) | |
1415 | (arguments | |
1416 | `(#:python ,python-2)) | |
e85af137 | 1417 | (home-page "https://pypi.org/project/enum/") |
44d10b1f RW |
1418 | (synopsis "Robust enumerated type support in Python") |
1419 | (description | |
1420 | "This provides a module for robust enumerations in Python. It has | |
1421 | been superseded by the Python standard library and is provided only for | |
1422 | compatibility.") | |
1423 | ;; Choice of either license. | |
1424 | (license (list license:gpl3+ license:psfl)))) | |
1425 | ||
1426 | (define-public python-enum34 | |
1427 | (package | |
1428 | (name "python-enum34") | |
1429 | (version "1.1.6") | |
1430 | (source | |
1431 | (origin | |
1432 | (method url-fetch) | |
1433 | (uri (pypi-uri "enum34" version)) | |
1434 | (sha256 | |
1435 | (base32 | |
1436 | "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a")))) | |
1437 | (build-system python-build-system) | |
e85af137 | 1438 | (home-page "https://pypi.org/project/enum34/") |
44d10b1f RW |
1439 | (synopsis "Backported Python 3.4 Enum") |
1440 | (description | |
1441 | "Enum34 is the new Python stdlib enum module available in Python 3.4 | |
1442 | backported for previous versions of Python from 2.4 to 3.3.") | |
1443 | (license license:bsd-3))) | |
1444 | ||
1445 | (define-public python2-enum34 | |
1446 | (package-with-python2 python-enum34)) | |
1447 | ||
1448 | (define-public python-parse-type | |
1449 | (package | |
1450 | (name "python-parse-type") | |
1451 | (version "0.4.2") | |
1452 | (source | |
1453 | (origin | |
1454 | (method url-fetch) | |
1455 | (uri (pypi-uri "parse_type" version)) | |
1456 | (sha256 | |
1457 | (base32 | |
1458 | "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm")))) | |
1459 | (build-system python-build-system) | |
1460 | (propagated-inputs | |
1461 | `(("python-six" ,python-six) | |
1462 | ("python-parse" ,python-parse))) | |
1463 | (native-inputs | |
1464 | `(("python-pytest" ,python-pytest) | |
1465 | ("python-pytest-runner" ,python-pytest-runner))) | |
1466 | (home-page "https://github.com/jenisys/parse_type") | |
1467 | (synopsis "Extended parse module") | |
1468 | (description | |
1469 | "Parse_type extends the python parse module.") | |
1470 | (properties | |
1471 | `((python2-variant . ,(delay python2-parse-type)))) | |
1472 | (license license:bsd-3))) | |
1473 | ||
1474 | (define-public python2-parse-type | |
1475 | (let ((base (package-with-python2 | |
1476 | (strip-python2-variant python-parse-type)))) | |
1477 | (package (inherit base) | |
1478 | (propagated-inputs | |
1479 | `(("python2-enum34" ,python2-enum34) | |
1480 | ,@(package-propagated-inputs base)))))) | |
1481 | ||
1482 | (define-public python-parse | |
1483 | (package | |
1484 | (name "python-parse") | |
1485 | (version "1.8.4") | |
1486 | (source | |
1487 | (origin | |
1488 | (method url-fetch) | |
1489 | (uri (pypi-uri "parse" version)) | |
1490 | (sha256 | |
1491 | (base32 | |
1492 | "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3")))) | |
1493 | (build-system python-build-system) | |
1494 | (arguments | |
1495 | `(#:phases | |
1496 | (modify-phases %standard-phases | |
1497 | (replace 'check | |
1498 | (lambda _ (invoke "python" "test_parse.py")))))) | |
1499 | (home-page "https://github.com/r1chardj0n3s/parse") | |
1500 | (synopsis "Parse strings") | |
1501 | (description | |
1502 | "Parse strings using a specification based on the Python @code{format()} | |
1503 | syntax.") | |
1504 | (license license:x11))) | |
1505 | ||
1506 | (define-public python-polib | |
1507 | (package | |
1508 | (name "python-polib") | |
1509 | (version "1.0.8") | |
1510 | (source (origin | |
1511 | (method url-fetch) | |
1512 | (uri (pypi-uri "polib" version)) | |
1513 | (sha256 | |
1514 | (base32 | |
1515 | "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss")))) | |
1516 | (build-system python-build-system) | |
1517 | (home-page "https://bitbucket.org/izi/polib/wiki/Home") | |
1518 | (synopsis "Manipulate, create and modify gettext files") | |
1519 | (description "Polib can manipulate any gettext format (po, pot and mo) | |
1520 | files. It can be used to create po files from scratch or to modify | |
1521 | existing ones.") | |
1522 | (license license:expat))) | |
1523 | ||
1524 | (define-public python2-polib | |
1525 | (let ((base (package-with-python2 (strip-python2-variant python-polib)))) | |
1526 | (package | |
1527 | (inherit base) | |
1528 | (arguments `(,@(package-arguments base) | |
1529 | ;; Tests don't work with python2. | |
1530 | #:tests? #f))))) | |
1531 | ||
6830120e TLC |
1532 | (define-public python-poyo |
1533 | (package | |
1534 | (name "python-poyo") | |
1535 | (version "0.5.0") | |
1536 | (source | |
1537 | (origin | |
1538 | (method url-fetch) | |
1539 | (uri (pypi-uri "poyo" version)) | |
1540 | (sha256 | |
1541 | (base32 | |
1542 | "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2")))) | |
1543 | (build-system python-build-system) | |
1544 | (home-page "https://github.com/hackebrot/poyo") | |
1545 | (synopsis "Lightweight YAML Parser for Python") | |
1546 | (description | |
1547 | "This package provides a lightweight YAML Parser for Python. It supports | |
1548 | only a chosen subset of the YAML format that is required to parse cookiecutter | |
1549 | user configuration files. It does not have support for serializing into YAML | |
1550 | and is not compatible with JSON.") | |
1551 | (license license:expat))) | |
1552 | ||
44d10b1f RW |
1553 | (define-public scons |
1554 | (package | |
1555 | (name "scons") | |
05487ed8 | 1556 | (version "3.0.4") |
44d10b1f | 1557 | (source (origin |
ad34338d RW |
1558 | (method git-fetch) |
1559 | (uri (git-reference | |
1560 | (url "https://github.com/SCons/scons.git") | |
1561 | (commit version))) | |
1562 | (file-name (git-file-name name version)) | |
44d10b1f RW |
1563 | (sha256 |
1564 | (base32 | |
05487ed8 | 1565 | "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn")))) |
44d10b1f RW |
1566 | (build-system python-build-system) |
1567 | (arguments | |
1568 | `(#:use-setuptools? #f ; still relies on distutils | |
ad34338d RW |
1569 | #:tests? #f ; no 'python setup.py test' command |
1570 | #:phases | |
1571 | (modify-phases %standard-phases | |
1572 | (add-before 'build 'bootstrap | |
1573 | (lambda _ | |
1574 | (substitute* "src/engine/SCons/compat/__init__.py" | |
1575 | (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)") | |
1576 | "sys.modules[new] = __import__(old)")) | |
05487ed8 RW |
1577 | (substitute* "src/engine/SCons/Platform/__init__.py" |
1578 | (("mod = imp.load_module\\(full_name, file, path, desc\\)") | |
1579 | "mod = __import__(full_name)")) | |
ad34338d RW |
1580 | (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix") |
1581 | (chdir "build/scons") | |
1582 | #t))))) | |
3602de33 | 1583 | (home-page "https://scons.org/") |
44d10b1f RW |
1584 | (synopsis "Software construction tool written in Python") |
1585 | (description | |
1586 | "SCons is a software construction tool. Think of SCons as an improved, | |
1587 | cross-platform substitute for the classic Make utility with integrated | |
1588 | functionality similar to autoconf/automake and compiler caches such as ccache. | |
1589 | In short, SCons is an easier, more reliable and faster way to build | |
1590 | software.") | |
1591 | (license license:x11))) | |
1592 | ||
1593 | (define-public scons-python2 | |
1594 | (package | |
1595 | (inherit (package-with-python2 scons)) | |
1596 | (name "scons-python2"))) | |
1597 | ||
1598 | (define-public python-extras | |
1599 | (package | |
1600 | (name "python-extras") | |
1601 | (version "1.0.0") | |
1602 | (source | |
1603 | (origin | |
1604 | (method url-fetch) | |
1605 | (uri (pypi-uri "extras" version)) | |
1606 | (sha256 | |
1607 | (base32 | |
1608 | "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk")))) | |
1609 | (build-system python-build-system) | |
1610 | (arguments | |
1611 | ;; FIXME: Circular dependency on testtools. | |
1612 | '(#:tests? #f)) | |
1613 | (home-page "https://github.com/testing-cabal/extras") | |
1614 | (synopsis "Useful extensions to the Python standard library") | |
1615 | (description | |
1616 | "Extras is a set of extensions to the Python standard library.") | |
1617 | (license license:expat))) | |
1618 | ||
1619 | (define-public python2-extras | |
1620 | (package-with-python2 python-extras)) | |
1621 | ||
1622 | (define-public python-mimeparse | |
1623 | (package | |
1624 | (name "python-mimeparse") | |
1625 | (version "1.6.0") | |
1626 | (source | |
1627 | (origin | |
1628 | (method url-fetch) | |
89bf667c | 1629 | (uri (pypi-uri "python-mimeparse" version)) |
44d10b1f RW |
1630 | (sha256 |
1631 | (base32 | |
1632 | "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n")))) | |
1633 | (build-system python-build-system) | |
1634 | (arguments | |
1635 | '(#:phases | |
1636 | (modify-phases %standard-phases | |
1637 | (replace 'check | |
1638 | (lambda _ | |
1639 | (invoke "./mimeparse_test.py")))))) | |
1640 | (home-page | |
1641 | "https://github.com/dbtsai/python-mimeparse") | |
1642 | (synopsis "Python library for parsing MIME types") | |
1643 | (description | |
1644 | "Mimeparse provides basic functions for parsing MIME type names and | |
1645 | matching them against a list of media-ranges.") | |
1646 | (license license:expat))) | |
1647 | ||
1648 | (define-public python2-mimeparse | |
1649 | (package-with-python2 python-mimeparse)) | |
1650 | ||
1651 | (define-public python-miniboa | |
1652 | (package | |
1653 | (name "python-miniboa") | |
1654 | (version "1.0.7") | |
1655 | (source | |
1656 | (origin | |
1657 | (method url-fetch) | |
1658 | (uri (pypi-uri "miniboa" version)) | |
1659 | (sha256 | |
1660 | (base32 | |
1661 | "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3")))) | |
1662 | (build-system python-build-system) | |
1663 | (home-page "https://github.com/shmup/miniboa") | |
1664 | (synopsis "Simple, single-threaded Telnet server") | |
1665 | (description | |
1666 | "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet | |
1667 | server.") | |
1668 | (license license:asl2.0))) | |
1669 | ||
1670 | (define-public python2-miniboa | |
1671 | (package-with-python2 python-miniboa)) | |
1672 | ||
1673 | (define-public python-pafy | |
1674 | (package | |
1675 | (name "python-pafy") | |
1676 | (version "0.5.3.1") | |
1677 | (source | |
1678 | (origin | |
1679 | (method url-fetch) | |
1680 | (uri (pypi-uri "pafy" version)) | |
1681 | (sha256 | |
1682 | (base32 | |
1683 | "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim")))) | |
1684 | (build-system python-build-system) | |
1685 | (arguments | |
1686 | `(#:tests? #f)) ; Currently pafy can not find itself in the tests | |
1687 | (propagated-inputs | |
1688 | ;; Youtube-dl is a python package which is imported in the file | |
1689 | ;; "backend_youtube_dl.py", therefore it needs to be propagated. | |
1690 | `(("youtube-dl" ,youtube-dl))) | |
1691 | (home-page "https://np1.github.io/pafy/") | |
1692 | (synopsis "Retrieve YouTube content and metadata") | |
1693 | (description | |
1694 | "@code{pafy} is a python library to retrieve YouTube content and metadata.") | |
1695 | (license license:lgpl3+))) | |
1696 | ||
1697 | (define-public python2-funcsigs | |
1698 | (package | |
1699 | (name "python2-funcsigs") | |
1700 | (version "1.0.2") | |
1701 | (source (origin | |
1702 | (method url-fetch) | |
1703 | (uri (pypi-uri "funcsigs" version)) | |
1704 | (sha256 | |
1705 | (base32 | |
1706 | "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7")))) | |
1707 | (build-system python-build-system) | |
1708 | (arguments | |
1709 | `(#:python ,python-2)) | |
1710 | (native-inputs | |
1711 | `(("python2-unittest2" ,python2-unittest2))) | |
1712 | (home-page "http://funcsigs.readthedocs.org") | |
1713 | (synopsis "Python function signatures from PEP362") | |
1714 | (description | |
1715 | "Backport of @code{funcsigs} which was introduced in Python 3.3.") | |
1716 | (license license:asl2.0))) | |
1717 | ||
1718 | (define-public python2-funcsigs-bootstrap | |
1719 | (package | |
1720 | (inherit python2-funcsigs) | |
1721 | (name "python2-funcsigs-bootstrap") | |
1722 | (native-inputs `()) | |
1723 | (arguments | |
1724 | `(#:tests? #f | |
1725 | ,@(package-arguments python2-funcsigs))))) | |
1726 | ||
1727 | (define-public python-py | |
1728 | (package | |
1729 | (name "python-py") | |
08eba545 | 1730 | (version "1.8.0") |
44d10b1f RW |
1731 | (source |
1732 | (origin | |
1733 | (method url-fetch) | |
1734 | (uri (pypi-uri "py" version)) | |
1735 | (sha256 | |
1736 | (base32 | |
08eba545 | 1737 | "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw")))) |
44d10b1f RW |
1738 | (build-system python-build-system) |
1739 | (arguments | |
1740 | ;; FIXME: "ImportError: 'test' module incorrectly imported from | |
1741 | ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'. | |
1742 | ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'. | |
1743 | ;; Is this module globally installed?" | |
1744 | '(#:tests? #f)) | |
1745 | (native-inputs | |
1746 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
1747 | (home-page "https://github.com/pytest-dev/py") | |
1748 | (synopsis "Python library for parsing, I/O, instrospection, and logging") | |
1749 | (description | |
1750 | "Py is a Python library for file name parsing, .ini file parsing, I/O, | |
1751 | code introspection, and logging.") | |
1752 | (license license:expat))) | |
1753 | ||
1754 | (define-public python2-py | |
1755 | (package-with-python2 python-py)) | |
1756 | ||
1757 | ;; Recent versions of python-fixtures and python-testrepository need | |
1758 | ;; python-pbr for packaging, which itself needs these two packages for | |
1759 | ;; testing. | |
1760 | ;; To fix this circular dependency, we use a build of python-pbr, based on the | |
1761 | ;; same source, just without any test dependencies and with tests disabled. | |
1762 | ;; python-pbr-minmal is then used to package python-fixtures and | |
1763 | ;; python-testrepository. | |
1764 | ;; Strictly speaking we currently could remove the test-requirements from the | |
1765 | ;; normal python-pbr package (and save this package) since test are disabled | |
1766 | ;; there anyway. But this may change in future. | |
1767 | (define-public python-pbr-minimal | |
1768 | (package | |
1769 | (name "python-pbr-minimal") | |
1770 | (version "3.0.1") | |
1771 | (source | |
1772 | (origin | |
1773 | (method url-fetch) | |
1774 | (uri (pypi-uri "pbr" version)) | |
1775 | (sha256 | |
1776 | (base32 | |
1777 | "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p")))) | |
1778 | (build-system python-build-system) | |
1779 | (arguments | |
1780 | `(#:tests? #f)) | |
58d4e949 | 1781 | (home-page "https://docs.openstack.org/pbr/latest/") |
44d10b1f RW |
1782 | (synopsis "Minimal build of python-pbr used for bootstrapping") |
1783 | (description | |
1784 | "Used only for bootstrapping python2-pbr, you should not need this.") | |
1785 | (license license:asl2.0))) | |
1786 | ||
1787 | (define-public python2-pbr-minimal | |
1788 | (package-with-python2 python-pbr-minimal)) | |
1789 | ||
1790 | (define-public python-pbr | |
1791 | (package | |
1792 | (inherit python-pbr-minimal) | |
1793 | (name "python-pbr") | |
1794 | (arguments | |
1795 | `(#:tests? #f)) ;; Most tests seem to use the Internet. | |
1796 | (propagated-inputs | |
1797 | `(("git" ,git))) ;; pbr actually uses the "git" binary. | |
1798 | (native-inputs | |
1799 | `(("python-fixtures" ,python-fixtures-bootstrap) | |
1800 | ;; discover, coverage, hacking, subunit | |
1801 | ("python-mock" ,python-mock) | |
1802 | ("python-six" ,python-six) | |
1803 | ("python-sphinx" ,python-sphinx) | |
1804 | ("python-testrepository" ,python-testrepository-bootstrap) | |
1805 | ("python-testresources" ,python-testresources-bootstrap) | |
1806 | ("python-testscenarios" ,python-testscenarios-bootstrap) | |
1807 | ("python-testtools" ,python-testtools-bootstrap) | |
1808 | ("python-virtualenv" ,python-virtualenv))) | |
1809 | (synopsis "Enhance the default behavior of Python’s setuptools") | |
1810 | (description | |
1811 | "Python Build Reasonableness (PBR) is a library that injects some useful | |
1812 | and sensible default behaviors into your setuptools run. It will set | |
1813 | versions, process requirements files and generate AUTHORS and ChangeLog file | |
1814 | from git information. | |
1815 | "))) | |
1816 | ||
1817 | (define-public python2-pbr | |
1818 | (package-with-python2 python-pbr)) | |
1819 | ||
ea43f0d5 MB |
1820 | (define-public python-pyrsistent |
1821 | (package | |
1822 | (name "python-pyrsistent") | |
1823 | (version "0.14.11") | |
1824 | (home-page "https://github.com/tobgu/pyrsistent") | |
1825 | (source (origin | |
1826 | (method url-fetch) | |
1827 | (uri (pypi-uri "pyrsistent" version)) | |
1828 | (sha256 | |
1829 | (base32 | |
1830 | "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w")))) | |
1831 | (build-system python-build-system) | |
1832 | (native-inputs | |
1833 | `(("python-hypothesis" ,python-hypothesis) | |
1834 | ("python-pytest" ,python-pytest) | |
1835 | ("python-pytest-runner" ,python-pytest-runner))) | |
1836 | (propagated-inputs | |
1837 | `(("python-six" ,python-six))) | |
1838 | (synopsis "Persistent data structures for Python") | |
1839 | (description | |
1840 | "Pyrsistent is a number of persistent collections (by some referred to as | |
1841 | functional data structures). Persistent in the sense that they are immutable. | |
1842 | ||
1843 | All methods on a data structure that would normally mutate it instead return a | |
1844 | new copy of the structure containing the requested updates. The original | |
1845 | structure is left untouched.") | |
1846 | (license license:expat))) | |
1847 | ||
1848 | (define-public python2-pyrsistent | |
1849 | (package-with-python2 python-pyrsistent)) | |
1850 | ||
44d10b1f RW |
1851 | (define-public python-exif-read |
1852 | (package | |
1853 | (name "python-exif-read") | |
1854 | (version "2.1.2") | |
1855 | (source (origin | |
1856 | (method url-fetch) | |
1857 | (uri (pypi-uri "ExifRead" version)) | |
1858 | (sha256 | |
1859 | (base32 | |
1860 | "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr")))) | |
1861 | (build-system python-build-system) | |
1862 | (arguments `(#:tests? #f)) ; no tests | |
1863 | (home-page "https://github.com/ianare/exif-py") | |
1864 | (synopsis "Python library to extract EXIF data from image files") | |
1865 | (description | |
1866 | "ExifRead is a Python library to extract EXIF data from tiff and jpeg | |
1867 | files.") | |
1868 | (license license:bsd-3))) | |
1869 | ||
1870 | (define-public python2-exif-read | |
1871 | (package-with-python2 python-exif-read)) | |
1872 | ||
1873 | (define-public python-pyld | |
1874 | (package | |
1875 | (name "python-pyld") | |
6d4ed78d | 1876 | (version "1.0.5") |
44d10b1f RW |
1877 | (source (origin |
1878 | (method url-fetch) | |
1879 | (uri (pypi-uri "PyLD" version)) | |
1880 | (sha256 | |
1881 | (base32 | |
6d4ed78d | 1882 | "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff")))) |
44d10b1f RW |
1883 | (build-system python-build-system) |
1884 | (home-page "https://github.com/digitalbazaar/pyld") | |
1885 | (synopsis "Python implementation of the JSON-LD specification") | |
1886 | (description | |
1887 | "PyLD is an implementation of the JSON-LD specification.") | |
1888 | (license license:bsd-3))) | |
1889 | ||
1890 | (define-public python2-pyld | |
1891 | (package-with-python2 python-pyld)) | |
1892 | ||
1893 | (define-public python-click | |
1894 | (package | |
1895 | (name "python-click") | |
61984855 | 1896 | (version "7.0") |
44d10b1f RW |
1897 | (source |
1898 | (origin | |
1899 | (method url-fetch) | |
1900 | (uri (pypi-uri "click" version)) | |
1901 | (sha256 | |
1902 | (base32 | |
61984855 | 1903 | "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v")))) |
44d10b1f RW |
1904 | (build-system python-build-system) |
1905 | (arguments | |
8d7e7ca6 | 1906 | `(#:phases |
44d10b1f RW |
1907 | (modify-phases %standard-phases |
1908 | (add-after 'unpack 'fix-paths | |
1909 | (lambda* (#:key inputs #:allow-other-keys) | |
1910 | (let ((glibc (assoc-ref inputs ,(if (%current-target-system) | |
1911 | "cross-libc" "libc")))) | |
1912 | (substitute* "click/_unicodefun.py" | |
1913 | (("'locale'") | |
1914 | (string-append "'" glibc "/bin/locale'")))) | |
8d7e7ca6 EF |
1915 | #t)) |
1916 | (replace 'check | |
1917 | (lambda _ | |
1918 | (invoke "python" "-m" "pytest")))))) | |
44d10b1f RW |
1919 | (native-inputs |
1920 | `(("python-pytest" ,python-pytest))) | |
61984855 | 1921 | (home-page "https://palletsprojects.com/p/click/") |
44d10b1f RW |
1922 | (synopsis "Command line library for Python") |
1923 | (description | |
1924 | "Click is a Python package for creating command line interfaces in a | |
1925 | composable way with as little code as necessary. Its name stands for | |
1926 | \"Command Line Interface Creation Kit\". It's highly configurable but comes | |
1927 | with sensible defaults out of the box.") | |
1928 | (license license:bsd-3))) | |
1929 | ||
1930 | (define-public python2-click | |
1931 | (package-with-python2 python-click)) | |
1932 | ||
1933 | (define-public python-wheel | |
1934 | (package | |
1935 | (name "python-wheel") | |
8f137daf | 1936 | (version "0.33.6") |
44d10b1f RW |
1937 | (source |
1938 | (origin | |
1939 | (method url-fetch) | |
1940 | (uri (pypi-uri "wheel" version)) | |
1941 | (sha256 | |
1942 | (base32 | |
8f137daf | 1943 | "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h")))) |
44d10b1f | 1944 | (build-system python-build-system) |
8f137daf MB |
1945 | (arguments |
1946 | ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn | |
1947 | ;; fails to find the newly-built bdist_wheel library, even though it is | |
1948 | ;; available on PYTHONPATH. What search path is consulted by setup.py? | |
1949 | '(#:tests? #f)) | |
44d10b1f RW |
1950 | (home-page "https://bitbucket.org/pypa/wheel/") |
1951 | (synopsis "Format for built Python packages") | |
1952 | (description | |
1953 | "A wheel is a ZIP-format archive with a specially formatted filename and | |
1954 | the @code{.whl} extension. It is designed to contain all the files for a PEP | |
1955 | 376 compatible install in a way that is very close to the on-disk format. Many | |
1956 | packages will be properly installed with only the @code{Unpack} step and the | |
1957 | unpacked archive preserves enough information to @code{Spread} (copy data and | |
1958 | scripts to their final locations) at any later time. Wheel files can be | |
1959 | installed with a newer @code{pip} or with wheel's own command line utility.") | |
8f137daf | 1960 | (license license:expat))) |
44d10b1f RW |
1961 | |
1962 | (define-public python2-wheel | |
8f137daf | 1963 | (package-with-python2 python-wheel)) |
44d10b1f RW |
1964 | |
1965 | (define-public python-vcversioner | |
1966 | (package | |
1967 | (name "python-vcversioner") | |
1968 | (version "2.16.0.0") | |
1969 | (source | |
1970 | (origin | |
1971 | (method url-fetch) | |
1972 | (uri (pypi-uri "vcversioner" version)) | |
1973 | (sha256 | |
1974 | (base32 | |
1975 | "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns")))) | |
1976 | (build-system python-build-system) | |
1977 | (synopsis "Python library for version number discovery") | |
1978 | (description "Vcversioner is a Python library that inspects tagging | |
1979 | information in a variety of version control systems in order to discover | |
1980 | version numbers.") | |
1981 | (home-page "https://github.com/habnabit/vcversioner") | |
1982 | (license license:isc))) | |
1983 | ||
1984 | (define-public python2-vcversioner | |
1985 | (package-with-python2 python-vcversioner)) | |
1986 | ||
5591fc4f MC |
1987 | (define-public python-jdcal |
1988 | (package | |
1989 | (name "python-jdcal") | |
1990 | (version "1.4") | |
1991 | (source | |
1992 | (origin | |
1993 | (method url-fetch) | |
1994 | (uri (pypi-uri "jdcal" version)) | |
1995 | (sha256 | |
1996 | (base32 | |
1997 | "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa")))) | |
1998 | (build-system python-build-system) | |
1999 | (arguments | |
2000 | `(#:phases (modify-phases %standard-phases | |
2001 | (replace 'check | |
2002 | (lambda _ | |
2003 | (invoke "pytest")))))) | |
2004 | (native-inputs | |
2005 | `(("python-pytest" ,python-pytest))) | |
2006 | (home-page "https://github.com/phn/jdcal") | |
2007 | (synopsis "Functions to convert between Julian dates Gregorian dates") | |
2008 | (description "This Python library provides functions for converting | |
2009 | between Julian dates and Gregorian dates.") | |
2010 | (license license:bsd-2))) | |
2011 | ||
2012 | (define-public python2-jdcal | |
2013 | (package-with-python2 python-jdcal)) | |
2014 | ||
06d41d8d VC |
2015 | (define-public python-jsondiff |
2016 | (package | |
2017 | (name "python-jsondiff") | |
2018 | (version "1.2.0") | |
2019 | (source | |
2020 | (origin | |
2021 | (method url-fetch) | |
2022 | (uri (pypi-uri "jsondiff" version)) | |
2023 | (sha256 | |
2024 | (base32 | |
2025 | "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l")))) | |
2026 | (build-system python-build-system) | |
2027 | (native-inputs | |
2028 | `(("python-nose" ,python-nose) | |
2029 | ("python-nose-random" ,python-nose-random))) | |
2030 | (home-page | |
2031 | "https://github.com/fzumstein/jsondiff") | |
2032 | (synopsis "Compare JSON and JSON-like structures in Python") | |
2033 | (description "@code{jsondiff} is a Python library which lets you | |
2034 | compare, diff, and patch JSON and JSON-like structures in Python.") | |
2035 | (license license:expat))) | |
2036 | ||
44d10b1f RW |
2037 | (define-public python-jsonschema |
2038 | (package | |
2039 | (name "python-jsonschema") | |
1adde06e | 2040 | (version "3.0.1") |
44d10b1f RW |
2041 | (source (origin |
2042 | (method url-fetch) | |
786ccb87 | 2043 | (uri (pypi-uri "jsonschema" version)) |
44d10b1f RW |
2044 | (sha256 |
2045 | (base32 | |
1adde06e | 2046 | "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc")))) |
44d10b1f RW |
2047 | (build-system python-build-system) |
2048 | (arguments | |
2049 | '(#:phases | |
2050 | (modify-phases %standard-phases | |
1adde06e MB |
2051 | (replace 'check |
2052 | (lambda _ | |
2053 | (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) | |
2054 | (invoke "trial" "jsonschema")))))) | |
44d10b1f | 2055 | (native-inputs |
1adde06e MB |
2056 | `(("python-setuptools_scm" ,python-setuptools-scm) |
2057 | ("python-twisted" ,python-twisted))) | |
2058 | (propagated-inputs | |
2059 | `(("python-attrs" ,python-attrs) | |
2060 | ("python-pyrsistent" ,python-pyrsistent) | |
2061 | ("python-six" ,python-six))) | |
44d10b1f RW |
2062 | (home-page "https://github.com/Julian/jsonschema") |
2063 | (synopsis "Implementation of JSON Schema for Python") | |
2064 | (description | |
2065 | "Jsonschema is an implementation of JSON Schema for Python.") | |
2066 | (license license:expat) | |
2067 | (properties `((python2-variant . ,(delay python2-jsonschema)))))) | |
2068 | ||
2069 | (define-public python2-jsonschema | |
2070 | (let ((jsonschema (package-with-python2 | |
2071 | (strip-python2-variant python-jsonschema)))) | |
2072 | (package (inherit jsonschema) | |
44d10b1f | 2073 | (propagated-inputs |
1adde06e MB |
2074 | `(("python2-functools32" ,python2-functools32) |
2075 | ,@(package-propagated-inputs jsonschema)))))) | |
44d10b1f | 2076 | |
914bba28 TGR |
2077 | ;; This old version is still required by docker-compose as of 1.24.0. |
2078 | (define-public python-jsonschema-2.6 | |
2079 | (package | |
2080 | (name "python-jsonschema") | |
2081 | (version "2.6.0") | |
2082 | (source (origin | |
2083 | (method url-fetch) | |
2084 | (uri (pypi-uri "jsonschema" version)) | |
2085 | (sha256 | |
2086 | (base32 | |
2087 | "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg")))) | |
2088 | (build-system python-build-system) | |
2089 | (arguments | |
2090 | '(#:phases | |
2091 | (modify-phases %standard-phases | |
2092 | (replace 'check (lambda _ (invoke "nosetests")))))) | |
2093 | (native-inputs | |
2094 | `(("python-nose" ,python-nose) | |
2095 | ("python-vcversioner" ,python-vcversioner))) | |
2096 | (home-page "https://github.com/Julian/jsonschema") | |
2097 | (synopsis "Implementation of JSON Schema for Python") | |
2098 | (description | |
2099 | "Jsonschema is an implementation of JSON Schema for Python.") | |
2100 | (license license:expat) | |
2101 | (properties `((python2-variant . ,(delay python2-jsonschema)))))) | |
2102 | ||
44d10b1f RW |
2103 | (define-public python-schema |
2104 | (package | |
2105 | (name "python-schema") | |
2106 | (version "0.6.6") | |
2107 | (source | |
2108 | (origin | |
2109 | (method url-fetch) | |
2110 | (uri (pypi-uri "schema" version)) | |
2111 | (sha256 | |
2112 | (base32 | |
2113 | "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm")))) | |
2114 | (build-system python-build-system) | |
2115 | (native-inputs | |
2116 | `(("python-pytest" ,python-pytest))) | |
2117 | (home-page "https://github.com/keleshev/schema") | |
2118 | (synopsis "Simple data validation library") | |
2119 | (description | |
2120 | "@code{python-schema} is a library for validating Python data | |
2121 | structures, such as those obtained from config-files, forms, external | |
2122 | services or command-line parsing, converted from JSON/YAML (or | |
2123 | something else) to Python data-types.") | |
2124 | (license license:psfl))) | |
2125 | ||
2126 | (define-public python2-schema | |
2127 | (package-with-python2 python-schema)) | |
2128 | ||
2129 | (define-public python-schema-0.5 | |
2130 | (package (inherit python-schema) | |
2131 | (version "0.5.0") | |
2132 | (source | |
2133 | (origin | |
2134 | (method url-fetch) | |
2135 | (uri (pypi-uri "schema" version)) | |
2136 | (sha256 | |
2137 | (base32 | |
2138 | "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s")))))) | |
2139 | ||
2140 | (define-public python2-schema-0.5 | |
2141 | (package-with-python2 python-schema-0.5)) | |
2142 | ||
2143 | (define-public python-kitchen | |
2144 | (package | |
2145 | (name "python-kitchen") | |
2146 | (version "1.2.5") | |
2147 | (source | |
2148 | (origin | |
2149 | (method url-fetch) | |
2150 | (uri (pypi-uri "kitchen" version)) | |
2151 | (sha256 | |
2152 | (base32 | |
2153 | "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg")))) | |
2154 | (build-system python-build-system) | |
2155 | (propagated-inputs | |
2156 | `(("python-chardet" ,python-chardet))) | |
2157 | (home-page "https://github.com/fedora-infra/kitchen") | |
2158 | (synopsis "Python API for snippets") | |
2159 | (description "@code{kitchen} module provides a python API for all sorts of | |
2160 | little useful snippets of code that everybody ends up writing for their projects | |
2161 | but never seem big enough to build an independent release. Use kitchen and stop | |
2162 | cutting and pasting that code over and over.") | |
2163 | (license (list license:lgpl2.1+ | |
2164 | ;; subprocess.py, test_subprocess.py, | |
2165 | ;; kitchen/pycompat25/defaultdict.py: | |
2166 | license:psfl)))) | |
2167 | ||
2168 | (define-public python2-kitchen | |
2169 | (package-with-python2 python-kitchen)) | |
2170 | ||
2171 | (define-public python-unidecode | |
2172 | (package | |
2173 | (name "python-unidecode") | |
eb80a300 | 2174 | (version "1.1.1") |
44d10b1f RW |
2175 | (source (origin |
2176 | (method url-fetch) | |
2177 | (uri (pypi-uri "Unidecode" version)) | |
2178 | (sha256 | |
2179 | (base32 | |
eb80a300 | 2180 | "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib")))) |
44d10b1f | 2181 | (build-system python-build-system) |
e85af137 | 2182 | (home-page "https://pypi.org/project/Unidecode/") |
44d10b1f RW |
2183 | (synopsis "ASCII transliterations of Unicode text") |
2184 | (description | |
2185 | "Unidecode provides ASCII transliterations of Unicode text. Unidecode is | |
2186 | useful when integrating with legacy code that doesn't support Unicode, or for | |
2187 | ease of entry of non-Roman names on a US keyboard, or when constructing ASCII | |
2188 | machine identifiers from human-readable Unicode strings that should still be | |
2189 | somewhat intelligible.") | |
2190 | (license license:gpl2+))) | |
2191 | ||
2192 | (define-public python2-unidecode | |
2193 | (package-with-python2 python-unidecode)) | |
2194 | ||
2195 | (define-public python-pyjwt | |
2196 | (package | |
2197 | (name "python-pyjwt") | |
be6f2f56 | 2198 | (version "1.7.1") |
44d10b1f RW |
2199 | (source |
2200 | (origin | |
2201 | (method url-fetch) | |
2202 | (uri (pypi-uri "PyJWT" version)) | |
2203 | (sha256 | |
2204 | (base32 | |
be6f2f56 | 2205 | "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd")) |
44d10b1f RW |
2206 | (modules '((guix build utils))) |
2207 | (snippet | |
2208 | '(begin | |
2209 | (for-each delete-file-recursively | |
2210 | (find-files "." "\\.pyc$")) | |
2211 | #t)))) | |
2212 | (build-system python-build-system) | |
2213 | (native-inputs | |
2214 | `(("python-pytest" ,python-pytest) | |
2215 | ("python-pytest-cov" ,python-pytest-cov) | |
2216 | ("python-pytest-runner" ,python-pytest-runner))) | |
2217 | (home-page "https://github.com/progrium/pyjwt") | |
2218 | (synopsis "JSON Web Token implementation in Python") | |
2219 | (description | |
2220 | "PyJWT is a JSON Web Token implementation written in Python.") | |
2221 | (license license:expat))) | |
2222 | ||
2223 | (define-public python2-pyjwt | |
2224 | (package-with-python2 python-pyjwt)) | |
2225 | ||
2226 | (define-public python-pykka | |
2227 | (package | |
2228 | (name "python-pykka") | |
2229 | (version "1.2.1") | |
2230 | (source | |
2231 | (origin | |
2232 | (method url-fetch) | |
2233 | (uri (pypi-uri "Pykka" version)) | |
2234 | (sha256 | |
2235 | (base32 | |
2236 | "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8")))) | |
2237 | (build-system python-build-system) | |
2238 | (native-inputs | |
2239 | `(("python-mock" ,python-mock) | |
2240 | ("python-nose" ,python-nose) | |
2241 | ("python-gevent" ,python-gevent) | |
2242 | ("python-eventlet" ,python-eventlet))) | |
2243 | (home-page "https://www.pykka.org/") | |
2244 | (synopsis "Pykka is a Python implementation of the actor model") | |
2245 | (description | |
2246 | "Pykka is a Python implementation of the actor model. | |
2247 | The actor model introduces some simple rules to control the sharing | |
2248 | of state and cooperation between execution units, which makes it | |
2249 | easier to build concurrent applications.") | |
2250 | (license license:asl2.0))) | |
2251 | ||
2252 | (define-public python2-pykka | |
2253 | (package-with-python2 python-pykka)) | |
2254 | ||
8d22f7e3 VC |
2255 | (define-public python-pymsgbox |
2256 | (package | |
2257 | (name "python-pymsgbox") | |
2258 | (version "1.0.6") | |
2259 | (source | |
2260 | (origin | |
2261 | (method git-fetch) | |
2262 | (uri (git-reference | |
2263 | ;; LICENSE.txt is not present on pypi | |
2264 | (url "https://github.com/asweigart/PyMsgBox") | |
2265 | (commit "55926b55f46caa969c5ddb87990ebea2737bd66f"))) | |
2266 | (file-name (git-file-name name version)) | |
2267 | (sha256 | |
2268 | (base32 | |
2269 | "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg")))) | |
2270 | (arguments | |
2271 | ;; Circular dependency to run tests: | |
2272 | ;; Tests need pyautogui, which depends on pymsgbox. | |
2273 | '(#:tests? #f)) | |
2274 | (build-system python-build-system) | |
2275 | (home-page "https://github.com/asweigart/PyMsgBox") | |
2276 | (synopsis "Python module for JavaScript-like message boxes") | |
2277 | (description | |
2278 | "PyMsgBox is a simple, cross-platform, pure Python module for | |
2279 | JavaScript-like message boxes. Types of dialog boxes include: | |
2280 | @enumerate | |
2281 | @item alert | |
2282 | @item confirm | |
2283 | @item prompt | |
2284 | @item password | |
2285 | @end enumerate | |
2286 | ") | |
2287 | (license license:bsd-3))) | |
2288 | ||
44d10b1f RW |
2289 | (define-public python-pympler |
2290 | (package | |
2291 | (name "python-pympler") | |
2292 | (home-page "https://pythonhosted.org/Pympler/") | |
6469af6f | 2293 | (version "0.8") |
44d10b1f RW |
2294 | (source (origin |
2295 | (method url-fetch) | |
2296 | (uri (pypi-uri "Pympler" version)) | |
2297 | (sha256 | |
2298 | (base32 | |
6469af6f | 2299 | "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p")))) |
44d10b1f RW |
2300 | (build-system python-build-system) |
2301 | (arguments | |
2302 | `(#:phases (modify-phases %standard-phases | |
2303 | (delete 'check) | |
2304 | (add-after 'install 'check | |
2305 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2306 | (add-installed-pythonpath inputs outputs) | |
2307 | (invoke "python" "setup.py" "test")))))) | |
2308 | (synopsis "Measure, monitor and analyze memory behavior") | |
2309 | (description | |
2310 | "Pympler is a development tool to measure, monitor and analyze | |
2311 | the memory behavior of Python objects in a running Python application. | |
2312 | ||
2313 | By pympling a Python application, detailed insight in the size and the | |
2314 | lifetime of Python objects can be obtained. Undesirable or unexpected | |
2315 | runtime behavior like memory bloat and other @samp{pymples} can easily | |
2316 | be identified. | |
2317 | ||
2318 | A web profiling frontend exposes process statistics, garbage | |
2319 | visualisation and class tracker statistics.") | |
2320 | (license license:asl2.0))) | |
2321 | ||
2322 | (define-public python2-pympler | |
2323 | (package-with-python2 python-pympler)) | |
2324 | ||
2325 | (define-public python-itsdangerous | |
2326 | (package | |
2327 | (name "python-itsdangerous") | |
acfcf2ed | 2328 | (version "1.1.0") |
44d10b1f RW |
2329 | (source |
2330 | (origin | |
2331 | (method url-fetch) | |
acfcf2ed | 2332 | (uri (pypi-uri "itsdangerous" version)) |
44d10b1f RW |
2333 | (sha256 |
2334 | (base32 | |
acfcf2ed | 2335 | "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj")))) |
44d10b1f | 2336 | (build-system python-build-system) |
acfcf2ed | 2337 | (home-page "https://palletsprojects.com/p/itsdangerous/") |
44d10b1f RW |
2338 | (synopsis "Python library for passing data to/from untrusted environments") |
2339 | (description | |
2340 | "Itsdangerous provides various helpers to pass trusted data to untrusted | |
2341 | environments and back.") | |
2342 | (license license:bsd-3))) | |
2343 | ||
2344 | (define-public python2-itsdangerous | |
2345 | (package-with-python2 python-itsdangerous)) | |
2346 | ||
2347 | (define-public python-pyyaml | |
2348 | (package | |
2349 | (name "python-pyyaml") | |
357af7f2 | 2350 | (version "5.3") |
44d10b1f RW |
2351 | (source |
2352 | (origin | |
2353 | (method url-fetch) | |
2354 | (uri (pypi-uri "PyYAML" version)) | |
2355 | (sha256 | |
2356 | (base32 | |
357af7f2 | 2357 | "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79")))) |
44d10b1f RW |
2358 | (build-system python-build-system) |
2359 | (inputs | |
2360 | `(("libyaml" ,libyaml))) | |
7509f34f | 2361 | (home-page "https://pyyaml.org") |
44d10b1f RW |
2362 | (synopsis "YAML parser and emitter for Python") |
2363 | (description | |
2364 | "PyYAML is a YAML parser and emitter for Python. PyYAML features a | |
2365 | complete YAML 1.1 parser, Unicode support, pickle support, capable extension | |
2366 | API, and sensible error messages. PyYAML supports standard YAML tags and | |
2367 | provides Python-specific tags that allow to represent an arbitrary Python | |
2368 | object.") | |
2369 | (license license:expat))) | |
2370 | ||
2371 | (define-public python2-pyyaml | |
2372 | (package-with-python2 python-pyyaml)) | |
2373 | ||
2374 | (define-public python-vine | |
2375 | (package | |
2376 | (name "python-vine") | |
2377 | (version "1.1.4") | |
2378 | (source | |
2379 | (origin | |
2380 | (method url-fetch) | |
2381 | (uri (pypi-uri "vine" version)) | |
2382 | (sha256 | |
2383 | (base32 | |
2384 | "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj")))) | |
2385 | (build-system python-build-system) | |
2386 | (native-inputs | |
2387 | `(("python-pytest" ,python-pytest) | |
2388 | ("python-case" ,python-case))) | |
2389 | (home-page "https://github.com/celery/vine") | |
2390 | (synopsis "Promises for Python") | |
2391 | (description | |
2392 | "@code{vine} provides a special implementation of promises in that it can | |
2393 | be used both for \"promise of a value\" and lazy evaluation. The biggest | |
2394 | upside for this is that everything in a promise can also be a promise, | |
2395 | e.g. filters, callbacks and errbacks can all be promises.") | |
2396 | (license license:bsd-3))) | |
2397 | ||
2398 | (define-public python-virtualenv | |
2399 | (package | |
2400 | (name "python-virtualenv") | |
94d57ba3 | 2401 | (version "20.0.8") |
44d10b1f RW |
2402 | (source |
2403 | (origin | |
2404 | (method url-fetch) | |
2405 | (uri (pypi-uri "virtualenv" version)) | |
2406 | (sha256 | |
2407 | (base32 | |
94d57ba3 | 2408 | "096r7g5cv85vxymg9iqbn5z749613snlvd6p3rf1nxnrd386j0qz")))) |
44d10b1f | 2409 | (build-system python-build-system) |
44d10b1f RW |
2410 | (native-inputs |
2411 | `(("python-mock" ,python-mock) | |
94d57ba3 JK |
2412 | ("python-pytest" ,python-pytest) |
2413 | ;; NOTE: guix lint remarks that "python-setuptools should probably not | |
2414 | ;; be an input at all". However, removing the input makes the build error: | |
2415 | ;; File "setup.py", line 4, in <module> | |
2416 | ;; raise RuntimeError("setuptools >= 41 required to build") | |
2417 | ("python-setuptools" ,python-setuptools) | |
2418 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
2419 | (inputs | |
2420 | `(("python-appdirs" ,python-appdirs) | |
2421 | ("python-distlib" ,python-distlib) | |
2422 | ("python-filelock" ,python-filelock) | |
2423 | ("python-six" ,python-six) | |
2424 | ("python-importlib-metadata" ,python-importlib-metadata))) | |
44d10b1f RW |
2425 | (home-page "https://virtualenv.pypa.io/") |
2426 | (synopsis "Virtual Python environment builder") | |
2427 | (description | |
2428 | "Virtualenv is a tool to create isolated Python environments.") | |
2429 | (license license:expat))) | |
2430 | ||
2431 | (define-public python2-virtualenv | |
2432 | (package-with-python2 python-virtualenv)) | |
2433 | ||
2434 | (define-public python-markupsafe | |
2435 | (package | |
2436 | (name "python-markupsafe") | |
753eb411 | 2437 | (version "1.1.1") |
44d10b1f RW |
2438 | (source |
2439 | (origin | |
2440 | (method url-fetch) | |
5182927c | 2441 | (uri (pypi-uri "MarkupSafe" version)) |
44d10b1f RW |
2442 | (sha256 |
2443 | (base32 | |
753eb411 | 2444 | "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9")))) |
44d10b1f | 2445 | (build-system python-build-system) |
753eb411 MB |
2446 | (arguments |
2447 | `(#:modules ((ice-9 ftw) | |
2448 | (srfi srfi-1) | |
2449 | (srfi srfi-26) | |
2450 | (guix build utils) | |
2451 | (guix build python-build-system)) | |
2452 | #:phases (modify-phases %standard-phases | |
2453 | (replace 'check | |
2454 | (lambda _ | |
2455 | (let ((cwd (getcwd)) | |
2456 | (libdir (find (cut string-prefix? "lib." <>) | |
2457 | (scandir "build")))) | |
2458 | (setenv "PYTHONPATH" | |
2459 | (string-append cwd "/build/" libdir ":" | |
2460 | (getenv "PYTHONPATH"))) | |
2461 | (invoke "pytest" "-vv"))))))) | |
2462 | (native-inputs | |
2463 | `(("python-pytest" ,python-pytest))) | |
44d10b1f RW |
2464 | (home-page "https://github.com/mitsuhiko/markupsafe") |
2465 | (synopsis "XML/HTML/XHTML markup safe string implementation for Python") | |
2466 | (description | |
2467 | "Markupsafe provides an XML/HTML/XHTML markup safe string implementation | |
2468 | for Python.") | |
2469 | (license license:bsd-3))) | |
2470 | ||
2471 | (define-public python2-markupsafe | |
2472 | (package-with-python2 python-markupsafe)) | |
2473 | ||
2474 | (define-public python-jinja2 | |
2475 | (package | |
2476 | (name "python-jinja2") | |
4a5c7934 | 2477 | (version "2.10.1") |
44d10b1f RW |
2478 | (source |
2479 | (origin | |
2480 | (method url-fetch) | |
2481 | (uri (pypi-uri "Jinja2" version)) | |
2482 | (sha256 | |
2483 | (base32 | |
4a5c7934 | 2484 | "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06")))) |
44d10b1f RW |
2485 | (build-system python-build-system) |
2486 | (propagated-inputs | |
2487 | `(("python-markupsafe" ,python-markupsafe))) | |
2488 | (home-page "http://jinja.pocoo.org/") | |
2489 | (synopsis "Python template engine") | |
2490 | (description | |
2491 | "Jinja2 is a small but fast and easy to use stand-alone template engine | |
2492 | written in pure Python.") | |
2493 | (license license:bsd-3))) | |
2494 | ||
2495 | (define-public python2-jinja2 | |
2496 | (package-with-python2 python-jinja2)) | |
2497 | ||
ba42a6bf TLC |
2498 | (define-public python-jinja2-time |
2499 | (package | |
2500 | (name "python-jinja2-time") | |
2501 | (version "0.2.0") | |
2502 | (source | |
2503 | (origin | |
2504 | (method url-fetch) | |
2505 | (uri (pypi-uri "jinja2-time" version)) | |
2506 | (sha256 | |
2507 | (base32 | |
2508 | "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni")))) | |
2509 | (build-system python-build-system) | |
2510 | (propagated-inputs | |
2511 | `(("python-arrow" ,python-arrow) | |
2512 | ("python-jinja2" ,python-jinja2))) | |
2513 | (home-page | |
2514 | "https://github.com/hackebrot/jinja2-time") | |
2515 | (synopsis "Jinja2 Extension for Dates and Times") | |
2516 | (description | |
2517 | "This package provides an extension for the template engine Jinja2. It | |
2518 | adds a 'now' tag providing a convenient access to the arrow.now() API from | |
2519 | templates. A format string can be provided to control the output.") | |
2520 | (license license:expat))) | |
2521 | ||
44d10b1f RW |
2522 | (define-public python-pystache |
2523 | (package | |
2524 | (name "python-pystache") | |
2525 | (version "0.5.4") | |
2526 | (source (origin | |
2527 | (method url-fetch) | |
2528 | (uri (pypi-uri "pystache" version)) | |
2529 | (sha256 | |
2530 | (base32 | |
2531 | "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp")))) | |
2532 | (build-system python-build-system) | |
2533 | (arguments | |
2534 | '(#:tests? #f)) ; FIXME: Python 3 tests are failing. | |
2535 | (home-page "http://defunkt.io/pystache/") | |
2536 | (synopsis "Python logic-less template engine") | |
2537 | (description | |
2538 | "Pystache is a Python implementation of the framework agnostic, | |
2539 | logic-free templating system Mustache.") | |
2540 | (license license:expat) | |
2541 | (properties `((python2-variant . ,(delay python2-pystache)))))) | |
2542 | ||
2543 | (define-public python2-pystache | |
2544 | (package (inherit (package-with-python2 | |
2545 | (strip-python2-variant python-pystache))) | |
2546 | (arguments | |
2547 | `(#:python ,python-2 | |
2548 | #:phases | |
2549 | (modify-phases %standard-phases | |
2550 | (replace 'check | |
2551 | (lambda _ | |
dfafc29b | 2552 | (invoke "python" "test_pystache.py")))))))) |
44d10b1f RW |
2553 | |
2554 | (define-public python-joblib | |
2555 | (package | |
2556 | (name "python-joblib") | |
2557 | (version "0.13.0") | |
2558 | (source (origin | |
2559 | (method url-fetch) | |
2560 | (uri (pypi-uri "joblib" version)) | |
2561 | (sha256 | |
2562 | (base32 | |
2563 | "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5")))) | |
2564 | (build-system python-build-system) | |
2565 | (arguments | |
2566 | `(#:phases | |
2567 | (modify-phases %standard-phases | |
2568 | (replace 'check | |
2569 | (lambda _ (invoke "pytest" "-v" "joblib")))))) | |
2570 | (native-inputs | |
2571 | `(("python-pytest" ,python-pytest))) | |
2572 | (home-page "https://joblib.readthedocs.io/") | |
2573 | (synopsis "Using Python functions as pipeline jobs") | |
2574 | (description | |
2575 | "Joblib is a set of tools to provide lightweight pipelining in Python. | |
2576 | In particular, joblib offers: transparent disk-caching of the output values | |
2577 | and lazy re-evaluation (memoize pattern), easy simple parallel computing | |
2578 | logging and tracing of the execution.") | |
2579 | (license license:bsd-3))) | |
2580 | ||
2581 | (define-public python2-joblib | |
2582 | (package-with-python2 python-joblib)) | |
2583 | ||
a3363341 VC |
2584 | (define-public python-daemon |
2585 | (package | |
2586 | (name "python-daemon") | |
2587 | (version "2.2.3") | |
2588 | (source | |
2589 | (origin | |
2590 | (method url-fetch) | |
2591 | (uri (pypi-uri "python-daemon" version)) | |
2592 | (sha256 | |
2593 | (base32 | |
2594 | "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg")))) | |
2595 | (build-system python-build-system) | |
2596 | (arguments | |
2597 | `(#:phases | |
2598 | (modify-phases %standard-phases | |
2599 | (add-before 'check 'disable-tests | |
2600 | (lambda _ | |
2601 | ;; FIXME: Determine why test fails | |
2602 | (substitute* "test/test_daemon.py" | |
2603 | (("test_detaches_process_context") | |
2604 | "skip_test_detaches_process_context")) | |
2605 | #t))))) | |
2606 | (propagated-inputs | |
2607 | `(("python-lockfile" ,python-lockfile))) | |
2608 | (native-inputs | |
2609 | `(("python-unittest2" ,python-unittest2) | |
2610 | ("python-testtools" ,python-testtools) | |
2611 | ("python-testscenarios" ,python-testscenarios) | |
2612 | ("python-mock" ,python-mock) | |
2613 | ("python-docutils" ,python-docutils))) | |
2614 | (home-page "https://pagure.io/python-daemon/") | |
2615 | (synopsis "Python library for making a Unix daemon process") | |
2616 | (description "Python-daemon is a library that assists a Python program to | |
2617 | turn itself into a well-behaved Unix daemon process, as specified in PEP 3143. | |
2618 | ||
2619 | This library provides a @code{DaemonContext} class that manages the following | |
2620 | important tasks for becoming a daemon process: | |
2621 | @enumerate | |
2622 | @item Detach the process into its own process group. | |
2623 | @item Set process environment appropriate for running inside a chroot. | |
2624 | @item Renounce suid and sgid privileges. | |
2625 | @item Close all open file descriptors. | |
2626 | @item Change the working directory, uid, gid, and umask. | |
2627 | @item Set appropriate signal handlers. | |
2628 | @item Open new file descriptors for stdin, stdout, and stderr. | |
2629 | @item Manage a specified PID lock file. | |
2630 | @item Register cleanup functions for at-exit processing. | |
2631 | @end enumerate") | |
2632 | ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed. | |
2633 | (license (list license:asl2.0 license:gpl3+)))) | |
2634 | ||
544ea9c2 MB |
2635 | (define-public python-anytree |
2636 | (package | |
2637 | (name "python-anytree") | |
2638 | (version "2.8.0") | |
2639 | (source (origin | |
2640 | (method url-fetch) | |
2641 | (uri (pypi-uri "anytree" version)) | |
2642 | (sha256 | |
2643 | (base32 | |
2644 | "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz")))) | |
2645 | (build-system python-build-system) | |
2646 | (propagated-inputs | |
2647 | `(("python-six" ,python-six))) | |
2648 | (native-inputs | |
2649 | `(;; For tests. | |
2650 | ("graphviz" ,graphviz) ;for 'dot' | |
2651 | ("python-nose" ,python-nose))) | |
2652 | (home-page "https://github.com/c0fec0de/anytree") | |
2653 | (synopsis "Lightweight tree data library") | |
2654 | (description | |
2655 | "@code{anytree} is a simple, lightweight, and extensible tree data | |
2656 | structure for Python.") | |
2657 | (license license:asl2.0))) | |
2658 | ||
44d10b1f RW |
2659 | (define-public python-docutils |
2660 | (package | |
2661 | (name "python-docutils") | |
2662 | (version "0.14") | |
2663 | (source | |
2664 | (origin | |
2665 | (method url-fetch) | |
2666 | (uri (pypi-uri "docutils" version)) | |
2667 | (sha256 | |
2668 | (base32 | |
2669 | "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji")))) | |
2670 | (build-system python-build-system) | |
2671 | (arguments | |
2672 | '(#:tests? #f)) ; no setup.py test command | |
2673 | (home-page "http://docutils.sourceforge.net/") | |
2674 | (synopsis "Python Documentation Utilities") | |
2675 | (description | |
2676 | "Docutils is a modular system for processing documentation into useful | |
2677 | formats, such as HTML, XML, and LaTeX. For input Docutils supports | |
2678 | reStructuredText.") | |
2679 | ;; Most of the source code is public domain, but some source files are | |
2680 | ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses. | |
2681 | (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+)))) | |
2682 | ||
2683 | (define-public python2-docutils | |
2684 | (package-with-python2 python-docutils)) | |
2685 | ||
2686 | (define-public python-pygments | |
2687 | (package | |
2688 | (name "python-pygments") | |
69002b21 | 2689 | (version "2.5.2") |
44d10b1f RW |
2690 | (source |
2691 | (origin | |
2692 | (method url-fetch) | |
2693 | (uri (pypi-uri "Pygments" version)) | |
2694 | (sha256 | |
2695 | (base32 | |
69002b21 | 2696 | "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))) |
44d10b1f RW |
2697 | (build-system python-build-system) |
2698 | (arguments | |
2699 | ;; FIXME: Tests require sphinx, which depends on this. | |
2700 | '(#:tests? #f)) | |
69002b21 | 2701 | (home-page "https://pygments.org/") |
44d10b1f RW |
2702 | (synopsis "Syntax highlighting") |
2703 | (description | |
2704 | "Pygments is a syntax highlighting package written in Python.") | |
2705 | (license license:bsd-2))) | |
2706 | ||
2707 | (define-public python2-pygments | |
2708 | (package-with-python2 python-pygments)) | |
2709 | ||
0f0a5ef9 MC |
2710 | (define-public python-bumpversion |
2711 | (package | |
2712 | (name "python-bumpversion") | |
2713 | (version "0.5.3") | |
2714 | (source | |
2715 | (origin | |
2716 | (method url-fetch) | |
2717 | (uri (pypi-uri "bumpversion" version)) | |
2718 | (sha256 | |
2719 | (base32 | |
2720 | "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37")))) | |
2721 | (build-system python-build-system) | |
2722 | (home-page "https://github.com/peritus/bumpversion") | |
2723 | (synopsis "Tool to bump software version") | |
2724 | (description "This tool provides a command-line interface (CLI) to bump a | |
2725 | software version simply.") | |
2726 | (license license:expat))) | |
2727 | ||
b24fd2c2 MC |
2728 | (define-public python-deprecated |
2729 | (package | |
2730 | (name "python-deprecated") | |
2731 | (version "1.2.5") | |
2732 | (source | |
2733 | (origin | |
2734 | (method git-fetch) | |
2735 | (uri (git-reference | |
2736 | (url "https://github.com/tantale/deprecated.git") | |
2737 | (commit (string-append "v" version)))) | |
2738 | (file-name (git-file-name name version)) | |
2739 | (sha256 | |
2740 | (base32 | |
2741 | "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz")))) | |
2742 | (build-system python-build-system) | |
2743 | (arguments | |
2744 | `(#:phases (modify-phases %standard-phases | |
2745 | (replace 'check | |
2746 | (lambda _ | |
2747 | (invoke "pytest")))))) | |
2748 | (propagated-inputs | |
2749 | `(("python-wrapt" ,python-wrapt))) | |
2750 | (native-inputs | |
2751 | `(("python-bumpversion" ,python-bumpversion) | |
2752 | ("python-pytest" ,python-pytest) | |
2753 | ("python-pytest-cov" ,python-pytest-cov) | |
2754 | ("python-sphinx" ,python-sphinx) | |
2755 | ("python-tox" ,python-tox))) | |
2756 | (home-page "https://github.com/tantale/deprecated") | |
2757 | (synopsis "Python decorator to deprecate classes, functions or methods") | |
2758 | (description "The @code{deprecated} decorator provides a convenient way to deprecate | |
2759 | to deprecate classes, functions or methods.") | |
2760 | (license license:expat))) | |
2761 | ||
d5a998fa MC |
2762 | (define-public python-pygithub |
2763 | (package | |
2764 | (name "python-pygithub") | |
749e38d7 | 2765 | (version "1.43.8") |
d5a998fa MC |
2766 | (source |
2767 | ;; We fetch from the Git repo because there are no tests in the PyPI | |
2768 | ;; archive. | |
2769 | (origin | |
2770 | (method git-fetch) | |
2771 | (uri (git-reference | |
2772 | (url "https://github.com/PyGithub/PyGithub.git") | |
2773 | (commit (string-append "v" version)))) | |
2774 | (file-name (git-file-name name version)) | |
2775 | (sha256 | |
749e38d7 | 2776 | (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw")))) |
d5a998fa MC |
2777 | (build-system python-build-system) |
2778 | (arguments | |
2779 | `(#:phases (modify-phases %standard-phases | |
2780 | ;; Some tests rely on the network. | |
2781 | (add-after 'unpack 'disable-failing-tests | |
2782 | (lambda _ | |
2783 | (substitute* "tests/Issue142.py" | |
2784 | (("testDecodeJson") "disabled_testDecodeJson")) | |
2785 | #t)) | |
2786 | (add-before 'check 'prepare-for-tests | |
2787 | (lambda _ | |
2788 | (for-each (lambda (f) | |
2789 | (chmod f #o666)) | |
2790 | (find-files "./tests")) | |
2791 | (system* "python" "-m" "lib2to3" "-w" "-n" "tests") | |
2792 | (setenv "PYTHONPATH" | |
2793 | (string-append "./tests:" (getenv "PYTHONPATH"))) | |
2794 | #t))))) | |
2795 | (propagated-inputs | |
2796 | `(("python-deprecated" ,python-deprecated) | |
2797 | ("python-pyjwt" ,python-pyjwt) | |
2798 | ("python-requests" ,python-requests))) | |
2799 | (native-inputs `(("python-httpretty" ,python-httpretty))) | |
2800 | (home-page "https://pygithub.readthedocs.io/en/latest/") | |
2801 | (synopsis "Python library for the GitHub API") | |
2802 | (description "This library allows managing GitHub resources such as | |
2803 | repositories, user profiles, and organizations in your Python applications, | |
2804 | using version 3 of the GitHub application programming interface (API).") | |
2805 | (license license:lgpl3+))) | |
2806 | ||
c0c0bb38 MC |
2807 | (define-public python-rellu |
2808 | (package | |
2809 | (name "python-rellu") | |
2810 | (version "0.7") | |
2811 | (source | |
2812 | (origin | |
2813 | (method url-fetch) | |
2814 | (uri (pypi-uri "rellu" version)) | |
2815 | (sha256 | |
2816 | (base32 | |
2817 | "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x")))) | |
2818 | (build-system python-build-system) | |
2819 | (propagated-inputs | |
2820 | `(("python-invoke" ,python-invoke) | |
2821 | ("python-pygithub" ,python-pygithub))) | |
2822 | (home-page "https://github.com/robotframework/rellu") | |
2823 | (synopsis "Utilities to create PyPI releases") | |
2824 | (description "This collection of utilities contains tooling and templates | |
2825 | to assist in creating releases on GitHub and publishing them on PyPI. It is | |
2826 | designed to be used by Robot Framework and tools and libraries in its | |
2827 | ecosystem, but can naturally be used also by other projects.") | |
2828 | (license license:asl2.0))) | |
2829 | ||
b9790285 MC |
2830 | (define-public python-robotframework |
2831 | (package | |
2832 | (name "python-robotframework") | |
1710b8f8 | 2833 | (version "3.1.2") |
b9790285 MC |
2834 | ;; There are no tests in the PyPI archive. |
2835 | (source | |
2836 | (origin | |
2837 | (method git-fetch) | |
2838 | (uri (git-reference | |
2839 | (url "https://github.com/robotframework/robotframework.git") | |
2840 | (commit (string-append "v" version)))) | |
2841 | (file-name (git-file-name name version)) | |
2842 | (sha256 | |
1710b8f8 | 2843 | (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym")) |
b9790285 MC |
2844 | (patches (search-patches |
2845 | "python-robotframework-honor-source-date-epoch.patch")))) | |
2846 | (build-system python-build-system) | |
2847 | (arguments | |
2848 | `(#:phases (modify-phases %standard-phases | |
2849 | (add-before 'build 'build-and-install-doc | |
2850 | (lambda* (#:key outputs #:allow-other-keys) | |
2851 | (let* ((doc-output (assoc-ref outputs "doc")) | |
2852 | (doc (string-append doc-output "/share/" | |
2853 | ,name "-" ,version "/"))) | |
2854 | (invoke "invoke" "library-docs" "all") | |
2855 | (mkdir-p doc) | |
2856 | (copy-recursively "doc/libraries" | |
2857 | (string-append doc "/libraries")) | |
2858 | #t))) | |
2859 | (replace 'check | |
2860 | (lambda _ | |
2861 | (invoke "python" "utest/run.py")))))) | |
2862 | (native-inputs | |
2863 | `(("python-invoke" ,python-invoke) | |
2864 | ("python-rellu" ,python-rellu) | |
2865 | ("python:tk" ,python "tk"))) ;used when building the HTML doc | |
2866 | (outputs '("out" "doc")) | |
2867 | (home-page "https://robotframework.org") | |
2868 | (synopsis "Generic automation framework") | |
2869 | (description "Robot Framework is a generic automation framework for | |
2870 | acceptance testing, acceptance test driven development (ATDD), and robotic | |
2871 | process automation (RPA).") | |
2872 | (license license:asl2.0))) | |
2873 | ||
5b84c120 MC |
2874 | (define-public python-robotframework-lint |
2875 | ;; There is no properly tagged release; the commit below seems to correspond | |
2876 | ;; to the 0.9 stable release available from PyPI. The tests are not | |
2877 | ;; included in the PyPI archive, so we fetch the sources from the upstream | |
2878 | ;; Git repo. | |
2879 | (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830") | |
2880 | (revision "1")) | |
2881 | (package | |
2882 | (name "python-robotframework-lint") | |
2883 | (version (git-version "0.9.0" revision commit)) | |
2884 | (source | |
2885 | (origin | |
2886 | (method git-fetch) | |
2887 | (uri (git-reference | |
2888 | (url "https://github.com/boakley/robotframework-lint.git") | |
2889 | (commit commit))) | |
2890 | (file-name (git-file-name name version)) | |
2891 | (sha256 | |
2892 | (base32 | |
2893 | "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m")))) | |
2894 | (build-system python-build-system) | |
2895 | (arguments | |
2896 | `(#:phases | |
2897 | (modify-phases %standard-phases | |
2898 | (replace 'check | |
2899 | (lambda _ | |
2900 | (invoke "python" "-m" "robot" "-A" | |
2901 | "tests/conf/default.args" "tests")))))) | |
2902 | (propagated-inputs | |
2903 | `(("python-robotframework" ,python-robotframework))) | |
2904 | (home-page "https://github.com/boakley/robotframework-lint/") | |
2905 | (synopsis "Static analysis tool (linter) for Robot Framework") | |
2906 | (description "This package provides the @code{rflint} command-line | |
2907 | utility, a static analysis tool (linter) for Robot Framework source files.") | |
2908 | (license license:asl2.0)))) | |
2909 | ||
c0c64f17 MC |
2910 | (define-public python-robotframework-sshlibrary |
2911 | (package | |
2912 | (name "python-robotframework-sshlibrary") | |
2913 | (version "3.3.0") | |
2914 | ;; There are no tests in the PyPI archive. | |
2915 | (source | |
2916 | (origin | |
2917 | (method git-fetch) | |
2918 | (uri (git-reference | |
2919 | (url "https://github.com/robotframework/SSHLibrary.git") | |
2920 | (commit (string-append "v" version)))) | |
2921 | (file-name (git-file-name name version)) | |
2922 | (sha256 | |
2923 | (base32 | |
2924 | "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2")))) | |
2925 | (build-system python-build-system) | |
2926 | (arguments | |
2927 | `(#:phases | |
2928 | (modify-phases %standard-phases | |
2929 | (add-before 'build 'build-and-install-doc | |
2930 | (lambda* (#:key outputs #:allow-other-keys) | |
2931 | (let* ((doc-output (assoc-ref outputs "doc")) | |
2932 | (doc (string-append doc-output "/share/" | |
2933 | ,name "-" ,version "/"))) | |
2934 | (invoke "chmod" "-R" "+w" "docs") | |
2935 | (invoke "invoke" "kw-docs" "project-docs") | |
2936 | (mkdir-p doc) | |
2937 | (for-each delete-file (find-files "docs" "\\.rst")) | |
2938 | (copy-recursively "docs" doc) | |
2939 | #t))) | |
2940 | (replace 'check | |
2941 | (lambda _ | |
2942 | ;; Some tests require an SSH server; we remove them. | |
2943 | (delete-file "utest/test_client_api.py") | |
2944 | (delete-file "utest/test_scp.py") | |
2945 | (invoke "python" "utest/run.py")))))) | |
2946 | (propagated-inputs | |
2947 | `(("python-robotframework" ,python-robotframework) | |
2948 | ("python-paramiko" ,python-paramiko) | |
2949 | ("python-scp" ,python-scp))) | |
2950 | (native-inputs | |
2951 | `(("openssh" ,openssh) | |
2952 | ("which" ,which) | |
2953 | ;; To generate the documentation | |
2954 | ("python-docutils" ,python-docutils) | |
2955 | ("python-invoke" ,python-invoke) | |
2956 | ("python-pygments" ,python-pygments) | |
2957 | ("python-rellu" ,python-rellu))) | |
2958 | (outputs '("out" "doc")) | |
2959 | (home-page "https://github.com/robotframework/SSHLibrary") | |
2960 | (synopsis "Robot Framework library for SSH and SFTP") | |
2961 | (description "SSHLibrary is a Robot Framework library providing support | |
2962 | for SSH and SFTP. It has the following main usages: | |
2963 | @itemize @bullet | |
2964 | @item Executing commands on the remote machine, either blocking or non-blocking. | |
2965 | @item Writing and reading in an interactive shell. | |
2966 | @item Transferring files and directories over SFTP. | |
2967 | @item Ensuring that files and directories exist on the remote machine. | |
2968 | @end itemize") | |
2969 | (license license:asl2.0))) | |
2970 | ||
b1daba94 VC |
2971 | (define-public python-rstr |
2972 | (package | |
2973 | (name "python-rstr") | |
2974 | (version "2.2.6") | |
2975 | (source | |
2976 | (origin | |
2977 | (method url-fetch) | |
2978 | (uri (pypi-uri "rstr" version)) | |
2979 | (sha256 | |
2980 | (base32 | |
2981 | "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx")))) | |
2982 | (build-system python-build-system) | |
2983 | (home-page | |
2984 | "http://bitbucket.org/leapfrogdevelopment/rstr/overview") | |
2985 | (synopsis "Generate random strings in Python") | |
2986 | (description "This package provides a python module for generating | |
2987 | random strings of various types. It could be useful for fuzz testing, | |
2988 | generating dummy data, or other applications. It has no dependencies | |
2989 | outside the standard library.") | |
2990 | (license license:bsd-3))) | |
2991 | ||
13d825fc MC |
2992 | (define-public python-scp |
2993 | (package | |
2994 | (name "python-scp") | |
2995 | (version "0.13.2") | |
2996 | (source | |
2997 | (origin | |
2998 | (method url-fetch) | |
2999 | (uri (pypi-uri "scp" version)) | |
3000 | (sha256 | |
3001 | (base32 | |
3002 | "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg")))) | |
3003 | (build-system python-build-system) | |
3004 | (arguments | |
3005 | '(#:tests? #f)) ;tests require an SSH server | |
3006 | (propagated-inputs | |
3007 | `(("python-paramiko" ,python-paramiko))) | |
3008 | (home-page "https://github.com/jbardin/scp.py") | |
3009 | (synopsis "SCP protocol module for Python and Paramiko") | |
3010 | (description "The scp module extends the Paramiko library to send and | |
3011 | receive files via the SCP1 protocol, as implemented by the OpenSSH | |
3012 | @command{scp} program.") | |
3013 | (license license:gpl2+))) | |
3014 | ||
44d10b1f RW |
3015 | (define-public python-rst.linker |
3016 | (package | |
3017 | (name "python-rst.linker") | |
d37e8e53 | 3018 | (version "1.11") |
44d10b1f RW |
3019 | (source |
3020 | (origin | |
3021 | (method url-fetch) | |
3022 | (uri (pypi-uri "rst.linker" version)) | |
3023 | (sha256 | |
d37e8e53 | 3024 | (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2")))) |
44d10b1f RW |
3025 | (build-system python-build-system) |
3026 | (propagated-inputs | |
3027 | `(("python-dateutil" ,python-dateutil) | |
3028 | ("python-six" ,python-six))) | |
3029 | (native-inputs | |
3030 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
3031 | ;; Test would require path.py, which would introduce a cyclic dependence. | |
3032 | (arguments `(#:tests? #f)) | |
3033 | ;; Note: As of version 1.7 the documentation is not worth building. | |
3034 | (home-page "https://github.com/jaraco/rst.linker") | |
3035 | (synopsis "Sphinx plugin to add links and timestamps") | |
3036 | (description "rst.linker allows to automatically replace text by a | |
3037 | reStructuredText external reference or timestamps. It's primary purpose is to | |
3038 | augment the changelog, but it can be used for other documents, too.") | |
3039 | (license license:expat))) | |
3040 | ||
3041 | (define-public python2-rst.linker | |
3042 | (package-with-python2 python-rst.linker)) | |
3043 | ||
3044 | (define-public python-feedgenerator | |
3045 | (package | |
3046 | (name "python-feedgenerator") | |
3047 | (version "1.9") | |
3048 | (source | |
3049 | (origin | |
3050 | (method url-fetch) | |
3051 | (uri (pypi-uri "feedgenerator" version)) | |
3052 | (sha256 | |
3053 | (base32 | |
3054 | "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s")) | |
3055 | (modules '((guix build utils))) | |
3056 | (snippet | |
3057 | '(begin | |
3058 | ;; Remove pre-compiled .pyc files from source. | |
3059 | (for-each delete-file-recursively | |
3060 | (find-files "." "__pycache__" #:directories? #t)) | |
3061 | (for-each delete-file (find-files "." "\\.pyc$")) | |
3062 | #t)))) | |
3063 | (build-system python-build-system) | |
3064 | (propagated-inputs | |
3065 | `(("python-pytz" ,python-pytz) | |
3066 | ("python-six" ,python-six))) | |
3067 | (home-page "https://github.com/getpelican/feedgenerator") | |
3068 | (synopsis | |
3069 | "Standalone version of Django's Atom/RSS feed generator") | |
3070 | (description | |
3071 | "Feedgenerator-py3k is a standalone version of Django's feedgenerator, | |
3072 | which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") | |
3073 | (license license:bsd-3))) | |
3074 | ||
3075 | (define-public python2-feedgenerator | |
3076 | (package-with-python2 python-feedgenerator)) | |
3077 | ||
3078 | (define-public python-toml | |
3079 | (package | |
3080 | (name "python-toml") | |
3081 | (version "0.9.4") | |
3082 | (source | |
3083 | (origin | |
3084 | (method url-fetch) | |
3085 | (uri (pypi-uri "toml" version)) | |
3086 | (sha256 | |
3087 | (base32 | |
3088 | "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf")))) | |
3089 | (build-system python-build-system) | |
3090 | (arguments | |
3091 | `(#:tests? #f)) ;no tests suite in release | |
3092 | (home-page "https://github.com/uiri/toml") | |
3093 | (synopsis "Library for TOML") | |
3094 | (description | |
3095 | "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal | |
3096 | Language (TOML) configuration files.") | |
3097 | (license license:expat))) | |
3098 | ||
346c8752 BG |
3099 | (define-public python-jsonrpc-server |
3100 | (package | |
3101 | (name "python-jsonrpc-server") | |
d6cf4c6e | 3102 | (version "0.3.2") |
346c8752 BG |
3103 | (source |
3104 | (origin | |
3105 | (method url-fetch) | |
3106 | (uri (pypi-uri "python-jsonrpc-server" version)) | |
3107 | (sha256 | |
3108 | (base32 | |
d6cf4c6e | 3109 | "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05")))) |
346c8752 BG |
3110 | (build-system python-build-system) |
3111 | (propagated-inputs | |
3112 | `(("python-future" ,python-future) | |
3113 | ("python-mock" ,python-mock) | |
d6cf4c6e BG |
3114 | ("python-pytest" ,python-pytest) |
3115 | ("python-ujson" ,python-ujson))) | |
346c8752 BG |
3116 | (home-page |
3117 | "https://github.com/palantir/python-jsonrpc-server") | |
3118 | (synopsis "JSON RPC 2.0 server library") | |
3119 | (description | |
1df5407c | 3120 | "This package provides a JSON RPC 2.0 server library for Python.") |
346c8752 BG |
3121 | (license license:expat))) |
3122 | ||
56f4ad47 BG |
3123 | (define-public python-pydocstyle |
3124 | (package | |
3125 | (name "python-pydocstyle") | |
3126 | (version "3.0.0") | |
3127 | (source | |
3128 | (origin | |
3129 | (method url-fetch) | |
3130 | (uri (pypi-uri "pydocstyle" version)) | |
3131 | (sha256 | |
3132 | (base32 | |
3133 | "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap")))) | |
3134 | (build-system python-build-system) | |
3135 | (propagated-inputs | |
3136 | `(("python-six" ,python-six) | |
3137 | ("python-snowballstemmer" ,python-snowballstemmer))) | |
3138 | (home-page | |
3139 | "https://github.com/PyCQA/pydocstyle/") | |
3140 | (synopsis "Python docstring style checker") | |
3141 | (description | |
3142 | "This package provides a style checker for the Python Language | |
3143 | Server (PLS).") | |
3144 | (license license:expat))) | |
3145 | ||
be4d840c | 3146 | (define-public python-language-server |
808dd2d0 BL |
3147 | (package |
3148 | (name "python-language-server") | |
a42f1420 | 3149 | (version "0.31.7") |
808dd2d0 BL |
3150 | (source |
3151 | (origin | |
3152 | (method url-fetch) | |
3153 | (uri (pypi-uri "python-language-server" version)) | |
3154 | (sha256 | |
3155 | (base32 | |
a42f1420 | 3156 | "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh")))) |
808dd2d0 BL |
3157 | (build-system python-build-system) |
3158 | (propagated-inputs | |
3159 | `(("python-pluggy" ,python-pluggy) | |
3160 | ("python-jsonrpc-server" ,python-jsonrpc-server) | |
3161 | ("python-jedi" ,python-jedi) | |
3162 | ("python-yapf" ,python-yapf) | |
3163 | ("python-pyflakes" ,python-pyflakes) | |
3164 | ("python-pydocstyle" ,python-pydocstyle) | |
3165 | ("python-pycodestyle" ,python-pycodestyle) | |
3166 | ("python-mccabe" ,python-mccabe) | |
3167 | ("python-rope" ,python-rope) | |
3168 | ("python-autopep8" ,python-autopep8) | |
3169 | ("python-flake8" ,python-flake8) | |
3170 | ("python-pylint" ,python-pylint))) | |
3171 | (home-page "https://github.com/palantir/python-language-server") | |
3172 | (synopsis "Python implementation of the Language Server Protocol") | |
3173 | (description | |
3174 | "The Python Language Server (pyls) is an implementation of the Python 3 | |
be4d840c BG |
3175 | language specification for the Language Server Protocol (LSP). This tool is |
3176 | used in text editing environments to provide a complete and integrated | |
3177 | feature-set for programming Python effectively.") | |
808dd2d0 | 3178 | (license license:expat))) |
be4d840c | 3179 | |
c777ecb3 RW |
3180 | (define-public python-pathspec |
3181 | (package | |
3182 | (name "python-pathspec") | |
3183 | (version "0.7.0") | |
3184 | (source | |
3185 | (origin | |
3186 | (method url-fetch) | |
3187 | (uri (pypi-uri "pathspec" version)) | |
3188 | (sha256 | |
3189 | (base32 | |
3190 | "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn")))) | |
3191 | (build-system python-build-system) | |
3192 | (home-page "https://github.com/cpburnz/python-path-specification") | |
3193 | (synopsis "Utility library for gitignore style pattern matching of file paths") | |
3194 | (description | |
3195 | "This package provides a utility library for gitignore style pattern | |
3196 | matching of file paths.") | |
3197 | (license license:mpl2.0))) | |
3198 | ||
44d10b1f RW |
3199 | (define-public python-black |
3200 | (package | |
3201 | (name "python-black") | |
5f603fab | 3202 | (version "19.10b0") |
44d10b1f RW |
3203 | (source |
3204 | (origin | |
3205 | (method url-fetch) | |
3206 | (uri (pypi-uri "black" version)) | |
3207 | (sha256 | |
3208 | (base32 | |
5f603fab | 3209 | "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2")))) |
44d10b1f RW |
3210 | (build-system python-build-system) |
3211 | (arguments | |
3212 | `(#:phases | |
3213 | (modify-phases %standard-phases | |
3214 | (add-after 'patch-source-shebangs 'patch-extra-shebangs | |
3215 | (lambda _ | |
3216 | (let ((python3 (which "python3"))) | |
3217 | (substitute* '("tests/data/fmtonoff.py" | |
3218 | "tests/data/string_prefixes.py" | |
5f603fab RW |
3219 | "tests/data/function.py" |
3220 | "tests/data/python37.py") | |
44d10b1f RW |
3221 | (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version) |
3222 | (string-append "#!" python3 (if (string? minor-version) | |
3223 | minor-version | |
5f603fab RW |
3224 | ""))))) |
3225 | #t)) | |
3226 | (add-after 'unpack 'disable-broken-tests | |
3227 | (lambda _ | |
3228 | ;; These tests are supposed to be skipped when the blackd | |
3229 | ;; dependencies are missing, but this doesn't quite work. | |
3230 | (substitute* "tests/test_black.py" | |
3231 | (("( *)class BlackDTestCase.*" match indent) | |
3232 | (string-append indent "@unittest.skip(\"no blackd deps\")\n" | |
3233 | indent "class BlackDTestCase(unittest.TestCase):\n")) | |
3234 | (("web.Application") "False") | |
3235 | (("@unittest_run_loop") "")) | |
3236 | ||
3237 | ;; Patching the above file breaks the self test | |
3238 | (substitute* "tests/test_black.py" | |
3239 | (("( *)def test_self" match indent) | |
3240 | (string-append indent "@unittest.skip(\"guix\")\n" match))) | |
3241 | #t))))) | |
44d10b1f RW |
3242 | (propagated-inputs |
3243 | `(("python-click" ,python-click) | |
3244 | ("python-attrs" ,python-attrs) | |
3245 | ("python-appdirs" ,python-appdirs) | |
5f603fab RW |
3246 | ("python-pathspec" ,python-pathspec) |
3247 | ("python-regex" ,python-regex) | |
3248 | ("python-toml" ,python-toml) | |
3249 | ("python-typed-ast" ,python-typed-ast))) | |
3250 | (native-inputs | |
3251 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
44d10b1f RW |
3252 | (home-page "https://github.com/ambv/black") |
3253 | (synopsis "The uncompromising code formatter") | |
3254 | (description "Black is the uncompromising Python code formatter.") | |
3255 | (license license:expat))) | |
3256 | ||
3257 | (define-public python-blinker | |
3258 | (package | |
3259 | (name "python-blinker") | |
3260 | (version "1.4") | |
3261 | (source | |
3262 | (origin | |
3263 | (method url-fetch) | |
3264 | (uri (pypi-uri "blinker" version)) | |
3265 | (sha256 | |
3266 | (base32 | |
3267 | "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7")))) | |
3268 | (build-system python-build-system) | |
d46646d9 | 3269 | (home-page "https://pythonhosted.org/blinker/") |
44d10b1f RW |
3270 | (synopsis "Fast, simple object-to-object and broadcast signaling") |
3271 | (description | |
3272 | "Blinker provides a fast dispatching system that allows any number of | |
3273 | interested parties to subscribe to events, or \"signals\".") | |
3274 | (license license:expat))) | |
3275 | ||
3276 | (define-public python2-blinker | |
3277 | (package-with-python2 python-blinker)) | |
3278 | ||
3279 | (define-public pelican | |
3280 | (package | |
3281 | (name "pelican") | |
fa9e3b5e | 3282 | (version "4.2.0") |
44d10b1f RW |
3283 | (source |
3284 | (origin | |
3285 | (method url-fetch) | |
3286 | (uri (pypi-uri "pelican" version)) | |
3287 | (sha256 | |
3288 | (base32 | |
fa9e3b5e | 3289 | "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy")))) |
44d10b1f RW |
3290 | (build-system python-build-system) |
3291 | (propagated-inputs | |
fa9e3b5e VC |
3292 | `(("python-blinker" ,python-blinker) |
3293 | ("python-dateutil" ,python-dateutil) | |
3294 | ("python-docutils" ,python-docutils) | |
3295 | ("python-feedgenerator" ,python-feedgenerator) | |
44d10b1f | 3296 | ("python-jinja2" ,python-jinja2) |
fa9e3b5e | 3297 | ("python-markdown" ,python-markdown) |
44d10b1f | 3298 | ("python-pygments" ,python-pygments) |
44d10b1f | 3299 | ("python-pytz" ,python-pytz) |
44d10b1f | 3300 | ("python-six" ,python-six) |
fa9e3b5e | 3301 | ("python-unidecode" ,python-unidecode))) |
44d10b1f RW |
3302 | (home-page "https://getpelican.com/") |
3303 | (arguments | |
3304 | `(;; XXX Requires a lot more packages to do unit tests :P | |
fa9e3b5e | 3305 | #:tests? #f)) |
44d10b1f RW |
3306 | (synopsis "Python-based static site publishing system") |
3307 | (description | |
3308 | "Pelican is a tool to generate a static blog from reStructuredText, | |
3309 | Markdown input files, and more. Pelican uses Jinja2 for templating | |
3310 | and is very extensible.") | |
3311 | (license license:agpl3+))) | |
3312 | ||
8c141421 JH |
3313 | (define-public mallard-ducktype |
3314 | (package | |
3315 | (name "mallard-ducktype") | |
12cc3da5 | 3316 | (version "1.0.2") |
8c141421 JH |
3317 | (source |
3318 | (origin | |
3319 | (method git-fetch) | |
12cc3da5 JH |
3320 | ;; git-reference because tests are not included in pypi source tarball |
3321 | ;; https://issues.guix.gnu.org/issue/36755#2 | |
8c141421 JH |
3322 | (uri (git-reference |
3323 | (url "https://github.com/projectmallard/mallard-ducktype.git") | |
3324 | (commit version))) | |
3325 | (file-name (git-file-name name version)) | |
3326 | (sha256 | |
3327 | (base32 | |
12cc3da5 | 3328 | "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c")))) |
8c141421 | 3329 | (build-system python-build-system) |
5246655f EF |
3330 | (arguments |
3331 | '(#:phases | |
3332 | (modify-phases %standard-phases | |
3333 | (replace 'check | |
3334 | (lambda _ | |
3335 | (with-directory-excursion "tests" | |
3336 | (invoke "sh" "runtests"))))))) | |
8c141421 JH |
3337 | (home-page "http://projectmallard.org") |
3338 | (synopsis "Convert Ducktype to Mallard documentation markup") | |
3339 | (description | |
3340 | "Ducktype is a lightweight syntax that can represent all the semantics | |
3341 | of the Mallard XML documentation system. Ducktype files can be converted to | |
3342 | Mallard using the @command{ducktype} tool. The yelp-tools package | |
3343 | provides additional functionality on the produced Mallard documents.") | |
3344 | (license license:expat))) | |
3345 | ||
44d10b1f RW |
3346 | (define-public python-cython |
3347 | (package | |
3348 | (name "python-cython") | |
6fd27a71 | 3349 | (version "0.29.13") |
44d10b1f RW |
3350 | (source |
3351 | (origin | |
3352 | (method url-fetch) | |
3353 | (uri (pypi-uri "Cython" version)) | |
3354 | (sha256 | |
6fd27a71 TGR |
3355 | (base32 |
3356 | "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2")))) | |
44d10b1f RW |
3357 | (build-system python-build-system) |
3358 | ;; we need the full python package and not just the python-wrapper | |
3359 | ;; because we need libpython3.3m.so | |
3360 | (inputs | |
3361 | `(("python" ,python))) | |
3362 | (arguments | |
3363 | `(#:phases | |
3364 | (modify-phases %standard-phases | |
3365 | (add-before 'check 'set-HOME | |
3366 | ;; some tests require access to "$HOME/.cython" | |
3367 | (lambda _ (setenv "HOME" "/tmp") #t)) | |
3368 | ||
3369 | ;; FIXME: These tests started failing on armhf after the 0.28 update | |
3370 | ;; (commit c69d11c5930), both with an error such as this: | |
3371 | ;; compiling (cpp) and running dictcomp ... | |
3372 | ;; === C/C++ compiler error output: === | |
3373 | ;; ‘ | |
3374 | ;; dictcomp.cpp:5221: confused by earlier errors, bailing out | |
3375 | ;; See <https://hydra.gnu.org/build/2948724> for logs. | |
3376 | ,@(if (target-arm32?) | |
3377 | `((add-before 'check 'disable-failing-tests | |
3378 | (lambda _ | |
3379 | (let ((disabled-tests (open-file "tests/bugs.txt" "a"))) | |
3380 | (for-each (lambda (test) | |
3381 | (format disabled-tests "~a\n" test)) | |
3382 | '("memslice" "dictcomp")) | |
3383 | (close-port disabled-tests))))) | |
3384 | '()) | |
3385 | ||
3386 | (replace 'check | |
3387 | (lambda _ | |
e9194eb0 MB |
3388 | ;; Disable compiler optimizations to greatly reduce the running |
3389 | ;; time of the test suite. | |
3390 | (setenv "CFLAGS" "-O0") | |
3391 | ||
3392 | (invoke "python" "runtests.py" "-vv" | |
3393 | "-j" (number->string (parallel-job-count)))))))) | |
f319409b | 3394 | (home-page "https://cython.org/") |
44d10b1f RW |
3395 | (synopsis "C extensions for Python") |
3396 | (description "Cython is an optimising static compiler for both the Python | |
3397 | programming language and the extended Cython programming language. It makes | |
3398 | writing C extensions for Python as easy as Python itself.") | |
3399 | (license license:asl2.0) | |
3400 | (properties `((python2-variant . ,(delay python2-cython)))))) | |
3401 | ||
3402 | (define-public python2-cython | |
da460865 MB |
3403 | (let ((base (package-with-python2 (strip-python2-variant python-cython)))) |
3404 | (package | |
3405 | (inherit base) | |
3406 | (name "python2-cython") | |
3407 | (inputs | |
3408 | `(("python-2" ,python-2))) ;this is not automatically changed | |
3409 | (arguments | |
3410 | (substitute-keyword-arguments (package-arguments base) | |
3411 | ((#:phases phases) | |
3412 | `(modify-phases ,phases | |
3413 | (add-before 'check 'adjust-test_embed | |
3414 | (lambda _ | |
3415 | (substitute* "runtests.py" | |
3416 | ;; test_embed goes great lengths to find the static libpythonX.Y.a | |
3417 | ;; so it can give the right -L flag to GCC when embedding static | |
3418 | ;; builds of Python. It is unaware that the Python "config" | |
3419 | ;; directory (where the static library lives) was renamed in | |
3420 | ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'), | |
3421 | ;; which works fine, because that is where the shared library is. | |
3422 | ;; | |
3423 | ;; It also appears to be unaware that the Makefile in Demos/embed | |
3424 | ;; already unconditionally pass the static library location to GCC, | |
3425 | ;; after checking sysconfig.get_config_var('LIBPL). | |
3426 | ;; | |
3427 | ;; The effect is that the linker is unable to resolve libexpat | |
3428 | ;; symbols when building for Python 2, because neither the Python 2 | |
3429 | ;; shared library nor Expat is available. To fix it, we can either | |
3430 | ;; add Expat as an input and make it visible to the linker, or just | |
3431 | ;; prevent it from overriding the Python shared library location. | |
3432 | ;; The end result is identical, so we take the easy route. | |
3433 | ((" or libname not in os\\.listdir\\(libdir\\)") | |
3434 | "")) | |
3435 | #t))))))))) | |
44d10b1f RW |
3436 | |
3437 | ;; The RPython toolchain currently does not support Python 3. | |
3438 | (define-public python2-rpython | |
3439 | (package | |
3440 | (name "python2-rpython") | |
3441 | (version "0.2.1") | |
3442 | (source | |
3443 | (origin | |
3444 | (method url-fetch) | |
3445 | (uri (pypi-uri "rpython" version)) | |
3446 | (sha256 | |
3447 | (base32 | |
3448 | "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0")))) | |
3449 | (build-system python-build-system) | |
3450 | (arguments `(#:python ,python-2)) | |
3451 | (native-inputs | |
3452 | `(("python2-pytest" ,python2-pytest))) ; needed for running tests | |
3453 | (home-page "https://rpython.readthedocs.org") | |
3454 | (synopsis "Framework for implementing interpreters and virtual machines") | |
3455 | (description "RPython is a translation and support framework for | |
3456 | producing implementations of dynamic languages, emphasizing a clean separation | |
3457 | between language specification and implementation aspects.") | |
3458 | (license license:expat))) | |
3459 | ||
3460 | ;; NOTE: when upgrading numpy please make sure that python-pandas and | |
3461 | ;; python-scipy still build, as these three packages are often used together. | |
3462 | (define-public python-numpy | |
3463 | (package | |
3464 | (name "python-numpy") | |
8e5fbd5d | 3465 | (version "1.17.3") |
44d10b1f RW |
3466 | (source |
3467 | (origin | |
3468 | (method url-fetch) | |
3469 | (uri (string-append | |
3470 | "https://github.com/numpy/numpy/releases/download/v" | |
3471 | version "/numpy-" version ".tar.gz")) | |
3472 | (sha256 | |
3473 | (base32 | |
8e5fbd5d | 3474 | "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9")))) |
44d10b1f RW |
3475 | (build-system python-build-system) |
3476 | (inputs | |
3477 | `(("openblas" ,openblas) | |
3478 | ("lapack" ,lapack))) | |
3479 | (native-inputs | |
3480 | `(("python-cython" ,python-cython) | |
3481 | ("python-pytest" ,python-pytest) | |
3482 | ("gfortran" ,gfortran))) | |
3483 | (arguments | |
3484 | `(#:phases | |
3485 | (modify-phases %standard-phases | |
3486 | (add-before 'build 'configure-blas-lapack | |
3487 | (lambda* (#:key inputs #:allow-other-keys) | |
3488 | (call-with-output-file "site.cfg" | |
3489 | (lambda (port) | |
3490 | (format port | |
3491 | "[openblas] | |
3492 | libraries = openblas | |
3493 | library_dirs = ~a/lib | |
3494 | include_dirs = ~a/include | |
3495 | ||
3496 | # backslash-n to make emacs happy | |
3497 | \n[lapack] | |
3498 | lapack_libs = lapack | |
3499 | library_dirs = ~a/lib | |
3500 | include_dirs = ~a/include | |
3501 | " | |
3502 | (assoc-ref inputs "openblas") | |
3503 | (assoc-ref inputs "openblas") | |
3504 | (assoc-ref inputs "lapack") | |
3505 | (assoc-ref inputs "lapack")))) | |
3506 | #t)) | |
3507 | (add-before 'build 'fix-executable-paths | |
3508 | (lambda* (#:key inputs #:allow-other-keys) | |
3509 | ;; Make /gnu/store/...-bash-.../bin/sh the default shell, | |
3510 | ;; instead of /bin/sh. | |
3511 | (substitute* "numpy/distutils/exec_command.py" | |
3512 | (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end) | |
3513 | (string-append match-start (assoc-ref inputs "bash") match-end))) | |
3514 | ;; Use "gcc" executable, not "cc". | |
3515 | (substitute* "numpy/distutils/system_info.py" | |
3516 | (("c = distutils\\.ccompiler\\.new_compiler\\(\\)") | |
3517 | "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')")) | |
3518 | #t)) | |
3519 | ;; Tests can only be run after the library has been installed and not | |
3520 | ;; within the source directory. | |
3521 | (delete 'check) | |
3522 | (add-after 'install 'check | |
3523 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
3524 | ;; Make installed package available for running the tests | |
3525 | (add-installed-pythonpath inputs outputs) | |
3526 | ;; Make sure "f2py" etc is found. | |
3527 | (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin" | |
3528 | ":" (getenv "PATH"))) | |
3529 | (with-directory-excursion "/tmp" | |
3530 | (invoke "python" "-c" | |
3531 | "import numpy; numpy.test(verbose=2)"))))))) | |
28191bdc | 3532 | (home-page "https://numpy.org") |
44d10b1f RW |
3533 | (synopsis "Fundamental package for scientific computing with Python") |
3534 | (description "NumPy is the fundamental package for scientific computing | |
3535 | with Python. It contains among other things: a powerful N-dimensional array | |
3536 | object, sophisticated (broadcasting) functions, tools for integrating C/C++ | |
3537 | and Fortran code, useful linear algebra, Fourier transform, and random number | |
3538 | capabilities.") | |
adb396ea | 3539 | (properties `((python2-variant . ,(delay python2-numpy)))) |
44d10b1f RW |
3540 | (license license:bsd-3))) |
3541 | ||
adb396ea | 3542 | ;; Numpy 1.16.x are the last versions that support Python 2. |
44d10b1f | 3543 | (define-public python2-numpy |
adb396ea MB |
3544 | (let ((numpy (package-with-python2 |
3545 | (strip-python2-variant python-numpy)))) | |
3546 | (package/inherit | |
3547 | numpy | |
3548 | (version "1.16.5") | |
3549 | (source (origin | |
3550 | (method url-fetch) | |
3551 | (uri (string-append | |
3552 | "https://github.com/numpy/numpy/releases/download/v" | |
3553 | version "/numpy-" version ".tar.gz")) | |
3554 | (sha256 | |
3555 | (base32 | |
3556 | "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb"))))))) | |
44d10b1f RW |
3557 | |
3558 | ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of | |
3559 | ;; interest only for legacy code going back to NumPy's predecessor | |
3560 | ;; Numeric. | |
3561 | (define-public python2-numpy-1.8 | |
3562 | (package (inherit python2-numpy) | |
3563 | (version "1.8.2") | |
3564 | (source | |
3565 | (origin | |
6b61fc47 EF |
3566 | (method git-fetch) |
3567 | (uri (git-reference | |
3568 | (url "https://github.com/numpy/numpy") | |
3569 | (commit (string-append "v" version)))) | |
3570 | (file-name (git-file-name "numpy" version)) | |
44d10b1f RW |
3571 | (sha256 |
3572 | (base32 | |
6b61fc47 | 3573 | "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk")))) |
44d10b1f RW |
3574 | (arguments |
3575 | (substitute-keyword-arguments (package-arguments python2-numpy) | |
3576 | ((#:phases phases) | |
3577 | `(modify-phases ,phases | |
3578 | (replace 'configure-blas-lapack | |
3579 | (lambda* (#:key inputs #:allow-other-keys) | |
3580 | (call-with-output-file "site.cfg" | |
3581 | (lambda (port) | |
3582 | (format port | |
3583 | "[openblas] | |
3584 | libraries = openblas,lapack | |
3585 | library_dirs = ~a/lib:~a/lib | |
3586 | include_dirs = ~a/include:~a/include | |
3587 | " | |
3588 | (assoc-ref inputs "openblas") | |
3589 | (assoc-ref inputs "lapack") | |
3590 | (assoc-ref inputs "openblas") | |
3591 | (assoc-ref inputs "lapack")))) | |
3592 | #t)))))) | |
3593 | (native-inputs | |
3594 | `(("python2-nose" ,python2-nose))) | |
3595 | (description "NumPy is the fundamental package for scientific computing | |
3596 | with Python. It contains among other things: a powerful N-dimensional array | |
3597 | object, sophisticated (broadcasting) functions, tools for integrating C/C++ | |
3598 | and Fortran code, useful linear algebra, Fourier transform, and random number | |
3599 | capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API | |
3600 | that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor | |
3601 | Numeric.") | |
3602 | (license license:bsd-3))) | |
3603 | ||
3604 | (define-public python-munch | |
3605 | (package | |
3606 | (name "python-munch") | |
3607 | (version "2.0.4") | |
3608 | (source | |
3609 | (origin | |
3610 | (method url-fetch) | |
3611 | (uri (pypi-uri "munch" version)) | |
3612 | (sha256 | |
3613 | (base32 | |
3614 | "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l")))) | |
3615 | (build-system python-build-system) | |
3616 | (home-page "https://github.com/Infinidat/munch") | |
3617 | (synopsis "Dot-accessible dictionary") | |
3618 | (description "Munch is a dot-accessible dictionary similar to JavaScript | |
3619 | objects.") | |
3620 | (license license:expat))) | |
3621 | ||
3622 | (define-public python2-munch | |
3623 | (package-with-python2 python-munch)) | |
3624 | ||
3625 | (define-public python-colormath | |
3626 | (package | |
3627 | (name "python-colormath") | |
3628 | (version "3.0.0") | |
3629 | (source | |
3630 | (origin | |
3631 | (method url-fetch) | |
3632 | (uri (pypi-uri "colormath" version)) | |
3633 | (sha256 | |
3634 | (base32 | |
3635 | "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix")))) | |
3636 | (build-system python-build-system) | |
3637 | (propagated-inputs | |
3638 | `(("python-networkx" ,python-networkx) | |
3639 | ("python-numpy" ,python-numpy))) | |
3640 | (home-page "https://github.com/gtaylor/python-colormath") | |
3641 | (synopsis "Color math and conversion library") | |
3642 | (description | |
3643 | "This is a Python library for color math and conversions.") | |
3644 | (license license:bsd-3))) | |
3645 | ||
3646 | (define-public python2-colormath | |
3647 | (package-with-python2 python-colormath)) | |
3648 | ||
3649 | (define-public python-spectra | |
3650 | (package | |
3651 | (name "python-spectra") | |
3652 | (version "0.0.11") | |
3653 | (source | |
3654 | (origin | |
3655 | (method url-fetch) | |
3656 | (uri (pypi-uri "spectra" version)) | |
3657 | (sha256 | |
3658 | (base32 | |
3659 | "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf")))) | |
3660 | (build-system python-build-system) | |
3661 | (arguments | |
3662 | `(#:phases | |
3663 | (modify-phases %standard-phases | |
3664 | (replace 'check | |
38ec0f6a | 3665 | (lambda _ (invoke "nosetests" "-v")))))) |
44d10b1f RW |
3666 | (propagated-inputs |
3667 | `(("python-colormath" ,python-colormath))) | |
3668 | (native-inputs | |
3669 | `(("python-nose" ,python-nose))) | |
3670 | (home-page "https://github.com/jsvine/spectra") | |
3671 | (synopsis "Color scales and color conversion") | |
3672 | (description | |
3673 | "This package provides a Python library intended to make color math, | |
3674 | color scales, and color space conversion easy. It has support for: | |
3675 | ||
3676 | @enumerate | |
3677 | @item Color scales | |
3678 | @item Color ranges | |
3679 | @item Color blending | |
3680 | @item Brightening/darkening colors | |
3681 | @item Saturating/desaturating colors | |
3682 | @item Conversion to/from multiple color spaces. | |
3683 | @end enumerate\n") | |
3684 | (license license:expat))) | |
3685 | ||
3686 | (define-public python2-spectra | |
3687 | (package-with-python2 python-spectra)) | |
3688 | ||
3689 | (define-public python-numpy-documentation | |
3690 | (package | |
3691 | (name "python-numpy-documentation") | |
3692 | (version (package-version python-numpy)) | |
3693 | (source (package-source python-numpy)) | |
3694 | (build-system python-build-system) | |
3695 | (native-inputs | |
3696 | `(("python-matplotlib" ,python-matplotlib) | |
3697 | ("python-numpy" ,python-numpy) | |
3698 | ("pkg-config" ,pkg-config) | |
3699 | ("python-sphinx" ,python-sphinx) | |
3700 | ("python-numpydoc" ,python-numpydoc) | |
f75aa97f | 3701 | ("texlive" ,(texlive-union (list texlive-fonts-cm-super |
44d10b1f RW |
3702 | texlive-fonts-ec |
3703 | texlive-generic-ifxetex | |
3704 | texlive-generic-pdftex | |
f75aa97f | 3705 | texlive-amsfonts |
44d10b1f RW |
3706 | texlive-latex-capt-of |
3707 | texlive-latex-cmap | |
3708 | texlive-latex-environ | |
3709 | texlive-latex-eqparbox | |
3710 | texlive-latex-etoolbox | |
3711 | texlive-latex-expdlist | |
3712 | texlive-latex-fancyhdr | |
3713 | texlive-latex-fancyvrb | |
3714 | texlive-latex-fncychap | |
3715 | texlive-latex-float | |
3716 | texlive-latex-framed | |
3717 | texlive-latex-geometry | |
3718 | texlive-latex-graphics | |
3719 | texlive-latex-hyperref | |
3720 | texlive-latex-mdwtools | |
3721 | texlive-latex-multirow | |
3722 | texlive-latex-needspace | |
3723 | texlive-latex-oberdiek | |
3724 | texlive-latex-parskip | |
3725 | texlive-latex-preview | |
3726 | texlive-latex-tabulary | |
3727 | texlive-latex-threeparttable | |
3728 | texlive-latex-titlesec | |
3729 | texlive-latex-trimspaces | |
3730 | texlive-latex-ucs | |
3731 | texlive-latex-upquote | |
3732 | texlive-latex-url | |
3733 | texlive-latex-varwidth | |
3734 | texlive-latex-wrapfig))) | |
3735 | ("texinfo" ,texinfo) | |
3736 | ("perl" ,perl) | |
3737 | ("scipy-sphinx-theme" | |
3738 | ,(origin ; The build script expects scipy-sphinx-theme as a git submodule | |
3739 | (method git-fetch) | |
3740 | (uri (git-reference | |
3741 | (url "https://github.com/scipy/scipy-sphinx-theme.git") | |
3742 | (commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))) | |
3743 | (sha256 | |
3744 | (base32 | |
3745 | "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))) | |
3746 | ,@(package-native-inputs python-numpy))) | |
3747 | (arguments | |
3748 | `(#:tests? #f ; we're only generating the documentation | |
3749 | #:phases | |
3750 | (modify-phases %standard-phases | |
3751 | (delete 'build) | |
3752 | (replace 'install | |
3753 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3754 | (let* ((data (string-append (assoc-ref outputs "out") "/share")) | |
3755 | (doc (string-append | |
3756 | data "/doc/" ,name "-" | |
3757 | ,(package-version python-numpy))) | |
3758 | (info-reader (string-append data "/info")) | |
3759 | (html (string-append doc "/html")) | |
3760 | (scipy-sphinx-theme "scipy-sphinx-theme") | |
3761 | (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme)) | |
3762 | (pyver ,(string-append "PYVER="))) | |
3763 | ||
3764 | ;; FIXME: this is needed to for texlive-union to generate | |
3765 | ;; fonts, which are not found. | |
3766 | (setenv "HOME" "/tmp") | |
3767 | ||
3768 | (with-directory-excursion "doc" | |
3769 | (copy-recursively sphinx-theme-checkout scipy-sphinx-theme) | |
3770 | (mkdir-p html) | |
4fc898da RW |
3771 | (invoke "make" "html" pyver) |
3772 | (invoke "make" "latex" "PAPER=a4" pyver) | |
3773 | (invoke "make" "-C" "build/latex" | |
44d10b1f RW |
3774 | "all-pdf" "PAPER=a4" pyver) |
3775 | ;; FIXME: Generation of the info file fails. | |
4fc898da | 3776 | ;; (invoke "make" "info" pyver) |
44d10b1f RW |
3777 | ;; (mkdir-p info) |
3778 | ;; (copy-file "build/texinfo/numpy.info" | |
3779 | ;; (string-append info "/numpy.info")) | |
3780 | (for-each (lambda (file) | |
3781 | (copy-file (string-append "build/latex" file) | |
3782 | (string-append doc file))) | |
3783 | '("/numpy-ref.pdf" "/numpy-user.pdf")) | |
3784 | (with-directory-excursion "build/html" | |
3785 | (for-each (lambda (file) | |
3786 | (let* ((dir (dirname file)) | |
3787 | (tgt-dir (string-append html "/" dir))) | |
3788 | (unless (equal? "." dir) | |
3789 | (mkdir-p tgt-dir)) | |
3790 | (install-file file html))) | |
3791 | (find-files "." ".*"))))) | |
3792 | #t))))) | |
3793 | (home-page (package-home-page python-numpy)) | |
3794 | (synopsis "Documentation for the python-numpy package") | |
3795 | (description (package-description python-numpy)) | |
3796 | (license (package-license python-numpy)))) | |
3797 | ||
3798 | (define-public python2-numpy-documentation | |
3799 | (let ((numpy-documentation (package-with-python2 python-numpy-documentation))) | |
3800 | (package | |
3801 | (inherit numpy-documentation) | |
3802 | (native-inputs `(("python2-functools32" ,python2-functools32) | |
3803 | ,@(package-native-inputs numpy-documentation)))))) | |
3804 | ||
3805 | (define-public python-pygit2 | |
3806 | (package | |
3807 | (name "python-pygit2") | |
7154f5ef | 3808 | (version "1.1.0") |
44d10b1f RW |
3809 | (source |
3810 | (origin | |
3811 | (method url-fetch) | |
3812 | (uri (pypi-uri "pygit2" version)) | |
3813 | (sha256 | |
7154f5ef | 3814 | (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg")))) |
44d10b1f RW |
3815 | (build-system python-build-system) |
3816 | (arguments | |
c3ecab0d | 3817 | '(#:tests? #f)) ; tests don't run correctly in our environment |
44d10b1f | 3818 | (propagated-inputs |
7154f5ef | 3819 | `(("python-cached-property" ,python-cached-property) |
44d10b1f | 3820 | ("python-cffi" ,python-cffi) |
7154f5ef | 3821 | ("libgit2" ,libgit2))) |
44d10b1f RW |
3822 | (native-inputs |
3823 | `(("python-pytest" ,python-pytest))) | |
3824 | (home-page "https://github.com/libgit2/pygit2") | |
3825 | (synopsis "Python bindings for libgit2") | |
3826 | (description "Pygit2 is a set of Python bindings to the libgit2 shared | |
3827 | library, libgit2 implements Git plumbing.") | |
3828 | ;; GPL2.0 only, with linking exception. | |
3829 | (license license:gpl2))) | |
3830 | ||
44d10b1f RW |
3831 | (define-public python-pyparsing |
3832 | (package | |
3833 | (name "python-pyparsing") | |
6d3cff5a | 3834 | (version "2.3.1") |
44d10b1f RW |
3835 | (source |
3836 | (origin | |
3837 | (method url-fetch) | |
3838 | (uri (pypi-uri "pyparsing" version)) | |
3839 | (sha256 | |
6d3cff5a | 3840 | (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6")))) |
44d10b1f RW |
3841 | (build-system python-build-system) |
3842 | (outputs '("out" "doc")) | |
3843 | (arguments | |
3844 | `(#:tests? #f ; no test target | |
3845 | #:phases | |
3846 | (modify-phases %standard-phases | |
3847 | (add-after 'install 'install-doc | |
3848 | (lambda* (#:key outputs #:allow-other-keys) | |
3849 | (let* ((doc (string-append (assoc-ref outputs "doc") | |
3850 | "/share/doc/" ,name "-" ,version)) | |
3851 | (html-doc (string-append doc "/html")) | |
3852 | (examples (string-append doc "/examples"))) | |
3853 | (mkdir-p html-doc) | |
3854 | (mkdir-p examples) | |
3855 | (for-each | |
3856 | (lambda (dir tgt) | |
3857 | (map (lambda (file) | |
3858 | (install-file file tgt)) | |
3859 | (find-files dir ".*"))) | |
3860 | (list "docs" "htmldoc" "examples") | |
3861 | (list doc html-doc examples)) | |
3862 | #t)))))) | |
3863 | (home-page "https://github.com/pyparsing/pyparsing") | |
3864 | (synopsis "Python parsing class library") | |
3865 | (description | |
3866 | "The pyparsing module is an alternative approach to creating and | |
3867 | executing simple grammars, vs. the traditional lex/yacc approach, or the use | |
3868 | of regular expressions. The pyparsing module provides a library of classes | |
3869 | that client code uses to construct the grammar directly in Python code.") | |
3870 | (license license:expat))) | |
3871 | ||
3872 | (define-public python2-pyparsing | |
3873 | (package-with-python2 python-pyparsing)) | |
3874 | ||
3875 | (define-public python-numpydoc | |
3876 | (package | |
3877 | (name "python-numpydoc") | |
3878 | (version "0.8.0") | |
3879 | (source | |
3880 | (origin | |
3881 | (method url-fetch) | |
3882 | (uri (pypi-uri "numpydoc" version)) | |
3883 | (sha256 | |
3884 | (base32 | |
3885 | "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31")))) | |
3886 | (build-system python-build-system) | |
3887 | (propagated-inputs | |
3888 | `(("python-sphinx" ,python-sphinx))) | |
3889 | (native-inputs | |
3890 | `(("python-nose" ,python-nose))) | |
e85af137 | 3891 | (home-page "https://pypi.org/project/numpydoc/") |
44d10b1f RW |
3892 | (synopsis |
3893 | "Numpy's Sphinx extensions") | |
3894 | (description | |
3895 | "Sphinx extension to support docstrings in Numpy format.") | |
3896 | (license license:bsd-2))) | |
3897 | ||
3898 | (define-public python2-numpydoc | |
3899 | (package-with-python2 python-numpydoc)) | |
3900 | ||
3901 | (define-public python-numexpr | |
3902 | (package | |
3903 | (name "python-numexpr") | |
3904 | (version "2.6.5") | |
3905 | (source | |
3906 | (origin | |
3907 | (method url-fetch) | |
3908 | (uri (pypi-uri "numexpr" version)) | |
3909 | (sha256 | |
3910 | (base32 | |
3911 | "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq")))) | |
3912 | (build-system python-build-system) | |
3913 | (arguments `(#:tests? #f)) ; no tests included | |
3914 | (propagated-inputs | |
3915 | `(("python-numpy" ,python-numpy))) | |
3916 | (home-page "https://github.com/pydata/numexpr") | |
3917 | (synopsis "Fast numerical expression evaluator for NumPy") | |
3918 | (description | |
3919 | "Numexpr is a fast numerical expression evaluator for NumPy. With it, | |
3920 | expressions that operate on arrays are accelerated and use less memory than | |
3921 | doing the same calculation in Python. In addition, its multi-threaded | |
3922 | capabilities can make use of all your cores, which may accelerate | |
3923 | computations, most specially if they are not memory-bounded (e.g. those using | |
3924 | transcendental functions).") | |
3925 | (license license:expat))) | |
3926 | ||
3927 | (define-public python2-numexpr | |
3928 | (package-with-python2 python-numexpr)) | |
3929 | ||
3930 | (define-public python-cycler | |
3931 | (package | |
3932 | (name "python-cycler") | |
3933 | (version "0.10.0") | |
3934 | (source (origin | |
3935 | (method url-fetch) | |
3936 | (uri (pypi-uri "cycler" version)) | |
3937 | (sha256 | |
3938 | (base32 | |
3939 | "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd")))) | |
3940 | (build-system python-build-system) | |
3941 | (arguments | |
3942 | ;; XXX: The current version requires 'coveralls' which we don't have. | |
3943 | ;; Enable this for the next release which uses 'python-pytest'. | |
3944 | '(#:tests? #f)) | |
3945 | (propagated-inputs | |
3946 | `(("python-six" ,python-six))) | |
3947 | (home-page "http://matplotlib.org/cycler/") | |
3948 | (synopsis "Composable keyword argument iterator") | |
3949 | (description | |
3950 | "When using @code{matplotlib} and plotting more than one line, it is | |
3951 | common to want to be able to want to be able to cycle over one or more artist | |
3952 | styles; but the plotting logic can quickly become involved. | |
3953 | To address this and enable easy cycling over arbitrary @code{kwargs}, the | |
3954 | @code{Cycler} class was developed.") | |
3955 | (license license:bsd-3))) | |
3956 | ||
3957 | (define-public python2-cycler | |
3958 | (package-with-python2 python-cycler)) | |
3959 | ||
3960 | (define-public python-colorspacious | |
3961 | (package | |
3962 | (name "python-colorspacious") | |
53a3ebed | 3963 | (version "1.1.2") |
44d10b1f | 3964 | (source |
dee92e65 TGR |
3965 | (origin |
3966 | (method git-fetch) | |
3967 | (uri (git-reference | |
3968 | (url "https://github.com/njsmith/colorspacious.git") | |
3969 | (commit (string-append "v" version)))) | |
3970 | (file-name (git-file-name name version)) | |
3971 | (sha256 | |
53a3ebed | 3972 | (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w")))) |
44d10b1f RW |
3973 | (build-system python-build-system) |
3974 | (propagated-inputs | |
3975 | `(("python-numpy" ,python-numpy))) | |
3976 | (native-inputs | |
3977 | `(("python-nose" ,python-nose))) | |
3978 | (arguments | |
3979 | `(#:phases | |
3980 | (modify-phases %standard-phases | |
3981 | (replace 'check | |
3982 | (lambda _ | |
c988afda | 3983 | (invoke "nosetests" "--all-modules" "-v" "colorspacious")))))) |
44d10b1f RW |
3984 | (home-page "https://github.com/njsmith/colorspacious") |
3985 | (synopsis "Python library for colorspace conversions") | |
3986 | (description "@code{colorspacious} is a Python library that lets you | |
3987 | convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") | |
3988 | (license license:expat))) | |
3989 | ||
3990 | (define-public python2-colorspacious | |
3991 | (package-with-python2 python-colorspacious)) | |
3992 | ||
3993 | (define-public python-matplotlib | |
3994 | (package | |
3995 | (name "python-matplotlib") | |
9e7cb2f1 | 3996 | (version "3.1.2") |
44d10b1f RW |
3997 | (source |
3998 | (origin | |
3999 | (method url-fetch) | |
4000 | (uri (pypi-uri "matplotlib" version)) | |
4001 | (sha256 | |
4002 | (base32 | |
9e7cb2f1 | 4003 | "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf")))) |
44d10b1f RW |
4004 | (build-system python-build-system) |
4005 | (propagated-inputs ; the following packages are all needed at run time | |
4006 | `(("python-cycler" ,python-cycler) | |
4007 | ("python-kiwisolver" ,python-kiwisolver) | |
4008 | ("python-pyparsing" ,python-pyparsing) | |
4009 | ("python-pygobject" ,python-pygobject) | |
4010 | ("gobject-introspection" ,gobject-introspection) | |
4011 | ("python-tkinter" ,python "tk") | |
4012 | ("python-dateutil" ,python-dateutil) | |
4013 | ("python-numpy" ,python-numpy) | |
4014 | ("python-pillow" ,python-pillow) | |
4015 | ("python-pytz" ,python-pytz) | |
4016 | ("python-six" ,python-six) | |
44d10b1f RW |
4017 | ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of |
4018 | ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context' | |
4019 | ;; object. For this reason we need to import both libraries. | |
5ea654cf | 4020 | ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi |
44d10b1f | 4021 | ("python-pycairo" ,python-pycairo) |
44d10b1f RW |
4022 | ("python-cairocffi" ,python-cairocffi))) |
4023 | (inputs | |
4024 | `(("libpng" ,libpng) | |
4025 | ("imagemagick" ,imagemagick) | |
4026 | ("freetype" ,freetype) | |
4027 | ("cairo" ,cairo) | |
4028 | ("glib" ,glib) | |
4029 | ;; FIXME: Add backends when available. | |
4030 | ;("python-wxpython" ,python-wxpython) | |
4031 | ("tcl" ,tcl) | |
4032 | ("tk" ,tk))) | |
4033 | (native-inputs | |
4034 | `(("pkg-config" ,pkg-config) | |
5ea654cf RW |
4035 | ("python-pytest" ,python-pytest) |
4036 | ("python-mock" ,python-mock) | |
4037 | ("unzip" ,unzip) | |
4038 | ("jquery-ui" | |
4039 | ,(origin | |
4040 | (method url-fetch) | |
4041 | (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip") | |
4042 | (sha256 | |
4043 | (base32 | |
4044 | "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq")))))) | |
44d10b1f RW |
4045 | (arguments |
4046 | `(#:phases | |
4047 | (modify-phases %standard-phases | |
5ea654cf RW |
4048 | ;; XXX We disable all image comparison tests because we're using a |
4049 | ;; newer version of FreeType than matplotlib expects. This leads to | |
4050 | ;; minor differences throughout the tests. | |
4051 | (add-after 'unpack 'fix-and-disable-failing-tests | |
4052 | (lambda _ | |
4053 | (substitute* (append (find-files "lib/matplotlib/tests/" | |
4054 | "test_.*\\.py$") | |
4055 | (find-files "lib/mpl_toolkits/tests" | |
4056 | "test_.*\\.py$")) | |
4057 | (("^from matplotlib" match) | |
4058 | (string-append "import pytest\n" match)) | |
4059 | (("( *)@image_comparison" match indent) | |
4060 | (string-append indent | |
4061 | "@pytest.mark.skip(reason=\"unknown minor image differences\")\n" | |
4062 | match))) | |
4063 | (substitute* "lib/matplotlib/tests/test_animation.py" | |
4064 | (("/bin/sh") (which "sh"))) | |
4065 | (for-each delete-file | |
4066 | ;; test_normal_axes, test_get_tightbbox_polar | |
4067 | '("lib/matplotlib/tests/test_axes.py" | |
9e7cb2f1 RW |
4068 | ;; We don't use the webagg backend and this test forces it. |
4069 | "lib/matplotlib/tests/test_backend_webagg.py" | |
5ea654cf RW |
4070 | ;; test_outward_ticks |
4071 | "lib/matplotlib/tests/test_tightlayout.py" | |
9e7cb2f1 RW |
4072 | ;; test_hidden_axes fails with minor extent |
4073 | ;; differences, possibly due to the use of a | |
4074 | ;; different version of FreeType. | |
4075 | "lib/matplotlib/tests/test_constrainedlayout.py" | |
5ea654cf RW |
4076 | ;; Fontconfig returns no fonts. |
4077 | "lib/matplotlib/tests/test_font_manager.py")) | |
4078 | #t)) | |
4079 | (add-before 'install 'install-jquery-ui | |
4080 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
4081 | (let ((dir (string-append (assoc-ref outputs "out") | |
4082 | "/lib/python3.7/site-packages/matplotlib/backends/web_backend/"))) | |
4083 | (mkdir-p dir) | |
4084 | (invoke "unzip" | |
4085 | (assoc-ref inputs "jquery-ui") | |
4086 | "-d" dir)) | |
4087 | #t)) | |
c09f598d | 4088 | (replace 'check |
5ea654cf RW |
4089 | (lambda* (#:key outputs inputs #:allow-other-keys) |
4090 | (add-installed-pythonpath inputs outputs) | |
4091 | (invoke "python" "tests.py" "-v" | |
9e7cb2f1 | 4092 | "-m" "not network and not webagg"))) |
44d10b1f RW |
4093 | (add-before 'build 'configure-environment |
4094 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
34c2a16b RW |
4095 | (let ((cairo (assoc-ref inputs "cairo"))) |
4096 | ;; Setting this directory in the 'basedirlist' of 'setup.cfg' | |
44d10b1f | 4097 | ;; has not effect. |
34c2a16b | 4098 | (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib")) |
44d10b1f RW |
4099 | (setenv "HOME" (getcwd)) |
4100 | (call-with-output-file "setup.cfg" | |
4101 | (lambda (port) | |
4102 | (format port "[directories]~% | |
4103 | basedirlist = ~a,~a~% | |
5ea654cf RW |
4104 | [packages]~% |
4105 | tests = True~%" | |
44d10b1f RW |
4106 | (assoc-ref inputs "tcl") |
4107 | (assoc-ref inputs "tk"))))) | |
4108 | #t))))) | |
339b5828 | 4109 | (home-page "https://matplotlib.org/") |
44d10b1f RW |
4110 | (synopsis "2D plotting library for Python") |
4111 | (description | |
4112 | "Matplotlib is a Python 2D plotting library which produces publication | |
4113 | quality figures in a variety of hardcopy formats and interactive environments | |
4114 | across platforms. Matplotlib can be used in Python scripts, the python and | |
4115 | ipython shell, web application servers, and six graphical user interface | |
4116 | toolkits.") | |
4117 | (license license:psfl) | |
4118 | (properties `((python2-variant . ,(delay python2-matplotlib)))))) | |
4119 | ||
4120 | (define-public python2-matplotlib | |
4121 | (let ((matplotlib (package-with-python2 | |
4122 | (strip-python2-variant python-matplotlib)))) | |
4123 | (package (inherit matplotlib) | |
7380df73 | 4124 | (version "2.2.4") |
5ea654cf RW |
4125 | (source |
4126 | (origin | |
4127 | (method url-fetch) | |
4128 | (uri (pypi-uri "matplotlib" version)) | |
4129 | (sha256 | |
4130 | (base32 | |
7380df73 | 4131 | "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2")))) |
5d484f42 EF |
4132 | (arguments |
4133 | (substitute-keyword-arguments (package-arguments matplotlib) | |
4134 | ((#:phases phases) | |
4135 | `(modify-phases ,phases | |
66a3c2db EF |
4136 | (replace 'install-jquery-ui |
4137 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
4138 | (let ((dir (string-append (assoc-ref outputs "out") | |
4139 | "/lib/python2.7/site-packages/" | |
4140 | "matplotlib/backends/web_backend/"))) | |
4141 | (mkdir-p dir) | |
4142 | (invoke "unzip" | |
4143 | (assoc-ref inputs "jquery-ui") | |
4144 | "-d" dir)) | |
4145 | #t)) | |
38a404d5 | 4146 | (delete 'fix-and-disable-failing-tests) |
5d484f42 | 4147 | (delete 'check))))) ; These tests weren't run the the past. |
44d10b1f RW |
4148 | ;; Make sure to use special packages for Python 2 instead |
4149 | ;; of those automatically rewritten by package-with-python2. | |
4150 | (propagated-inputs | |
4151 | `(("python2-pycairo" ,python2-pycairo) | |
4152 | ("python2-backports-functools-lru-cache" | |
4153 | ,python2-backports-functools-lru-cache) | |
4154 | ("python2-functools32" ,python2-functools32) | |
4155 | ("python2-pygobject-2" ,python2-pygobject-2) | |
4156 | ("python2-subprocess32" ,python2-subprocess32) | |
4157 | ("python2-tkinter" ,python-2 "tk") | |
4158 | ,@(fold alist-delete (package-propagated-inputs matplotlib) | |
4159 | '("python-pycairo" "python-pygobject" "python-tkinter"))))))) | |
4160 | ||
4161 | (define-public python-matplotlib-documentation | |
4162 | (package | |
4163 | (name "python-matplotlib-documentation") | |
4164 | (version (package-version python-matplotlib)) | |
4165 | (source (package-source python-matplotlib)) | |
4166 | (build-system python-build-system) | |
4167 | (native-inputs | |
4168 | `(("python-matplotlib" ,python-matplotlib) | |
4169 | ("python-colorspacious" ,python-colorspacious) | |
4170 | ("python-sphinx" ,python-sphinx) | |
5ad0a452 | 4171 | ("python-sphinx-copybutton" ,python-sphinx-copybutton) |
44d10b1f RW |
4172 | ("python-sphinx-gallery" ,python-sphinx-gallery) |
4173 | ("python-numpydoc" ,python-numpydoc) | |
4174 | ("python-ipython" ,python-ipython) | |
e7a53914 | 4175 | ("python-ipykernel" ,python-ipykernel) |
44d10b1f RW |
4176 | ("python-mock" ,python-mock) |
4177 | ("graphviz" ,graphviz) | |
f75aa97f | 4178 | ("texlive" ,(texlive-union (list texlive-amsfonts |
e7a53914 RW |
4179 | texlive-latex-amsmath |
4180 | texlive-latex-enumitem | |
4181 | texlive-latex-expdlist | |
4182 | texlive-latex-geometry | |
4183 | texlive-latex-preview | |
4184 | texlive-latex-type1cm | |
4185 | texlive-latex-ucs | |
4186 | ||
4187 | texlive-generic-pdftex | |
4188 | ||
e7a53914 RW |
4189 | texlive-fonts-ec |
4190 | texlive-fonts-adobe-times | |
4191 | texlive-fonts-txfonts))) | |
44d10b1f RW |
4192 | ("texinfo" ,texinfo) |
4193 | ,@(package-native-inputs python-matplotlib))) | |
4194 | (arguments | |
4195 | `(#:tests? #f ; we're only generating documentation | |
4196 | #:phases | |
4197 | (modify-phases %standard-phases | |
5ea654cf RW |
4198 | ;; The tests in python-matplotlib are run after the install phase, so |
4199 | ;; we need to delete the extra phase here. | |
4200 | (delete 'check) | |
44d10b1f RW |
4201 | (replace 'build |
4202 | (lambda _ | |
4203 | (chdir "doc") | |
e7a53914 RW |
4204 | (setenv "PYTHONPATH" |
4205 | (string-append (getenv "PYTHONPATH") | |
4206 | ":" (getcwd) "/../examples/units")) | |
44d10b1f | 4207 | (substitute* "conf.py" |
e7a53914 RW |
4208 | ;; Don't use git. |
4209 | (("^SHA = check_output.*") | |
4210 | (string-append "SHA = \"" ,version "\"\n")) | |
4211 | ;; Don't fetch intersphinx files from the Internet | |
4212 | (("^explicit_order_folders" m) | |
4213 | (string-append "intersphinx_mapping = {}\n" m)) | |
4214 | (("'sphinx.ext.intersphinx',") "") | |
4215 | ;; Disable URL embedding which requires internet access. | |
4216 | (("'https://docs.scipy.org/doc/numpy'") "None") | |
4217 | (("'https://docs.scipy.org/doc/scipy/reference'") "None")) | |
4218 | (invoke "make" | |
4219 | "SPHINXBUILD=sphinx-build" | |
4220 | "SPHINXOPTS=" ; don't abort on warnings | |
4221 | "html" "texinfo"))) | |
44d10b1f RW |
4222 | (replace 'install |
4223 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4224 | (let* ((data (string-append (assoc-ref outputs "out") "/share")) | |
4225 | (doc (string-append data "/doc/python-matplotlib-" ,version)) | |
4226 | (info (string-append data "/info")) | |
4227 | (html (string-append doc "/html"))) | |
4228 | (mkdir-p html) | |
4229 | (mkdir-p info) | |
4230 | (copy-recursively "build/html" html) | |
4231 | (symlink (string-append html "/_images") | |
4232 | (string-append info "/matplotlib-figures")) | |
4233 | (with-directory-excursion "build/texinfo" | |
4234 | (substitute* "matplotlib.texi" | |
4235 | (("@image\\{([^,]*)" all file) | |
4236 | (string-append "@image{matplotlib-figures/" file))) | |
4237 | (symlink (string-append html "/_images") | |
4238 | "./matplotlib-figures") | |
e7a53914 RW |
4239 | (invoke "makeinfo" "--no-split" |
4240 | "-o" "matplotlib.info" "matplotlib.texi")) | |
4241 | (install-file "build/texinfo/matplotlib.info" info)) | |
44d10b1f RW |
4242 | #t))))) |
4243 | (home-page (package-home-page python-matplotlib)) | |
4244 | (synopsis "Documentation for the python-matplotlib package") | |
4245 | (description (package-description python-matplotlib)) | |
4246 | (license (package-license python-matplotlib)))) | |
4247 | ||
4248 | (define-public python2-matplotlib-documentation | |
5ad0a452 RW |
4249 | (let ((parent (package-with-python2 python-matplotlib-documentation))) |
4250 | (package | |
4251 | (inherit parent) | |
4252 | (native-inputs | |
4253 | (alist-delete "python-sphinx-copybutton" | |
4254 | (package-native-inputs parent)))))) | |
44d10b1f | 4255 | |
55dae98f RW |
4256 | (define-public python-matplotlib-venn |
4257 | (package | |
4258 | (name "python-matplotlib-venn") | |
4259 | (version "0.11.5") | |
4260 | (source | |
4261 | (origin | |
4262 | (method url-fetch) | |
4263 | (uri (pypi-uri "matplotlib-venn" version ".zip")) | |
4264 | (sha256 | |
4265 | (base32 | |
4266 | "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy")))) | |
4267 | (build-system python-build-system) | |
4268 | (arguments '(#:tests? #f)) ; tests are not included | |
4269 | (propagated-inputs | |
4270 | `(("python-matplotlib" ,python-matplotlib) | |
4271 | ("python-numpy" ,python-numpy) | |
4272 | ("python-scipy" ,python-scipy))) | |
4273 | (native-inputs | |
4274 | `(("unzip" ,unzip))) | |
4275 | (home-page "https://github.com/konstantint/matplotlib-venn") | |
4276 | (synopsis "Plot area-proportional Venn diagrams") | |
4277 | (description | |
4278 | "This package provides tools for plotting area-proportional two- and | |
4279 | three-way Venn diagrams in @code{matplotlib}.") | |
4280 | (license license:expat))) | |
4281 | ||
44d10b1f RW |
4282 | (define-public python2-pysnptools |
4283 | (package | |
4284 | (name "python2-pysnptools") | |
5d1ade85 | 4285 | (version "0.3.13") |
44d10b1f RW |
4286 | (source |
4287 | (origin | |
4288 | (method url-fetch) | |
5d1ade85 | 4289 | (uri (pypi-uri "pysnptools" version)) |
44d10b1f RW |
4290 | (sha256 |
4291 | (base32 | |
5d1ade85 | 4292 | "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm")))) |
44d10b1f RW |
4293 | (build-system python-build-system) |
4294 | (arguments | |
5d1ade85 RW |
4295 | `(#:python ,python-2 ; only Python 2.7 is supported |
4296 | #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included | |
44d10b1f RW |
4297 | (propagated-inputs |
4298 | `(("python2-numpy" ,python2-numpy) | |
4299 | ("python2-scipy" ,python2-scipy) | |
4300 | ("python2-pandas" ,python2-pandas))) | |
44d10b1f | 4301 | (native-inputs |
5d1ade85 | 4302 | `(("python2-cython" ,python2-cython))) |
1b66989b | 4303 | (home-page "http://microsoftgenomics.github.io/PySnpTools/") |
44d10b1f RW |
4304 | (synopsis "Library for reading and manipulating genetic data") |
4305 | (description | |
4306 | "PySnpTools is a library for reading and manipulating genetic data. It | |
4307 | can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of | |
4308 | those files. It can also efficiently manipulate ranges of integers using set | |
4309 | operators such as union, intersection, and difference.") | |
4310 | (license license:asl2.0))) | |
4311 | ||
44d10b1f RW |
4312 | (define-public python-socksipy-branch |
4313 | (package | |
4314 | (name "python-socksipy-branch") | |
4315 | (version "1.01") | |
4316 | (source | |
4317 | (origin | |
4318 | (method url-fetch) | |
4319 | (uri (pypi-uri "SocksiPy-branch" version)) | |
4320 | (sha256 | |
4321 | (base32 | |
4322 | "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p")))) | |
4323 | (build-system python-build-system) | |
4324 | (arguments | |
4325 | `(#:tests? #f)) ; There are no tests | |
4326 | (home-page "https://code.google.com/archive/p/socksipy-branch/") | |
4327 | (synopsis "Python SOCKS module") | |
4328 | (description | |
4329 | "SocksiPy - A Python SOCKS client module. It provides a | |
4330 | socket-like interface that supports connections to any TCP | |
4331 | service through the use of a SOCKS4, SOCKS5 or HTTP proxy. | |
4332 | The original version was developed by Dan Haim, this is a | |
4333 | branch created by Mario Vilas to address some open issues, | |
4334 | as the original project seems to have been abandoned circa 2007.") | |
4335 | (license license:bsd-3))) | |
4336 | ||
4337 | (define-public python2-socksipy-branch | |
4338 | (package-with-python2 python-socksipy-branch)) | |
4339 | ||
6fcceb23 AG |
4340 | (define-public python-socksipychain |
4341 | (package | |
4342 | (name "python-socksipychain") | |
d97cdff1 | 4343 | (version "2.1.0") |
6fcceb23 AG |
4344 | (source |
4345 | (origin | |
4346 | (method git-fetch) | |
4347 | (uri (git-reference | |
4348 | (url "https://github.com/pagekite/PySocksipyChain.git") | |
4349 | (commit (string-append "v" version)))) | |
4350 | (file-name (git-file-name name version)) | |
4351 | (sha256 | |
4352 | (base32 | |
d97cdff1 | 4353 | "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn")))) |
6fcceb23 AG |
4354 | (build-system python-build-system) |
4355 | (arguments | |
4356 | `(#:tests? #f)) ; Tests try to access the network. | |
4357 | (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/") | |
4358 | (synopsis "Python SOCKS module with chained proxies support") | |
4359 | (description | |
4360 | "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which | |
4361 | adds support for arbitrary chaining of proxy servers and various modes of | |
4362 | TLS/SSL encryption. It was developed for use in PageKite, and also includes | |
4363 | a simple netcat replacement with chaining support.") | |
4364 | (license license:bsd-3))) | |
4365 | ||
44d10b1f RW |
4366 | (define-public python-pycodestyle |
4367 | (package | |
4368 | (name "python-pycodestyle") | |
d16ef28b | 4369 | (version "2.5.0") |
44d10b1f | 4370 | (source |
ba88eea2 RW |
4371 | (origin |
4372 | (method url-fetch) | |
4373 | (uri (pypi-uri "pycodestyle" version)) | |
4374 | (sha256 | |
4375 | (base32 | |
d16ef28b | 4376 | "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4")))) |
44d10b1f RW |
4377 | (build-system python-build-system) |
4378 | (home-page "https://pycodestyle.readthedocs.io/") | |
4379 | (synopsis "Python style guide checker") | |
4380 | (description "@code{pycodestyle} (formerly pep8) is a tool to check | |
4381 | Python code against some of the style conventions in | |
4382 | @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.") | |
4383 | (license license:expat))) | |
4384 | ||
4385 | (define-public python2-pycodestyle | |
4386 | (package-with-python2 python-pycodestyle)) | |
4387 | ||
4388 | (define-public python-multidict | |
4389 | (package | |
4390 | (name "python-multidict") | |
4391 | (version "4.2.0") | |
4392 | (source | |
4393 | (origin | |
4394 | (method url-fetch) | |
4395 | (uri (pypi-uri "multidict" version)) | |
4396 | (sha256 | |
4397 | (base32 | |
4398 | "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194")))) | |
4399 | (build-system python-build-system) | |
4400 | (native-inputs | |
4401 | `(("python-pytest" ,python-pytest) | |
4402 | ("python-pytest-runner" ,python-pytest-runner))) | |
4403 | (home-page "https://github.com/aio-libs/multidict/") | |
4404 | (synopsis "Multidict implementation") | |
4405 | (description "Multidict is dict-like collection of key-value pairs | |
4406 | where key might be occurred more than once in the container.") | |
4407 | (license license:asl2.0))) | |
4408 | ||
4409 | (define-public python-orderedmultidict | |
4410 | (package | |
4411 | (name "python-orderedmultidict") | |
4412 | (version "0.7.11") | |
4413 | (source | |
4414 | (origin | |
4415 | (method url-fetch) | |
4416 | (uri (pypi-uri "orderedmultidict" version)) | |
4417 | (sha256 | |
4418 | (base32 | |
4419 | "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw")))) | |
4420 | (build-system python-build-system) | |
4421 | (arguments | |
4422 | `(#:phases | |
4423 | (modify-phases %standard-phases | |
4424 | (add-after 'unpack 'fix-tests | |
4425 | (lambda _ | |
4426 | ;; The package uses nosetest for running the tests. | |
4427 | ;; Adding this initfile allows to run the test suite | |
4428 | ;; without requiring nosetest. | |
d1c4f329 RW |
4429 | (with-output-to-file "tests/__init__.py" newline) |
4430 | #t))))) | |
44d10b1f RW |
4431 | (propagated-inputs |
4432 | `(("python-six" ,python-six))) | |
4433 | (native-inputs | |
4434 | `(("python-pycodestyle" ,python-pycodestyle))) | |
4435 | (home-page "https://github.com/gruns/orderedmultidict") | |
4436 | (synopsis "Python Ordered Multivalue Dictionary - omdict") | |
4437 | (description "This package contains a library for ordered multivalue | |
4438 | dictionaries. A multivalue dictionary is a dictionary that can store | |
4439 | multiple values for the same key. An ordered multivalue dictionary is a | |
4440 | multivalue dictionary that retains the order of insertions and deletions.") | |
4441 | (license license:unlicense))) | |
4442 | ||
4443 | (define-public python2-orderedmultidict | |
4444 | (package-with-python2 python-orderedmultidict)) | |
4445 | ||
4446 | (define-public python-autopep8 | |
4447 | (package | |
4448 | (name "python-autopep8") | |
4449 | (version "1.3.5") | |
4450 | (source | |
4451 | (origin | |
4452 | (method url-fetch) | |
4453 | (uri (pypi-uri "autopep8" version)) | |
4454 | (sha256 | |
4455 | (base32 | |
4456 | "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112")))) | |
4457 | (build-system python-build-system) | |
4458 | (propagated-inputs | |
4459 | `(("python-pycodestyle" ,python-pycodestyle))) | |
4460 | (home-page "https://github.com/hhatto/autopep8") | |
4461 | (synopsis "Format Python code according to the PEP 8 style guide") | |
4462 | (description | |
4463 | "@code{autopep8} automatically formats Python code to conform to | |
4464 | the PEP 8 style guide. It uses the pycodestyle utility to determine | |
4465 | what parts of the code needs to be formatted. @code{autopep8} is | |
4466 | capable of fixing most of the formatting issues that can be reported | |
4467 | by pycodestyle.") | |
4468 | (license (license:non-copyleft | |
4469 | "https://github.com/hhatto/autopep8/blob/master/LICENSE")))) | |
4470 | ||
4471 | (define-public python2-autopep8 | |
4472 | (package-with-python2 python-autopep8)) | |
4473 | ||
f2a64830 JK |
4474 | (define-public python-distlib |
4475 | (package | |
4476 | (name "python-distlib") | |
4477 | (version "0.3.0") | |
4478 | (source | |
4479 | (origin | |
4480 | (method url-fetch) | |
4481 | (uri (pypi-uri "distlib" version ".zip")) | |
4482 | (sha256 | |
4483 | (base32 | |
4484 | "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if")))) | |
4485 | (build-system python-build-system) | |
4486 | (arguments | |
4487 | `(#:phases | |
4488 | (modify-phases %standard-phases | |
4489 | (add-before 'build 'no-/bin/sh | |
4490 | (lambda _ | |
4491 | (substitute* '("distlib/scripts.py" "tests/test_scripts.py") | |
4492 | (("/bin/sh") (which "sh"))) | |
4493 | #t)) | |
4494 | (add-before 'check 'prepare-test-env | |
4495 | (lambda _ | |
4496 | (setenv "HOME" "/tmp") | |
4497 | ;; NOTE: Any value works, the variable just has to be present. | |
4498 | (setenv "SKIP_ONLINE" "1") | |
4499 | #t))))) | |
4500 | (native-inputs `(("unzip" ,unzip))) | |
4501 | (home-page "https://bitbucket.org/pypa/distlib") | |
4502 | (synopsis "Distribution utilities") | |
4503 | (description "Distlib is a library which implements low-level functions that | |
4504 | relate to packaging and distribution of Python software. It is intended to be | |
4505 | used as the basis for third-party packaging tools.") | |
4506 | (license license:psfl))) | |
4507 | ||
44d10b1f RW |
4508 | (define-public python-distutils-extra |
4509 | (package | |
4510 | (name "python-distutils-extra") | |
4511 | (version "2.38") | |
4512 | (source | |
4513 | (origin | |
4514 | (method url-fetch) | |
4515 | (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/" | |
4516 | version "/+download/python-distutils-extra-" | |
4517 | version ".tar.gz")) | |
4518 | (sha256 | |
4519 | (base32 | |
4520 | "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x")))) | |
4521 | (build-system python-build-system) | |
4522 | (home-page "https://launchpad.net/python-distutils-extra/") | |
4523 | (synopsis "Enhancements to Python's distutils") | |
4524 | (description | |
4525 | "The python-distutils-extra module enables you to easily integrate | |
4526 | gettext support, themed icons, and scrollkeeper-based documentation into | |
4527 | Python's distutils.") | |
4528 | (license license:gpl2))) | |
4529 | ||
4530 | (define-public python2-distutils-extra | |
4531 | (package-with-python2 python-distutils-extra)) | |
4532 | ||
4533 | (define-public python2-elib.intl | |
4534 | (package | |
4535 | (name "python2-elib.intl") | |
4536 | (version "0.0.3") | |
4537 | (source | |
4538 | (origin | |
4539 | ;; This project doesn't tag releases or publish tarballs, so we take | |
4540 | ;; source from a (semi-arbitrary, i.e. latest as of now) git commit. | |
4541 | (method git-fetch) | |
4542 | (uri (git-reference | |
4543 | (url "https://github.com/dieterv/elib.intl.git") | |
4544 | (commit "d09997cfef"))) | |
4545 | (file-name (string-append name "-" version "-checkout")) | |
4546 | (sha256 | |
4547 | (base32 | |
4548 | "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d")))) | |
4549 | (build-system python-build-system) | |
4550 | (arguments | |
4551 | ;; incompatible with Python 3 (exception syntax) | |
4552 | `(#:python ,python-2 | |
4553 | #:tests? #f)) | |
4554 | (home-page "https://github.com/dieterv/elib.intl") | |
4555 | (synopsis "Enhanced internationalization for Python") | |
4556 | (description | |
4557 | "The elib.intl module provides enhanced internationalization (I18N) | |
4558 | services for your Python modules and applications.") | |
4559 | (license license:lgpl3+))) | |
4560 | ||
4561 | (define-public python-olefile | |
4562 | (package | |
4563 | (name "python-olefile") | |
5bef0f10 | 4564 | (version "0.46") |
44d10b1f RW |
4565 | (source |
4566 | (origin | |
4567 | (method url-fetch) | |
5bef0f10 MB |
4568 | (uri (string-append "https://github.com/decalage2/olefile/releases/" |
4569 | "download/v" version "/olefile-" version ".tar.gz")) | |
44d10b1f RW |
4570 | (file-name (string-append name "-" version ".tar.gz")) |
4571 | (sha256 | |
4572 | (base32 | |
5bef0f10 | 4573 | "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m")))) |
44d10b1f | 4574 | (build-system python-build-system) |
5bef0f10 | 4575 | (home-page "https://www.decalage.info/python/olefileio") |
44d10b1f RW |
4576 | (synopsis "Read and write Microsoft OLE2 files.") |
4577 | (description | |
4578 | "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured | |
4579 | Storage or Compound Document, Microsoft Office). It is an improved version of | |
4580 | the OleFileIO module from PIL, the Python Image Library.") | |
4581 | (license license:bsd-3))) | |
4582 | ||
4583 | (define-public python2-olefile | |
4584 | (package-with-python2 python-olefile)) | |
4585 | ||
4586 | (define-public python-pillow | |
4587 | (package | |
4588 | (name "python-pillow") | |
5fbdd917 | 4589 | (version "6.2.1") |
44d10b1f RW |
4590 | (source |
4591 | (origin | |
4592 | (method url-fetch) | |
4593 | (uri (pypi-uri "Pillow" version)) | |
4594 | (sha256 | |
4595 | (base32 | |
5fbdd917 | 4596 | "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz")))) |
44d10b1f RW |
4597 | (build-system python-build-system) |
4598 | (native-inputs | |
4599 | `(("python-pytest" ,python-pytest))) | |
4600 | (inputs | |
4601 | `(("freetype" ,freetype) | |
4602 | ("lcms" ,lcms) | |
44d10b1f | 4603 | ("libjpeg" ,libjpeg) |
44d10b1f | 4604 | ("libtiff" ,libtiff) |
0c4e1c5f EF |
4605 | ("libwebp" ,libwebp) |
4606 | ("openjpeg" ,openjpeg) | |
4607 | ("zlib" ,zlib))) | |
44d10b1f RW |
4608 | (propagated-inputs |
4609 | `(("python-olefile" ,python-olefile))) | |
4610 | (arguments | |
4611 | `(#:phases | |
4612 | (modify-phases %standard-phases | |
4613 | (add-after 'unpack 'patch-ldconfig | |
4614 | (lambda _ | |
4615 | (substitute* "setup.py" | |
4616 | (("\\['/sbin/ldconfig', '-p'\\]") "['true']")))) | |
61b77ff3 | 4617 | (replace 'check |
979d8464 EF |
4618 | (lambda* (#:key outputs inputs tests? #:allow-other-keys) |
4619 | (if tests? | |
4620 | (begin | |
4621 | (setenv "HOME" (getcwd)) | |
4622 | ;; Make installed package available for running the tests. | |
4623 | (add-installed-pythonpath inputs outputs) | |
4624 | (invoke "python" "selftest.py" "--installed") | |
4625 | (invoke "python" "-m" "pytest" "-vv")) | |
4626 | #t)))))) | |
44d10b1f RW |
4627 | (home-page "https://python-pillow.org") |
4628 | (synopsis "Fork of the Python Imaging Library") | |
4629 | (description | |
4630 | "The Python Imaging Library adds image processing capabilities to your | |
4631 | Python interpreter. This library provides extensive file format support, an | |
4632 | efficient internal representation, and fairly powerful image processing | |
4633 | capabilities. The core image library is designed for fast access to data | |
4634 | stored in a few basic pixel formats. It should provide a solid foundation for | |
4635 | a general image processing tool.") | |
4636 | (license (license:x11-style | |
4637 | "http://www.pythonware.com/products/pil/license.htm" | |
4638 | "The PIL Software License")))) | |
4639 | ||
4640 | (define-public python2-pillow | |
4641 | (package-with-python2 python-pillow)) | |
4642 | ||
4643 | (define-public python-pycparser | |
4644 | (package | |
4645 | (name "python-pycparser") | |
c6c0940e | 4646 | (version "2.19") |
44d10b1f RW |
4647 | (source |
4648 | (origin | |
4649 | (method url-fetch) | |
4650 | (uri (pypi-uri "pycparser" version)) | |
4651 | (sha256 | |
4652 | (base32 | |
c6c0940e | 4653 | "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259")))) |
44d10b1f RW |
4654 | (outputs '("out" "doc")) |
4655 | (build-system python-build-system) | |
4656 | (native-inputs | |
4657 | `(("pkg-config" ,pkg-config))) | |
4658 | (arguments | |
4659 | `(#:phases | |
4660 | (modify-phases %standard-phases | |
4661 | (replace 'check | |
4662 | (lambda _ | |
4663 | (with-directory-excursion "tests" | |
acb75c03 RW |
4664 | (invoke "python" "all_tests.py")) |
4665 | #t)) | |
44d10b1f RW |
4666 | (add-after 'install 'install-doc |
4667 | (lambda* (#:key outputs #:allow-other-keys) | |
4668 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4669 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
4670 | (examples (string-append doc "/examples"))) | |
4671 | (mkdir-p examples) | |
4672 | (for-each (lambda (file) | |
4673 | (copy-file (string-append "." file) | |
4674 | (string-append doc file))) | |
4675 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
c6c0940e MB |
4676 | (copy-recursively "examples" examples) |
4677 | #t)))))) | |
44d10b1f RW |
4678 | (home-page "https://github.com/eliben/pycparser") |
4679 | (synopsis "C parser in Python") | |
4680 | (description | |
4681 | "Pycparser is a complete parser of the C language, written in pure Python | |
4682 | using the PLY parsing library. It parses C code into an AST and can serve as | |
4683 | a front-end for C compilers or analysis tools.") | |
4684 | (license license:bsd-3))) | |
4685 | ||
4686 | (define-public python2-pycparser | |
4687 | (package-with-python2 python-pycparser)) | |
4688 | ||
4689 | (define-public python-pywavelets | |
4690 | (package | |
4691 | (name "python-pywavelets") | |
4692 | (version "1.0.1") | |
4693 | (home-page "https://github.com/PyWavelets/pywt") | |
4694 | (source (origin | |
4695 | (method url-fetch) | |
4696 | (uri (pypi-uri "PyWavelets" version)) | |
4697 | (sha256 | |
4698 | (base32 | |
4699 | "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w")))) | |
4700 | (build-system python-build-system) | |
4701 | (arguments | |
4702 | '(#:modules ((ice-9 ftw) | |
4703 | (srfi srfi-1) | |
4704 | (srfi srfi-26) | |
4705 | (guix build utils) | |
4706 | (guix build python-build-system)) | |
4707 | #:phases (modify-phases %standard-phases | |
4708 | (replace 'check | |
4709 | (lambda _ | |
4710 | (let ((cwd (getcwd)) | |
4711 | (libdir (find (cut string-prefix? "lib." <>) | |
4712 | (scandir "build")))) | |
4713 | (with-directory-excursion (string-append cwd "/build/" libdir) | |
4714 | (invoke "nosetests" "-v" ".")))))))) | |
4715 | (native-inputs | |
4716 | `(("python-matplotlib" ,python-matplotlib) ;for tests | |
4717 | ("python-nose" ,python-nose))) | |
4718 | (propagated-inputs | |
4719 | `(("python-numpy" ,python-numpy))) | |
4720 | (synopsis "Wavelet transforms in Python") | |
4721 | (description | |
4722 | "PyWavelets is a library for wavelet transforms in Python. Wavelets are | |
4723 | mathematical basis functions that are localized in both time and frequency. | |
4724 | Wavelet transforms are time-frequency transforms employing wavelets. They are | |
4725 | similar to Fourier transforms, the difference being that Fourier transforms are | |
4726 | localized only in frequency instead of in time and frequency.") | |
4727 | (license license:expat))) | |
4728 | ||
4729 | (define-public python2-pywavelets | |
4730 | (package-with-python2 python-pywavelets)) | |
4731 | ||
4732 | (define-public python-xcffib | |
4733 | (package | |
4734 | (name "python-xcffib") | |
4735 | (version "0.6.0") | |
4736 | (source | |
4737 | (origin | |
4738 | (method url-fetch) | |
4739 | (uri (pypi-uri "xcffib" version)) | |
4740 | (sha256 | |
4741 | (base32 | |
4742 | "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n")))) | |
4743 | (build-system python-build-system) | |
4744 | (inputs | |
4745 | `(("libxcb" ,libxcb))) | |
4746 | (propagated-inputs | |
4747 | `(("python-cffi" ,python-cffi) ; used at run time | |
4748 | ("python-six" ,python-six))) | |
4749 | (arguments | |
4750 | `(;; FIXME: Tests need more work. See ".travis.yml" in the repository. | |
4751 | #:tests? #f | |
4752 | #:phases | |
4753 | (modify-phases %standard-phases | |
4754 | (add-after 'unpack 'fix-libxcb-path | |
4755 | (lambda* (#:key inputs #:allow-other-keys) | |
4756 | (let ((libxcb (assoc-ref inputs "libxcb"))) | |
4757 | (substitute* '("xcffib/__init__.py") | |
4758 | (("^soname = \"") (string-append "soname = \"" libxcb "/lib/"))) | |
4759 | #t))) | |
4760 | (add-after 'install 'install-doc | |
4761 | (lambda* (#:key outputs #:allow-other-keys) | |
4762 | (let ((doc (string-append (assoc-ref outputs "out") "/share" | |
4763 | "/doc/" ,name "-" ,version))) | |
4764 | (mkdir-p doc) | |
4765 | (copy-file "README.md" | |
4766 | (string-append doc "/README.md")) | |
4767 | #t)))))) | |
4768 | (home-page "https://github.com/tych0/xcffib") | |
4769 | (synopsis "XCB Python bindings") | |
4770 | (description | |
4771 | "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds | |
4772 | support for Python 3 and PyPy. It is based on cffi.") | |
4773 | (license license:expat))) | |
4774 | ||
4775 | (define-public python2-xcffib | |
4776 | (package-with-python2 python-xcffib)) | |
4777 | ||
4778 | (define-public python-cairocffi | |
4779 | (package | |
4780 | (name "python-cairocffi") | |
4781 | (version "0.9.0") | |
4782 | (source | |
4783 | (origin | |
4784 | (method url-fetch) | |
4785 | (uri (pypi-uri "cairocffi" version)) | |
4786 | (sha256 | |
4787 | (base32 | |
4788 | "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m")) | |
4789 | (patches (search-patches "python-cairocffi-dlopen-path.patch")))) | |
4790 | (build-system python-build-system) | |
4791 | (outputs '("out" "doc")) | |
4792 | (inputs | |
4793 | `(("glib" ,glib) | |
4794 | ("gtk+" ,gtk+) | |
4795 | ("gdk-pixbuf" ,gdk-pixbuf) | |
4796 | ("cairo" ,cairo) | |
4797 | ("pango" ,pango))) | |
4798 | (native-inputs | |
4799 | `(("pkg-config" ,pkg-config) | |
4800 | ("python-pytest" ,python-pytest) | |
4801 | ("python-pytest-cov" ,python-pytest-cov) | |
4802 | ("python-pytest-runner" ,python-pytest-runner) | |
4803 | ("python-sphinx" ,python-sphinx) | |
4804 | ("python-docutils" ,python-docutils))) | |
4805 | (propagated-inputs | |
4806 | `(("python-xcffib" ,python-xcffib))) ; used at run time | |
4807 | (arguments | |
4808 | `(#:phases | |
4809 | (modify-phases %standard-phases | |
4810 | (add-after 'unpack 'patch-paths | |
4811 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4812 | (substitute* (find-files "." "\\.py$") | |
4813 | (("dlopen\\(ffi, 'cairo'") | |
4814 | (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo") | |
4815 | "/lib/libcairo.so.2'")) | |
4816 | (("dlopen\\(ffi, 'gdk-3'") | |
4817 | (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+") | |
4818 | "/lib/libgtk-3.so.0'")) | |
4819 | (("dlopen\\(ffi, 'gdk_pixbuf-2.0'") | |
4820 | (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf") | |
4821 | "/lib/libgdk_pixbuf-2.0.so.0'")) | |
4822 | (("dlopen\\(ffi, 'glib-2.0'") | |
4823 | (string-append "dlopen(ffi, '" (assoc-ref inputs "glib") | |
4824 | "/lib/libglib-2.0.so.0'")) | |
4825 | (("dlopen\\(ffi, 'gobject-2.0'") | |
4826 | (string-append "dlopen(ffi, '" (assoc-ref inputs "glib") | |
4827 | "/lib/libgobject-2.0.so.0'")) | |
4828 | (("dlopen\\(ffi, 'pangocairo-1.0'") | |
4829 | (string-append "dlopen(ffi, '" (assoc-ref inputs "pango") | |
4830 | "/lib/libpangocairo-1.0.so.0'")) | |
4831 | (("dlopen\\(ffi, 'pango-1.0'") | |
4832 | (string-append "dlopen(ffi, '" (assoc-ref inputs "pango") | |
4833 | "/lib/libpango-1.0.so.0'"))) | |
4834 | #t)) | |
4835 | (add-after 'install 'install-doc | |
4836 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4837 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
4838 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
4839 | (html (string-append doc "/html"))) | |
4840 | (setenv "LD_LIBRARY_PATH" | |
4841 | (string-append (assoc-ref inputs "cairo") "/lib" ":" | |
4842 | (assoc-ref inputs "gdk-pixbuf") "/lib")) | |
4843 | (setenv "LANG" "en_US.UTF-8") | |
4844 | (mkdir-p html) | |
4845 | (for-each (lambda (file) | |
4846 | (copy-file (string-append "." file) | |
4847 | (string-append doc file))) | |
4848 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
4849 | (system* "python" "setup.py" "build_sphinx") | |
4850 | (copy-recursively "docs/_build/html" html) | |
4851 | #t)))))) | |
4852 | (home-page "https://github.com/Kozea/cairocffi") | |
4853 | (synopsis "Python bindings and object-oriented API for Cairo") | |
4854 | (description | |
4855 | "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of | |
4856 | Python bindings and object-oriented API for cairo. Cairo is a 2D vector | |
4857 | graphics library with support for multiple backends including image buffers, | |
4858 | PNG, PostScript, PDF, and SVG file output.") | |
4859 | (license license:bsd-3))) | |
4860 | ||
4861 | (define-public python2-cairocffi | |
4862 | (package-with-python2 python-cairocffi)) | |
4863 | ||
4864 | (define-public python-decorator | |
4865 | (package | |
4866 | (name "python-decorator") | |
4867 | (version "4.3.0") | |
4868 | (source | |
4869 | (origin | |
4870 | (method url-fetch) | |
4871 | (uri (pypi-uri "decorator" version)) | |
4872 | (sha256 | |
4873 | (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3")))) | |
4874 | (build-system python-build-system) | |
e85af137 | 4875 | (home-page "https://pypi.org/project/decorator/") |
44d10b1f RW |
4876 | (synopsis "Python module to simplify usage of decorators") |
4877 | (description | |
4878 | "The aim of the decorator module is to simplify the usage of decorators | |
4879 | for the average programmer, and to popularize decorators usage giving examples | |
4880 | of useful decorators, such as memoize, tracing, redirecting_stdout, locked, | |
4881 | etc. The core of this module is a decorator factory.") | |
4882 | (license license:expat))) | |
4883 | ||
4884 | (define-public python2-decorator | |
4885 | (package-with-python2 python-decorator)) | |
4886 | ||
4887 | (define-public python-drmaa | |
4888 | (package | |
4889 | (name "python-drmaa") | |
4890 | (version "0.7.7") | |
4891 | (source | |
4892 | (origin | |
4893 | (method url-fetch) | |
4894 | (uri (pypi-uri "drmaa" version)) | |
4895 | (sha256 | |
4896 | (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx")))) | |
4897 | (build-system python-build-system) | |
4898 | ;; The test suite requires libdrmaa which is provided by the cluster | |
4899 | ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH | |
4900 | ;; should be set to the path of the libdrmaa library. | |
4901 | (arguments '(#:tests? #f)) | |
4902 | (native-inputs | |
4903 | `(("python-nose" ,python-nose))) | |
e85af137 | 4904 | (home-page "https://pypi.org/project/drmaa/") |
44d10b1f RW |
4905 | (synopsis "Python bindings for the DRMAA library") |
4906 | (description | |
4907 | "A Python package for Distributed Resource Management (DRM) job | |
4908 | submission and control. This package is an implementation of the DRMAA 1.0 | |
4909 | Python language binding specification.") | |
4910 | (license license:bsd-3))) | |
4911 | ||
4912 | (define-public python2-drmaa | |
4913 | (package-with-python2 python-drmaa)) | |
4914 | ||
4915 | (define-public python-grako | |
4916 | (package | |
4917 | (name "python-grako") | |
4918 | (version "3.99.9") | |
4919 | (source | |
4920 | (origin | |
4921 | (method url-fetch) | |
4922 | (uri | |
4923 | (pypi-uri "grako" version ".zip")) | |
4924 | (sha256 | |
4925 | (base32 | |
4926 | "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw")))) | |
4927 | (build-system python-build-system) | |
4928 | (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive. | |
4929 | (native-inputs | |
4930 | `(("unzip" ,unzip) | |
4931 | ("python-pytest" ,python-pytest) | |
4932 | ("python-pytest-runner" ,python-pytest-runner))) | |
4933 | (home-page "https://bitbucket.org/neogeny/grako") | |
4934 | (synopsis "EBNF parser generator") | |
4935 | (description | |
4936 | "Grako takes a grammar in a variation of EBNF as input, and outputs a | |
4937 | memoizing PEG/Packrat parser in Python.") | |
4938 | (license license:bsd-3))) | |
4939 | ||
4940 | (define-public python2-grako | |
4941 | (package-with-python2 python-grako)) | |
4942 | ||
4943 | (define-public python-gridmap | |
4944 | (package | |
4945 | (name "python-gridmap") | |
4946 | (version "0.13.0") | |
4947 | (source | |
4948 | (origin | |
768fea0f TGR |
4949 | (method git-fetch) |
4950 | (uri (git-reference | |
4951 | (url "https://github.com/pygridtools/gridmap.git") | |
4952 | (commit (string-append "v" version)))) | |
4953 | (file-name (git-file-name name version)) | |
44d10b1f | 4954 | (sha256 |
768fea0f | 4955 | (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm")))) |
44d10b1f RW |
4956 | (build-system python-build-system) |
4957 | (arguments | |
4958 | '(#:tests? #f)) ; FIXME: Requires python-cherrypy. | |
4959 | (propagated-inputs | |
4960 | `(("python-psutil" ,python-psutil) | |
4961 | ("python-drmaa" ,python-drmaa) | |
4962 | ("python-pyzmq" ,python-pyzmq))) | |
4963 | (home-page "https://github.com/pygridtools/gridmap") | |
4964 | (synopsis "Create jobs on a cluster directly from Python") | |
4965 | (description | |
4966 | "Gridmap is a Python package to allow you to easily create jobs on the | |
4967 | cluster directly from Python. You can directly map Python functions onto the | |
4968 | cluster without needing to write any wrapper code yourself.") | |
4969 | (license license:gpl3+))) | |
4970 | ||
4971 | (define-public python2-gridmap | |
4972 | (package-with-python2 python-gridmap)) | |
4973 | ||
4974 | (define-public python-honcho | |
4975 | (package | |
4976 | (name "python-honcho") | |
4977 | (version "1.0.1") | |
4978 | (source | |
4979 | (origin | |
8524d130 TGR |
4980 | (method git-fetch) |
4981 | (uri (git-reference | |
4982 | (url "https://github.com/nickstenning/honcho.git") | |
4983 | (commit (string-append "v" version)))) | |
4984 | (file-name (git-file-name name version)) | |
44d10b1f | 4985 | (sha256 |
8524d130 | 4986 | (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b")))) |
44d10b1f RW |
4987 | (build-system python-build-system) |
4988 | (native-inputs | |
4989 | `(("python-pytest" ,python-pytest) | |
4990 | ("python-mock" ,python-mock) | |
4991 | ("python-tox" ,python-tox) | |
4992 | ("which" ,which))) ;for tests | |
4993 | (propagated-inputs | |
4994 | `(("python-jinja2" ,python-jinja2))) | |
4995 | (arguments | |
4996 | `(#:phases | |
4997 | (modify-phases %standard-phases | |
4998 | (delete 'check) | |
4999 | (add-after 'install 'check | |
5000 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
5001 | ;; fix honcho path in testsuite | |
5002 | (substitute* "tests/conftest.py" | |
5003 | (("'honcho'") (string-append "'" (assoc-ref outputs "out") | |
5004 | "/bin/honcho" "'"))) | |
5005 | ;; It's easier to run tests after install. | |
5006 | ;; Make installed package available for running the tests | |
5007 | (add-installed-pythonpath inputs outputs) | |
95b707fb | 5008 | (invoke "py.test" "-v")))))) |
44d10b1f RW |
5009 | (home-page "https://github.com/nickstenning/honcho") |
5010 | (synopsis "Manage Procfile-based applications") | |
5011 | (description | |
5012 | "A Procfile is a file which describes how to run an application | |
50fceab0 | 5013 | consisting of several processes. honcho starts all listed processes. |
44d10b1f RW |
5014 | The output of all running processes is collected by honcho and |
5015 | displayed.") | |
5016 | (license license:expat))) | |
5017 | ||
5018 | (define-public python2-honcho | |
5019 | (package-with-python2 python-honcho)) | |
5020 | ||
5021 | (define-public python-pexpect | |
5022 | (package | |
5023 | (name "python-pexpect") | |
5024 | (version "4.6.0") | |
5025 | (source | |
5026 | (origin | |
5027 | (method url-fetch) | |
5028 | (uri (pypi-uri "pexpect" version)) | |
5029 | (sha256 | |
5030 | (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia")))) | |
5031 | (build-system python-build-system) | |
5032 | (arguments | |
5033 | `(#:phases | |
5034 | (modify-phases %standard-phases | |
5035 | (add-before 'check 'prepare-tests | |
5036 | (lambda _ | |
5037 | (substitute* (find-files "tests") | |
5038 | (("/bin/ls") (which "ls")) | |
5039 | (("/bin/echo") (which "echo")) | |
5040 | (("/bin/which") (which "which")) | |
5041 | ;; Many tests try to use the /bin directory which | |
5042 | ;; is not present in the build environment. | |
5043 | ;; Use one that's non-empty and unlikely to change. | |
5044 | (("/bin'") "/dev'")) | |
5045 | ;; XXX: Socket connection test gets "Connection reset by peer". | |
5046 | ;; Why does it not work? Delete for now. | |
5047 | (delete-file "tests/test_socket.py") | |
5048 | #t)) | |
5049 | (replace 'check (lambda _ (invoke "nosetests" "-v")))))) | |
5050 | (native-inputs | |
5051 | `(("python-nose" ,python-nose) | |
5052 | ("python-pytest" ,python-pytest) | |
5053 | ("man-db" ,man-db) | |
5054 | ("which" ,which) | |
5055 | ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py' | |
5056 | (propagated-inputs | |
5057 | `(("python-ptyprocess" ,python-ptyprocess))) | |
5058 | (home-page "http://pexpect.readthedocs.org/") | |
5059 | (synopsis "Controlling interactive console applications") | |
5060 | (description | |
5061 | "Pexpect is a pure Python module for spawning child applications; | |
5062 | controlling them; and responding to expected patterns in their output. | |
5063 | Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a | |
5064 | child application and control it as if a human were typing commands.") | |
5065 | (license license:isc))) | |
5066 | ||
5067 | (define-public python2-pexpect | |
5068 | (package-with-python2 python-pexpect)) | |
5069 | ||
5070 | (define-public python-setuptools-scm | |
5071 | (package | |
5072 | (name "python-setuptools-scm") | |
85092643 | 5073 | (version "3.2.0") |
44d10b1f RW |
5074 | (source (origin |
5075 | (method url-fetch) | |
5076 | (uri (pypi-uri "setuptools_scm" version)) | |
5077 | (sha256 | |
5078 | (base32 | |
85092643 | 5079 | "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj")))) |
44d10b1f RW |
5080 | (build-system python-build-system) |
5081 | (home-page "https://github.com/pypa/setuptools_scm/") | |
5082 | (synopsis "Manage Python package versions in SCM metadata") | |
5083 | (description | |
5084 | "Setuptools_scm handles managing your Python package versions in | |
5085 | @dfn{software configuration management} (SCM) metadata instead of declaring | |
5086 | them as the version argument or in a SCM managed file.") | |
5087 | (license license:expat))) | |
5088 | ||
a0b2accf MO |
5089 | ;; Needed by python-lazy-object-proxy, remove on next update cycle. |
5090 | (define-public python-setuptools-scm-3.3 | |
5091 | (package | |
5092 | (inherit python-setuptools-scm) | |
5093 | (version "3.3.3") | |
5094 | (source (origin | |
5095 | (method url-fetch) | |
5096 | (uri (pypi-uri "setuptools_scm" version)) | |
5097 | (sha256 | |
5098 | (base32 | |
5099 | "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx")))))) | |
5100 | ||
44d10b1f RW |
5101 | (define-public python2-setuptools-scm |
5102 | (package-with-python2 python-setuptools-scm)) | |
5103 | ||
bb74ea09 RW |
5104 | (define-public python-pathlib2 |
5105 | (package | |
5106 | (name "python-pathlib2") | |
5107 | (version "2.3.3") | |
5108 | (source | |
5109 | (origin | |
5110 | (method url-fetch) | |
5111 | (uri (pypi-uri "pathlib2" version)) | |
5112 | (sha256 | |
5113 | (base32 | |
5114 | "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695")))) | |
5115 | (build-system python-build-system) | |
5116 | (propagated-inputs | |
5117 | `(("python-scandir" ,python-scandir) | |
5118 | ("python-six" ,python-six))) | |
e85af137 | 5119 | (home-page "https://pypi.org/project/pathlib2/") |
746d3384 | 5120 | (synopsis "Object-oriented file system paths") |
bb74ea09 RW |
5121 | (description "The goal of pathlib2 is to provide a backport of the |
5122 | standard @code{pathlib} module which tracks the standard library module, so | |
5123 | all the newest features of the standard @code{pathlib} can be used also on | |
5124 | older Python versions.") | |
5125 | (license license:expat))) | |
5126 | ||
fd5c264a MB |
5127 | (define-public python2-importlib-resources |
5128 | (package | |
5129 | (name "python2-importlib-resources") | |
5130 | (version "1.0.2") | |
5131 | (source (origin | |
5132 | (method url-fetch) | |
5133 | (uri (pypi-uri "importlib_resources" version)) | |
5134 | (sha256 | |
5135 | (base32 | |
5136 | "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk")))) | |
5137 | (build-system python-build-system) | |
5138 | (arguments | |
5139 | `(#:python ,python-2)) | |
5140 | (native-inputs | |
5141 | `(("python-wheel" ,python2-wheel))) | |
5142 | (propagated-inputs | |
5143 | `(("python-pathlib2" ,python2-pathlib2) | |
5144 | ("python-typing" ,python2-typing))) | |
5145 | (home-page "https://gitlab.com/python-devs/importlib_resources") | |
5146 | (synopsis "Backport of @code{importlib.resources} from Python 3.7") | |
5147 | (description | |
5148 | "This package provides an implementation of @code{importlib.resources} | |
5149 | for older versions of Python.") | |
5150 | (license license:asl2.0))) | |
5151 | ||
15b65617 RW |
5152 | (define-public python-importlib-metadata |
5153 | (package | |
5154 | (name "python-importlib-metadata") | |
4dc04d11 | 5155 | (version "1.4.0") |
15b65617 RW |
5156 | (source |
5157 | (origin | |
5158 | (method url-fetch) | |
5159 | (uri (pypi-uri "importlib_metadata" version)) | |
5160 | (sha256 | |
4dc04d11 | 5161 | (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i")))) |
15b65617 RW |
5162 | (build-system python-build-system) |
5163 | (propagated-inputs | |
4dc04d11 | 5164 | `(("python-zipp" ,python-zipp))) |
15b65617 RW |
5165 | (native-inputs |
5166 | `(("python-setuptools-scm" ,python-setuptools-scm) | |
4dc04d11 | 5167 | ("python-packaging" ,python-packaging))) |
15b65617 RW |
5168 | (home-page "https://importlib-metadata.readthedocs.io/") |
5169 | (synopsis "Read metadata from Python packages") | |
5170 | (description | |
5171 | "@code{importlib_metadata} is a library which provides an API for | |
5172 | accessing an installed Python package's metadata, such as its entry points or | |
5173 | its top-level name. This functionality intends to replace most uses of | |
5174 | @code{pkg_resources} entry point API and metadata API. Along with | |
5175 | @code{importlib.resources} in Python 3.7 and newer, this can eliminate the | |
5176 | need to use the older and less efficient @code{pkg_resources} package.") | |
3dfb3d44 | 5177 | (properties `((python2-variant . ,(delay python2-importlib-metadata)))) |
15b65617 RW |
5178 | (license license:asl2.0))) |
5179 | ||
5efa04dd MB |
5180 | (define-public python2-importlib-metadata |
5181 | (let ((base (package-with-python2 (strip-python2-variant | |
5182 | python-importlib-metadata)))) | |
5183 | (package/inherit | |
5184 | base | |
5185 | (name "python2-importlib-metadata") | |
5186 | (propagated-inputs | |
5187 | `(("python-configparser" ,python2-configparser) | |
5188 | ("python-contextlib2" ,python2-contextlib2) | |
5189 | ("python-importlib-resources" ,python2-importlib-resources) | |
5190 | ("python-pathlib2" ,python2-pathlib2) | |
5191 | ,@(package-propagated-inputs base)))))) | |
5192 | ||
37c173d1 RW |
5193 | (define-public python-jaraco-packaging |
5194 | (package | |
5195 | (name "python-jaraco-packaging") | |
5196 | (version "6.1") | |
5197 | (source | |
5198 | (origin | |
5199 | (method url-fetch) | |
5200 | (uri (pypi-uri "jaraco.packaging" version)) | |
5201 | (sha256 | |
5202 | (base32 | |
5203 | "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm")))) | |
5204 | (build-system python-build-system) | |
5205 | (propagated-inputs | |
5206 | `(("python-pytest" ,python-pytest) | |
5207 | ("python-pytest-checkdocs" ,python-pytest-checkdocs) | |
5208 | ("python-pytest-flake8" ,python-pytest-flake8) | |
5209 | ("python-rst.linker" ,python-rst.linker) | |
5210 | ("python-setuptools" ,python-setuptools) | |
5211 | ("python-setuptools-scm" ,python-setuptools-scm) | |
5212 | ("python-six" ,python-six) | |
5213 | ("python-sphinx" ,python-sphinx))) | |
5214 | (home-page "https://github.com/jaraco/jaraco.packaging") | |
5215 | (synopsis "Tools to supplement packaging Python releases") | |
5216 | (description | |
5217 | "This package provides various tools to supplement packaging Python | |
5218 | releases.") | |
5219 | (license license:expat))) | |
5220 | ||
44d10b1f RW |
5221 | (define-public python-pathpy |
5222 | (package | |
5223 | (name "python-pathpy") | |
a3dd8871 | 5224 | (version "11.5.1") |
44d10b1f RW |
5225 | (source |
5226 | (origin | |
5227 | (method url-fetch) | |
5228 | (uri (pypi-uri "path.py" version)) | |
5229 | (sha256 | |
a3dd8871 | 5230 | (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8")))) |
49ad11e9 | 5231 | (outputs '("out" "doc")) |
44d10b1f RW |
5232 | (build-system python-build-system) |
5233 | (propagated-inputs | |
01a53e0b MC |
5234 | `(("python-appdirs" ,python-appdirs) |
5235 | ("python-importlib-metadata" ,python-importlib-metadata))) | |
44d10b1f RW |
5236 | (native-inputs |
5237 | `(("python-setuptools-scm" ,python-setuptools-scm) | |
5238 | ("python-sphinx" ,python-sphinx) | |
5239 | ("python-rst.linker" ,python-rst.linker) | |
5240 | ("python-pytest" ,python-pytest) | |
49ad11e9 RW |
5241 | ("python-pytest-runner" ,python-pytest-runner) |
5242 | ("python-jaraco-packaging" ,python-jaraco-packaging))) | |
44d10b1f | 5243 | (arguments |
49ad11e9 RW |
5244 | `(#:phases |
5245 | (modify-phases %standard-phases | |
5246 | (add-after 'build 'build-doc | |
5247 | (lambda _ | |
5248 | (setenv "LANG" "en_US.UTF-8") | |
5249 | (invoke "python" "setup.py" "build_sphinx"))) | |
5250 | (add-after 'install 'install-doc | |
5251 | (lambda* (#:key outputs #:allow-other-keys) | |
5252 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
5253 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
5254 | (html (string-append doc "/html"))) | |
5255 | (mkdir-p html) | |
5256 | (for-each (lambda (file) | |
5257 | (copy-file file (string-append doc "/" file))) | |
5258 | '("README.rst" "CHANGES.rst")) | |
5259 | (copy-recursively "build/sphinx/html" html) | |
5260 | #t))) | |
5261 | (replace 'check | |
5262 | (lambda _ | |
5263 | ;; The import time test aborts if an import takes longer than | |
5264 | ;; 100ms. It may very well take a little longer than that. | |
5265 | (invoke "pytest" "-v" "-k" "not test_import_time")))))) | |
44d10b1f RW |
5266 | (home-page "https://github.com/jaraco/path.py") |
5267 | (synopsis "Python module wrapper for built-in os.path") | |
5268 | (description | |
5269 | "@code{path.py} implements path objects as first-class entities, allowing | |
5270 | common operations on files to be invoked on those path objects directly.") | |
5271 | (license license:expat))) | |
5272 | ||
5273 | (define-public python2-pathpy | |
5274 | (package-with-python2 python-pathpy)) | |
5275 | ||
5276 | (define-public python-simplegeneric | |
5277 | (package | |
5278 | (name "python-simplegeneric") | |
5279 | (version "0.8.1") | |
5280 | (source | |
5281 | (origin | |
5282 | (method url-fetch) | |
6c8c3980 | 5283 | (uri (pypi-uri "simplegeneric" version ".zip")) |
44d10b1f RW |
5284 | (sha256 |
5285 | (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw")))) | |
5286 | (build-system python-build-system) | |
5287 | (native-inputs | |
5288 | `(("unzip" ,unzip))) | |
5289 | (home-page "http://cheeseshop.python.org/pypi/simplegeneric") | |
5290 | (synopsis "Python module for simple generic functions") | |
5291 | (description | |
5292 | "The simplegeneric module lets you define simple single-dispatch generic | |
5293 | functions, akin to Python’s built-in generic functions like @code{len()}, | |
5294 | @code{iter()} and so on. However, instead of using specially-named methods, | |
5295 | these generic functions use simple lookup tables, akin to those used by | |
5296 | e.g. @code{pickle.dump()} and other generic functions found in the Python | |
5297 | standard library.") | |
5298 | (license license:zpl2.1))) | |
5299 | ||
5300 | (define-public python2-simplegeneric | |
5301 | (package-with-python2 python-simplegeneric)) | |
5302 | ||
5303 | (define-public python-ipython-genutils | |
5304 | ;; TODO: This package is retired, check if can be removed, see description. | |
5305 | (package | |
5306 | (name "python-ipython-genutils") | |
5307 | (version "0.1.0") | |
5308 | (source | |
5309 | (origin | |
5310 | (method url-fetch) | |
c9671d4b | 5311 | (uri (pypi-uri "ipython_genutils" version)) |
44d10b1f RW |
5312 | (sha256 |
5313 | (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is")))) | |
5314 | (build-system python-build-system) | |
5315 | (arguments `(#:tests? #f)) ; no tests | |
5316 | (home-page "https://ipython.org") | |
5317 | (synopsis "Vestigial utilities from IPython") | |
5318 | (description | |
5319 | "This package provides retired utilities from IPython. No packages | |
5320 | outside IPython/Jupyter should depend on it. | |
5321 | ||
5322 | This package shouldn't exist. It contains some common utilities shared by | |
5323 | Jupyter and IPython projects during The Big Split. As soon as possible, those | |
5324 | packages will remove their dependency on this, and this package will go | |
5325 | away.") | |
5326 | (license license:bsd-3))) | |
5327 | ||
5328 | (define-public python2-ipython-genutils | |
5329 | (package-with-python2 python-ipython-genutils)) | |
5330 | ||
5331 | (define-public python-traitlets | |
5332 | (package | |
5333 | (name "python-traitlets") | |
ac5e205a | 5334 | (version "4.3.3") |
44d10b1f RW |
5335 | (source |
5336 | (origin | |
5337 | (method url-fetch) | |
5338 | (uri (pypi-uri "traitlets" version)) | |
5339 | (sha256 | |
5340 | (base32 | |
ac5e205a | 5341 | "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh")))) |
44d10b1f RW |
5342 | (build-system python-build-system) |
5343 | (arguments | |
5344 | `(#:phases | |
5345 | (modify-phases %standard-phases | |
5346 | (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets")))))) | |
5347 | (propagated-inputs | |
5348 | `(("python-ipython-genutils" ,python-ipython-genutils) | |
ac5e205a | 5349 | ("python-decorator" ,python-decorator))) |
44d10b1f RW |
5350 | (native-inputs |
5351 | `(("python-pytest" ,python-pytest))) | |
5352 | (properties `((python2-variant . ,(delay python2-traitlets)))) | |
5353 | (home-page "https://ipython.org") | |
5354 | (synopsis "Configuration system for Python applications") | |
5355 | (description | |
5356 | "Traitlets is a framework that lets Python classes have attributes with | |
5357 | type checking, dynamically calculated default values, and ‘on change’ | |
5358 | callbacks. The package also includes a mechanism to use traitlets for | |
5359 | configuration, loading values from files or from command line arguments. This | |
5360 | is a distinct layer on top of traitlets, so you can use traitlets in your code | |
5361 | without using the configuration machinery.") | |
5362 | (license license:bsd-3))) | |
5363 | ||
5364 | (define-public python2-traitlets | |
5365 | (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets)))) | |
5366 | (package | |
5367 | (inherit traitlets) | |
5368 | (propagated-inputs | |
5369 | `(("python2-enum34" ,python2-enum34) | |
5370 | ,@(package-propagated-inputs traitlets)))))) | |
5371 | ||
5372 | (define-public python-jupyter-core | |
5373 | (package | |
5374 | (name "python-jupyter-core") | |
5375 | (version "4.4.0") | |
5376 | (source | |
5377 | (origin | |
5378 | (method url-fetch) | |
5379 | (uri (string-append (pypi-uri "jupyter_core" version))) | |
5380 | (sha256 | |
5381 | (base32 | |
5382 | "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s")))) | |
5383 | (build-system python-build-system) | |
5384 | ;; FIXME: not sure how to run the tests | |
5385 | (arguments `(#:tests? #f)) | |
5386 | (propagated-inputs | |
5387 | `(("python-traitlets" ,python-traitlets))) | |
5388 | (home-page "http://jupyter.org/") | |
5389 | (synopsis "Jupyter base package") | |
5390 | (description | |
5391 | "Jupyter core is the base package on which Jupyter projects rely.") | |
5392 | (license license:bsd-3))) | |
5393 | ||
5394 | (define-public python2-jupyter-core | |
5395 | (package-with-python2 python-jupyter-core)) | |
5396 | ||
5397 | (define-public python-jupyter-client | |
5398 | (package | |
5399 | (name "python-jupyter-client") | |
5400 | (version "5.2.4") | |
5401 | (source | |
5402 | (origin | |
5403 | (method url-fetch) | |
5404 | (uri (pypi-uri "jupyter_client" version)) | |
5405 | (sha256 | |
5406 | (base32 | |
5407 | "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm")))) | |
5408 | (build-system python-build-system) | |
5409 | ;; Tests fail because of missing native python kernel which I assume is | |
5410 | ;; provided by the ipython package, which we cannot use because it would | |
5411 | ;; cause a dependency cycle. | |
ddc586ea LC |
5412 | (arguments |
5413 | `(#:tests? #f | |
5414 | ||
5415 | #:phases (modify-phases %standard-phases | |
5416 | (add-after 'unpack 'set-tool-file-names | |
5417 | (lambda* (#:key inputs #:allow-other-keys) | |
5418 | (let ((iproute (assoc-ref inputs "iproute"))) | |
5419 | (substitute* "jupyter_client/localinterfaces.py" | |
5420 | (("'ip'") | |
5421 | (string-append "'" iproute "/sbin/ip'"))) | |
5422 | #t)))))) | |
5423 | (inputs | |
5424 | `(("iproute" ,iproute))) | |
44d10b1f RW |
5425 | (propagated-inputs |
5426 | `(("python-pyzmq" ,python-pyzmq) | |
5427 | ("python-traitlets" ,python-traitlets) | |
5428 | ("python-jupyter-core" ,python-jupyter-core))) | |
5429 | (home-page "http://jupyter.org/") | |
5430 | (synopsis "Jupyter protocol implementation and client libraries") | |
5431 | (description | |
5432 | "The @code{jupyter_client} package contains the reference implementation | |
5433 | of the Jupyter protocol. It also provides client and kernel management APIs | |
5434 | for working with kernels, and the @code{jupyter kernelspec} entrypoint for | |
5435 | installing @code{kernelspec}s for use with Jupyter frontends.") | |
5436 | (license license:bsd-3))) | |
5437 | ||
5438 | (define-public python2-jupyter-client | |
5439 | (package-with-python2 python-jupyter-client)) | |
5440 | ||
5441 | (define-public python-ipykernel | |
5442 | (package | |
5443 | (name "python-ipykernel") | |
08d0a355 | 5444 | (version "5.1.3") |
44d10b1f RW |
5445 | (source |
5446 | (origin | |
5447 | (method url-fetch) | |
5448 | (uri (pypi-uri "ipykernel" version)) | |
5449 | (sha256 | |
08d0a355 | 5450 | (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k")))) |
44d10b1f RW |
5451 | (build-system python-build-system) |
5452 | (arguments | |
5453 | `(#:phases | |
5454 | (modify-phases %standard-phases | |
5455 | (replace 'check | |
5456 | (lambda _ | |
5457 | (setenv "HOME" "/tmp") | |
5458 | (invoke "pytest" "-v") | |
aa856d02 LC |
5459 | #t)) |
5460 | (add-after 'install 'set-python-file-name | |
5461 | (lambda* (#:key outputs #:allow-other-keys) | |
5462 | ;; Record the absolute file name of the 'python' executable in | |
5463 | ;; 'kernel.json'. | |
5464 | (let ((out (assoc-ref outputs "out"))) | |
5465 | (substitute* (string-append out "/share/jupyter" | |
5466 | "/kernels/python3/kernel.json") | |
5467 | (("\"python\"") | |
5468 | (string-append "\"" (which "python") "\""))) | |
5469 | #t)))))) | |
44d10b1f RW |
5470 | (propagated-inputs |
5471 | `(("python-ipython" ,python-ipython) | |
5472 | ;; imported at runtime during connect | |
5473 | ("python-jupyter-client" ,python-jupyter-client))) | |
5474 | (native-inputs | |
08d0a355 TGR |
5475 | `(("python-flaky" ,python-flaky) |
5476 | ("python-nose" ,python-nose) | |
5477 | ("python-pytest" ,python-pytest))) | |
44d10b1f RW |
5478 | (home-page "https://ipython.org") |
5479 | (synopsis "IPython Kernel for Jupyter") | |
5480 | (description | |
5481 | "This package provides the IPython kernel for Jupyter.") | |
5482 | (license license:bsd-3))) | |
5483 | ||
0f378947 | 5484 | ;; Version 5.1.1 and above no longer support Python 2. |
44d10b1f | 5485 | (define-public python2-ipykernel |
0f378947 RW |
5486 | (package |
5487 | (name "python2-ipykernel") | |
5488 | (version "5.1.0") | |
5489 | (source | |
5490 | (origin | |
5491 | (method url-fetch) | |
5492 | (uri (pypi-uri "ipykernel" version)) | |
5493 | (sha256 | |
5494 | (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g")))) | |
5495 | (build-system python-build-system) | |
5496 | (arguments | |
5497 | `(#:python ,python-2 | |
5498 | #:phases | |
5499 | (modify-phases %standard-phases | |
5500 | (replace 'check | |
5501 | (lambda _ | |
5502 | (setenv "HOME" "/tmp") | |
5503 | (invoke "pytest" "-v") | |
5504 | #t))))) | |
5505 | (propagated-inputs | |
5506 | `(("python2-ipython" ,python2-ipython) | |
5507 | ;; imported at runtime during connect | |
5508 | ("python2-jupyter-client" ,python2-jupyter-client))) | |
5509 | (native-inputs | |
5510 | `(("python2-pytest" ,python2-pytest) | |
5511 | ("python2-nose" ,python2-nose))) | |
5512 | (home-page "https://ipython.org") | |
5513 | (synopsis "IPython Kernel for Jupyter") | |
5514 | (description | |
5515 | "This package provides the IPython kernel for Jupyter.") | |
5516 | (license license:bsd-3))) | |
44d10b1f | 5517 | |
966aa714 AE |
5518 | (define-public python-pari-jupyter |
5519 | (package | |
5520 | (name "python-pari-jupyter") | |
5521 | (version "1.3.2") | |
5522 | (source | |
5523 | (origin | |
5524 | (method url-fetch) | |
5525 | (uri (pypi-uri "pari_jupyter" version)) | |
5526 | (sha256 | |
5527 | (base32 | |
5528 | "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6")))) | |
5529 | (build-system python-build-system) | |
5530 | (propagated-inputs | |
5531 | `(("python-ipykernel" ,python-ipykernel))) | |
5532 | (inputs | |
5533 | `(("pari-gp" ,pari-gp) | |
5534 | ("readline" ,readline))) | |
5535 | (arguments | |
5536 | `(#:tests? #f)) ; no test suite | |
5537 | (home-page | |
5538 | "https://github.com/jdemeyer/pari_jupyter") | |
5539 | (synopsis "A Jupyter kernel for PARI/GP") | |
5540 | (description "The package provides a PARI/GP kernel for Jupyter.") | |
5541 | (license license:gpl3+))) | |
5542 | ||
dede052a RW |
5543 | (define-public python-backcall |
5544 | (package | |
5545 | (name "python-backcall") | |
5546 | (version "0.1.0") | |
5547 | (source | |
5548 | (origin | |
5549 | (method url-fetch) | |
5550 | (uri (pypi-uri "backcall" version)) | |
5551 | (sha256 | |
5552 | (base32 | |
5553 | "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q")))) | |
5554 | (build-system python-build-system) | |
5555 | (home-page "https://github.com/takluyver/backcall/") | |
5556 | (synopsis "Specifications for callback functions passed in to an API") | |
5557 | (description | |
5558 | "If your code lets other people supply callback functions, it's important | |
5559 | to specify the function signature you expect, and check that functions support | |
5560 | that. Adding extra parameters later would break other peoples code unless | |
5561 | you're careful. The @code{backcall} package provides a way of specifying the | |
5562 | callback signature using a prototype function.") | |
5563 | (license license:bsd-3))) | |
5564 | ||
44d10b1f RW |
5565 | ;; This is the latest release of the LTS version of ipython with support for |
5566 | ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have | |
8b5f756c RW |
5567 | ;; dropped support for Python 2.7. |
5568 | (define-public python2-ipython | |
44d10b1f | 5569 | (package |
8b5f756c | 5570 | (name "python2-ipython") |
44d10b1f RW |
5571 | (version "5.8.0") |
5572 | (source | |
5573 | (origin | |
5574 | (method url-fetch) | |
5575 | (uri (pypi-uri "ipython" version ".tar.gz")) | |
5576 | (sha256 | |
5577 | (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b")))) | |
5578 | (build-system python-build-system) | |
44d10b1f | 5579 | (propagated-inputs |
8b5f756c RW |
5580 | `(("python2-backports-shutil-get-terminal-size" |
5581 | ,python2-backports-shutil-get-terminal-size) | |
5582 | ("python2-pathlib2" ,python2-pathlib2) | |
5583 | ("python2-pyzmq" ,python2-pyzmq) | |
5584 | ("python2-prompt-toolkit" ,python2-prompt-toolkit-1) | |
5585 | ("python2-terminado" ,python2-terminado) | |
5586 | ("python2-matplotlib" ,python2-matplotlib) | |
5587 | ("python2-numpy" ,python2-numpy) | |
5588 | ("python2-numpydoc" ,python2-numpydoc) | |
5589 | ("python2-jinja2" ,python2-jinja2) | |
5590 | ("python2-mistune" ,python2-mistune) | |
5591 | ("python2-pexpect" ,python2-pexpect) | |
5592 | ("python2-pickleshare" ,python2-pickleshare) | |
5593 | ("python2-simplegeneric" ,python2-simplegeneric) | |
5594 | ("python2-jsonschema" ,python2-jsonschema) | |
5595 | ("python2-traitlets" ,python2-traitlets) | |
5596 | ("python2-nbformat" ,python2-nbformat) | |
5597 | ("python2-pygments" ,python2-pygments))) | |
5598 | (inputs | |
5599 | `(("readline" ,readline) | |
5600 | ("which" ,which))) | |
5601 | (native-inputs | |
5602 | `(("graphviz" ,graphviz) | |
5603 | ("pkg-config" ,pkg-config) | |
5604 | ("python2-requests" ,python2-requests) ;; for tests | |
5605 | ("python2-testpath" ,python2-testpath) | |
5606 | ("python2-mock" ,python2-mock) | |
5607 | ("python2-nose" ,python2-nose))) | |
5608 | (arguments | |
5609 | `(#:python ,python-2 | |
5610 | #:phases | |
5611 | (modify-phases %standard-phases | |
5612 | (add-before 'check 'delete-broken-tests | |
5613 | (lambda* (#:key inputs #:allow-other-keys) | |
5614 | ;; These tests throw errors for unknown reasons. | |
5615 | (delete-file "IPython/core/tests/test_profile.py") | |
5616 | (delete-file "IPython/core/tests/test_interactiveshell.py") | |
5617 | (delete-file "IPython/core/tests/test_magic.py") | |
5618 | #t))))) | |
5619 | (home-page "https://ipython.org") | |
5620 | (synopsis "IPython is a tool for interactive computing in Python") | |
5621 | (description | |
5622 | "IPython provides a rich architecture for interactive computing with: | |
5623 | Powerful interactive shells, a browser-based notebook, support for interactive | |
5624 | data visualization, embeddable interpreters and tools for parallel | |
5625 | computing.") | |
5626 | (license license:bsd-3))) | |
5627 | ||
5628 | (define-public python-ipython | |
5629 | (package | |
5630 | (name "python-ipython") | |
ee515773 | 5631 | (version "7.9.0") |
8b5f756c RW |
5632 | (source |
5633 | (origin | |
5634 | (method url-fetch) | |
5635 | (uri (pypi-uri "ipython" version ".tar.gz")) | |
5636 | (sha256 | |
ee515773 | 5637 | (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz")))) |
8b5f756c RW |
5638 | (build-system python-build-system) |
5639 | (propagated-inputs | |
5640 | `(("python-backcall" ,python-backcall) | |
5641 | ("python-pyzmq" ,python-pyzmq) | |
5642 | ("python-prompt-toolkit" ,python-prompt-toolkit) | |
44d10b1f RW |
5643 | ("python-terminado" ,python-terminado) |
5644 | ("python-matplotlib" ,python-matplotlib) | |
5645 | ("python-numpy" ,python-numpy) | |
5646 | ("python-numpydoc" ,python-numpydoc) | |
8b5f756c | 5647 | ("python-jedi" ,python-jedi) |
44d10b1f RW |
5648 | ("python-jinja2" ,python-jinja2) |
5649 | ("python-mistune" ,python-mistune) | |
5650 | ("python-pexpect" ,python-pexpect) | |
5651 | ("python-pickleshare" ,python-pickleshare) | |
5652 | ("python-simplegeneric" ,python-simplegeneric) | |
5653 | ("python-jsonschema" ,python-jsonschema) | |
5654 | ("python-traitlets" ,python-traitlets) | |
5655 | ("python-nbformat" ,python-nbformat) | |
5656 | ("python-pygments" ,python-pygments))) | |
5657 | (inputs | |
5658 | `(("readline" ,readline) | |
5659 | ("which" ,which))) | |
5660 | (native-inputs | |
5661 | `(("graphviz" ,graphviz) | |
5662 | ("pkg-config" ,pkg-config) | |
5663 | ("python-requests" ,python-requests) ;; for tests | |
5664 | ("python-testpath" ,python-testpath) | |
8b5f756c | 5665 | ("python-nose" ,python-nose))) |
44d10b1f RW |
5666 | (arguments |
5667 | `(#:phases | |
5668 | (modify-phases %standard-phases | |
0f272518 RW |
5669 | (add-after 'unpack 'make-docs-reproducible |
5670 | (lambda _ | |
5671 | (substitute* "IPython/sphinxext/ipython_directive.py" | |
5672 | ((".*import datetime") "") | |
5673 | ((".*datetime.datetime.now\\(\\)") "") | |
5674 | (("%timeit") "# %timeit")) | |
5675 | #t)) | |
44d10b1f RW |
5676 | ;; Tests can only be run after the library has been installed and not |
5677 | ;; within the source directory. | |
5678 | (delete 'check) | |
5679 | (add-after 'install 'check | |
5680 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) | |
5681 | (if tests? | |
5682 | (begin | |
5683 | ;; Make installed package available for running the tests | |
5684 | (add-installed-pythonpath inputs outputs) | |
5685 | (setenv "HOME" "/tmp/") ;; required by a test | |
5686 | ;; We only test the core because one of the other tests | |
5687 | ;; tries to import ipykernel. | |
5688 | (invoke "python" "IPython/testing/iptest.py" | |
5689 | "-v" "IPython/core/tests")) | |
5690 | #t))) | |
5691 | (add-before 'check 'fix-tests | |
5692 | (lambda* (#:key inputs #:allow-other-keys) | |
5693 | (substitute* "./IPython/utils/_process_posix.py" | |
5694 | (("/usr/bin/env', 'which") (which "which"))) | |
5695 | (substitute* "./IPython/core/tests/test_inputtransformer.py" | |
5696 | (("#!/usr/bin/env python") | |
5697 | (string-append "#!" (which "python")))) | |
44d10b1f RW |
5698 | ;; This test introduces a circular dependency on ipykernel |
5699 | ;; (which depends on ipython). | |
5700 | (delete-file "IPython/core/tests/test_display.py") | |
8b5f756c | 5701 | ;; AttributeError: module 'IPython.core' has no attribute 'formatters' |
44d10b1f | 5702 | (delete-file "IPython/core/tests/test_interactiveshell.py") |
44d10b1f RW |
5703 | #t))))) |
5704 | (home-page "https://ipython.org") | |
5705 | (synopsis "IPython is a tool for interactive computing in Python") | |
5706 | (description | |
5707 | "IPython provides a rich architecture for interactive computing with: | |
5708 | Powerful interactive shells, a browser-based notebook, support for interactive | |
5709 | data visualization, embeddable interpreters and tools for parallel | |
5710 | computing.") | |
8b5f756c | 5711 | (license license:bsd-3))) |
44d10b1f | 5712 | |
8b5f756c RW |
5713 | (define-public python-ipython-documentation |
5714 | (package | |
5715 | (inherit python-ipython) | |
5716 | (name "python-ipython-documentation") | |
5717 | (version (package-version python-ipython)) | |
5718 | (arguments | |
5719 | `(#:phases | |
5720 | (modify-phases %standard-phases | |
5721 | (delete 'build) | |
5722 | (delete 'check) | |
5723 | (replace 'install | |
5724 | (lambda* (#:key outputs #:allow-other-keys) | |
5725 | (let* ((data (string-append (assoc-ref outputs "out") "/share")) | |
5726 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
5727 | (html (string-append doc "/html")) | |
5728 | (man1 (string-append data "/man/man1")) | |
5729 | (info (string-append data "/info")) | |
5730 | (examples (string-append doc "/examples")) | |
5731 | (python-arg (string-append "PYTHON=" (which "python")))) | |
5732 | (setenv "LANG" "en_US.utf8") | |
5733 | (with-directory-excursion "docs" | |
5734 | ;; FIXME: pdf fails to build | |
5735 | ;;(system* "make" "pdf" "PAPER=a4") | |
5736 | (system* "make" python-arg "html") | |
5737 | ;; FIXME: the generated texi file contains ^@^@, which trips | |
5738 | ;; up the parser. | |
5739 | ;; (system* "make" python-arg "info") | |
5740 | ) | |
5741 | (copy-recursively "docs/man" man1) | |
5742 | (copy-recursively "examples" examples) | |
5743 | (copy-recursively "docs/build/html" html) | |
5744 | ;; (copy-file "docs/build/latex/ipython.pdf" | |
5745 | ;; (string-append doc "/ipython.pdf")) | |
5746 | (mkdir-p info) | |
5747 | ;; (copy-file "docs/build/texinfo/ipython.info" | |
5748 | ;; (string-append info "/ipython.info")) | |
5749 | (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))) | |
5750 | #t))))) | |
5751 | (inputs | |
5752 | `(("python-ipython" ,python-ipython) | |
5753 | ("python-ipykernel" ,python-ipykernel))) | |
5754 | (native-inputs | |
5755 | `(("python-sphinx" ,python-sphinx) | |
5756 | ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) | |
5757 | ;; FIXME: It's possible that a smaller union would work just as well. | |
f75aa97f | 5758 | ("texlive" ,(texlive-union (list texlive-amsfonts |
8b5f756c RW |
5759 | texlive-fonts-ec |
5760 | texlive-generic-ifxetex | |
5761 | texlive-generic-pdftex | |
8b5f756c RW |
5762 | texlive-latex-capt-of |
5763 | texlive-latex-cmap | |
5764 | texlive-latex-environ | |
5765 | texlive-latex-eqparbox | |
5766 | texlive-latex-etoolbox | |
5767 | texlive-latex-expdlist | |
5768 | texlive-latex-fancyhdr | |
5769 | texlive-latex-fancyvrb | |
5770 | texlive-latex-fncychap | |
5771 | texlive-latex-float | |
5772 | texlive-latex-framed | |
5773 | texlive-latex-geometry | |
5774 | texlive-latex-graphics | |
5775 | texlive-latex-hyperref | |
5776 | texlive-latex-mdwtools | |
5777 | texlive-latex-multirow | |
5778 | texlive-latex-needspace | |
5779 | texlive-latex-oberdiek | |
5780 | texlive-latex-parskip | |
5781 | texlive-latex-preview | |
5782 | texlive-latex-tabulary | |
5783 | texlive-latex-threeparttable | |
5784 | texlive-latex-titlesec | |
5785 | texlive-latex-trimspaces | |
5786 | texlive-latex-ucs | |
5787 | texlive-latex-upquote | |
5788 | texlive-latex-url | |
5789 | texlive-latex-varwidth | |
5790 | texlive-latex-wrapfig))) | |
5791 | ("texinfo" ,texinfo))))) | |
44d10b1f RW |
5792 | |
5793 | (define-public python-urwid | |
5794 | (package | |
5795 | (name "python-urwid") | |
5796 | (version "2.0.1") | |
5797 | (source | |
5798 | (origin | |
5799 | (method url-fetch) | |
5800 | (uri (pypi-uri "urwid" version)) | |
5801 | (sha256 | |
5802 | (base32 | |
5803 | "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4")))) | |
5804 | (build-system python-build-system) | |
5805 | (home-page "http://urwid.org") | |
5806 | (synopsis "Console user interface library for Python") | |
5807 | (description | |
5808 | "Urwid is a curses-based UI/widget library for Python. It includes many | |
5809 | features useful for text console applications.") | |
5810 | (license license:lgpl2.1+))) | |
5811 | ||
5812 | (define-public python2-urwid | |
5813 | (package-with-python2 python-urwid)) | |
5814 | ||
5815 | (define-public python-urwidtrees | |
5816 | (package | |
5817 | (name "python-urwidtrees") | |
5818 | (version "1.0.2") | |
5819 | (source | |
5820 | (origin | |
c8364072 | 5821 | (method git-fetch) |
44d10b1f RW |
5822 | ;; package author intends on distributing via github rather than pypi: |
5823 | ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331 | |
c8364072 EF |
5824 | (uri (git-reference |
5825 | (url "https://github.com/pazz/urwidtrees") | |
5826 | (commit version))) | |
5827 | (file-name (git-file-name name version)) | |
44d10b1f RW |
5828 | (sha256 |
5829 | (base32 | |
c8364072 | 5830 | "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2")))) |
44d10b1f RW |
5831 | (build-system python-build-system) |
5832 | (arguments | |
26bb7fc6 EF |
5833 | '(#:use-setuptools? #f |
5834 | #:tests? #f)) ; no tests | |
44d10b1f RW |
5835 | (propagated-inputs `(("python-urwid" ,python-urwid))) |
5836 | (home-page "https://github.com/pazz/urwidtrees") | |
5837 | (synopsis "Tree widgets for urwid") | |
5838 | (description "Urwidtrees is a Widget Container API for the @code{urwid} | |
5839 | toolkit. Use it to build trees of widgets.") | |
5840 | (license license:gpl3+))) | |
5841 | ||
5842 | (define-public python2-urwidtrees | |
5843 | (package-with-python2 python-urwidtrees)) | |
5844 | ||
5845 | (define-public python-ua-parser | |
5846 | (package | |
5847 | (name "python-ua-parser") | |
5848 | (version "0.8.0") | |
5849 | (source | |
5850 | (origin | |
5851 | (method url-fetch) | |
5852 | (uri (pypi-uri "ua-parser" version)) | |
5853 | (sha256 | |
5854 | (base32 | |
5855 | "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp")))) | |
5856 | (build-system python-build-system) | |
5857 | (arguments | |
5858 | `(#:tests? #f)) ;no test suite in release | |
5859 | (native-inputs | |
5860 | `(("python-pyyaml" ,python-pyyaml))) | |
5861 | (home-page "https://github.com/ua-parser/uap-python") | |
5862 | (synopsis "User agent parser") | |
5863 | (description | |
5864 | "@code{ua-parser} is a Python port of Browserscope's user agent parser.") | |
5865 | (license license:asl2.0))) | |
5866 | ||
5867 | (define-public python2-ua-parser | |
5868 | (package-with-python2 python-ua-parser)) | |
5869 | ||
5870 | (define-public python-user-agents | |
5871 | (package | |
5872 | (name "python-user-agents") | |
5873 | (version "1.1.0") | |
5874 | (source | |
5875 | (origin | |
5876 | (method url-fetch) | |
5877 | (uri (pypi-uri "user-agents" version)) | |
5878 | (sha256 | |
5879 | (base32 | |
5880 | "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4")))) | |
5881 | (build-system python-build-system) | |
5882 | (arguments | |
5883 | `(#:tests? #f)) ;missing devices.json test file in release | |
5884 | (propagated-inputs | |
5885 | `(("python-ua-parser" ,python-ua-parser))) | |
5886 | (home-page "https://github.com/selwin/python-user-agents") | |
5887 | (synopsis "User Agent strings parsing library") | |
5888 | (description | |
5889 | "A library to identify devices (phones, tablets) and their capabilities by | |
5890 | parsing (browser/HTTP) user agent strings.") | |
5891 | (license license:expat))) | |
5892 | ||
5893 | (define-public python2-user-agents | |
5894 | (package-with-python2 python-user-agents)) | |
5895 | ||
5896 | (define-public python-dbus | |
5897 | (package | |
5898 | (name "python-dbus") | |
ba5ef999 | 5899 | (version "1.2.14") |
44d10b1f RW |
5900 | (source |
5901 | (origin | |
5902 | (method url-fetch) | |
5903 | (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/" | |
5904 | "dbus-python-" version ".tar.gz")) | |
5905 | (sha256 | |
ba5ef999 | 5906 | (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi")))) |
44d10b1f | 5907 | (build-system gnu-build-system) |
44d10b1f RW |
5908 | (native-inputs |
5909 | `(("pkg-config" ,pkg-config))) | |
5910 | (inputs | |
5911 | `(("python" ,python-wrapper) | |
5912 | ("dbus-glib" ,dbus-glib))) | |
5913 | (synopsis "Python bindings for D-bus") | |
5914 | (description "python-dbus provides bindings for libdbus, the reference | |
5915 | implementation of D-Bus.") | |
5916 | (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/") | |
5917 | (license license:expat))) | |
5918 | ||
5919 | (define-public python2-dbus | |
5920 | (package (inherit python-dbus) | |
5921 | (name "python2-dbus") | |
5922 | (inputs `(("python" ,python-2) | |
5923 | ,@(alist-delete "python" | |
5924 | (package-inputs python-dbus) | |
ba5ef999 | 5925 | equal?))))) |
44d10b1f | 5926 | |
fb236fdd AG |
5927 | (define-public python-notify2 |
5928 | (package | |
5929 | (name "python-notify2") | |
5930 | (version "0.3.1") | |
5931 | (source | |
5932 | (origin | |
5933 | (method url-fetch) | |
5934 | (uri (pypi-uri "notify2" version)) | |
5935 | (sha256 | |
5936 | (base32 | |
5937 | "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik")))) | |
5938 | (build-system python-build-system) | |
5939 | (arguments `(#:tests? #f)) ; tests depend on system state | |
5940 | (native-inputs | |
5941 | `(("python-dbus" ,python-dbus))) | |
5942 | (home-page "https://bitbucket.org/takluyver/pynotify2") | |
5943 | (synopsis "Python interface to D-Bus notifications") | |
5944 | (description | |
5945 | "Pynotify2 provides a Python interface for sending D-Bus notifications. | |
5946 | It is a reimplementation of pynotify in pure Python, and an alternative to | |
5947 | the GObject Introspection bindings to libnotify for non-GTK applications.") | |
5948 | (license (list license:bsd-2 | |
5949 | license:lgpl2.1+)))) | |
5950 | ||
5951 | (define-public python2-notify2 | |
5952 | (package-with-python2 python-notify2)) | |
5953 | ||
44d10b1f RW |
5954 | ;; beautifulsoup4 has a totally different namespace than 3.x, |
5955 | ;; and pypi seems to put it under its own name, so I guess we should too | |
5956 | (define-public python-beautifulsoup4 | |
5957 | (package | |
5958 | (name "python-beautifulsoup4") | |
abb53e6f | 5959 | (version "4.7.1") |
44d10b1f RW |
5960 | (source |
5961 | (origin | |
5962 | (method url-fetch) | |
5963 | (uri (pypi-uri "beautifulsoup4" version)) | |
5964 | (sha256 | |
5965 | (base32 | |
abb53e6f | 5966 | "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l")))) |
44d10b1f RW |
5967 | (build-system python-build-system) |
5968 | (arguments | |
5969 | `(#:phases | |
5970 | (modify-phases %standard-phases | |
5971 | ;; The Python 2 source is the definitive source of beautifulsoup4. We | |
5972 | ;; must use this conversion script when building with Python 3. The | |
5973 | ;; conversion script also runs the tests. | |
5974 | ;; For more information, see the file 'convert-py3k' in the source | |
5975 | ;; distribution. | |
5976 | (replace 'check | |
dff0197e | 5977 | (lambda _ (invoke "./convert-py3k")))))) |
f83e10e4 | 5978 | (propagated-inputs |
abb53e6f | 5979 | `(("python-soupsieve" ,python-soupsieve))) |
44d10b1f RW |
5980 | (home-page |
5981 | "https://www.crummy.com/software/BeautifulSoup/bs4/") | |
5982 | (synopsis | |
5983 | "Python screen-scraping library") | |
5984 | (description | |
5985 | "Beautiful Soup is a Python library designed for rapidly setting up | |
5986 | screen-scraping projects. It offers Pythonic idioms for navigating, | |
5987 | searching, and modifying a parse tree, providing a toolkit for | |
5988 | dissecting a document and extracting what you need. It automatically | |
5989 | converts incoming documents to Unicode and outgoing documents to UTF-8.") | |
5990 | (license license:expat) | |
5991 | (properties `((python2-variant . ,(delay python2-beautifulsoup4)))))) | |
5992 | ||
5993 | (define-public python2-beautifulsoup4 | |
5994 | (package | |
5995 | (inherit (package-with-python2 | |
5996 | (strip-python2-variant python-beautifulsoup4))) | |
5997 | (arguments `(#:python ,python-2)))) | |
5998 | ||
ad74978a BT |
5999 | (define-public python-soupsieve |
6000 | (package | |
6001 | (name "python-soupsieve") | |
3367df31 | 6002 | (version "1.9.5") |
ad74978a BT |
6003 | (source |
6004 | (origin | |
6005 | (method url-fetch) | |
6006 | (uri (pypi-uri "soupsieve" version)) | |
6007 | (sha256 | |
6008 | (base32 | |
3367df31 | 6009 | "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2")))) |
ad74978a BT |
6010 | (build-system python-build-system) |
6011 | (arguments `(#:tests? #f)) | |
6012 | ;;XXX: 2 tests fail currently despite claming they were to be | |
6013 | ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we | |
6014 | ;;don't want to create a circular dependency. | |
6015 | (home-page "https://github.com/facelessuser/soupsieve") | |
6016 | (synopsis "CSS selector library") | |
6017 | (description | |
6018 | "Soup Sieve is a CSS selector library designed to be used with Beautiful | |
6019 | Soup 4. It aims to provide selecting, matching, and filtering using modern | |
6020 | CSS selectors. Soup Sieve currently provides selectors from the CSS level 1 | |
6021 | specifications up through the latest CSS level 4 drafts and beyond (though | |
6022 | some are not yet implemented).") | |
d00b83fb | 6023 | (properties `((python2-variant . ,(delay python2-soupsieve)))) |
ad74978a BT |
6024 | (license license:expat))) |
6025 | ||
6026 | (define-public python2-soupsieve | |
d00b83fb | 6027 | (let ((base (package-with-python2 (strip-python2-variant python-soupsieve)))) |
ad74978a BT |
6028 | (package |
6029 | (inherit base) | |
6030 | (propagated-inputs | |
d00b83fb MB |
6031 | `(("python2-backports-functools-lru-cache" |
6032 | ,python2-backports-functools-lru-cache) | |
6033 | ,@(package-propagated-inputs base)))))) | |
ad74978a | 6034 | |
44d10b1f RW |
6035 | (define-public python-netifaces |
6036 | (package | |
6037 | (name "python-netifaces") | |
6038 | (version "0.10.7") | |
6039 | (source | |
6040 | (origin | |
6041 | (method url-fetch) | |
6042 | (uri (pypi-uri "netifaces" version)) | |
6043 | (sha256 | |
6044 | (base32 | |
6045 | "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx")))) | |
6046 | (build-system python-build-system) | |
6047 | (home-page "https://github.com/al45tair/netifaces") | |
6048 | (synopsis | |
6049 | "Python module for portable network interface information") | |
6050 | (description | |
6051 | "Netifaces is a Python module providing information on network | |
6052 | interfaces in an easy and portable manner.") | |
6053 | (license license:expat))) | |
6054 | ||
6055 | (define-public python2-netifaces | |
6056 | (package-with-python2 python-netifaces)) | |
6057 | ||
6058 | (define-public python-networkx | |
6059 | (package | |
6060 | (name "python-networkx") | |
6061 | (version "2.2") | |
6062 | (source | |
6063 | (origin | |
6064 | (method url-fetch) | |
6065 | (uri (pypi-uri "networkx" version ".zip")) | |
6066 | (sha256 | |
6067 | (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5")))) | |
6068 | (build-system python-build-system) | |
6069 | ;; python-decorator is needed at runtime. | |
6070 | (propagated-inputs | |
6071 | `(("python-decorator" ,python-decorator))) | |
6072 | (native-inputs | |
6073 | `(("python-nose" ,python-nose) | |
6074 | ("unzip" ,unzip))) | |
6075 | (home-page "https://networkx.github.io/") | |
6076 | (synopsis "Python module for creating and manipulating graphs and networks") | |
6077 | (description | |
6078 | "NetworkX is a Python package for the creation, manipulation, and study | |
6079 | of the structure, dynamics, and functions of complex networks.") | |
6080 | (license license:bsd-3))) | |
6081 | ||
6082 | (define-public python2-networkx | |
6083 | (package-with-python2 python-networkx)) | |
6084 | ||
6085 | (define-public python-datrie | |
6086 | (package | |
6087 | (name "python-datrie") | |
0b58cb42 | 6088 | (version "0.8") |
44d10b1f RW |
6089 | (source |
6090 | (origin | |
6091 | (method url-fetch) | |
6092 | (uri (pypi-uri "datrie" version)) | |
6093 | (sha256 | |
6094 | (base32 | |
0b58cb42 | 6095 | "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx")))) |
44d10b1f | 6096 | (build-system python-build-system) |
44d10b1f RW |
6097 | (native-inputs |
6098 | `(("python-cython" ,python-cython) | |
6099 | ("python-hypothesis" ,python-hypothesis) | |
6100 | ("python-pytest" ,python-pytest) | |
6101 | ("python-pytest-runner" ,python-pytest-runner))) | |
6102 | (home-page "https://github.com/kmike/datrie") | |
6103 | (synopsis "Fast, efficiently stored trie for Python") | |
6104 | (description | |
6105 | "This package provides a fast, efficiently stored trie implementation for | |
6106 | Python.") | |
6107 | (license license:lgpl2.1+))) | |
6108 | ||
6109 | (define-public snakemake | |
6110 | (package | |
6111 | (name "snakemake") | |
93803c6b | 6112 | (version "5.7.1") |
44d10b1f RW |
6113 | (source |
6114 | (origin | |
6115 | (method url-fetch) | |
6116 | (uri (pypi-uri "snakemake" version)) | |
6117 | (sha256 | |
93803c6b | 6118 | (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas")))) |
44d10b1f RW |
6119 | (build-system python-build-system) |
6120 | (arguments | |
6121 | ;; TODO: Package missing test dependencies. | |
6122 | '(#:tests? #f | |
6123 | #:phases | |
6124 | (modify-phases %standard-phases | |
6125 | ;; For cluster execution Snakemake will call Python. Since there is | |
6126 | ;; no suitable PYTHONPATH set, cluster execution will fail. We fix | |
6127 | ;; this by calling the snakemake wrapper instead. | |
6128 | (add-after 'unpack 'call-wrapper-not-wrapped-snakemake | |
6129 | (lambda* (#:key outputs #:allow-other-keys) | |
6130 | (substitute* "snakemake/executors.py" | |
6131 | (("\\{sys.executable\\} -m snakemake") | |
6132 | (string-append (assoc-ref outputs "out") | |
6133 | "/bin/snakemake"))) | |
6134 | #t))))) | |
6135 | (propagated-inputs | |
8994ae34 | 6136 | `(("python-appdirs" ,python-appdirs) |
44d10b1f RW |
6137 | ("python-configargparse" ,python-configargparse) |
6138 | ("python-datrie" ,python-datrie) | |
6139 | ("python-docutils" ,python-docutils) | |
8994ae34 | 6140 | ("python-gitpython" ,python-gitpython) |
44d10b1f RW |
6141 | ("python-jinja2" ,python-jinja2) |
6142 | ("python-jsonschema" ,python-jsonschema) | |
6143 | ("python-networkx" ,python-networkx) | |
93803c6b | 6144 | ("python-psutil" ,python-psutil) |
44d10b1f | 6145 | ("python-pyyaml" ,python-pyyaml) |
8994ae34 TGR |
6146 | ("python-ratelimiter" ,python-ratelimiter) |
6147 | ("python-requests" ,python-requests) | |
6148 | ("python-wrapt" ,python-wrapt))) | |
44d10b1f RW |
6149 | (home-page "https://snakemake.readthedocs.io") |
6150 | (synopsis "Python-based execution environment for make-like workflows") | |
6151 | (description | |
6152 | "Snakemake aims to reduce the complexity of creating workflows by | |
6153 | providing a clean and modern domain specific specification language (DSL) in | |
6154 | Python style, together with a fast and comfortable execution environment.") | |
6155 | (license license:expat))) | |
6156 | ||
44d10b1f RW |
6157 | (define-public python-pyqrcode |
6158 | (package | |
6159 | (name "python-pyqrcode") | |
6160 | (version "1.2.1") | |
6161 | (source | |
6162 | (origin | |
6163 | (method url-fetch) | |
6164 | (uri (pypi-uri "PyQRCode" version)) | |
6165 | (sha256 | |
6166 | (base32 | |
6167 | "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx")))) | |
6168 | (build-system python-build-system) | |
6169 | (home-page | |
6170 | "https://github.com/mnooner256/pyqrcode") | |
6171 | (synopsis "QR code generator") | |
6172 | (description | |
6173 | "Pyqrcode is a QR code generator written purely in Python with | |
6174 | SVG, EPS, PNG and terminal output.") | |
6175 | (license license:bsd-3))) | |
6176 | ||
6177 | (define-public python-seaborn | |
6178 | (package | |
6179 | (name "python-seaborn") | |
6180 | (version "0.9.0") | |
6181 | (source | |
6182 | (origin | |
6183 | (method url-fetch) | |
6184 | (uri (pypi-uri "seaborn" version)) | |
6185 | (sha256 | |
f9bd82e7 RW |
6186 | (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n")) |
6187 | (patches | |
6188 | (list (origin | |
6189 | (method url-fetch) | |
6190 | ;; This has already been merged, but there is no new | |
6191 | ;; release including this patch. It fixes problems | |
6192 | ;; with axis rotation that would lead to test | |
6193 | ;; failures. | |
6194 | (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff") | |
6195 | (sha256 | |
6196 | (base32 | |
6197 | "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w")) | |
6198 | (file-name "seaborn-0.9.0-axis-rotation.patch")))))) | |
44d10b1f RW |
6199 | (build-system python-build-system) |
6200 | (arguments | |
6201 | `(#:phases | |
6202 | (modify-phases %standard-phases | |
6203 | (add-before 'check 'start-xserver | |
6204 | (lambda* (#:key inputs #:allow-other-keys) | |
6205 | (let ((xorg-server (assoc-ref inputs "xorg-server"))) | |
6206 | ;; There must be a running X server and make check doesn't | |
6207 | ;; start one. Therefore we must do it. | |
6208 | (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) | |
6209 | (setenv "DISPLAY" ":1") | |
6210 | #t))) | |
a1322765 RW |
6211 | (add-after 'unpack 'fix-tests |
6212 | (lambda _ | |
6213 | ;; test_cbar_ticks fails probably because of matplotlib's | |
6214 | ;; expectation of using an older version of FreeType. | |
6215 | (delete-file "seaborn/tests/test_matrix.py") | |
6216 | #t)) | |
44d10b1f RW |
6217 | (replace 'check (lambda _ (invoke "pytest" "seaborn") #t))))) |
6218 | (propagated-inputs | |
6219 | `(("python-pandas" ,python-pandas) | |
6220 | ("python-matplotlib" ,python-matplotlib) | |
6221 | ("python-numpy" ,python-numpy) | |
6222 | ("python-scipy" ,python-scipy))) | |
6223 | (native-inputs | |
6224 | `(("python-pytest" ,python-pytest) | |
ff337525 | 6225 | ("xorg-server" ,xorg-server-for-tests))) |
d3d73bd6 | 6226 | (home-page "https://seaborn.pydata.org/") |
44d10b1f RW |
6227 | (synopsis "Statistical data visualization") |
6228 | (description | |
6229 | "Seaborn is a library for making attractive and informative statistical | |
6230 | graphics in Python. It is built on top of matplotlib and tightly integrated | |
6231 | with the PyData stack, including support for numpy and pandas data structures | |
6232 | and statistical routines from scipy and statsmodels.") | |
6233 | (license license:bsd-3))) | |
6234 | ||
6235 | (define-public python2-seaborn | |
6236 | (package-with-python2 python-seaborn)) | |
6237 | ||
6238 | (define-public python-mpmath | |
6239 | (package | |
6240 | (name "python-mpmath") | |
6241 | (version "0.19") | |
6242 | (source (origin | |
6243 | (method url-fetch) | |
6244 | (uri (string-append "http://mpmath.org/files/mpmath-" | |
6245 | version ".tar.gz")) | |
6246 | (sha256 | |
6247 | (base32 | |
6248 | "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8")))) | |
6249 | (build-system python-build-system) | |
6250 | (arguments | |
6251 | '(#:phases | |
6252 | (modify-phases %standard-phases | |
6253 | (replace 'check | |
6254 | (lambda _ | |
5d7a6f1c | 6255 | (invoke "python" "mpmath/tests/runtests.py" "-local")))))) |
44d10b1f RW |
6256 | (home-page "http://mpmath.org") |
6257 | (synopsis "Arbitrary-precision floating-point arithmetic in python") | |
6258 | (description | |
6259 | "@code{mpmath} can be used as an arbitrary-precision substitute for | |
6260 | Python's float/complex types and math/cmath modules, but also does much | |
6261 | more advanced mathematics.") | |
6262 | (license license:bsd-3))) | |
6263 | ||
6264 | (define-public python2-mpmath | |
6265 | (package-with-python2 python-mpmath)) | |
6266 | ||
6267 | (define-public python-bigfloat | |
6268 | (package | |
6269 | (name "python-bigfloat") | |
6270 | (version "0.3.0") | |
6271 | (source | |
6272 | (origin | |
6273 | (method url-fetch) | |
6274 | (uri (pypi-uri "bigfloat" version)) | |
6275 | (sha256 | |
6276 | (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6")))) | |
6277 | (build-system python-build-system) | |
6278 | (inputs | |
6279 | `(("mpfr" ,mpfr))) | |
6280 | (home-page "https://github.com/mdickinson/bigfloat") | |
6281 | (synopsis "Arbitrary precision floating-point arithmetic for Python") | |
6282 | (description | |
e36de31b | 6283 | "This package provides a Python interface to the MPFR library for |
44d10b1f RW |
6284 | multiprecision arithmetic.") |
6285 | (license license:lgpl3+))) | |
6286 | ||
6287 | (define-public python2-bigfloat | |
6288 | (package-with-python2 python-bigfloat)) | |
6289 | ||
6290 | (define-public python-sympy | |
6291 | (package | |
6292 | (name "python-sympy") | |
6293 | (version "1.1.1") | |
6294 | (source | |
6295 | (origin | |
6296 | (method url-fetch) | |
6297 | (uri (string-append | |
6298 | "https://github.com/sympy/sympy/releases/download/sympy-" | |
6299 | version "/sympy-" version ".tar.gz")) | |
6300 | (sha256 | |
6301 | (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc")))) | |
6302 | (build-system python-build-system) | |
6303 | (arguments | |
6304 | `(#:phases | |
6305 | (modify-phases %standard-phases | |
6306 | ;; Run the core tests after installation. By default it would run | |
6307 | ;; *all* tests, which take a very long time to complete and are known | |
6308 | ;; to be flaky. | |
6309 | (delete 'check) | |
6310 | (add-after 'install 'check | |
6311 | (lambda* (#:key outputs #:allow-other-keys) | |
6312 | (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")") | |
6313 | #t))))) | |
6314 | (propagated-inputs | |
6315 | `(("python-mpmath" ,python-mpmath))) | |
2f35985c | 6316 | (home-page "https://www.sympy.org/") |
44d10b1f RW |
6317 | (synopsis "Python library for symbolic mathematics") |
6318 | (description | |
6319 | "SymPy is a Python library for symbolic mathematics. It aims to become a | |
6320 | full-featured computer algebra system (CAS) while keeping the code as simple | |
6321 | as possible in order to be comprehensible and easily extensible.") | |
6322 | (license license:bsd-3))) | |
6323 | ||
6324 | (define-public python2-sympy | |
6325 | (package | |
6326 | (inherit (package-with-python2 python-sympy)) | |
6327 | (arguments | |
6328 | `(#:phases | |
6329 | (modify-phases %standard-phases | |
6330 | ;; Run the core tests after installation. By default it would run | |
6331 | ;; *all* tests, which take a very long time to complete and are known | |
6332 | ;; to be flaky. | |
6333 | (delete 'check) | |
6334 | (add-after 'install 'check | |
6335 | (lambda* (#:key outputs #:allow-other-keys) | |
6336 | (invoke "python" "-c" "import sympy; sympy.test(\"/core\")") | |
6337 | #t))))))) | |
6338 | ||
6339 | (define-public python-q | |
6340 | (package | |
6341 | (name "python-q") | |
6342 | (version "2.6") | |
6343 | (source | |
6344 | (origin | |
6345 | (method url-fetch) | |
6346 | (uri (pypi-uri "q" version)) | |
6347 | (sha256 | |
6348 | (base32 | |
6349 | "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy")))) | |
6350 | (build-system python-build-system) | |
6351 | (home-page "https://github.com/zestyping/q") | |
6352 | (synopsis "Quick-and-dirty debugging output for tired programmers") | |
6353 | (description | |
6354 | "q is a Python module for \"print\" style of debugging Python code. It | |
6355 | provides convenient short API for print out of values, tracebacks, and | |
6356 | falling into the Python interpreter.") | |
6357 | (license license:asl2.0))) | |
6358 | ||
6359 | (define-public python2-q | |
6360 | (package-with-python2 python-q)) | |
6361 | ||
6362 | (define-public python2-xlib | |
6363 | (package | |
6364 | (name "python2-xlib") | |
6365 | (version "0.14") | |
6366 | (source (origin | |
6367 | (method url-fetch) | |
6368 | (uri (string-append "mirror://sourceforge/python-xlib/python-xlib" | |
6369 | "/" version "/" | |
6370 | "python-xlib-" version ".tar.gz")) | |
6371 | (sha256 | |
6372 | (base32 | |
6373 | "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7")))) | |
6374 | (build-system python-build-system) | |
6375 | (arguments | |
6376 | `(#:python ,python-2 ;Python 2 only | |
6377 | #:tests? #f)) ;no tests | |
6378 | (home-page "http://python-xlib.sourceforge.net/") | |
6379 | (synopsis "Python X11 client library") | |
6380 | (description | |
6381 | "The Python X Library is intended to be a fully functional X client | |
6382 | library for Python programs. It is useful to implement low-level X clients. | |
6383 | It is written entirely in Python.") | |
6384 | (license license:gpl2+))) | |
6385 | ||
6386 | (define-public python-singledispatch | |
6387 | (package | |
6388 | (name "python-singledispatch") | |
6389 | (version "3.4.0.3") | |
6390 | (source | |
6391 | (origin | |
6392 | (method url-fetch) | |
6393 | (uri (pypi-uri "singledispatch" version)) | |
6394 | (sha256 | |
6395 | (base32 | |
6396 | "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv")))) | |
6397 | (build-system python-build-system) | |
6398 | (native-inputs | |
6399 | `(("python-six" ,python-six))) ; required for conversion, not at run-time | |
6400 | (home-page | |
8680eff3 | 6401 | "https://docs.python.org/3/library/functools.html#functools.singledispatch") |
44d10b1f RW |
6402 | (synopsis "Backport of singledispatch feature from Python 3.4") |
6403 | (description | |
6404 | "This library brings functools.singledispatch from Python 3.4 to Python | |
6405 | 2.6-3.3.") | |
6406 | (license license:expat))) | |
6407 | ||
6408 | (define-public python2-singledispatch | |
6409 | (package-with-python2 python-singledispatch)) | |
6410 | ||
6411 | ;; the python- version can be removed with python-3.5 | |
6412 | (define-public python-backports-abc | |
6413 | (package | |
6414 | (name "python-backports-abc") | |
6415 | (version "0.5") | |
6416 | (source | |
6417 | (origin | |
6418 | (method url-fetch) | |
6419 | (uri (pypi-uri "backports_abc" version)) | |
6420 | (sha256 | |
6421 | (base32 | |
6422 | "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3")))) | |
6423 | (build-system python-build-system) | |
6424 | (home-page "https://github.com/cython/backports_abc") | |
6425 | (synopsis "Backport of additions to the 'collections.abc' module") | |
6426 | (description | |
6427 | "Python-backports-abc provides a backport of additions to the | |
36a4366d | 6428 | @code{collections.abc} module in Python-3.5.") |
44d10b1f RW |
6429 | (license license:psfl))) |
6430 | ||
6431 | (define-public python2-backports-abc | |
6432 | (package-with-python2 python-backports-abc)) | |
6433 | ||
6434 | (define-public python-backports-csv | |
6435 | (package | |
6436 | (name "python-backports-csv") | |
6437 | (version "1.0.5") | |
6438 | (source | |
6439 | (origin | |
6440 | (method url-fetch) | |
6441 | (uri (pypi-uri "backports.csv" version)) | |
6442 | (sha256 | |
6443 | (base32 | |
6444 | "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc")))) | |
6445 | (build-system python-build-system) | |
6446 | (home-page "https://github.com/ryanhiebert/backports.csv") | |
6447 | (synopsis "Backport of Python 3's csv module for Python 2") | |
6448 | (description | |
6449 | "Provides a backport of Python 3's @code{csv} module for parsing | |
6450 | comma separated values. The API of the @code{csv} module in Python 2 | |
6451 | is drastically different from the @code{csv} module in Python 3. | |
6452 | This is due, for the most part, to the difference between str in | |
6453 | Python 2 and Python 3.") | |
6454 | (license license:psfl))) | |
6455 | ||
6456 | (define-public python2-backports-csv | |
6457 | (package-with-python2 python-backports-csv)) | |
6458 | ||
6459 | (define-public python2-backports-shutil-get-terminal-size | |
6460 | (package | |
6461 | (name "python2-backports-shutil-get-terminal-size") | |
6462 | (version "1.0.0") | |
6463 | (source | |
6464 | (origin | |
6465 | (method url-fetch) | |
6466 | (uri (pypi-uri "backports.shutil_get_terminal_size" version)) | |
6467 | (sha256 | |
6468 | (base32 | |
6469 | "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki")))) | |
6470 | (build-system python-build-system) | |
6471 | (arguments | |
6472 | `(#:python ,python-2 | |
6473 | #:phases | |
6474 | (modify-phases %standard-phases | |
6475 | (replace 'check | |
6476 | (lambda _ | |
4a4a7d9a | 6477 | (invoke "py.test" "-v")))))) |
44d10b1f RW |
6478 | (native-inputs |
6479 | `(("python2-pytest" ,python2-pytest))) | |
6480 | (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size") | |
6481 | (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}") | |
6482 | (description | |
6483 | "This package provides a backport of the @code{get_terminal_size | |
6484 | function} from Python 3.3's @code{shutil}. | |
6485 | Unlike the original version it is written in pure Python rather than C, | |
6486 | so it might be a tiny bit slower.") | |
6487 | (license license:expat))) | |
6488 | ||
6489 | (define-public python-waf | |
6490 | (package | |
6491 | (name "python-waf") | |
6c2c11fa | 6492 | (version "2.0.19") |
44d10b1f RW |
6493 | (source (origin |
6494 | (method url-fetch) | |
6495 | (uri (string-append "https://waf.io/" | |
6496 | "waf-" version ".tar.bz2")) | |
6497 | (sha256 | |
6498 | (base32 | |
6c2c11fa | 6499 | "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q")))) |
44d10b1f RW |
6500 | (build-system python-build-system) |
6501 | (arguments | |
6502 | '(#:phases | |
6503 | (modify-phases %standard-phases | |
6504 | (replace 'build | |
6505 | (lambda _ | |
633c8b71 MO |
6506 | ;; XXX: Find a way to add all extra tools. |
6507 | (let ((tools '("gccdeps" | |
6508 | "clang_compilation_database"))) | |
6509 | (invoke "python" "waf-light" "configure" "build" | |
6510 | (string-append "--tools=" | |
6511 | (string-join tools ",")))))) | |
44d10b1f RW |
6512 | (replace 'check |
6513 | (lambda _ | |
6514 | (invoke "python" "waf" "--version"))) | |
6515 | (replace 'install | |
6516 | (lambda* (#:key outputs #:allow-other-keys) | |
6517 | (let ((out (assoc-ref outputs "out"))) | |
6518 | (install-file "waf" (string-append out "/bin"))) | |
6519 | #t)) | |
6520 | ;; waf breaks when it is wrapped. | |
6521 | (delete 'wrap)))) | |
6522 | (home-page "https://waf.io/") | |
6523 | (synopsis "Python-based build system") | |
6524 | (description | |
6525 | "Waf is a Python-based framework for configuring, compiling and installing | |
6526 | applications.") | |
6527 | (license license:bsd-3))) | |
6528 | ||
6529 | (define-public python2-waf | |
6530 | (package-with-python2 python-waf)) | |
6531 | ||
6532 | (define-public python-pyzmq | |
6533 | (package | |
6534 | (name "python-pyzmq") | |
6535 | (version "17.1.2") | |
6536 | (source | |
6537 | (origin | |
6538 | (method url-fetch) | |
6539 | (uri (pypi-uri "pyzmq" version)) | |
6540 | (sha256 | |
6541 | (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7")))) | |
6542 | (build-system python-build-system) | |
6543 | (arguments | |
6544 | `(#:configure-flags | |
6545 | (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq"))) | |
6546 | ;; FIXME: You must build pyzmq with 'python setup.py build_ext | |
6547 | ;; --inplace' for 'python setup.py test' to work. | |
6548 | #:tests? #f)) | |
6549 | (inputs | |
6550 | `(("zeromq" ,zeromq))) | |
6551 | (native-inputs | |
6552 | `(("pkg-config" ,pkg-config) | |
6553 | ("python-nose" ,python-nose))) | |
6554 | (home-page "https://github.com/zeromq/pyzmq") | |
6555 | (synopsis "Python bindings for 0MQ") | |
6556 | (description | |
6557 | "PyZMQ is the official Python binding for the ZeroMQ messaging library.") | |
6558 | (license license:bsd-4))) | |
6559 | ||
6560 | (define-public python2-pyzmq | |
6561 | (package-with-python2 python-pyzmq)) | |
6562 | ||
6563 | (define-public python-pep8 | |
6564 | ;; This package has been renamed to ‘pycodestyle’ and is no longer updated. | |
6565 | ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking | |
6566 | ;; some dependents' test suites, and nothing more. | |
6567 | (package | |
6568 | (name "python-pep8") | |
6569 | (version "1.7.0") | |
6570 | (source | |
6571 | (origin | |
6572 | (method url-fetch) | |
6573 | (uri (pypi-uri "pep8" version)) | |
6574 | (sha256 | |
6575 | (base32 | |
2be878d8 CB |
6576 | "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1")) |
6577 | (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch")))) | |
44d10b1f RW |
6578 | (build-system python-build-system) |
6579 | (home-page "https://pep8.readthedocs.org/") | |
6580 | (synopsis "Python style guide checker") | |
6581 | (description | |
6582 | "This tools checks Python code against some of the style conventions in | |
6583 | PEP 8.") | |
6584 | (license license:expat))) | |
6585 | ||
6586 | (define-public python2-pep8 | |
6587 | (package-with-python2 python-pep8)) | |
6588 | ||
6589 | (define-public python-pyflakes | |
6590 | (package | |
6591 | (name "python-pyflakes") | |
d0cba11b | 6592 | (version "2.1.1") |
44d10b1f RW |
6593 | (source |
6594 | (origin | |
6595 | (method url-fetch) | |
6596 | (uri (pypi-uri "pyflakes" version)) | |
6597 | (sha256 | |
6598 | (base32 | |
d0cba11b | 6599 | "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr")))) |
44d10b1f RW |
6600 | (build-system python-build-system) |
6601 | (home-page | |
6602 | "https://github.com/pyflakes/pyflakes") | |
6603 | (synopsis "Passive checker of Python programs") | |
6604 | (description | |
6605 | "Pyflakes statically checks Python source code for common errors.") | |
6606 | (license license:expat))) | |
6607 | ||
6608 | (define-public python2-pyflakes | |
6609 | (package-with-python2 python-pyflakes)) | |
6610 | ||
6611 | (define-public python-mccabe | |
6612 | (package | |
6613 | (name "python-mccabe") | |
6614 | (version "0.6.1") | |
6615 | (source | |
6616 | (origin | |
6617 | (method url-fetch) | |
6618 | (uri (pypi-uri "mccabe" version)) | |
6619 | (sha256 | |
6620 | (base32 | |
6621 | "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx")))) | |
6622 | (build-system python-build-system) | |
6623 | (native-inputs | |
6624 | `(("python-pytest" ,python-pytest-bootstrap) | |
6625 | ("python-pytest-runner" ,python-pytest-runner))) | |
6626 | (home-page "https://github.com/flintwork/mccabe") | |
6627 | (synopsis "McCabe checker, plugin for flake8") | |
6628 | (description | |
6629 | "This package provides a Flake8 plug-in to compute the McCabe cyclomatic | |
6630 | complexity of Python source code.") | |
6631 | (license license:expat))) | |
6632 | ||
6633 | (define-public python2-mccabe | |
6634 | (package-with-python2 python-mccabe)) | |
6635 | ||
6636 | (define-public python-mccabe-0.2.1 | |
6637 | (package (inherit python-mccabe) | |
6638 | (version "0.2.1") | |
6639 | (source | |
6640 | (origin | |
6641 | (method url-fetch) | |
6642 | (uri (pypi-uri "mccabe" version)) | |
6643 | (sha256 | |
6644 | (base32 | |
6645 | "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs")))))) | |
6646 | ||
6647 | (define-public python2-mccabe-0.2.1 | |
6648 | (package-with-python2 python-mccabe-0.2.1)) | |
6649 | ||
6650 | ;; Flake8 2.4.1 requires an older version of pep8. | |
6651 | ;; This should be removed ASAP. | |
6652 | (define-public python-pep8-1.5.7 | |
6653 | (package (inherit python-pep8) | |
6654 | (version "1.5.7") | |
6655 | (source | |
f3576970 RW |
6656 | (origin |
6657 | (method url-fetch) | |
6658 | (uri (pypi-uri "pep8" version)) | |
6659 | (sha256 | |
6660 | (base32 | |
6661 | "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m")))) | |
44d10b1f RW |
6662 | (arguments |
6663 | ;; XXX Tests not compatible with Python 3.5. | |
6664 | '(#:tests? #f)))) | |
6665 | ||
6666 | (define-public python2-pep8-1.5.7 | |
6667 | (package-with-python2 python-pep8-1.5.7)) | |
6668 | ||
6669 | ;; Flake8 2.4.1 requires an older version of pyflakes. | |
6670 | ;; This should be removed ASAP. | |
6671 | (define-public python-pyflakes-0.8.1 | |
6672 | (package (inherit python-pyflakes) | |
6673 | (version "0.8.1") | |
6674 | (source | |
8c4dffb5 RW |
6675 | (origin |
6676 | (method url-fetch) | |
6677 | (uri (pypi-uri "pyflakes" version)) | |
6678 | (sha256 | |
6679 | (base32 | |
6680 | "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z")))) | |
44d10b1f RW |
6681 | (arguments |
6682 | ;; XXX Tests not compatible with Python 3.5. | |
6683 | '(#:tests? #f)))) | |
6684 | ||
6685 | (define-public python2-pyflakes-0.8.1 | |
6686 | (package-with-python2 python-pyflakes-0.8.1)) | |
6687 | ||
ac63cf0a | 6688 | (define-public python-flake8 |
44d10b1f RW |
6689 | (package |
6690 | (name "python-flake8") | |
beaff4a8 | 6691 | (version "3.7.7") |
ac63cf0a MB |
6692 | (source (origin |
6693 | (method url-fetch) | |
6694 | (uri (pypi-uri "flake8" version)) | |
6695 | (sha256 | |
6696 | (base32 | |
beaff4a8 | 6697 | "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5")))) |
44d10b1f RW |
6698 | (build-system python-build-system) |
6699 | (arguments | |
6700 | `(#:phases | |
6701 | (modify-phases %standard-phases | |
44d10b1f RW |
6702 | (delete 'check) |
6703 | (add-after 'install 'check | |
6704 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6705 | (add-installed-pythonpath inputs outputs) | |
6706 | (invoke "pytest" "-v") | |
6707 | #t))))) | |
6708 | (propagated-inputs | |
6709 | `(("python-pycodestyle" ,python-pycodestyle) | |
beaff4a8 | 6710 | ("python-entrypoints" ,python-entrypoints) |
44d10b1f RW |
6711 | ("python-pyflakes" ,python-pyflakes) |
6712 | ("python-mccabe" ,python-mccabe))) | |
6713 | (native-inputs | |
6714 | `(("python-mock" ,python-mock) | |
6715 | ("python-pytest" ,python-pytest-bootstrap) | |
6716 | ("python-pytest-runner" ,python-pytest-runner))) | |
6717 | (home-page "https://gitlab.com/pycqa/flake8") | |
6718 | (synopsis | |
6719 | "The modular source code checker: pep8, pyflakes and co") | |
6720 | (description | |
6721 | "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.") | |
ac63cf0a | 6722 | (properties `((python2-variant . ,(delay python2-flake8)))) |
44d10b1f RW |
6723 | (license license:expat))) |
6724 | ||
ac63cf0a MB |
6725 | (define-public python2-flake8 |
6726 | (let ((base (package-with-python2 (strip-python2-variant python-flake8)))) | |
44d10b1f RW |
6727 | (package (inherit base) |
6728 | (propagated-inputs | |
6729 | `(("python2-configparser" ,python2-configparser) | |
6730 | ("python2-enum34" ,python2-enum34) | |
beaff4a8 | 6731 | ("python2-typing" ,python2-typing) |
44d10b1f RW |
6732 | ,@(package-propagated-inputs base)))))) |
6733 | ||
44d10b1f RW |
6734 | ;; python-hacking requires flake8 <2.6.0. |
6735 | (define-public python-flake8-2.5 | |
6736 | (package | |
6737 | (inherit python-flake8) | |
6738 | (version "2.5.5") | |
6739 | (source (origin | |
6740 | (method url-fetch) | |
6741 | (uri (pypi-uri "flake8" version)) | |
6742 | (sha256 | |
6743 | (base32 | |
6744 | "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij")))) | |
6745 | (propagated-inputs | |
6746 | `(("python-pep8" ,python-pep8) | |
6747 | ,@(package-propagated-inputs python-flake8))) | |
6748 | (properties `((python2-variant . ,(delay python2-flake8-2.5)))))) | |
6749 | ||
6750 | (define-public python2-flake8-2.5 | |
6751 | (package | |
6752 | (inherit python2-flake8) | |
6753 | (version (package-version python-flake8-2.5)) | |
6754 | (source (origin | |
6755 | (inherit (package-source python-flake8-2.5)))) | |
6756 | (propagated-inputs | |
6757 | `(("python2-pep8" ,python2-pep8) | |
6758 | ,@(package-propagated-inputs python2-flake8))))) | |
6759 | ||
6760 | (define-public python-flake8-polyfill | |
6761 | (package | |
6762 | (name "python-flake8-polyfill") | |
6763 | (version "1.0.2") | |
6764 | (source | |
6765 | (origin | |
6766 | (method url-fetch) | |
6767 | (uri (pypi-uri "flake8-polyfill" version)) | |
6768 | (sha256 | |
6769 | (base32 | |
6770 | "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4")))) | |
6771 | (build-system python-build-system) | |
6772 | (arguments | |
6773 | '(#:phases | |
6774 | (modify-phases %standard-phases | |
6775 | (replace 'check | |
6776 | (lambda _ | |
40a7153d MB |
6777 | ;; Be compatible with Pytest 4: |
6778 | ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7 | |
6779 | (substitute* "setup.cfg" | |
6780 | (("\\[pytest\\]") | |
6781 | "[tool:pytest]")) | |
6782 | ||
44d10b1f RW |
6783 | (setenv "PYTHONPATH" |
6784 | (string-append (getcwd) "/build/lib:" | |
6785 | (getenv "PYTHONPATH"))) | |
4f0a0894 | 6786 | (invoke "py.test" "-v")))))) |
44d10b1f RW |
6787 | (native-inputs |
6788 | `(("python-flake8" ,python-flake8) | |
6789 | ("python-mock" ,python-mock) | |
6790 | ("python-pep8" ,python-pep8) | |
6791 | ("python-pycodestyle" ,python-pycodestyle) | |
6792 | ("python-pytest" ,python-pytest))) | |
6793 | (home-page "https://gitlab.com/pycqa/flake8-polyfill") | |
6794 | (synopsis "Polyfill package for Flake8 plugins") | |
6795 | (description | |
6796 | "This package that provides some compatibility helpers for Flake8 | |
6797 | plugins that intend to support Flake8 2.x and 3.x simultaneously.") | |
6798 | (license license:expat))) | |
6799 | ||
6800 | (define-public python2-flake8-polyfill | |
6801 | (package-with-python2 python-flake8-polyfill)) | |
6802 | ||
6803 | (define-public python-mistune | |
6804 | (package | |
6805 | (name "python-mistune") | |
6806 | (version "0.8.4") | |
6807 | (source | |
6808 | (origin | |
6809 | (method url-fetch) | |
6810 | (uri (pypi-uri "mistune" version)) | |
6811 | (sha256 | |
6812 | (base32 | |
6813 | "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr")))) | |
6814 | (build-system python-build-system) | |
6815 | (native-inputs | |
6816 | `(("python-nose" ,python-nose) | |
6817 | ("python-cython" ,python-cython))) | |
6818 | (home-page "https://github.com/lepture/mistune") | |
6819 | (synopsis "Markdown parser in pure Python") | |
6820 | (description "This package provides a fast markdown parser in pure | |
6821 | Python.") | |
6822 | (license license:bsd-3))) | |
6823 | ||
6824 | (define-public python2-mistune | |
6825 | (package-with-python2 python-mistune)) | |
6826 | ||
6827 | (define-public python-markdown | |
6828 | (package | |
6829 | (name "python-markdown") | |
0d1d0a6e | 6830 | (version "3.2.1") |
44d10b1f RW |
6831 | (source |
6832 | (origin | |
6833 | (method url-fetch) | |
6834 | (uri (pypi-uri "Markdown" version)) | |
6835 | (sha256 | |
6836 | (base32 | |
0d1d0a6e | 6837 | "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh")))) |
44d10b1f RW |
6838 | (build-system python-build-system) |
6839 | (native-inputs | |
6840 | `(("python-nose" ,python-nose) | |
6841 | ("python-pyyaml" ,python-pyyaml))) | |
6842 | (home-page "https://python-markdown.github.io/") | |
6843 | (synopsis "Python implementation of Markdown") | |
6844 | (description | |
6845 | "This package provides a Python implementation of John Gruber's | |
6846 | Markdown. The library features international input, various Markdown | |
6847 | extensions, and several HTML output formats. A command line wrapper | |
6848 | markdown_py is also provided to convert Markdown files to HTML.") | |
2537ce68 | 6849 | (properties `((python2-variant . ,(delay python2-markdown)))) |
44d10b1f RW |
6850 | (license license:bsd-3))) |
6851 | ||
2537ce68 | 6852 | ;; Markdown 3.2 dropped support for Python 2. |
44d10b1f | 6853 | (define-public python2-markdown |
2537ce68 MB |
6854 | (let ((base (package-with-python2 (strip-python2-variant python-markdown)))) |
6855 | (package/inherit | |
6856 | base | |
6857 | (version "3.1.1") | |
6858 | (source (origin | |
6859 | (method url-fetch) | |
6860 | (uri (pypi-uri "Markdown" version)) | |
6861 | (sha256 | |
6862 | (base32 | |
6863 | "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))))) | |
44d10b1f RW |
6864 | |
6865 | (define-public python-ptyprocess | |
6866 | (package | |
6867 | (name "python-ptyprocess") | |
6868 | (version "0.5.2") | |
6869 | (source | |
6870 | (origin | |
6871 | (method url-fetch) | |
6872 | (uri (pypi-uri "ptyprocess" version)) | |
6873 | (sha256 | |
6874 | (base32 | |
6875 | "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6")))) | |
6876 | (build-system python-build-system) | |
6877 | (native-inputs | |
6878 | `(("python-nose" ,python-nose))) | |
6879 | (arguments | |
6880 | `(#:phases | |
6881 | (modify-phases %standard-phases | |
6882 | (replace 'check | |
7904d6fa | 6883 | (lambda _ (invoke "nosetests")))))) |
44d10b1f RW |
6884 | (home-page "https://github.com/pexpect/ptyprocess") |
6885 | (synopsis "Run a subprocess in a pseudo terminal") | |
6886 | (description | |
6887 | "This package provides a Python library used to launch a subprocess in a | |
6888 | pseudo terminal (pty), and interact with both the process and its pty.") | |
6889 | (license license:isc))) | |
6890 | ||
6891 | (define-public python2-ptyprocess | |
6892 | (package-with-python2 python-ptyprocess)) | |
6893 | ||
6894 | (define-public python-cram | |
6895 | (package | |
6896 | (name "python-cram") | |
6897 | (version "0.7") | |
6898 | (home-page "https://bitheap.org/cram/") | |
6899 | (source (origin | |
6900 | (method url-fetch) | |
6901 | (uri (list (string-append home-page "cram-" | |
6902 | version ".tar.gz") | |
6903 | (pypi-uri "cram" version))) | |
6904 | (sha256 | |
6905 | (base32 | |
6906 | "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx")))) | |
6907 | (arguments | |
6908 | '(#:phases | |
6909 | (modify-phases %standard-phases | |
6910 | (add-after 'unpack 'patch-source | |
6911 | (lambda _ | |
6912 | (substitute* (find-files "cram" ".*\\.py$") | |
6913 | ;; Replace default shell path. | |
6914 | (("/bin/sh") (which "sh"))) | |
6915 | (substitute* (find-files "tests" ".*\\.t$") | |
6916 | (("md5") "md5sum") | |
6917 | (("/bin/bash") (which "bash")) | |
6918 | (("/bin/sh") (which "sh"))) | |
6919 | (substitute* "cram/_test.py" | |
6920 | ;; This hack works around a bug triggered by substituting | |
6921 | ;; the /bin/sh paths. "tests/usage.t" compares the output of | |
6922 | ;; "cram -h", which breaks the output at 80 characters. This | |
6923 | ;; causes the line showing the default shell to break into two | |
6924 | ;; lines, but the test expects a single line... | |
6925 | (("env\\['COLUMNS'\\] = '80'") | |
6926 | "env['COLUMNS'] = '160'")) | |
ff1e80d7 MB |
6927 | |
6928 | (substitute* "Makefile" | |
6929 | ;; Recent versions of python-coverage have caused the test | |
6930 | ;; coverage to decrease (as of version 0.7). Allow that. | |
6931 | (("--fail-under=100") | |
6932 | "--fail-under=90")) | |
6933 | ||
44d10b1f | 6934 | #t)) |
ff1e80d7 | 6935 | (replace 'check |
44d10b1f | 6936 | ;; The test phase uses the built library and executable. |
44d10b1f RW |
6937 | (lambda* (#:key inputs outputs #:allow-other-keys) |
6938 | (add-installed-pythonpath inputs outputs) | |
6939 | (setenv "PATH" (string-append (getenv "PATH") ":" | |
6940 | (assoc-ref outputs "out") "/bin")) | |
2d7db192 | 6941 | (invoke "make" "test")))))) |
44d10b1f RW |
6942 | (build-system python-build-system) |
6943 | (native-inputs | |
6944 | `(("python-coverage" ,python-coverage) | |
6945 | ("which" ,which))) | |
6946 | (synopsis "Simple testing framework for command line applications") | |
6947 | (description | |
6948 | "Cram is a functional testing framework for command line applications. | |
6949 | Cram tests look like snippets of interactive shell sessions. Cram runs each | |
6950 | command and compares the command output in the test with the command’s actual | |
6951 | output.") | |
6952 | (license license:gpl2+))) | |
6953 | ||
6954 | (define-public python2-cram | |
6955 | (package-with-python2 python-cram)) | |
6956 | ||
6957 | (define-public python-straight-plugin | |
6958 | (package | |
6959 | (name "python-straight-plugin") | |
6960 | (version "1.4.1") | |
6961 | (source | |
6962 | (origin | |
6963 | (method url-fetch) | |
6964 | (uri (pypi-uri "straight.plugin" version)) | |
6965 | (sha256 | |
6966 | (base32 | |
6967 | "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62")))) | |
6968 | (build-system python-build-system) | |
6969 | (home-page "https://github.com/ironfroggy/straight.plugin") | |
6970 | (synopsis "Simple namespaced plugin facility") | |
6971 | (description "Straight Plugin provides a type of plugin you can create from | |
6972 | almost any existing Python modules, and an easy way for outside developers to | |
6973 | add functionality and customization to your projects with their own plugins.") | |
6974 | (license license:expat))) | |
6975 | ||
6976 | (define-public python2-straight-plugin | |
6977 | (package-with-python2 python-straight-plugin)) | |
6978 | ||
6979 | (define-public python-fonttools | |
6980 | (package | |
6981 | (name "python-fonttools") | |
1a4bb420 | 6982 | (version "3.38.0") |
44d10b1f RW |
6983 | (source (origin |
6984 | (method url-fetch) | |
6985 | (uri (pypi-uri "fonttools" version ".zip")) | |
6986 | (sha256 | |
6987 | (base32 | |
1a4bb420 | 6988 | "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh")))) |
44d10b1f RW |
6989 | (build-system python-build-system) |
6990 | (native-inputs | |
6991 | `(("unzip" ,unzip) | |
6992 | ("python-pytest" ,python-pytest) | |
6993 | ("python-pytest-runner" ,python-pytest-runner))) | |
9d25a454 | 6994 | (home-page "https://github.com/fonttools/fonttools") |
44d10b1f RW |
6995 | (synopsis "Tools to manipulate font files") |
6996 | (description | |
6997 | "FontTools/TTX is a library to manipulate font files from Python. It | |
6998 | supports reading and writing of TrueType/OpenType fonts, reading and writing | |
6999 | of AFM files, reading (and partially writing) of PS Type 1 fonts. The package | |
7000 | also contains a tool called “TTX” which converts TrueType/OpenType fonts to and | |
7001 | from an XML-based format.") | |
7002 | (license license:expat))) | |
7003 | ||
7004 | (define-public python2-fonttools | |
7005 | (package-with-python2 python-fonttools)) | |
7006 | ||
7007 | (define-public python-ly | |
7008 | (package | |
7009 | (name "python-ly") | |
7010 | (version "0.9.5") | |
7011 | (source | |
7012 | (origin | |
7013 | (method url-fetch) | |
7014 | (uri (pypi-uri name version)) | |
7015 | (sha256 | |
7016 | (base32 | |
7017 | "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl")))) | |
7018 | (build-system python-build-system) | |
7019 | (arguments | |
7020 | ;; FIXME: Some tests need network access. | |
7021 | '(#:tests? #f)) | |
7022 | (synopsis "Tool and library for manipulating LilyPond files") | |
7023 | (description "This package provides a Python library to parse, manipulate | |
7024 | or create documents in LilyPond format. A command line program ly is also | |
7025 | provided that can be used to do various manipulations with LilyPond files.") | |
e85af137 | 7026 | (home-page "https://pypi.org/project/python-ly/") |
44d10b1f RW |
7027 | (license license:gpl2+))) |
7028 | ||
7029 | (define-public python-appdirs | |
7030 | (package | |
7031 | (name "python-appdirs") | |
7032 | (version "1.4.3") | |
7033 | (source | |
7034 | (origin | |
7035 | (method url-fetch) | |
7036 | (uri (pypi-uri "appdirs" version)) | |
7037 | (sha256 | |
7038 | (base32 | |
7039 | "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y")))) | |
7040 | (build-system python-build-system) | |
7041 | (home-page "https://github.com/ActiveState/appdirs") | |
7042 | (synopsis | |
7043 | "Determine platform-specific dirs, e.g. a \"user data dir\"") | |
7044 | (description | |
7045 | "This module provides a portable way of finding out where user data | |
7046 | should be stored on various operating systems.") | |
7047 | (license license:expat))) | |
7048 | ||
7049 | (define-public python2-appdirs | |
7050 | (package-with-python2 python-appdirs)) | |
7051 | ||
7052 | (define-public python-llfuse | |
7053 | (package | |
7054 | (name "python-llfuse") | |
7055 | (version "1.3.5") | |
7056 | (source (origin | |
7057 | (method url-fetch) | |
7058 | (uri (pypi-uri "llfuse" version ".tar.bz2")) | |
7059 | (sha256 | |
7060 | (base32 | |
7061 | "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf")))) | |
7062 | (build-system python-build-system) | |
7063 | (inputs | |
7064 | `(("fuse" ,fuse) | |
7065 | ("attr" ,attr))) | |
7066 | (native-inputs | |
7067 | `(("pkg-config" ,pkg-config))) | |
7068 | (synopsis "Python bindings for FUSE") | |
7069 | (description | |
7070 | "Python-LLFUSE is a set of Python bindings for the low level FUSE API.") | |
7071 | (home-page "https://bitbucket.org/nikratio/python-llfuse/") | |
7072 | (license license:lgpl2.0+) | |
7073 | (properties `((python2-variant . ,(delay python2-llfuse)))))) | |
7074 | ||
7075 | (define-public python2-llfuse | |
7076 | (package (inherit (package-with-python2 | |
7077 | (strip-python2-variant python-llfuse))) | |
7078 | (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))) | |
7079 | ||
7080 | ;; For attic-0.16 | |
7081 | (define-public python-llfuse-0.41 | |
7082 | (package (inherit python-llfuse) | |
7083 | (version "0.41.1") | |
7084 | (source (origin | |
7085 | (method url-fetch) | |
7086 | (uri (string-append | |
7087 | "https://bitbucket.org/nikratio/python-llfuse/downloads/" | |
7088 | "llfuse-" version ".tar.bz2")) | |
7089 | (sha256 | |
7090 | (base32 | |
7091 | "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa")))) | |
7092 | ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat) | |
7093 | ;; licensed. The rest of the package is licensed under LGPL2.0 or later. | |
7094 | (license (list license:expat license:lgpl2.0+)))) | |
7095 | ||
7096 | (define-public python-msgpack | |
7097 | (package | |
7098 | (name "python-msgpack") | |
7099 | (version "0.5.6") | |
7100 | (source (origin | |
7101 | (method url-fetch) | |
7102 | (uri (pypi-uri "msgpack" version)) | |
7103 | (sha256 | |
7104 | (base32 | |
7105 | "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f")))) | |
7106 | (build-system python-build-system) | |
7107 | (arguments | |
7108 | `(#:modules ((guix build utils) | |
7109 | (guix build python-build-system) | |
7110 | (ice-9 ftw) | |
7111 | (srfi srfi-1) | |
7112 | (srfi srfi-26)) | |
7113 | #:phases | |
7114 | (modify-phases %standard-phases | |
7115 | (replace 'check | |
7116 | (lambda _ | |
7117 | (let ((cwd (getcwd))) | |
7118 | (setenv "PYTHONPATH" | |
7119 | (string-append cwd "/build/" | |
7120 | (find (cut string-prefix? "lib" <>) | |
7121 | (scandir (string-append cwd "/build"))) | |
7122 | ":" | |
7123 | (getenv "PYTHONPATH"))) | |
7124 | (invoke "pytest" "-v" "test"))))))) | |
7125 | (native-inputs | |
7126 | `(("python-pytest" ,python-pytest))) | |
7127 | (synopsis "MessagePack (de)serializer") | |
7128 | (description "MessagePack is a fast, compact binary serialization format, | |
7129 | suitable for similar data to JSON. This package provides CPython bindings for | |
7130 | reading and writing MessagePack data.") | |
e85af137 | 7131 | (home-page "https://pypi.org/project/msgpack/") |
44d10b1f RW |
7132 | (license license:asl2.0))) |
7133 | ||
7134 | ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with | |
7135 | ;; release 0.5. Some packages like borg still call it by the old name for now. | |
7136 | ;; <https://bugs.gnu.org/30662> | |
7137 | (define-public python-msgpack-transitional | |
7138 | (package | |
7139 | (inherit python-msgpack) | |
7140 | (name "python-msgpack-transitional") | |
7141 | (arguments | |
7142 | (substitute-keyword-arguments (package-arguments python-msgpack) | |
7143 | ((#:phases phases) | |
7144 | `(modify-phases ,phases | |
7145 | (add-after 'unpack 'configure-transitional | |
7146 | (lambda _ | |
7147 | ;; Keep using the old name. | |
7148 | (substitute* "setup.py" | |
7149 | (("TRANSITIONAL = False") | |
7150 | "TRANSITIONAL = 1")) | |
7151 | #t)))))))) | |
7152 | ||
7153 | (define-public python2-msgpack | |
7154 | (package-with-python2 python-msgpack)) | |
7155 | ||
7156 | (define-public python-netaddr | |
7157 | (package | |
7158 | (name "python-netaddr") | |
7159 | (version "0.7.19") | |
7160 | (source | |
7161 | (origin | |
7162 | (method url-fetch) | |
7163 | (uri (pypi-uri "netaddr" version)) | |
7164 | (sha256 | |
7165 | (base32 | |
7166 | "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq")))) | |
7167 | (build-system python-build-system) | |
7168 | (arguments `(#:tests? #f)) ;; No tests. | |
7169 | (home-page "https://github.com/drkjam/netaddr/") | |
7170 | (synopsis "Pythonic manipulation of network addresses") | |
7171 | (description | |
7172 | "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI | |
7173 | and MAC network addresses.") | |
7174 | (license license:bsd-3))) | |
7175 | ||
7176 | (define-public python2-netaddr | |
7177 | (package-with-python2 python-netaddr)) | |
7178 | ||
dd85eca0 AG |
7179 | (define-public python2-pyroute2 |
7180 | (package | |
7181 | (name "python2-pyroute2") | |
7182 | (version "0.5.6") | |
7183 | (source | |
7184 | (origin | |
7185 | (method url-fetch) | |
7186 | (uri (pypi-uri "pyroute2" version)) | |
7187 | (sha256 | |
7188 | (base32 | |
7189 | "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny")))) | |
7190 | (build-system python-build-system) | |
7191 | (arguments | |
7192 | `(#:python ,python-2)) ;Python 3.x is not supported | |
7193 | (home-page "https://github.com/svinota/pyroute2") | |
7194 | (synopsis "Python netlink library") | |
7195 | (description | |
7196 | "Pyroute2 is a pure Python netlink library with minimal dependencies. | |
7197 | Supported netlink families and protocols include: | |
7198 | @itemize | |
7199 | @item rtnl, network settings - addresses, routes, traffic controls | |
7200 | @item nfnetlink - netfilter API: ipset, nftables, ... | |
7201 | @item ipq - simplest userspace packet filtering, iptables QUEUE target | |
7202 | @item devlink - manage and monitor devlink-enabled hardware | |
7203 | @item generic - generic netlink families | |
7204 | @itemize | |
7205 | @item nl80211 - wireless functions API (basic support) | |
7206 | @item taskstats - extended process statistics | |
7207 | @item acpi_events - ACPI events monitoring | |
7208 | @item thermal_events - thermal events monitoring | |
7209 | @item VFS_DQUOT - disk quota events monitoring | |
7210 | @end itemize | |
7211 | @end itemize") | |
7212 | (license license:gpl2+))) | |
7213 | ||
44d10b1f RW |
7214 | (define-public python-wrapt |
7215 | (package | |
7216 | (name "python-wrapt") | |
2271a1dc | 7217 | (version "1.11.2") |
44d10b1f | 7218 | (source |
2271a1dc MB |
7219 | (origin |
7220 | (method url-fetch) | |
7221 | (uri (pypi-uri "wrapt" version)) | |
7222 | (sha256 | |
7223 | (base32 | |
7224 | "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn")))) | |
44d10b1f RW |
7225 | (build-system python-build-system) |
7226 | (arguments | |
7227 | ;; Tests are not included in the tarball, they are only available in the | |
7228 | ;; git repository. | |
7229 | `(#:tests? #f)) | |
7230 | (home-page "https://github.com/GrahamDumpleton/wrapt") | |
7231 | (synopsis "Module for decorators, wrappers and monkey patching") | |
7232 | (description | |
2271a1dc | 7233 | "The aim of the wrapt module is to provide a transparent object proxy for |
44d10b1f RW |
7234 | Python, which can be used as the basis for the construction of function |
7235 | wrappers and decorator functions.") | |
7236 | (license license:bsd-2))) | |
7237 | ||
7238 | (define-public python2-wrapt | |
7239 | (package-with-python2 python-wrapt)) | |
7240 | ||
7241 | (define-public python-xlrd | |
7242 | (package | |
7243 | (name "python-xlrd") | |
3a2b1a3c | 7244 | (version "1.2.0") |
44d10b1f RW |
7245 | (source (origin |
7246 | (method url-fetch) | |
7247 | (uri (pypi-uri "xlrd" version)) | |
7248 | (sha256 | |
7249 | (base32 | |
3a2b1a3c | 7250 | "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl")))) |
44d10b1f RW |
7251 | (build-system python-build-system) |
7252 | (arguments | |
7253 | `(#:phases | |
7254 | (modify-phases %standard-phases | |
3ccdd3a5 MO |
7255 | ;; Some tests depend on writing a temporary file to the user's home |
7256 | ;; directory. | |
3a2b1a3c GL |
7257 | (add-after 'unpack 'fix-tests |
7258 | (lambda _ | |
7259 | (delete-file "tests/test_open_workbook.py") | |
7260 | #t))))) | |
44d10b1f RW |
7261 | (home-page "http://www.python-excel.org/") |
7262 | (synopsis "Library for extracting data from Excel files") | |
a0909286 | 7263 | (description "This package provides a library to extract data from |
44d10b1f RW |
7264 | spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and |
7265 | @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is | |
7266 | Unicode-aware. It is not intended as an end-user tool.") | |
7267 | (license license:bsd-3))) | |
7268 | ||
7269 | (define-public python2-xlrd | |
7270 | (package-with-python2 python-xlrd)) | |
7271 | ||
7272 | (define-public python-prettytable | |
7273 | (package | |
7274 | (name "python-prettytable") | |
7275 | (version "0.7.2") | |
7276 | (source | |
7277 | (origin | |
7278 | (method url-fetch) | |
337c3a1e | 7279 | (uri (pypi-uri "prettytable" version ".tar.bz2")) |
44d10b1f RW |
7280 | (sha256 |
7281 | (base32 | |
7282 | "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45")))) | |
7283 | (build-system python-build-system) | |
8be58b48 | 7284 | (home-page "https://code.google.com/archive/p/prettytable/") |
44d10b1f RW |
7285 | (synopsis "Display tabular data in an ASCII table format") |
7286 | (description | |
7287 | "A library designed to represent tabular data in visually appealing ASCII | |
7288 | tables. PrettyTable allows for selection of which columns are to be printed, | |
7289 | independent alignment of columns (left or right justified or centred) and | |
7290 | printing of sub-tables by specifying a row range.") | |
7291 | (license license:bsd-3))) | |
7292 | ||
7293 | (define-public python2-prettytable | |
7294 | (package-with-python2 python-prettytable)) | |
7295 | ||
7296 | (define-public python-tables | |
7297 | (package | |
7298 | (name "python-tables") | |
7299 | (version "3.4.4") | |
7300 | (source | |
7301 | (origin | |
7302 | (method url-fetch) | |
7303 | (uri (pypi-uri "tables" version)) | |
7304 | (sha256 | |
7305 | (base32 | |
7306 | "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx")) | |
7307 | (modules '((guix build utils))) | |
7308 | (snippet | |
7309 | '(begin | |
7310 | ;; Remove pre-compiled .pyc files from source. | |
7311 | (for-each delete-file-recursively | |
7312 | (find-files "." "__pycache__" #:directories? #t)) | |
7313 | (for-each delete-file (find-files "." "\\.pyc$")) | |
7314 | #t)))) | |
7315 | (build-system python-build-system) | |
7316 | (arguments | |
7317 | `(;; FIXME: python-build-system does not pass configure-flags to "build" | |
7318 | ;; or "check", so we must override the build and check phases. | |
7319 | #:phases | |
7320 | (modify-phases %standard-phases | |
7321 | (add-after 'unpack 'use-gcc | |
7322 | (lambda _ | |
7323 | (substitute* "setup.py" | |
7324 | (("compiler = new_compiler\\(\\)" line) | |
7325 | (string-append line | |
7326 | "\ncompiler.set_executables(compiler='gcc'," | |
7327 | "compiler_so='gcc'," | |
7328 | "linker_exe='gcc'," | |
7329 | "linker_so='gcc -shared')"))) | |
7330 | #t)) | |
70b74663 RW |
7331 | (add-after 'unpack 'disable-tuning |
7332 | (lambda _ | |
7333 | (substitute* "setup.py" | |
7334 | (("cpu_flags = .*") | |
7335 | "cpu_flags = ['sse2']\n")) | |
7336 | #t)) | |
44d10b1f RW |
7337 | (replace 'build |
7338 | (lambda* (#:key inputs #:allow-other-keys) | |
35d79d61 RW |
7339 | (invoke "python" "setup.py" "build" |
7340 | (string-append "--hdf5=" | |
7341 | (assoc-ref inputs "hdf5"))))) | |
44d10b1f RW |
7342 | (replace 'check |
7343 | (lambda* (#:key inputs #:allow-other-keys) | |
35d79d61 RW |
7344 | (invoke "python" "setup.py" "check" |
7345 | (string-append "--hdf5=" | |
7346 | (assoc-ref inputs "hdf5")))))))) | |
44d10b1f RW |
7347 | (propagated-inputs |
7348 | `(("python-numexpr" ,python-numexpr) | |
7349 | ("python-numpy" ,python-numpy))) | |
7350 | (native-inputs | |
7351 | `(("python-cython" ,python-cython) | |
7352 | ("pkg-config" ,pkg-config))) | |
7353 | (inputs | |
538c1a02 | 7354 | `(("hdf5" ,hdf5-1.10) |
44d10b1f RW |
7355 | ("bzip2" ,bzip2) |
7356 | ("zlib" ,zlib))) | |
7357 | (home-page "http://www.pytables.org/") | |
7358 | (synopsis "Hierarchical datasets for Python") | |
7359 | (description "PyTables is a package for managing hierarchical datasets and | |
7360 | designed to efficiently cope with extremely large amounts of data.") | |
7361 | (license license:bsd-3))) | |
7362 | ||
7363 | (define-public python2-tables | |
7364 | (package-with-python2 python-tables)) | |
7365 | ||
cc2c2850 RW |
7366 | (define-public python-pytest-black |
7367 | (package | |
7368 | (name "python-pytest-black") | |
7369 | (version "0.3.8") | |
7370 | (source | |
7371 | (origin | |
7372 | (method url-fetch) | |
7373 | (uri (pypi-uri "pytest-black" version)) | |
7374 | (sha256 | |
7375 | (base32 | |
7376 | "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81")))) | |
7377 | (build-system python-build-system) | |
7378 | (propagated-inputs | |
7379 | `(("python-pytest" ,python-pytest) | |
7380 | ("python-black" ,python-black) | |
7381 | ("python-toml" ,python-toml))) | |
7382 | (native-inputs | |
7383 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
7384 | (home-page "https://github.com/shopkeep/pytest-black") | |
7385 | (synopsis "Pytest plugin to enable format checking with black") | |
7386 | (description | |
7387 | "This package provides a pytest plugin to enable format checking with the | |
7388 | Python code formatter \"black\".") | |
7389 | (license license:expat))) | |
7390 | ||
2ceff35f RW |
7391 | (define-public python-get-version |
7392 | (package | |
7393 | (name "python-get-version") | |
7394 | (version "2.1") | |
7395 | (source | |
7396 | (origin | |
7397 | (method url-fetch) | |
7398 | (uri (pypi-uri "get_version" version)) | |
7399 | (sha256 | |
7400 | (base32 | |
7401 | "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1")))) | |
7402 | (build-system python-build-system) | |
7403 | (propagated-inputs | |
7404 | `(("python-pygments" ,python-pygments) | |
7405 | ("python-pytest" ,python-pytest) | |
7406 | ("python-pytest-black" ,python-pytest-black) | |
7407 | ("python-pytest-cov" ,python-pytest-cov) | |
7408 | ("python-setuptools" ,python-setuptools) | |
7409 | ("python-testpath" ,python-testpath))) | |
7410 | (home-page "https://github.com/flying-sheep/get_version") | |
7411 | (synopsis "Version helper in the spirit of versioneer") | |
7412 | (description | |
7413 | "This package provides a version helper that lets you automatically use | |
7414 | the latest @code{vX.X.X} Git tag as the version in your Python package. It | |
7415 | also supports getting the version from Python source distributions or, once | |
7416 | your package is installed, via @code{pkg_resources} (part of | |
7417 | @code{setuptools}).") | |
7418 | (license license:gpl3+))) | |
7419 | ||
053ab825 RW |
7420 | (define-public python-legacy-api-wrap |
7421 | (package | |
7422 | (name "python-legacy-api-wrap") | |
7423 | (version "1.2") | |
7424 | (source | |
7425 | (origin | |
7426 | (method url-fetch) | |
7427 | (uri (pypi-uri "legacy-api-wrap" version)) | |
7428 | (sha256 | |
7429 | (base32 | |
7430 | "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3")))) | |
7431 | (build-system python-build-system) | |
7432 | (propagated-inputs | |
7433 | `(("python-get-version" ,python-get-version) | |
7434 | ("python-pytest" ,python-pytest) | |
7435 | ("python-pytest-black" ,python-pytest-black) | |
7436 | ("python-pytest-cov" ,python-pytest-cov) | |
7437 | ("python-setuptools" ,python-setuptools))) | |
7438 | (home-page "https://github.com/flying-sheep/legacy-api-wrap") | |
7439 | (synopsis "Legacy API wrapper") | |
7440 | (description "This module defines a decorator to wrap legacy APIs. The | |
7441 | primary use case is APIs defined before keyword-only parameters existed.") | |
7442 | (license license:gpl3+))) | |
7443 | ||
44d10b1f RW |
7444 | (define-public python-pyasn1 |
7445 | (package | |
7446 | (name "python-pyasn1") | |
7447 | (version "0.4.3") | |
7448 | (source | |
7449 | (origin | |
7450 | (method url-fetch) | |
7451 | (uri (pypi-uri "pyasn1" version)) | |
7452 | (sha256 | |
7453 | (base32 | |
7454 | "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv")))) | |
7455 | (build-system python-build-system) | |
7456 | (home-page "http://pyasn1.sourceforge.net/") | |
7457 | (synopsis "ASN.1 types and codecs") | |
7458 | (description | |
7459 | "This is an implementation of ASN.1 types and codecs in Python. It is | |
7460 | suitable for a wide range of protocols based on the ASN.1 specification.") | |
7461 | (license license:bsd-2))) | |
7462 | ||
7463 | (define-public python2-pyasn1 | |
7464 | (package-with-python2 python-pyasn1)) | |
7465 | ||
7466 | (define-public python-pyasn1-modules | |
7467 | (package | |
7468 | (name "python-pyasn1-modules") | |
7469 | (version "0.2.2") | |
7470 | (source | |
7471 | (origin | |
7472 | (method url-fetch) | |
7473 | (uri (pypi-uri "pyasn1-modules" version)) | |
7474 | (sha256 | |
7475 | (base32 | |
7476 | "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0")))) | |
7477 | (build-system python-build-system) | |
7478 | (propagated-inputs | |
7479 | `(("python-pyasn1" ,python-pyasn1))) | |
7480 | (home-page "https://sourceforge.net/projects/pyasn1/") | |
7481 | (synopsis "ASN.1 codec implementations") | |
7482 | (description | |
7483 | "Pyasn1-modules is a collection of Python modules providing ASN.1 types and | |
7484 | implementations of ASN.1-based codecs and protocols.") | |
7485 | (license license:bsd-3))) | |
7486 | ||
7487 | (define-public python2-pyasn1-modules | |
7488 | (package-with-python2 python-pyasn1-modules)) | |
7489 | ||
7490 | (define-public python-ipaddress | |
7491 | (package | |
7492 | (name "python-ipaddress") | |
7493 | (version "1.0.22") | |
7494 | (source (origin | |
7495 | (method url-fetch) | |
7496 | (uri (pypi-uri "ipaddress" version)) | |
7497 | (sha256 | |
7498 | (base32 | |
7499 | "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi")))) | |
7500 | (build-system python-build-system) | |
7501 | (home-page "https://github.com/phihag/ipaddress") | |
7502 | (synopsis "IP address manipulation library") | |
7503 | (description | |
7504 | "This package provides a fast, lightweight IPv4/IPv6 manipulation library | |
7505 | in Python. This library is used to create, poke at, and manipulate IPv4 and | |
7506 | IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress | |
7507 | module to older versions of Python.") | |
7508 | (license license:psfl))) | |
7509 | ||
7510 | (define-public python2-ipaddress | |
7511 | (package-with-python2 python-ipaddress)) | |
7512 | ||
7513 | (define-public python2-ipaddr | |
7514 | (package | |
7515 | (name "python2-ipaddr") | |
7516 | (version "2.1.11") | |
7517 | (source | |
7518 | (origin | |
7519 | (method url-fetch) | |
7520 | (uri (pypi-uri "ipaddr" version)) | |
7521 | (sha256 | |
7522 | (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v")))) | |
7523 | (build-system python-build-system) | |
7524 | (arguments | |
7525 | `(#:python ,python-2 ;version 2 only | |
7526 | #:phases | |
7527 | (modify-phases %standard-phases | |
7528 | (replace 'check | |
40b8c4e3 | 7529 | (lambda _ (invoke "python" "ipaddr_test.py")))))) |
44d10b1f RW |
7530 | (home-page "https://github.com/google/ipaddr-py") |
7531 | (synopsis "IP address manipulation library") | |
7532 | (description | |
7533 | "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and | |
7534 | IPv6 addresses and networks. | |
7535 | ||
7536 | For new implementations you may prefer to use the standard module | |
7537 | @code{ipaddress}, which was introduced in Python 3.3 and backported to older | |
7538 | versions of Python.") | |
7539 | (license license:asl2.0))) | |
7540 | ||
7541 | (define-public python-idna | |
7542 | (package | |
7543 | (name "python-idna") | |
e95c9837 | 7544 | (version "2.8") |
44d10b1f RW |
7545 | (source |
7546 | (origin | |
7547 | (method url-fetch) | |
7548 | (uri (pypi-uri "idna" version)) | |
7549 | (sha256 | |
7550 | (base32 | |
e95c9837 | 7551 | "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3")))) |
44d10b1f RW |
7552 | (build-system python-build-system) |
7553 | (home-page "https://github.com/kjd/idna") | |
7554 | (synopsis "Internationalized domain names in applications") | |
7555 | (description | |
7556 | "This is a library to support the Internationalised Domain Names in | |
7557 | Applications (IDNA) protocol as specified in RFC 5891. This version of the | |
7558 | protocol is often referred to as “IDNA2008” and can produce different results | |
7559 | from the earlier standard from 2003. The library is also intended to act as a | |
7560 | suitable drop-in replacement for the “encodings.idna” module that comes with | |
7561 | the Python standard library but currently only supports the older 2003 | |
7562 | specification.") | |
7563 | (license license:bsd-4))) | |
7564 | ||
a76e6a69 JM |
7565 | (define-public python-idna-2.7 |
7566 | (package (inherit python-idna) | |
7567 | (version "2.7") | |
7568 | (source (origin | |
7569 | (method url-fetch) | |
7570 | (uri (pypi-uri "idna" version)) | |
7571 | (sha256 | |
7572 | (base32 | |
7573 | "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8")))))) | |
7574 | ||
7575 | ||
44d10b1f RW |
7576 | (define-public python2-idna |
7577 | (package-with-python2 python-idna)) | |
7578 | ||
7579 | (define-public python-idna-ssl | |
7580 | (package | |
7581 | (name "python-idna-ssl") | |
7582 | (version "1.0.1") | |
7583 | (source | |
7584 | (origin | |
7585 | (method url-fetch) | |
7586 | (uri (pypi-uri "idna-ssl" version)) | |
7587 | (sha256 | |
7588 | (base32 | |
7589 | "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj")))) | |
7590 | (build-system python-build-system) | |
7591 | (arguments | |
7592 | `(#:tests? #f)) ;circular dependency with python-aiohttp | |
7593 | (home-page "https://github.com/aio-libs/idna-ssl") | |
7594 | (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support") | |
7595 | (description "Patch @code{ssl.match_hostname} for Unicode(idna) | |
7596 | domains support.") | |
7597 | (license license:expat))) | |
7598 | ||
7599 | (define-public python-pretend | |
7600 | (package | |
7601 | (name "python-pretend") | |
7602 | (version "1.0.9") | |
7603 | (source | |
7604 | (origin | |
7605 | (method url-fetch) | |
9f1f22ee | 7606 | (uri (pypi-uri "pretend" version)) |
44d10b1f RW |
7607 | (sha256 |
7608 | (base32 | |
7609 | "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9")))) | |
7610 | (build-system python-build-system) | |
7611 | (home-page "https://github.com/alex/pretend") | |
7612 | (synopsis "Library for stubbing in Python") | |
7613 | (description | |
7614 | "Pretend is a library to make stubbing with Python easier. Stubbing is a | |
7615 | technique for writing tests. You may hear the term mixed up with mocks, | |
7616 | fakes, or doubles. Basically, a stub is an object that returns pre-canned | |
7617 | responses, rather than doing any computation.") | |
7618 | (license license:bsd-3))) | |
7619 | ||
7620 | (define-public python2-pretend | |
7621 | (package-with-python2 python-pretend)) | |
7622 | ||
7623 | (define-public python-pip | |
7624 | (package | |
7625 | (name "python-pip") | |
0a193d32 | 7626 | (version "20.0.2") |
44d10b1f RW |
7627 | (source |
7628 | (origin | |
7629 | (method url-fetch) | |
7630 | (uri (pypi-uri "pip" version)) | |
7631 | (sha256 | |
7632 | (base32 | |
0a193d32 | 7633 | "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x")))) |
44d10b1f RW |
7634 | (build-system python-build-system) |
7635 | (arguments | |
7636 | '(#:tests? #f)) ; there are no tests in the pypi archive. | |
7637 | (home-page "https://pip.pypa.io/") | |
7638 | (synopsis "Package manager for Python software") | |
7639 | (description | |
7640 | "Pip is a package manager for Python software, that finds packages on the | |
7641 | Python Package Index (PyPI).") | |
7642 | (license license:expat))) | |
7643 | ||
7644 | (define-public python2-pip | |
7645 | (package-with-python2 python-pip)) | |
7646 | ||
7647 | (define-public python-tlsh | |
7648 | (package | |
7649 | (name "python-tlsh") | |
7650 | (version "3.4.5") | |
7651 | (home-page "https://github.com/trendmicro/tlsh") | |
3e3ff8ad TGR |
7652 | (source |
7653 | (origin | |
7654 | (method git-fetch) | |
7655 | (uri (git-reference | |
7656 | (url "https://github.com/trendmicro/tlsh.git") | |
7657 | (commit (string-append "v" version)))) | |
7658 | (file-name (git-file-name name version)) | |
7659 | (sha256 | |
7660 | (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll")))) | |
44d10b1f RW |
7661 | (build-system cmake-build-system) |
7662 | (arguments | |
7663 | '(#:out-of-source? #f | |
7664 | #:phases (modify-phases %standard-phases | |
7665 | (replace | |
7666 | 'install | |
7667 | (lambda* (#:key outputs #:allow-other-keys) | |
7668 | ;; Build and install the Python bindings. The underlying | |
7669 | ;; C++ library is apparently not meant to be installed. | |
7670 | (let ((out (assoc-ref outputs "out"))) | |
7671 | (with-directory-excursion "py_ext" | |
7672 | (and (system* "python" "setup.py" "build") | |
7673 | (system* "python" "setup.py" "install" | |
7674 | (string-append "--prefix=" out)))))))))) | |
7675 | (inputs `(("python" ,python-wrapper))) ;for the bindings | |
7676 | (synopsis "Fuzzy matching library for Python") | |
7677 | (description | |
7678 | "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library. | |
7679 | Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash | |
7680 | value which can be used for similarity comparisons. Similar objects have | |
7681 | similar hash values, which allows for the detection of similar objects by | |
7682 | comparing their hash values. The byte stream should have a sufficient amount | |
7683 | of complexity; for example, a byte stream of identical bytes will not generate | |
7684 | a hash value.") | |
7685 | (license license:asl2.0))) | |
7686 | ||
7687 | (define-public python2-tlsh | |
7688 | (package | |
7689 | (inherit python-tlsh) | |
7690 | (name "python2-tlsh") | |
7691 | (inputs `(("python" ,python-2))))) | |
7692 | ||
7693 | (define-public python-termcolor | |
7694 | (package | |
7695 | (name "python-termcolor") | |
7696 | (version "1.1.0") | |
7697 | (source | |
7698 | (origin | |
7699 | (method url-fetch) | |
7700 | (uri (pypi-uri "termcolor" version)) | |
7701 | (sha256 | |
7702 | (base32 | |
7703 | "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x")))) | |
7704 | (build-system python-build-system) | |
7705 | (arguments | |
7706 | ;; There are no tests. | |
7707 | `(#:tests? #f)) | |
e85af137 | 7708 | (home-page "https://pypi.org/project/termcolor/") |
44d10b1f RW |
7709 | (synopsis "ANSII Color formatting for terminal output") |
7710 | (description | |
7711 | "This package provides ANSII Color formatting for output in terminals.") | |
7712 | (license license:expat))) | |
7713 | ||
7714 | (define-public python2-termcolor | |
7715 | (package-with-python2 python-termcolor)) | |
7716 | ||
7717 | (define-public python-libarchive-c | |
7718 | (package | |
7719 | (name "python-libarchive-c") | |
f2774824 | 7720 | (version "2.9") |
44d10b1f RW |
7721 | (source (origin |
7722 | (method url-fetch) | |
7723 | (uri (pypi-uri "libarchive-c" version)) | |
7724 | (sha256 | |
7725 | (base32 | |
f2774824 | 7726 | "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr")))) |
44d10b1f RW |
7727 | (build-system python-build-system) |
7728 | (arguments | |
7729 | '(#:phases (modify-phases %standard-phases | |
7730 | (add-before | |
7731 | 'build 'reference-libarchive | |
7732 | (lambda* (#:key inputs #:allow-other-keys) | |
7733 | ;; Retain the absolute file name of libarchive.so. | |
7734 | (let ((libarchive (assoc-ref inputs "libarchive"))) | |
7735 | (substitute* "libarchive/ffi.py" | |
7736 | (("find_library\\('archive'\\)") | |
7737 | (string-append "'" libarchive | |
7738 | "/lib/libarchive.so'")))))) | |
7739 | (replace 'check | |
7740 | (lambda _ (invoke "pytest" "-vv")))))) | |
7741 | (native-inputs | |
7742 | `(("python-mock" ,python-mock) | |
7743 | ("python-pytest" ,python-pytest))) | |
7744 | (inputs | |
7745 | `(("libarchive" ,libarchive))) | |
7746 | (home-page "https://github.com/Changaco/python-libarchive-c") | |
7747 | (synopsis "Python interface to libarchive") | |
7748 | (description | |
7749 | "This package provides Python bindings to libarchive, a C library to | |
7750 | access possibly compressed archives in many different formats. It uses | |
7751 | Python's @code{ctypes} foreign function interface (FFI).") | |
7752 | (license license:lgpl2.0+))) | |
7753 | ||
7754 | (define-public python2-libarchive-c | |
7755 | (package-with-python2 python-libarchive-c)) | |
7756 | ||
7757 | (define-public python-file | |
7758 | (package | |
7759 | (inherit file) | |
7760 | (name "python-file") | |
7761 | (build-system python-build-system) | |
7762 | (arguments | |
7763 | '(#:tests? #f ;no tests | |
7764 | #:configure-flags '("--single-version-externally-managed" "--root=/") | |
7765 | #:phases (modify-phases %standard-phases | |
7766 | (add-before 'build 'change-directory | |
7767 | (lambda _ | |
7768 | (chdir "python") | |
7769 | #t)) | |
7770 | (add-before 'build 'set-library-file-name | |
7771 | (lambda* (#:key inputs #:allow-other-keys) | |
7772 | (let ((file (assoc-ref inputs "file"))) | |
7773 | (substitute* "magic.py" | |
7774 | (("find_library\\('magic'\\)") | |
7775 | (string-append "'" file "/lib/libmagic.so'"))) | |
7776 | #t)))))) | |
7777 | (inputs `(("file" ,file))) | |
528ea990 LC |
7778 | (native-inputs (if (%current-target-system) |
7779 | `(("self" ,this-package)) | |
7780 | '())) | |
44d10b1f RW |
7781 | (synopsis "Python bindings to the libmagic file type guesser. Note that |
7782 | this module and the python-magic module both provide a \"magic.py\" file; | |
7783 | these two modules, which are different and were developed separately, both | |
7784 | serve the same purpose: provide Python bindings for libmagic."))) | |
7785 | ||
7786 | (define-public python2-file | |
7787 | (package-with-python2 python-file)) | |
7788 | ||
7789 | (define-public python-debian | |
7790 | (package | |
7791 | (name "python-debian") | |
7792 | (home-page "https://salsa.debian.org/python-debian-team/python-debian") | |
9f74bd31 | 7793 | (version "0.1.36") |
44d10b1f RW |
7794 | (source |
7795 | (origin | |
9f74bd31 VC |
7796 | ;; Use git-fetch, as pypi doesn't include test suite. |
7797 | (method git-fetch) | |
7798 | (uri (git-reference | |
7799 | (url home-page) | |
7800 | (commit version))) | |
7801 | (file-name (git-file-name name version)) | |
44d10b1f RW |
7802 | (sha256 |
7803 | (base32 | |
9f74bd31 | 7804 | "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa")))) |
44d10b1f | 7805 | (build-system python-build-system) |
9f74bd31 VC |
7806 | (arguments |
7807 | `(#:phases (modify-phases %standard-phases | |
7808 | (add-after 'unpack 'remove-debian-specific-tests | |
7809 | ;; python-apt, apt and dpkg are not yet available in guix, | |
7810 | ;; and these tests heavily depend on them. | |
7811 | (lambda _ | |
7812 | (delete-file "lib/debian/tests/test_deb822.py") | |
7813 | (delete-file "lib/debian/tests/test_debfile.py") | |
7814 | #t))))) | |
44d10b1f | 7815 | (propagated-inputs |
9f74bd31 VC |
7816 | `(("python-six" ,python-six) |
7817 | ("python-chardet" ,python-chardet))) | |
44d10b1f RW |
7818 | (synopsis "Debian package related modules") |
7819 | (description | |
7820 | ;; XXX: Use @enumerate instead of @itemize to work around | |
7821 | ;; <http://bugs.gnu.org/21772>. | |
7822 | "This package provides Python modules that abstract many formats of | |
7823 | Debian-related files, such as: | |
7824 | ||
7825 | @enumerate | |
7826 | @item Debtags information; | |
7827 | @item @file{debian/changelog} files; | |
7828 | @item packages files, pdiffs; | |
7829 | @item control files of single or multiple RFC822-style paragraphs---e.g. | |
7830 | @file{debian/control}, @file{.changes}, @file{.dsc}; | |
7831 | @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to | |
7832 | contained files and meta-information. | |
7833 | @end enumerate\n") | |
7834 | ||
7835 | ;; Modules are either GPLv2+ or GPLv3+. | |
7836 | (license license:gpl3+))) | |
7837 | ||
44d10b1f RW |
7838 | (define-public python-nbformat |
7839 | (package | |
7840 | (name "python-nbformat") | |
7841 | (version "4.4.0") | |
7842 | (source | |
7843 | (origin | |
7844 | (method url-fetch) | |
7845 | (uri (pypi-uri "nbformat" version)) | |
7846 | (sha256 | |
7847 | (base32 | |
7848 | "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp")))) | |
7849 | (build-system python-build-system) | |
7850 | (arguments `(#:tests? #f)) ; no test target | |
7851 | (propagated-inputs | |
7852 | `(("python-ipython-genutils" ,python-ipython-genutils) | |
7853 | ("python-jsonschema" ,python-jsonschema) | |
7854 | ("python-jupyter-core" ,python-jupyter-core) | |
7855 | ("python-traitlets" ,python-traitlets))) | |
7856 | (home-page "http://jupyter.org") | |
7857 | (synopsis "Jupyter Notebook format") | |
7858 | (description "This package provides the reference implementation of the | |
7859 | Jupyter Notebook format and Python APIs for working with notebooks.") | |
7860 | (license license:bsd-3))) | |
7861 | ||
7862 | (define-public python2-nbformat | |
7863 | (package-with-python2 python-nbformat)) | |
7864 | ||
7865 | (define-public python-bleach | |
7866 | (package | |
7867 | (name "python-bleach") | |
e6daf515 | 7868 | (version "3.1.1") |
44d10b1f RW |
7869 | (source |
7870 | (origin | |
7871 | (method url-fetch) | |
7872 | (uri (pypi-uri "bleach" version)) | |
7873 | (sha256 | |
7874 | (base32 | |
e6daf515 | 7875 | "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa")))) |
44d10b1f RW |
7876 | (build-system python-build-system) |
7877 | (propagated-inputs | |
ff0efc8f | 7878 | `(("python-webencodings" ,python-webencodings) |
44d10b1f RW |
7879 | ("python-six" ,python-six))) |
7880 | (native-inputs | |
ff0efc8f MB |
7881 | `(("python-pytest" ,python-pytest) |
7882 | ("python-pytest-runner" ,python-pytest-runner-2))) | |
44d10b1f RW |
7883 | (home-page "https://github.com/jsocol/bleach") |
7884 | (synopsis "Whitelist-based HTML-sanitizing tool") | |
7885 | (description "Bleach is an easy whitelist-based HTML-sanitizing tool.") | |
7886 | (license license:asl2.0))) | |
7887 | ||
7888 | (define-public python2-bleach | |
7889 | (package-with-python2 python-bleach)) | |
7890 | ||
7891 | (define-public python-entrypoints | |
7892 | (package | |
7893 | (name "python-entrypoints") | |
a7f1b718 | 7894 | (version "0.3") |
44d10b1f RW |
7895 | (source |
7896 | (origin | |
7897 | (method url-fetch) | |
a7f1b718 | 7898 | (uri (pypi-uri "entrypoints" version)) |
44d10b1f RW |
7899 | (sha256 |
7900 | (base32 | |
a7f1b718 | 7901 | "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7")))) |
44d10b1f RW |
7902 | (build-system python-build-system) |
7903 | ;; The package does not come with a setup.py file, so we have to generate | |
7904 | ;; one ourselves. | |
7905 | (arguments | |
7906 | `(#:tests? #f | |
7907 | #:phases | |
7908 | (modify-phases %standard-phases | |
7909 | (add-after 'unpack 'create-setup.py | |
7910 | (lambda _ | |
7911 | (call-with-output-file "setup.py" | |
7912 | (lambda (port) | |
7913 | (format port "\ | |
7914 | from setuptools import setup | |
7915 | setup(name='entrypoints', version='~a', py_modules=['entrypoints']) | |
7916 | " ,version)))))))) | |
7917 | (home-page "https://github.com/takluyver/entrypoints") | |
7918 | (synopsis "Discover and load entry points from installed Python packages") | |
7919 | (description "Entry points are a way for Python packages to advertise | |
7920 | objects with some common interface. The most common examples are | |
7921 | @code{console_scripts} entry points, which define shell commands by | |
7922 | identifying a Python function to run. The @code{entrypoints} module contains | |
7923 | functions to find and load entry points.") | |
7924 | (license license:expat))) | |
7925 | ||
7926 | (define-public python2-entrypoints | |
7927 | (package-with-python2 python-entrypoints)) | |
7928 | ||
7929 | (define-public python-nbconvert | |
7930 | (package | |
7931 | (name "python-nbconvert") | |
7932 | (version "5.0.0b1") | |
7933 | (source | |
7934 | (origin | |
7935 | (method url-fetch) | |
7936 | (uri (pypi-uri "nbconvert" version)) | |
7937 | (sha256 | |
7938 | (base32 | |
7939 | "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp")))) | |
7940 | (build-system python-build-system) | |
7941 | (arguments | |
7942 | `(;; The "bdist_egg" target is disabled by default, causing the installation | |
7943 | ;; to fail. | |
7944 | #:configure-flags (list "bdist_egg") | |
7945 | ;; FIXME: 5 failures, 40 errors. | |
7946 | #:tests? #f)) | |
7947 | ;; #:phases | |
7948 | ;; (modify-phases %standard-phases | |
7949 | ;; (replace 'check | |
7950 | ;; (lambda _ | |
7951 | ;; (zero? (system* "py.test" "-v"))))) | |
7952 | (native-inputs | |
7953 | `(("python-pytest" ,python-pytest))) | |
7954 | (propagated-inputs | |
7955 | `(("python-bleach" ,python-bleach) | |
7956 | ("python-entrypoints" ,python-entrypoints) | |
7957 | ("python-jinja2" ,python-jinja2) | |
7958 | ("python-jupyter-core" ,python-jupyter-core) | |
7959 | ("python-mistune" ,python-mistune) | |
7960 | ("python-nbformat" ,python-nbformat) | |
7961 | ("python-pygments" ,python-pygments) | |
7962 | ("python-traitlets" ,python-traitlets))) | |
7963 | (home-page "http://jupyter.org") | |
7964 | (synopsis "Converting Jupyter Notebooks") | |
7965 | (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts | |
7966 | notebooks to various other formats via Jinja templates. It allows you to | |
7967 | convert an @code{.ipynb} notebook file into various static formats including: | |
7968 | ||
7969 | @enumerate | |
7970 | @item HTML | |
7971 | @item LaTeX | |
7972 | @item PDF | |
7973 | @item Reveal JS | |
7974 | @item Markdown (md) | |
7975 | @item ReStructured Text (rst) | |
7976 | @item executable script | |
7977 | @end enumerate\n") | |
7978 | (license license:bsd-3))) | |
7979 | ||
7980 | (define-public python2-nbconvert | |
7981 | (package-with-python2 python-nbconvert)) | |
7982 | ||
44d10b1f RW |
7983 | (define-public python-notebook |
7984 | (package | |
7985 | (name "python-notebook") | |
7986 | (version "5.7.4") | |
7987 | (source (origin | |
7988 | (method url-fetch) | |
7989 | (uri (pypi-uri "notebook" version)) | |
7990 | (sha256 | |
7991 | (base32 | |
7992 | "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r")))) | |
7993 | (build-system python-build-system) | |
7994 | (arguments | |
7995 | `(#:phases | |
7996 | (modify-phases %standard-phases | |
7997 | (replace 'check | |
7998 | (lambda _ | |
7999 | ;; These tests require a browser | |
8000 | (delete-file-recursively "notebook/tests/selenium") | |
8001 | ;; Some tests need HOME | |
8002 | (setenv "HOME" "/tmp") | |
8003 | ;; This file contains "warningfilters", which are not supported | |
8004 | ;; by this version of nose. | |
8005 | (delete-file "setup.cfg") | |
8006 | (with-directory-excursion "/tmp" | |
8007 | (invoke "nosetests" "-v")) | |
8008 | #t))))) | |
8009 | (propagated-inputs | |
8010 | `(("python-jupyter-core" ,python-jupyter-core) | |
8011 | ("python-nbformat" ,python-nbformat) | |
8012 | ("python-nbconvert" ,python-nbconvert) | |
8013 | ("python-prometheus-client" ,python-prometheus-client) | |
8014 | ("python-send2trash" ,python-send2trash) | |
8015 | ("python-terminado" ,python-terminado))) | |
8016 | (native-inputs | |
8017 | `(("python-nose" ,python-nose) | |
8018 | ("python-sphinx" ,python-sphinx) | |
8019 | ("python-requests" ,python-requests))) | |
8020 | (home-page "http://jupyter.org/") | |
8021 | (synopsis "Web-based notebook environment for interactive computing") | |
8022 | (description | |
8023 | "The Jupyter HTML notebook is a web-based notebook environment for | |
8024 | interactive computing.") | |
8025 | (properties `((python2-variant . ,(delay python2-notebook)))) | |
8026 | (license license:bsd-3))) | |
8027 | ||
8028 | (define-public python2-notebook | |
8029 | (let ((base (package-with-python2 | |
8030 | (strip-python2-variant python-notebook)))) | |
8031 | (package (inherit base) | |
8032 | (native-inputs | |
8033 | `(("python2-mock" ,python2-mock) | |
8034 | ,@(package-native-inputs base))) | |
8035 | (arguments | |
8036 | (substitute-keyword-arguments (package-arguments base) | |
8037 | ((#:phases phases) | |
8038 | `(modify-phases ,phases | |
8039 | (add-before 'check 'disable-test-case | |
8040 | ;; The test requires network access to localhost. Curiously it | |
8041 | ;; fails with Python 2 only. Simply make the test-case return | |
8042 | ;; immediately. | |
8043 | (lambda _ | |
8044 | (substitute* | |
8045 | "notebook/services/nbconvert/tests/test_nbconvert_api.py" | |
8046 | (("formats = self.nbconvert_api") "return #"))))))))))) | |
8047 | ||
8048 | (define-public python-widgetsnbextension | |
8049 | (package | |
8050 | (name "python-widgetsnbextension") | |
8051 | (version "3.4.2") | |
8052 | (source | |
8053 | (origin | |
8054 | (method url-fetch) | |
8055 | (uri (pypi-uri "widgetsnbextension" version)) | |
8056 | (sha256 | |
8057 | (base32 | |
8058 | "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs")))) | |
8059 | (build-system python-build-system) | |
8060 | (propagated-inputs | |
8061 | `(("python-ipykernel" ,python-ipykernel) | |
8062 | ("python-notebook" ,python-notebook))) | |
8063 | (native-inputs | |
8064 | `(("python-certifi" ,python-certifi) | |
8065 | ("python-nose" ,python-nose))) | |
8066 | (home-page "https://ipython.org") | |
8067 | (synopsis "IPython HTML widgets for Jupyter") | |
8068 | (description "This package provides interactive HTML widgets for Jupyter | |
8069 | notebooks.") | |
8070 | (license license:bsd-3))) | |
8071 | ||
8072 | (define-public python2-widgetsnbextension | |
8073 | (package-with-python2 python-widgetsnbextension)) | |
8074 | ||
8075 | (define-public python-ipywidgets | |
8076 | (package | |
8077 | (name "python-ipywidgets") | |
8078 | (version "5.2.2") | |
8079 | (source | |
8080 | (origin | |
8081 | (method url-fetch) | |
8082 | (uri (pypi-uri "ipywidgets" version)) | |
8083 | (sha256 | |
8084 | (base32 | |
8085 | "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms")))) | |
8086 | (build-system python-build-system) | |
8087 | (propagated-inputs | |
8088 | `(("python-ipython" ,python-ipython) | |
8089 | ("python-traitlets" ,python-traitlets) | |
8090 | ("python-widgetsnbextension" ,python-widgetsnbextension))) | |
8091 | (native-inputs | |
8092 | `(("python-nose" ,python-nose) | |
8093 | ("python-pytest" ,python-pytest))) | |
8094 | (home-page "https://ipython.org") | |
8095 | (synopsis "IPython HTML widgets for Jupyter") | |
8096 | (description "Ipywidgets are interactive HTML widgets for Jupyter | |
8097 | notebooks and the IPython kernel. Notebooks come alive when interactive | |
8098 | widgets are used. Users gain control of their data and can visualize changes | |
8099 | in the data.") | |
8100 | (license license:bsd-3))) | |
8101 | ||
8102 | (define-public python2-ipywidgets | |
8103 | (package-with-python2 python-ipywidgets)) | |
8104 | ||
8105 | (define-public python-jupyter-console | |
8106 | (package | |
8107 | (name "python-jupyter-console") | |
becb9cbf | 8108 | (version "6.0.0") |
44d10b1f RW |
8109 | (source |
8110 | (origin | |
8111 | (method url-fetch) | |
8112 | (uri (pypi-uri "jupyter_console" version)) | |
8113 | (sha256 | |
8114 | (base32 | |
becb9cbf | 8115 | "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h")))) |
44d10b1f | 8116 | (build-system python-build-system) |
44d10b1f RW |
8117 | (propagated-inputs |
8118 | `(("python-ipykernel" ,python-ipykernel) | |
8119 | ("python-jupyter-client" ,python-jupyter-client) | |
becb9cbf | 8120 | ("python-prompt-toolkit" ,python-prompt-toolkit) |
44d10b1f RW |
8121 | ("python-pygments" ,python-pygments))) |
8122 | (native-inputs | |
8123 | `(("python-nose" ,python-nose))) | |
8124 | (home-page "https://jupyter.org") | |
8125 | (synopsis "Jupyter terminal console") | |
8126 | (description "This package provides a terminal-based console frontend for | |
8127 | Jupyter kernels. It also allows for console-based interaction with non-Python | |
8128 | Jupyter kernels such as IJulia and IRKernel.") | |
8129 | (license license:bsd-3))) | |
8130 | ||
8131 | (define-public python2-jupyter-console | |
8e590c81 RW |
8132 | (package |
8133 | (name "python2-jupyter-console") | |
8134 | (version "5.2.0") | |
8135 | (source | |
8136 | (origin | |
8137 | (method url-fetch) | |
8138 | (uri (pypi-uri "jupyter_console" version)) | |
8139 | (sha256 | |
8140 | (base32 | |
8141 | "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal")))) | |
8142 | (build-system python-build-system) | |
8143 | ;; Tests only run in an TTY. | |
8144 | (arguments `(#:tests? #f)) | |
8145 | (propagated-inputs | |
8146 | `(("python2-ipykernel" ,python2-ipykernel) | |
8147 | ("python2-jupyter-client" ,python2-jupyter-client) | |
8148 | ("python2-prompt-toolkit" ,python2-prompt-toolkit-1) | |
8149 | ("python2-pygments" ,python2-pygments))) | |
8150 | (native-inputs | |
8151 | `(("python2-nose" ,python2-nose))) | |
8152 | (home-page "https://jupyter.org") | |
8153 | (synopsis "Jupyter terminal console") | |
8154 | (description "This package provides a terminal-based console frontend for | |
8155 | Jupyter kernels. It also allows for console-based interaction with non-Python | |
8156 | Jupyter kernels such as IJulia and IRKernel.") | |
8157 | (license license:bsd-3))) | |
44d10b1f RW |
8158 | |
8159 | ;; The python-ipython and python-jupyter-console require each other. To get | |
8160 | ;; the functionality in both packages working, strip down the | |
8161 | ;; python-jupyter-console package when using it as an input to python-ipython. | |
8162 | (define python-jupyter-console-minimal | |
8163 | (package | |
8164 | (inherit python-jupyter-console) | |
8165 | (name "python-jupyter-console-minimal") | |
8166 | (arguments | |
8167 | (substitute-keyword-arguments | |
8168 | (package-arguments python-jupyter-console) | |
8169 | ((#:phases phases) | |
8170 | `(modify-phases ,phases | |
8171 | (add-after 'install 'delete-bin | |
8172 | (lambda* (#:key outputs #:allow-other-keys) | |
8173 | ;; Delete the bin files, to avoid conflicts in profiles | |
8174 | ;; where python-ipython and python-jupyter-console are | |
8175 | ;; both present. | |
8176 | (delete-file-recursively | |
8177 | (string-append | |
8178 | (assoc-ref outputs "out") "/bin")))))))) | |
8179 | ;; Remove the python-ipython propagated input, to avoid the cycle | |
8180 | (propagated-inputs | |
8181 | (alist-delete | |
8182 | "python-ipython" | |
8183 | (package-propagated-inputs python-jupyter-console))))) | |
8184 | ||
8185 | (define-public python-qtconsole | |
8186 | (package | |
8187 | (name "python-qtconsole") | |
8188 | (version "4.4.3") | |
8189 | (source | |
8190 | (origin | |
8191 | (method url-fetch) | |
8192 | (uri (pypi-uri "qtconsole" version)) | |
8193 | (sha256 | |
8194 | (base32 | |
8195 | "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw")))) | |
8196 | (build-system python-build-system) | |
8197 | (arguments | |
8198 | ;; XXX: Tests are disabled, because this package needs python-ipython 7, | |
8199 | ;; but we only have the LTS version 5.x. This means that there might be | |
8200 | ;; runtime errors, but since this is a dependency of the Jupyter package, | |
8201 | ;; and Jupyter can be used without the qtconsole we can overlook this for | |
8202 | ;; now. | |
8203 | `(#:tests? #f | |
8204 | #:phases | |
8205 | (modify-phases %standard-phases | |
8206 | (add-before 'check 'pre-check | |
8207 | (lambda _ | |
8208 | (setenv "QT_QPA_PLATFORM" "offscreen") | |
8209 | #t))))) | |
8210 | (propagated-inputs | |
8211 | `(("python-ipykernel" ,python-ipykernel) | |
8212 | ("python-ipython" ,python-ipython))) | |
8213 | (native-inputs | |
8214 | `(("python-pytest" ,python-pytest))) | |
8215 | (home-page "http://jupyter.org") | |
8216 | (synopsis "Jupyter Qt console") | |
8217 | (description "This package provides a Qt-based console for Jupyter with | |
8218 | support for rich media output.") | |
8219 | (license license:bsd-3))) | |
8220 | ||
6ec87223 VC |
8221 | (define-public python-jsbeautifier |
8222 | (package | |
8223 | (name "python-jsbeautifier") | |
8224 | (version "1.10.2") | |
8225 | (home-page "https://github.com/beautify-web/js-beautify") | |
8226 | (source (origin | |
8227 | (method git-fetch) | |
8228 | (uri (git-reference | |
8229 | (url home-page) | |
8230 | (commit (string-append "v" version)))) | |
8231 | (file-name (git-file-name name version)) | |
8232 | (sha256 | |
8233 | (base32 | |
8234 | "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg")))) | |
8235 | (build-system python-build-system) | |
8236 | (arguments | |
8237 | `(#:phases (modify-phases %standard-phases | |
8238 | (add-after 'unpack 'chdir | |
8239 | (lambda _ | |
8240 | ;; The upstream Git repository contains all the code, | |
8241 | ;; but this package only builds the python code. | |
8242 | (chdir "python") | |
8243 | #t)) | |
8244 | (add-after 'unpack 'patch-python-six-requirements | |
8245 | (lambda _ | |
8246 | (substitute* "python/setup.py" | |
8247 | (("six>=1.12.0") | |
8248 | "six>=1.11.0")) | |
8249 | #t))))) | |
8250 | (propagated-inputs | |
8251 | `(("python-editorconfig" ,python-editorconfig) | |
8252 | ("python-six" ,python-six))) | |
8253 | (native-inputs | |
8254 | `(("python-pytest" ,python-pytest))) | |
8255 | (synopsis "JavaScript unobfuscator and beautifier") | |
8256 | (description "Beautify, unpack or deobfuscate JavaScript, leveraging | |
8257 | popular online obfuscators.") | |
8258 | (license license:expat))) | |
8259 | ||
44d10b1f RW |
8260 | (define-public jupyter |
8261 | (package | |
8262 | (name "jupyter") | |
8263 | (version "1.0.0") | |
8264 | (source | |
8265 | (origin | |
8266 | (method url-fetch) | |
8267 | (uri (pypi-uri "jupyter" version)) | |
8268 | (sha256 | |
8269 | (base32 | |
8270 | "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r")))) | |
8271 | (build-system python-build-system) | |
8272 | (arguments '(#:tests? #f)) ; there are none. | |
8273 | (propagated-inputs | |
8274 | `(("python-ipykernel" ,python-ipykernel) | |
8275 | ("python-ipywidgets" ,python-ipywidgets) | |
8276 | ("python-jupyter-console" ,python-jupyter-console) | |
8277 | ("python-nbconvert" ,python-nbconvert) | |
8278 | ("python-notebook" ,python-notebook) | |
8279 | ("python-qtconsole" ,python-qtconsole))) | |
8280 | (native-search-paths | |
8281 | (list (search-path-specification | |
8282 | (variable "JUPYTER_PATH") | |
8283 | (files '("share/jupyter"))))) | |
8284 | (home-page "https://jupyter.org") | |
8285 | (synopsis "Web application for interactive documents") | |
8286 | (description | |
8287 | "The Jupyter Notebook is a web application that allows you to create and | |
8288 | share documents that contain live code, equations, visualizations and | |
8289 | explanatory text. Uses include: data cleaning and transformation, numerical | |
8290 | simulation, statistical modeling, machine learning and much more.") | |
8291 | (license license:bsd-3))) | |
8292 | ||
8293 | (define-public python-chardet | |
8294 | (package | |
8295 | (name "python-chardet") | |
8296 | (version "3.0.4") | |
8297 | (source | |
8298 | (origin | |
8299 | (method url-fetch) | |
8300 | (uri (pypi-uri "chardet" version)) | |
8301 | (sha256 | |
8302 | (base32 | |
8303 | "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4")))) | |
8304 | (native-inputs | |
8305 | `(("python-hypothesis" ,python-hypothesis) | |
8306 | ("python-pytest" ,python-pytest) | |
8307 | ("python-pytest-runner" ,python-pytest-runner))) | |
8308 | (build-system python-build-system) | |
3d369407 MB |
8309 | ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>. |
8310 | (arguments `(#:tests? #f)) | |
44d10b1f RW |
8311 | (home-page "https://github.com/chardet/chardet") |
8312 | (synopsis "Universal encoding detector for Python 2 and 3") | |
8313 | (description | |
8314 | "This package provides @code{chardet}, a Python module that can | |
8315 | automatically detect a wide range of file encodings.") | |
8316 | (license license:lgpl2.1+))) | |
8317 | ||
8318 | (define-public python2-chardet | |
8319 | (package-with-python2 python-chardet)) | |
8320 | ||
8321 | (define-public python-docopt | |
8322 | (package | |
8323 | (name "python-docopt") | |
8324 | (version "0.6.2") | |
8325 | (source | |
8326 | (origin | |
11e46326 | 8327 | (method git-fetch) |
44d10b1f | 8328 | ;; The release on PyPI does not include tests. |
11e46326 EF |
8329 | (uri (git-reference |
8330 | (url "https://github.com/docopt/docopt") | |
8331 | (commit version))) | |
8332 | (file-name (git-file-name name version)) | |
44d10b1f RW |
8333 | (sha256 |
8334 | (base32 | |
11e46326 | 8335 | "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0")))) |
44d10b1f RW |
8336 | (build-system python-build-system) |
8337 | (native-inputs | |
8338 | `(("python-pytest" ,python-pytest))) | |
8339 | (arguments | |
8340 | `(#:phases | |
8341 | (modify-phases %standard-phases | |
8342 | (replace 'check | |
8343 | (lambda _ (invoke "py.test")))))) | |
8344 | (home-page "http://docopt.org") | |
8345 | (synopsis "Command-line interface description language for Python") | |
8346 | (description "This library allows the user to define a command-line | |
8347 | interface from a program's help message rather than specifying it | |
4ca7207b | 8348 | programmatically with command-line parsers like @code{getopt} and |
44d10b1f RW |
8349 | @code{argparse}.") |
8350 | (license license:expat))) | |
8351 | ||
8352 | (define-public python2-docopt | |
8353 | (package-with-python2 python-docopt)) | |
8354 | ||
8355 | (define-public python-pythondialog | |
8356 | (package | |
8357 | (name "python-pythondialog") | |
8358 | (version "3.4.0") | |
8359 | (source | |
8360 | (origin | |
8361 | (method url-fetch) | |
8362 | (uri (pypi-uri "pythondialog" version)) | |
8363 | (sha256 | |
8364 | (base32 | |
8365 | "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c")))) | |
8366 | (build-system python-build-system) | |
8367 | (arguments | |
8368 | `(#:phases | |
8369 | (modify-phases %standard-phases | |
8370 | (add-after 'unpack 'patch-path | |
8371 | (lambda* (#:key inputs #:allow-other-keys) | |
8372 | (let* ((dialog (assoc-ref inputs "dialog"))) | |
8373 | ;; Since this library really wants to grovel the search path, we | |
8374 | ;; must hardcode dialog's store path into it. | |
8375 | (substitute* "dialog.py" | |
8376 | (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)") | |
8377 | (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\""))) | |
8378 | #t)))) | |
8379 | #:tests? #f)) ; no test suite | |
8380 | (propagated-inputs | |
8381 | `(("dialog" ,dialog))) | |
8382 | (home-page "http://pythondialog.sourceforge.net/") | |
8383 | (synopsis "Python interface to the UNIX dialog utility") | |
8384 | (description "A Python wrapper for the dialog utility. Its purpose is to | |
8385 | provide an easy to use, pythonic and comprehensive Python interface to dialog. | |
8386 | This allows one to make simple text-mode user interfaces on Unix-like systems") | |
8387 | (license license:lgpl2.1) | |
8388 | (properties `((python2-variant . ,(delay python2-pythondialog)))))) | |
8389 | ||
8390 | (define-public python2-pythondialog | |
8391 | (let ((base (package-with-python2 (strip-python2-variant python-pythondialog)))) | |
8392 | (package | |
8393 | (inherit base) | |
8394 | (version (package-version python-pythondialog)) | |
8395 | (source (origin | |
8396 | (method url-fetch) | |
8397 | (uri (pypi-uri "python2-pythondialog" version)) | |
8398 | (sha256 | |
8399 | (base32 | |
8400 | "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9"))))))) | |
8401 | ||
8402 | (define-public python-configobj | |
8403 | (package | |
8404 | (name "python-configobj") | |
8405 | (version "5.0.6") | |
8406 | (source (origin | |
8407 | (method url-fetch) | |
b0758fbb | 8408 | (uri (pypi-uri "configobj" version)) |
44d10b1f RW |
8409 | (sha256 |
8410 | (base32 | |
8411 | "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2")) | |
8412 | ;; Patch setup.py so it looks for python-setuptools, which is | |
8413 | ;; required to parse the keyword 'install_requires' in setup.py. | |
8414 | (patches (search-patches "python-configobj-setuptools.patch")))) | |
8415 | (build-system python-build-system) | |
8416 | (propagated-inputs | |
8417 | `(("python-six" ,python-six))) | |
8418 | (synopsis "Config file reading, writing and validation") | |
8419 | (description "ConfigObj is a simple but powerful config file reader and | |
8420 | writer: an ini file round tripper. Its main feature is that it is very easy to | |
8421 | use, with a straightforward programmer’s interface and a simple syntax for | |
8422 | config files.") | |
8423 | (home-page "https://github.com/DiffSK/configobj") | |
8424 | (license license:bsd-3))) | |
8425 | ||
8426 | (define-public python2-configobj | |
8427 | (package-with-python2 python-configobj)) | |
8428 | ||
8429 | (define-public python-configargparse | |
8430 | (package | |
8431 | (name "python-configargparse") | |
86ae491f | 8432 | (version "0.14.0") |
44d10b1f RW |
8433 | (source (origin |
8434 | (method url-fetch) | |
8435 | (uri (pypi-uri "ConfigArgParse" version)) | |
8436 | (sha256 | |
8437 | (base32 | |
86ae491f | 8438 | "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif")))) |
44d10b1f RW |
8439 | (build-system python-build-system) |
8440 | (native-inputs | |
8441 | `(("python-pyyaml" ,python-pyyaml))) | |
8442 | (arguments | |
8443 | `(#:phases | |
8444 | (modify-phases %standard-phases | |
8445 | (replace 'check | |
8446 | (lambda _ | |
8447 | ;; Bypass setuptools-shim because one test relies on "setup.py" | |
8448 | ;; being the first argument passed to the python call. | |
8449 | ;; | |
8450 | ;; NOTE: Many tests do not run because they rely on Python's | |
8451 | ;; built-in test.test_argparse, but we remove the unit tests from | |
8452 | ;; our Python installation. | |
8453 | (invoke "python" "setup.py" "test")))))) | |
8454 | (synopsis "Replacement for argparse") | |
8455 | (description "A drop-in replacement for argparse that allows options to also | |
8456 | be set via config files and/or environment variables.") | |
8457 | (home-page "https://github.com/bw2/ConfigArgParse") | |
8458 | (license license:expat))) | |
8459 | ||
8460 | (define-public python2-configargparse | |
8461 | (package-with-python2 python-configargparse)) | |
8462 | ||
8463 | (define-public python-argparse-manpage | |
8464 | (package | |
8465 | (name "python-argparse-manpage") | |
8466 | (version "1.1") | |
8467 | (source | |
8468 | (origin | |
8469 | (method url-fetch) | |
8470 | (uri (pypi-uri "argparse-manpage" version)) | |
8471 | (sha256 | |
8472 | (base32 | |
8473 | "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p")))) | |
8474 | (build-system python-build-system) | |
8475 | (home-page "https://github.com/praiskup/argparse-manpage") | |
8476 | (synopsis "Build manual page from Python's ArgumentParser object") | |
8477 | (description | |
8478 | "This package provides tools to build manual pages from Python's | |
8479 | @code{ArgumentParser} object.") | |
8480 | (license license:asl2.0))) | |
8481 | ||
3e8f76d8 RW |
8482 | (define-public python-contextlib2 |
8483 | (package | |
8484 | (name "python-contextlib2") | |
8485 | (version "0.5.5") | |
8486 | (source | |
8487 | (origin | |
8488 | (method url-fetch) | |
8489 | (uri (pypi-uri "contextlib2" version)) | |
8490 | (sha256 | |
8491 | (base32 | |
8492 | "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh")))) | |
8493 | (build-system python-build-system) | |
a0fdade2 | 8494 | (home-page "https://contextlib2.readthedocs.org/") |
3e8f76d8 RW |
8495 | (synopsis "Tools for decorators and context managers") |
8496 | (description "This module is primarily a backport of the Python | |
8497 | 3.2 contextlib to earlier Python versions. Like contextlib, it | |
8498 | provides utilities for common tasks involving decorators and context | |
8499 | managers. It also contains additional features that are not part of | |
8500 | the standard library.") | |
1e158ba1 | 8501 | (properties `((python2-variant . ,(delay python2-contextlib2)))) |
3e8f76d8 RW |
8502 | (license license:psfl))) |
8503 | ||
44d10b1f | 8504 | (define-public python2-contextlib2 |
1e158ba1 EF |
8505 | (let ((base (package-with-python2 |
8506 | (strip-python2-variant python-contextlib2)))) | |
8507 | (package | |
8508 | (inherit base) | |
8509 | (arguments | |
8510 | (substitute-keyword-arguments (package-arguments base) | |
8511 | ((#:phases phases) | |
8512 | `(modify-phases ,phases | |
8513 | (replace 'check | |
8514 | (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))) | |
8515 | (native-inputs | |
8516 | `(("python2-unittest2" ,python2-unittest2)))))) | |
44d10b1f RW |
8517 | |
8518 | (define-public python-texttable | |
8519 | (package | |
8520 | (name "python-texttable") | |
02422b3b | 8521 | (version "1.6.2") |
44d10b1f RW |
8522 | (source |
8523 | (origin | |
8524 | (method url-fetch) | |
8525 | (uri (pypi-uri "texttable" version)) | |
8526 | (sha256 | |
8527 | (base32 | |
02422b3b | 8528 | "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg")))) |
44d10b1f | 8529 | (build-system python-build-system) |
02422b3b RW |
8530 | (arguments |
8531 | `(#:phases | |
8532 | (modify-phases %standard-phases | |
8533 | (replace 'check | |
8534 | (lambda _ (invoke "pytest" "tests.py")))))) | |
8535 | (native-inputs | |
8536 | `(("python-pytest" ,python-pytest))) | |
44d10b1f RW |
8537 | (home-page "https://github.com/foutaise/texttable/") |
8538 | (synopsis "Python module for creating simple ASCII tables") | |
8539 | (description "Texttable is a Python module for creating simple ASCII | |
8540 | tables.") | |
02422b3b | 8541 | (license license:expat))) |
44d10b1f RW |
8542 | |
8543 | (define-public python2-texttable | |
8544 | (package-with-python2 python-texttable)) | |
8545 | ||
8546 | (define-public python-atomicwrites | |
8547 | (package | |
8548 | (name "python-atomicwrites") | |
14f10479 | 8549 | (version "1.3.0") |
44d10b1f RW |
8550 | (source (origin |
8551 | (method url-fetch) | |
8552 | (uri (pypi-uri "atomicwrites" version)) | |
8553 | (sha256 | |
8554 | (base32 | |
14f10479 | 8555 | "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm")))) |
44d10b1f RW |
8556 | (build-system python-build-system) |
8557 | (synopsis "Atomic file writes in Python") | |
8558 | (description "Library for atomic file writes using platform dependent tools | |
8559 | for atomic file system operations.") | |
8560 | (home-page "https://github.com/untitaker/python-atomicwrites") | |
8561 | (license license:expat))) | |
8562 | ||
8563 | (define-public python2-atomicwrites | |
8564 | (package-with-python2 python-atomicwrites)) | |
8565 | ||
8566 | (define-public python-click-threading | |
8567 | (package | |
8568 | (name "python-click-threading") | |
8569 | (version "0.4.4") | |
8570 | (source (origin | |
8571 | (method url-fetch) | |
8572 | (uri (pypi-uri "click-threading" version)) | |
8573 | (sha256 | |
8574 | (base32 | |
8575 | "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j")))) | |
8576 | (build-system python-build-system) | |
8577 | (propagated-inputs | |
8578 | `(("python-click" ,python-click))) | |
8579 | (synopsis "Utilities for multithreading in Click") | |
8580 | (description "This package provides utilities for multithreading in Click | |
8581 | applications.") | |
8582 | (home-page "https://github.com/click-contrib/click-threading") | |
8583 | (license license:expat))) | |
8584 | ||
8585 | (define-public python-click-log | |
8586 | (package | |
8587 | (name "python-click-log") | |
8588 | (version "0.3.2") | |
8589 | (source (origin | |
8590 | (method url-fetch) | |
8591 | (uri (pypi-uri "click-log" version)) | |
8592 | (sha256 | |
8593 | (base32 | |
8594 | "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n")))) | |
8595 | (build-system python-build-system) | |
8596 | (propagated-inputs | |
8597 | `(("python-click" ,python-click))) | |
8598 | (synopsis "Logging for click applications") | |
8599 | (description "This package provides a Python library for logging Click | |
8600 | applications.") | |
8601 | (home-page "https://github.com/click-contrib/click-log") | |
8602 | (license license:expat))) | |
8603 | ||
8604 | (define-public python-apipkg | |
8605 | (package | |
8606 | (name "python-apipkg") | |
8607 | (version "1.4") | |
8608 | (source (origin | |
8609 | (method url-fetch) | |
8610 | (uri (pypi-uri "apipkg" version)) | |
8611 | (sha256 | |
8612 | (base32 | |
8613 | "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f")))) | |
8614 | (build-system python-build-system) | |
8615 | (native-inputs | |
8616 | `(("python-pytest" ,python-pytest))) | |
8617 | (synopsis "Namespace control and lazy-import mechanism") | |
8618 | (description "With apipkg you can control the exported namespace of a Python | |
8619 | package and greatly reduce the number of imports for your users. It is a small | |
8620 | pure Python module that works on virtually all Python versions.") | |
8621 | (home-page "https://github.com/pytest-dev/apipkg") | |
8622 | (license license:expat))) | |
8623 | ||
8624 | (define-public python2-apipkg | |
8625 | (package-with-python2 python-apipkg)) | |
8626 | ||
8627 | (define-public python-execnet | |
8628 | (package | |
8629 | (name "python-execnet") | |
8630 | (version "1.4.1") | |
8631 | (source (origin | |
8632 | (method url-fetch) | |
8633 | (uri (pypi-uri "execnet" version)) | |
8634 | (sha256 | |
8635 | (base32 | |
8636 | "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn")))) | |
8637 | (build-system python-build-system) | |
8638 | (arguments | |
8639 | `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed | |
8640 | ;; The two test failures are caused by the lack of an `ssh` executable. | |
8641 | ;; The test suite can be run with pytest after the 'install' phase. | |
8642 | #:tests? #f)) | |
8643 | (native-inputs | |
8644 | `(("python-pytest" ,python-pytest) | |
8645 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
8646 | (propagated-inputs | |
8647 | `(("python-apipkg" ,python-apipkg))) | |
8648 | (synopsis "Rapid multi-Python deployment") | |
8649 | (description "Execnet provides a share-nothing model with | |
8650 | channel-send/receive communication for distributing execution across many | |
8651 | Python interpreters across version, platform and network barriers. It has a | |
8652 | minimal and fast API targeting the following uses: | |
8653 | @enumerate | |
8654 | @item distribute tasks to (many) local or remote CPUs | |
8655 | @item write and deploy hybrid multi-process applications | |
8656 | @item write scripts to administer multiple environments | |
8657 | @end enumerate") | |
14a5146f | 8658 | (home-page "https://codespeak.net/execnet/") |
44d10b1f RW |
8659 | (license license:expat))) |
8660 | ||
8661 | (define-public python2-execnet | |
8662 | (package-with-python2 python-execnet)) | |
8663 | ||
8664 | (define-public python-icalendar | |
8665 | (package | |
8666 | (name "python-icalendar") | |
43ae8f79 | 8667 | (version "4.0.4") |
44d10b1f RW |
8668 | (source (origin |
8669 | (method url-fetch) | |
8670 | (uri (pypi-uri "icalendar" version)) | |
8671 | (sha256 | |
8672 | (base32 | |
43ae8f79 | 8673 | "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l")))) |
44d10b1f RW |
8674 | (build-system python-build-system) |
8675 | (propagated-inputs | |
8676 | `(("python-dateutil" ,python-dateutil) | |
8677 | ("python-pytz" ,python-pytz))) | |
8678 | (synopsis "Python library for parsing iCalendar files") | |
8679 | (description "The icalendar package is a parser/generator of iCalendar | |
8680 | files for use with Python.") | |
8681 | (home-page "https://github.com/collective/icalendar") | |
8682 | (license license:bsd-2))) | |
8683 | ||
44d10b1f RW |
8684 | (define-public python-args |
8685 | (package | |
8686 | (name "python-args") | |
8687 | (version "0.1.0") | |
8688 | (source (origin | |
8689 | (method url-fetch) | |
8690 | (uri (pypi-uri "args" version)) | |
8691 | (sha256 | |
8692 | (base32 | |
8693 | "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7")))) | |
8694 | (build-system python-build-system) | |
8695 | (home-page "https://github.com/kennethreitz/args") | |
8696 | (synopsis "Command-line argument parser") | |
8697 | (description | |
8698 | "This library provides a Python module to parse command-line arguments.") | |
8699 | (license license:bsd-3))) | |
8700 | ||
8701 | (define-public python2-args | |
8702 | (package-with-python2 python-args)) | |
8703 | ||
8704 | (define-public python-clint | |
8705 | (package | |
8706 | (name "python-clint") | |
8707 | (version "0.5.1") | |
8708 | (source (origin | |
8709 | (method url-fetch) | |
8710 | (uri (pypi-uri "clint" version)) | |
8711 | (sha256 | |
8712 | (base32 | |
8713 | "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5")))) | |
8714 | (build-system python-build-system) | |
8715 | (arguments | |
8716 | '(#:phases | |
8717 | (modify-phases %standard-phases | |
8718 | (replace 'check | |
8719 | (lambda _ (invoke "py.test" "-v")))))) | |
8720 | (native-inputs | |
8721 | `(("python-pytest" ,python-pytest))) | |
8722 | (propagated-inputs | |
8723 | `(("python-args" ,python-args))) | |
8724 | (home-page "https://github.com/kennethreitz/clint") | |
8725 | (synopsis "Command-line interface tools") | |
8726 | (description | |
8727 | "Clint is a Python module filled with a set of tools for developing | |
8728 | command-line applications, including tools for colored and indented | |
8729 | output, progress bar display, and pipes.") | |
8730 | (license license:isc))) | |
8731 | ||
8732 | (define-public python2-clint | |
8733 | (package-with-python2 python-clint)) | |
8734 | ||
44d10b1f RW |
8735 | (define-public python-rply |
8736 | (package | |
8737 | (name "python-rply") | |
8738 | (version "0.7.5") | |
8739 | (source (origin | |
8740 | (method url-fetch) | |
8741 | (uri (pypi-uri "rply" version)) | |
8742 | (sha256 | |
8743 | (base32 | |
8744 | "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh")))) | |
8745 | (build-system python-build-system) | |
8746 | (propagated-inputs | |
8747 | `(("python-appdirs" ,python-appdirs))) | |
8748 | (home-page "https://github.com/alex/rply") | |
8749 | (synopsis "Parser generator for Python") | |
8750 | (description | |
8751 | "This package provides a pure Python based parser generator, that also | |
8752 | works with RPython. It is a more-or-less direct port of David Bazzley's PLY, | |
8753 | with a new public API, and RPython support.") | |
8754 | (license license:bsd-3))) | |
8755 | ||
8756 | (define-public python2-rply | |
8757 | (package-with-python2 python-rply)) | |
8758 | ||
8759 | (define-public python-hy | |
8760 | (package | |
8761 | (name "python-hy") | |
c215051d | 8762 | (version "0.17.0") |
44d10b1f RW |
8763 | (source (origin |
8764 | (method url-fetch) | |
8765 | (uri (pypi-uri "hy" version)) | |
8766 | (sha256 | |
8767 | (base32 | |
c215051d | 8768 | "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi")))) |
44d10b1f RW |
8769 | (build-system python-build-system) |
8770 | (arguments | |
8771 | '(#:phases | |
8772 | (modify-phases %standard-phases | |
6ba6a1c1 JG |
8773 | (add-before 'install 'set-HOME |
8774 | (lambda _ | |
8775 | (setenv "HOME" "/tmp"))) | |
44d10b1f RW |
8776 | (replace 'check |
8777 | (lambda _ | |
8778 | ;; Tests require write access to HOME. | |
8779 | (setenv "HOME" "/tmp") | |
8780 | (invoke "nosetests")))))) | |
8781 | (native-inputs | |
8782 | `(("python-coverage" ,python-coverage) | |
8783 | ("python-nose" ,python-nose))) | |
8784 | (propagated-inputs | |
8785 | `(("python-astor" ,python-astor) | |
8786 | ("python-clint" ,python-clint) | |
c215051d JG |
8787 | ("python-rply" ,python-rply) |
8788 | ("python-fastentrypoints" | |
8789 | ,python-fastentrypoints) | |
8790 | ("python-funcparserlib" | |
8791 | ,python-funcparserlib))) | |
44d10b1f RW |
8792 | (home-page "http://hylang.org/") |
8793 | (synopsis "Lisp frontend to Python") | |
8794 | (description | |
8795 | "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms | |
8796 | its Lisp code into the Python Abstract Syntax Tree, you have the whole world of | |
8797 | Python at your fingertips, in Lisp form.") | |
8798 | (license license:expat))) | |
8799 | ||
8800 | (define-public python2-hy | |
8801 | (package-with-python2 python-hy)) | |
8802 | ||
8803 | (define-public python2-functools32 | |
8804 | (package | |
8805 | (name "python2-functools32") | |
8806 | (version "3.2.3-2") | |
8807 | (source | |
8808 | (origin | |
8809 | (method url-fetch) | |
8810 | (uri (pypi-uri "functools32" version)) | |
8811 | (sha256 | |
8812 | (base32 | |
8813 | "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn")))) | |
8814 | (build-system python-build-system) | |
8815 | (arguments | |
8816 | `(#:python ,python-2 | |
8817 | #:tests? #f)) ; no test target | |
8818 | (home-page "https://github.com/MiCHiLU/python-functools32") | |
8819 | (synopsis | |
8820 | "Backport of the functools module from Python 3.2.3") | |
8821 | (description | |
8822 | "This package is a backport of the @code{functools} module from Python | |
8823 | 3.2.3 for use with older versions of Python and PyPy.") | |
8824 | (license license:expat))) | |
8825 | ||
8826 | (define-public python2-subprocess32 | |
8827 | (package | |
8828 | (name "python2-subprocess32") | |
8829 | (version "3.2.7") | |
8830 | (source (origin | |
8831 | (method url-fetch) | |
8832 | (uri (pypi-uri "subprocess32" version)) | |
8833 | (sha256 | |
8834 | (base32 | |
8835 | "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y")) | |
8836 | (patches | |
8837 | (search-patches "python2-subprocess32-disable-input-test.patch")))) | |
8838 | (build-system python-build-system) | |
8839 | (arguments | |
8840 | `(#:python ,python-2 | |
8841 | ;; The test suite fails with Python > 2.7.13: | |
8842 | ;; import test.support | |
8843 | ;; ImportError: No module named support | |
8844 | #:tests? #f | |
8845 | #:phases | |
8846 | (modify-phases %standard-phases | |
8847 | (add-after 'unpack 'patch-/bin/sh | |
8848 | (lambda _ | |
8849 | (substitute* '("subprocess32.py" | |
8850 | "test_subprocess32.py") | |
8851 | (("/bin/sh") (which "sh"))) | |
8852 | #t))))) | |
8853 | (home-page "https://github.com/google/python-subprocess32") | |
8854 | (synopsis "Backport of the subprocess module from Python 3.2") | |
8855 | (description | |
8856 | "This is a backport of the @code{subprocess} standard library module | |
8857 | from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some | |
8858 | new features. On POSIX systems it is guaranteed to be reliable when used | |
8859 | in threaded applications. It includes timeout support from Python 3.3 but | |
8860 | otherwise matches 3.2’s API.") | |
8861 | (license license:psfl))) | |
8862 | ||
8863 | (define-public python2-futures | |
8864 | (package | |
8865 | (name "python2-futures") | |
8866 | (version "3.2.0") | |
8867 | (source | |
8868 | (origin | |
8869 | (method url-fetch) | |
8870 | (uri (pypi-uri "futures" version)) | |
8871 | (sha256 | |
8872 | (base32 | |
8873 | "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y")))) | |
8874 | (build-system python-build-system) | |
ba88eea2 RW |
8875 | (arguments |
8876 | `(#:python ,python-2 | |
8877 | #:phases | |
8878 | (modify-phases %standard-phases | |
8879 | (replace 'check | |
8880 | (lambda _ | |
8881 | (invoke "python" "test_futures.py") | |
8882 | #t))))) | |
44d10b1f RW |
8883 | (home-page "https://github.com/agronholm/pythonfutures") |
8884 | (synopsis | |
8885 | "Backport of the concurrent.futures package from Python 3.2") | |
8886 | (description | |
8887 | "The concurrent.futures module provides a high-level interface for | |
8888 | asynchronously executing callables. This package backports the | |
8889 | concurrent.futures package from Python 3.2") | |
8890 | (license license:bsd-3))) | |
8891 | ||
8892 | (define-public python-promise | |
8893 | (package | |
8894 | (name "python-promise") | |
8895 | (version "0.4.2") | |
8896 | (source | |
8897 | (origin | |
8898 | (method url-fetch) | |
8899 | (uri (pypi-uri "promise" version)) | |
8900 | (sha256 | |
8901 | (base32 | |
8902 | "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h")))) | |
8903 | (build-system python-build-system) | |
8904 | ;; Tests wants python-futures, which is a python2 only program, and | |
8905 | ;; can't be found by python-promise at test time. | |
8906 | (arguments `(#:tests? #f)) | |
8907 | (home-page "https://github.com/syrusakbary/promise") | |
8908 | (synopsis "Promises/A+ implementation for Python") | |
8909 | (description | |
8910 | "Promises/A+ implementation for Python") | |
8911 | (properties `((python2-variant . ,(delay python2-promise)))) | |
8912 | (license license:expat))) | |
8913 | ||
8914 | (define-public python2-promise | |
8915 | (let ((promise (package-with-python2 | |
8916 | (strip-python2-variant python-promise)))) | |
8917 | (package (inherit promise) | |
8918 | (arguments (substitute-keyword-arguments (package-arguments promise) | |
8919 | ((#:tests? _) #t))) | |
8920 | (native-inputs | |
8921 | `(("python2-futures" ,python2-futures) | |
8922 | ("python2-pytest" ,python2-pytest) | |
8923 | ,@(package-native-inputs promise)))))) | |
8924 | ||
d71d85cd RW |
8925 | (define-public python-progressbar33 |
8926 | (package | |
8927 | (name "python-progressbar33") | |
8928 | (version "2.4") | |
8929 | (source | |
8930 | (origin | |
8931 | (method url-fetch) | |
8932 | (uri (pypi-uri "progressbar33" version)) | |
8933 | (sha256 | |
8934 | (base32 | |
8935 | "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji")))) | |
8936 | (build-system python-build-system) | |
8937 | (home-page "http://github.com/germangh/python-progressbar") | |
8938 | (synopsis "Text progress bar library for Python") | |
8939 | (description | |
8940 | "This package provides a text progress bar library for Python. This | |
8941 | version only differs from the original @code{progressbar} package in that it | |
8942 | uses relative package imports instead of absolute imports, which is necessary | |
8943 | for the module to work under Python 3.3.") | |
8944 | ;; Either or both of these licenses may be selected. | |
8945 | (license (list license:lgpl2.1+ license:bsd-3)))) | |
8946 | ||
44d10b1f RW |
8947 | (define-public python-colorama |
8948 | (package | |
8949 | (name "python-colorama") | |
bd137055 | 8950 | (version "0.4.3") |
44d10b1f RW |
8951 | (source |
8952 | (origin | |
8953 | (method url-fetch) | |
8954 | (uri (pypi-uri "colorama" version)) | |
8955 | (sha256 | |
8956 | (base32 | |
bd137055 | 8957 | "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9")))) |
44d10b1f RW |
8958 | (build-system python-build-system) |
8959 | (synopsis "Colored terminal text rendering for Python") | |
8960 | (description "Colorama is a Python library for rendering colored terminal | |
8961 | text.") | |
e85af137 | 8962 | (home-page "https://pypi.org/project/colorama/") |
44d10b1f RW |
8963 | (license license:bsd-3))) |
8964 | ||
8965 | (define-public python2-colorama | |
8966 | (package-with-python2 python-colorama)) | |
8967 | ||
8968 | (define-public python-rsa | |
8969 | (package | |
8970 | (name "python-rsa") | |
8971 | (version "3.4.2") | |
8972 | (source | |
8973 | (origin | |
8974 | (method url-fetch) | |
8975 | (uri (pypi-uri "rsa" version)) | |
8976 | (sha256 | |
8977 | (base32 | |
8978 | "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5")))) | |
8979 | (build-system python-build-system) | |
8980 | (propagated-inputs | |
8981 | `(("python-pyasn1" ,python-pyasn1))) | |
8982 | (synopsis "Pure-Python RSA implementation") | |
8983 | (description "Python-RSA is a pure-Python RSA implementation. It supports | |
8984 | encryption and decryption, signing and verifying signatures, and key | |
8985 | generation according to PKCS#1 version 1.5. It can be used as a Python | |
8986 | library as well as on the command line.") | |
8987 | (home-page "https://stuvel.eu/rsa") | |
8988 | (license license:asl2.0))) | |
8989 | ||
8990 | (define-public python2-rsa | |
8991 | (package-with-python2 python-rsa)) | |
8992 | ||
8993 | (define-public python-pluggy | |
8994 | (package | |
8995 | (name "python-pluggy") | |
e5731c03 | 8996 | (version "0.11.0") |
44d10b1f RW |
8997 | (source |
8998 | (origin | |
8999 | (method url-fetch) | |
9000 | (uri (pypi-uri "pluggy" version)) | |
9001 | (sha256 | |
9002 | (base32 | |
e5731c03 | 9003 | "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895")))) |
44d10b1f RW |
9004 | (build-system python-build-system) |
9005 | (native-inputs | |
9006 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
9007 | (synopsis "Plugin and hook calling mechanism for Python") | |
9008 | (description "Pluggy is an extraction of the plugin manager as used by | |
9009 | Pytest but stripped of Pytest specific details.") | |
e85af137 | 9010 | (home-page "https://pypi.org/project/pluggy/") |
44d10b1f RW |
9011 | (license license:expat))) |
9012 | ||
9013 | (define-public python2-pluggy | |
9014 | (package-with-python2 python-pluggy)) | |
9015 | ||
9016 | (define-public python-tox | |
9017 | (package | |
9018 | (name "python-tox") | |
9019 | (version "2.8.1") | |
9020 | (source | |
9021 | (origin | |
9022 | (method url-fetch) | |
9023 | (uri (pypi-uri "tox" version)) | |
9024 | (sha256 | |
9025 | (base32 | |
9026 | "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny")))) | |
9027 | (build-system python-build-system) | |
9028 | (arguments | |
9029 | ;; FIXME: Tests require pytest-timeout, which itself requires | |
9030 | ;; pytest>=2.8.0 for installation. | |
9031 | '(#:tests? #f)) | |
9032 | (propagated-inputs | |
9033 | `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0 | |
9034 | ("python-py" ,python-py) | |
9035 | ("python-virtualenv" ,python-virtualenv))) | |
9036 | (native-inputs | |
9037 | `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout) | |
9038 | ("python-pytest" ,python-pytest) ; >= 2.3.5 | |
9039 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
d81fb2ae | 9040 | (home-page "https://tox.readthedocs.io") |
44d10b1f RW |
9041 | (synopsis "Virtualenv-based automation of test activities") |
9042 | (description "Tox is a generic virtualenv management and test command line | |
9043 | tool. It can be used to check that a package installs correctly with | |
9044 | different Python versions and interpreters, or run tests in each type of | |
9045 | supported environment, or act as a frontend to continuous integration | |
9046 | servers.") | |
9047 | (license license:expat))) | |
9048 | ||
9049 | (define-public python2-tox | |
9050 | (package-with-python2 python-tox)) | |
9051 | ||
9052 | (define-public python-jmespath | |
9053 | (package | |
9054 | (name "python-jmespath") | |
27fb781f | 9055 | (version "0.9.4") |
44d10b1f RW |
9056 | (source |
9057 | (origin | |
9058 | (method url-fetch) | |
9059 | (uri (pypi-uri "jmespath" version)) | |
9060 | (sha256 | |
9061 | (base32 | |
27fb781f | 9062 | "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx")))) |
44d10b1f RW |
9063 | (build-system python-build-system) |
9064 | (native-inputs | |
9065 | `(("python-nose" ,python-nose))) | |
9066 | (synopsis "JSON Matching Expressions") | |
9067 | (description "JMESPath (pronounced “james path”) is a Python library that | |
9068 | allows one to declaratively specify how to extract elements from a JSON | |
9069 | document.") | |
9070 | (home-page "https://github.com/jmespath/jmespath.py") | |
9071 | (license license:expat))) | |
9072 | ||
9073 | (define-public python2-jmespath | |
9074 | (package-with-python2 python-jmespath)) | |
9075 | ||
9076 | (define-public python-botocore | |
9077 | (package | |
7bcf827c RW |
9078 | (name "python-botocore") |
9079 | (version "1.12.149") | |
9080 | (source | |
9081 | (origin | |
9082 | (method url-fetch) | |
9083 | (uri (pypi-uri "botocore" version)) | |
9084 | (sha256 | |
9085 | (base32 | |
9086 | "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf")))) | |
9087 | (build-system python-build-system) | |
9088 | (arguments | |
9089 | ;; FIXME: Many tests are failing. | |
9090 | '(#:tests? #f)) | |
9091 | (propagated-inputs | |
9092 | `(("python-dateutil" ,python-dateutil) | |
9093 | ("python-docutils" ,python-docutils) | |
9094 | ("python-jmespath" ,python-jmespath))) | |
9095 | (native-inputs | |
9096 | `(("python-mock" ,python-mock) | |
9097 | ("python-nose" ,python-nose) | |
9098 | ("behave" ,behave) | |
9099 | ("python-tox" ,python-tox) | |
9100 | ("python-urllib3" ,python-urllib3) | |
9101 | ("python-wheel" ,python-wheel))) | |
9102 | (home-page "https://github.com/boto/botocore") | |
9103 | (synopsis "Low-level interface to AWS") | |
9104 | (description "Botocore is a Python library that provides a low-level | |
44d10b1f | 9105 | interface to the Amazon Web Services (AWS) API.") |
7bcf827c | 9106 | (license license:asl2.0))) |
44d10b1f RW |
9107 | |
9108 | (define-public python2-botocore | |
9109 | (package-with-python2 python-botocore)) | |
9110 | ||
9111 | (define-public python-xdo | |
9112 | (package | |
9113 | (name "python-xdo") | |
9114 | (version "0.3") | |
9115 | (source (origin | |
9116 | (method url-fetch) | |
9117 | (uri (string-append | |
9118 | "http://http.debian.net/debian/pool/main/p/python-xdo/" | |
9119 | "python-xdo_" version ".orig.tar.gz")) | |
9120 | (sha256 | |
9121 | (base32 | |
9122 | "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0")))) | |
9123 | (build-system python-build-system) | |
9124 | (arguments | |
9125 | '(#:phases | |
9126 | (modify-phases %standard-phases | |
9127 | (add-before 'install 'patch-libxdo-path | |
9128 | ;; Hardcode the path of dynamically loaded libxdo library. | |
9129 | (lambda* (#:key inputs #:allow-other-keys) | |
9130 | (let ((libxdo (string-append | |
9131 | (assoc-ref inputs "xdotool") | |
9132 | "/lib/libxdo.so"))) | |
9133 | (substitute* "xdo/_xdo.py" | |
9134 | (("find_library\\(\"xdo\"\\)") | |
9135 | (simple-format #f "\"~a\"" libxdo))) | |
9136 | #t)))) | |
9137 | #:tests? #f)) ; no tests provided | |
9138 | (propagated-inputs | |
9139 | `(("python-six" ,python-six))) | |
9140 | (inputs | |
9141 | `(("xdotool" ,xdotool) | |
9142 | ("libX11" ,libx11))) | |
9143 | (home-page "https://tracker.debian.org/pkg/python-xdo") | |
9144 | (synopsis "Python library for simulating X11 keyboard/mouse input") | |
9145 | (description "Provides bindings to libxdo for manipulating X11 via simulated | |
9146 | input. (Note that this is mostly a legacy library; you may wish to look at | |
9147 | python-xdo for newer bindings.)") | |
9148 | (license license:bsd-3))) | |
9149 | ||
9150 | (define-public python2-xdo | |
9151 | (package-with-python2 python-xdo)) | |
9152 | ||
9153 | (define-public python-mako | |
9154 | (package | |
9155 | (name "python-mako") | |
6bf53ad5 | 9156 | (version "1.1.0") |
44d10b1f RW |
9157 | (source |
9158 | (origin | |
9159 | (method url-fetch) | |
9160 | (uri (pypi-uri "Mako" version)) | |
9161 | (sha256 | |
9162 | (base32 | |
6bf53ad5 | 9163 | "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3")))) |
44d10b1f | 9164 | (build-system python-build-system) |
6bf53ad5 MB |
9165 | (arguments |
9166 | `(#:phases (modify-phases %standard-phases | |
9167 | (replace 'check | |
9168 | (lambda _ | |
9169 | (invoke "pytest" "-vv")))))) | |
44d10b1f RW |
9170 | (propagated-inputs |
9171 | `(("python-markupsafe" ,python-markupsafe))) | |
9172 | (native-inputs | |
9173 | `(("python-mock" ,python-mock) | |
44d10b1f | 9174 | ("python-pytest" ,python-pytest))) |
7016e620 | 9175 | (home-page "https://www.makotemplates.org/") |
44d10b1f RW |
9176 | (synopsis "Templating language for Python") |
9177 | (description "Mako is a templating language for Python that compiles | |
9178 | templates into Python modules.") | |
9179 | (license license:expat))) | |
9180 | ||
9181 | (define-public python2-mako | |
9182 | (package-with-python2 python-mako)) | |
9183 | ||
9184 | (define-public python-waitress | |
9185 | (package | |
9186 | (name "python-waitress") | |
9187 | (version "1.1.0") | |
9188 | (source | |
9189 | (origin | |
9190 | (method url-fetch) | |
9191 | (uri (pypi-uri "waitress" version)) | |
9192 | (patches (search-patches "python-waitress-fix-tests.patch")) | |
9193 | (sha256 | |
9194 | (base32 | |
9195 | "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k")))) | |
9196 | (build-system python-build-system) | |
9197 | (home-page "https://github.com/Pylons/waitress") | |
9198 | (synopsis "Waitress WSGI server") | |
9199 | (description "Waitress is meant to be a production-quality pure-Python WSGI | |
9200 | server with very acceptable performance.") | |
9201 | (license license:zpl2.1))) | |
9202 | ||
9203 | (define-public python2-waitress | |
9204 | (package-with-python2 python-waitress)) | |
9205 | ||
b2b23d12 TLC |
9206 | (define-public python-whichcraft |
9207 | (package | |
9208 | (name "python-whichcraft") | |
9209 | (version "0.6.1") | |
9210 | (source | |
9211 | (origin | |
9212 | (method url-fetch) | |
9213 | (uri (pypi-uri "whichcraft" version)) | |
9214 | (sha256 | |
9215 | (base32 | |
9216 | "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc")))) | |
9217 | (build-system python-build-system) | |
9218 | (native-inputs | |
9219 | `(("python-pytest" ,python-pytest))) | |
9220 | (home-page "https://github.com/pydanny/whichcraft") | |
9221 | (synopsis "Cross-platform cross-python shutil.which functionality") | |
9222 | (description | |
9223 | "This package provides a shim of the shutil.which function that's | |
9224 | designed to work across multiple versions of Python.") | |
9225 | (license license:bsd-3))) | |
9226 | ||
1133ca44 TLC |
9227 | (define-public python-cookiecutter |
9228 | (package | |
9229 | (name "python-cookiecutter") | |
9230 | (version "1.6.0") | |
9231 | (source | |
9232 | (origin | |
9233 | (method url-fetch) | |
9234 | (uri (pypi-uri "cookiecutter" version)) | |
9235 | (sha256 | |
9236 | (base32 | |
9237 | "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk")))) | |
9238 | (build-system python-build-system) | |
9239 | (native-inputs | |
9240 | `(("python-freezegun" ,python-freezegun) | |
9241 | ("python-pytest" ,python-pytest) | |
9242 | ("python-pytest-catchlog" ,python-pytest-catchlog) | |
9243 | ("python-pytest-cov" ,python-pytest-cov) | |
9244 | ("python-pytest-mock" ,python-pytest-mock))) | |
9245 | (propagated-inputs | |
9246 | `(("python-binaryornot" ,python-binaryornot) | |
9247 | ("python-click" ,python-click) | |
9248 | ("python-future" ,python-future) | |
9249 | ("python-jinja2" ,python-jinja2) | |
9250 | ("python-jinja2-time" ,python-jinja2-time) | |
9251 | ("python-poyo" ,python-poyo) | |
9252 | ("python-requests" ,python-requests) | |
9253 | ("python-whichcraft" ,python-whichcraft))) | |
9254 | (home-page "https://github.com/audreyr/cookiecutter") | |
9255 | (synopsis | |
9256 | "Command-line utility that creates projects from project templates") | |
9257 | (description | |
9258 | "This package provides a command-line utility that creates projects from | |
9259 | project templates, e.g. creating a Python package project from a Python package | |
9260 | project template.") | |
9261 | (license license:bsd-3))) | |
9262 | ||
44d10b1f RW |
9263 | (define-public python-pyquery |
9264 | (package | |
9265 | (name "python-pyquery") | |
9266 | (version "1.2.17") | |
9267 | (source | |
9268 | (origin | |
9269 | (method url-fetch) | |
9270 | (uri (pypi-uri "pyquery" version)) | |
9271 | (sha256 | |
9272 | (base32 | |
9273 | "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a")))) | |
9274 | (build-system python-build-system) | |
9275 | (native-inputs | |
9276 | `(("python-webob" ,python-webob) | |
9277 | ("python-webtest" ,python-webtest))) | |
9278 | (propagated-inputs | |
9279 | `(("python-lxml" ,python-lxml) | |
9280 | ("python-cssselect" ,python-cssselect))) | |
9281 | (home-page "https://github.com/gawel/pyquery") | |
9282 | (synopsis "Make jQuery-like queries on xml documents") | |
9283 | (description "pyquery allows you to make jQuery queries on xml documents. | |
9284 | The API is as much as possible the similar to jQuery. pyquery uses lxml for | |
9285 | fast xml and html manipulation.") | |
9286 | (license license:bsd-3))) | |
9287 | ||
44d10b1f RW |
9288 | (define-public python-anyjson |
9289 | (package | |
9290 | (name "python-anyjson") | |
9291 | (version "0.3.3") | |
9292 | (source | |
9293 | (origin | |
9294 | (method url-fetch) | |
9295 | (uri (pypi-uri "anyjson" version)) | |
9296 | (sha256 | |
9297 | (base32 | |
9298 | "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p")))) | |
9299 | (build-system python-build-system) | |
9300 | (arguments | |
9301 | `(;; We could possibly get tests working, but on Python 3 it's not so easy. | |
9302 | ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or | |
9303 | ;; whatever) so this transformation needs to be done before the tests | |
9304 | ;; can be run. Maybe we could add a build step to transform beforehand | |
9305 | ;; but it could be annoying/difficult. | |
9306 | ;; We can enable tests for the Python 2 version, though, and do below. | |
9307 | #:tests? #f)) | |
9308 | (home-page "https://bitbucket.org/runeh/anyjson/") | |
9309 | (synopsis | |
9310 | "Wraps best available JSON implementation in a common interface") | |
9311 | (description | |
9312 | "Anyjson loads whichever is the fastest JSON module installed | |
9313 | and provides a uniform API regardless of which JSON implementation is used.") | |
9314 | (license license:bsd-3) | |
9315 | (properties `((python2-variant . ,(delay python2-anyjson)))))) | |
9316 | ||
9317 | (define-public python2-anyjson | |
9318 | (let ((anyjson (package-with-python2 | |
9319 | (strip-python2-variant python-anyjson)))) | |
9320 | (package | |
9321 | (inherit anyjson) | |
9322 | (arguments `(;; Unlike the python 3 variant, we do run tests. See above! | |
9323 | #:tests? #t | |
9324 | ,@(package-arguments anyjson))) | |
9325 | (native-inputs `(("python2-nose" ,python2-nose)))))) | |
9326 | ||
9327 | (define-public python-amqp | |
9328 | (package | |
9329 | (name "python-amqp") | |
9330 | (version "2.3.2") | |
9331 | (source | |
9332 | (origin | |
9333 | (method url-fetch) | |
9334 | (uri (pypi-uri "amqp" version)) | |
9335 | (sha256 | |
9336 | (base32 | |
9337 | "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87")))) | |
9338 | (build-system python-build-system) | |
9339 | (native-inputs | |
9340 | `(("python-case" ,python-case) | |
9341 | ("python-pytest-sugar" ,python-pytest-sugar) | |
9342 | ("python-mock" ,python-mock))) | |
9343 | (propagated-inputs | |
9344 | `(("python-vine" ,python-vine))) | |
9345 | (home-page "https://github.com/celery/py-amqp") | |
9346 | (synopsis | |
9347 | "Low-level AMQP client for Python (fork of amqplib)") | |
9348 | (description | |
9349 | "This is a fork of amqplib which was originally written by Barry Pederson. | |
9350 | It is maintained by the Celery project, and used by kombu as a pure python | |
9351 | alternative when librabbitmq is not available.") | |
9352 | (license license:lgpl2.1+) | |
9353 | (properties `((python2-variant . ,(delay python2-amqp)))))) | |
9354 | ||
9355 | (define-public python2-amqp | |
9356 | (let ((amqp (package-with-python2 | |
9357 | (strip-python2-variant python-amqp)))) | |
9358 | (package | |
9359 | (inherit amqp) | |
9360 | (arguments `(;; Tries to run coverage tests with nose-cover3, which seems | |
9361 | ;; unmaintained. Weirdly, does not do this on the python 3 | |
9362 | ;; version? | |
9363 | #:tests? #f | |
9364 | ,@(package-arguments amqp)))))) | |
9365 | ||
9366 | (define-public python-txamqp | |
9367 | (package | |
9368 | (name "python-txamqp") | |
9369 | (version "0.8.2") | |
9370 | (source | |
9371 | (origin | |
9372 | (method url-fetch) | |
9373 | (uri (pypi-uri "txAMQP" version)) | |
9374 | (sha256 | |
9375 | (base32 | |
9376 | "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4")))) | |
9377 | (build-system python-build-system) | |
9378 | (propagated-inputs | |
9379 | `(("python-six" ,python-six) | |
9380 | ("python-twisted" ,python-twisted))) | |
9381 | (home-page "https://github.com/txamqp/txamqp") | |
9382 | (synopsis "Communicate with AMQP peers and brokers using Twisted") | |
9383 | (description | |
9384 | "This package provides a Python library for communicating with AMQP peers | |
9385 | and brokers using the asynchronous networking framework Twisted. It contains | |
9386 | all the necessary code to connect, send and receive messages to/from an | |
9387 | AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It | |
9388 | also includes support for using Thrift RPC over AMQP in Twisted | |
9389 | applications.") | |
9390 | (license license:asl2.0))) | |
9391 | ||
9392 | (define-public python2-txamqp | |
9393 | (package-with-python2 python-txamqp)) | |
9394 | ||
9395 | (define-public python-kombu | |
9396 | (package | |
9397 | (name "python-kombu") | |
9398 | (version "4.2.2") | |
9399 | (source | |
9400 | (origin | |
9401 | (method url-fetch) | |
9402 | (uri (pypi-uri "kombu" version)) | |
9403 | (sha256 | |
9404 | (base32 | |
9405 | "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj")))) | |
9406 | (build-system python-build-system) | |
9407 | (native-inputs | |
9408 | `(("python-mock" ,python-mock) | |
9409 | ("python-case" ,python-case) | |
9410 | ("python-pyro4" ,python-pyro4) | |
9411 | ("python-pytest-sugar" ,python-pytest-sugar) | |
9412 | ("python-pytz" ,python-pytz))) | |
9413 | (propagated-inputs | |
9414 | `(("python-anyjson" ,python-anyjson) | |
9415 | ("python-amqp" ,python-amqp) | |
9416 | ("python-redis" ,python-redis))) | |
9417 | (home-page "https://kombu.readthedocs.io") | |
9418 | (synopsis "Message passing library for Python") | |
9419 | (description "The aim of Kombu is to make messaging in Python as easy as | |
9420 | possible by providing an idiomatic high-level interface for the AMQ protocol, | |
9421 | and also provide proven and tested solutions to common messaging problems. | |
9422 | AMQP is the Advanced Message Queuing Protocol, an open standard protocol for | |
9423 | message orientation, queuing, routing, reliability and security, for which the | |
9424 | RabbitMQ messaging server is the most popular implementation.") | |
9425 | (license license:bsd-3) | |
9426 | (properties `((python2-variant . ,(delay python2-kombu)))))) | |
9427 | ||
9428 | (define-public python2-kombu | |
9429 | (let ((kombu (package-with-python2 | |
9430 | (strip-python2-variant python-kombu)))) | |
9431 | (package | |
9432 | (inherit kombu) | |
9433 | (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2. | |
9434 | ;; It works fine on the python3 variant. | |
9435 | #:tests? #f | |
9436 | ,@(package-arguments kombu))) | |
9437 | (native-inputs `(("python2-unittest2" ,python2-unittest2) | |
9438 | ,@(package-native-inputs kombu)))))) | |
9439 | ||
9440 | (define-public python-billiard | |
9441 | (package | |
9442 | (name "python-billiard") | |
9443 | (version "3.5.0.5") | |
9444 | (source | |
9445 | (origin | |
9446 | (method url-fetch) | |
9447 | (uri (pypi-uri "billiard" version)) | |
9448 | (sha256 | |
9449 | (base32 | |
9450 | "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2")))) | |
9451 | (build-system python-build-system) | |
9452 | (native-inputs | |
9453 | `(("python-case" ,python-case) | |
9454 | ("python-pytest" ,python-pytest))) | |
9455 | (home-page "https://github.com/celery/billiard") | |
9456 | (synopsis | |
9457 | "Python multiprocessing fork with improvements and bugfixes") | |
9458 | (description | |
9459 | "Billiard is a fork of the Python 2.7 multiprocessing package. The | |
9460 | multiprocessing package itself is a renamed and updated version of R Oudkerk's | |
9461 | pyprocessing package. This standalone variant is intended to be compatible with | |
9462 | Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.") | |
9463 | (license license:bsd-3) | |
9464 | (properties `((python2-variant . ,(delay python2-billiard)))))) | |
9465 | ||
9466 | (define-public python2-billiard | |
9467 | (let ((billiard (package-with-python2 | |
9468 | (strip-python2-variant python-billiard)))) | |
9469 | (package | |
9470 | (inherit billiard) | |
9471 | (native-inputs `(("python2-unittest2" ,python2-unittest2) | |
9472 | ("python2-mock" ,python2-mock) | |
9473 | ,@(package-native-inputs billiard)))))) | |
9474 | ||
9475 | (define-public python-celery | |
9476 | (package | |
9477 | (name "python-celery") | |
9478 | (version "4.2.1") | |
9479 | (source | |
9480 | (origin | |
9481 | (method url-fetch) | |
9482 | (uri (pypi-uri "celery" version)) | |
9483 | (sha256 | |
9484 | (base32 | |
9485 | "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp")))) | |
9486 | (build-system python-build-system) | |
9487 | (arguments | |
9488 | '(;; TODO The tests fail with Python 3.7 | |
9489 | ;; https://github.com/celery/celery/issues/4849 | |
9490 | #:tests? #f | |
9491 | #:phases | |
9492 | (modify-phases %standard-phases | |
9493 | (add-after 'unpack 'patch-requirements | |
9494 | (lambda _ | |
9495 | (substitute* "requirements/test.txt" | |
9496 | (("pytest>=3\\.0,<3\\.3") | |
9497 | "pytest>=3.0")) | |
9498 | #t))))) | |
9499 | (native-inputs | |
9500 | `(("python-case" ,python-case) | |
9501 | ("python-pytest" ,python-pytest))) | |
9502 | (propagated-inputs | |
9503 | `(("python-pytz" ,python-pytz) | |
9504 | ("python-billiard" ,python-billiard) | |
9505 | ("python-kombu" ,python-kombu))) | |
9506 | (home-page "https://celeryproject.org") | |
9507 | (synopsis "Distributed Task Queue") | |
9508 | (description "Celery is an asynchronous task queue/job queue based on | |
9509 | distributed message passing. It is focused on real-time operation, but | |
9510 | supports scheduling as well. The execution units, called tasks, are executed | |
9511 | concurrently on a single or more worker servers using multiprocessing, | |
9512 | Eventlet, or gevent. Tasks can execute asynchronously (in the background) or | |
9513 | synchronously (wait until ready).") | |
9514 | (license license:bsd-3) | |
9515 | (properties `((python2-variant . ,(delay python2-celery)))))) | |
9516 | ||
9517 | (define-public python2-celery | |
9518 | (let ((celery (package-with-python2 | |
9519 | (strip-python2-variant python-celery)))) | |
9520 | (package | |
9521 | (inherit celery) | |
9522 | (native-inputs `(("python2-unittest2" ,python2-unittest2) | |
9523 | ("python2-mock" ,python2-mock) | |
9524 | ,@(package-native-inputs celery)))))) | |
9525 | ||
9526 | (define-public python-translitcodec | |
9527 | (package | |
9528 | (name "python-translitcodec") | |
9529 | (version "0.4.0") | |
9530 | (source | |
9531 | (origin | |
9532 | (method url-fetch) | |
9533 | (uri (pypi-uri "translitcodec" version)) | |
9534 | (sha256 | |
9535 | (base32 | |
9536 | "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki")))) | |
9537 | (build-system python-build-system) | |
9538 | (arguments | |
9539 | `(#:tests? #f)) ; no tests provided | |
9540 | (home-page | |
9541 | "https://github.com/claudep/translitcodec") | |
9542 | (synopsis | |
9543 | "Unicode to 8-bit charset transliteration codec") | |
9544 | (description | |
9545 | "This package contains codecs for transliterating ISO 10646 texts into | |
9546 | best-effort representations using smaller coded character sets (ASCII, | |
9547 | ISO 8859, etc.).") | |
9548 | (license license:expat))) | |
9549 | ||
9550 | (define-public python2-translitcodec | |
9551 | (package-with-python2 python-translitcodec)) | |
9552 | ||
9553 | (define-public python-editor | |
9554 | (package | |
9555 | (name "python-editor") | |
9556 | (version "0.5") | |
9557 | (source | |
9558 | (origin | |
9559 | (method url-fetch) | |
9560 | (uri (pypi-uri "python-editor" version)) | |
9561 | (sha256 | |
9562 | (base32 | |
9563 | "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n")))) | |
9564 | (build-system python-build-system) | |
9565 | (home-page | |
9566 | "https://github.com/fmoo/python-editor") | |
9567 | (synopsis | |
9568 | "Programmatically open an editor, capture the result") | |
9569 | (description | |
9570 | "python-editor is a library that provides the editor module for | |
9571 | programmatically interfacing with your system's $EDITOR.") | |
9572 | (license license:asl2.0))) | |
9573 | ||
9574 | (define-public python2-editor | |
9575 | (package-with-python2 python-editor)) | |
9576 | ||
44d10b1f RW |
9577 | (define-public python-vobject |
9578 | (package | |
9579 | (name "python-vobject") | |
9580 | (version "0.9.5") | |
9581 | (source (origin | |
9582 | (method url-fetch) | |
9583 | (uri (pypi-uri "vobject" version)) | |
9584 | (sha256 | |
9585 | (base32 | |
9586 | "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg")))) | |
9587 | (build-system python-build-system) | |
9588 | (arguments | |
9589 | '(;; The test suite relies on some non-portable Windows interfaces. | |
9590 | #:tests? #f)) | |
9591 | (propagated-inputs | |
9592 | `(("python-dateutil" ,python-dateutil) | |
9593 | ("python-pyicu" ,python-pyicu))) | |
9594 | (synopsis "Parse and generate vCard and vCalendar files") | |
9595 | (description "Vobject is intended to be a full featured Python package for | |
9596 | parsing and generating vCard and vCalendar files. Currently, iCalendar files | |
9597 | are supported and well tested. vCard 3.0 files are supported, and all data | |
9598 | should be imported, but only a few components are understood in a sophisticated | |
9599 | way.") | |
5d6e7106 | 9600 | (home-page "https://eventable.github.io/vobject/") |
44d10b1f RW |
9601 | (license license:asl2.0))) |
9602 | ||
9603 | (define-public python2-vobject | |
9604 | (package-with-python2 python-vobject)) | |
9605 | ||
9606 | (define-public python-munkres | |
9607 | (package | |
9608 | (name "python-munkres") | |
9609 | (version "1.0.8") | |
9610 | (source (origin | |
9611 | (method url-fetch) | |
9612 | (uri (pypi-uri "munkres" version)) | |
9613 | (sha256 | |
9614 | (base32 | |
9615 | "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq")))) | |
9616 | (build-system python-build-system) | |
9617 | (arguments | |
9618 | '(#:tests? #f)) ; no test suite | |
78f8780e | 9619 | (home-page "https://software.clapper.org/munkres/") |
44d10b1f RW |
9620 | (synopsis "Implementation of the Munkres algorithm") |
9621 | (description "The Munkres module provides an implementation of the Munkres | |
9622 | algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), | |
9623 | useful for solving the Assignment Problem.") | |
9624 | (license license:bsd-3))) | |
9625 | ||
9626 | (define-public python2-munkres | |
9627 | (package-with-python2 python-munkres)) | |
9628 | ||
9629 | (define-public python-whoosh | |
9630 | (package | |
9631 | (name "python-whoosh") | |
9632 | (version "2.7.4") | |
9633 | (source | |
9634 | (origin | |
9635 | (method url-fetch) | |
9636 | (uri (pypi-uri "Whoosh" version)) | |
9637 | (sha256 | |
9638 | (base32 | |
9639 | "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw")))) | |
9640 | (build-system python-build-system) | |
2679d9a4 | 9641 | (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python. |
44d10b1f RW |
9642 | (native-inputs |
9643 | `(("python-pytest" ,python-pytest))) | |
9644 | (home-page "https://bitbucket.org/mchaput/whoosh") | |
9645 | (synopsis "Full text indexing, search, and spell checking library") | |
9646 | (description | |
9647 | "Whoosh is a fast, pure-Python full text indexing, search, and spell | |
9648 | checking library.") | |
9649 | (license license:bsd-2))) | |
9650 | ||
9651 | (define-public python2-whoosh | |
9652 | (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh)))) | |
9653 | (package (inherit whoosh) | |
9654 | (propagated-inputs | |
9655 | `(("python2-backport-ssl-match-hostname" | |
9656 | ,python2-backport-ssl-match-hostname) | |
9657 | ,@(package-propagated-inputs whoosh)))))) | |
9658 | ||
9659 | (define-public python-pathlib | |
9660 | (package | |
9661 | (name "python-pathlib") | |
9662 | (version "1.0.1") | |
9663 | (source (origin | |
9664 | (method url-fetch) | |
9665 | (uri (pypi-uri "pathlib" version)) | |
9666 | (sha256 | |
9667 | (base32 | |
9668 | "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39")))) | |
9669 | (build-system python-build-system) | |
9670 | ;; The tests depend on the internal "test" module, which does not provide | |
9671 | ;; a stable interface. | |
9672 | (arguments `(#:tests? #f)) | |
9673 | (home-page "https://pathlib.readthedocs.org/") | |
9674 | (synopsis "Object-oriented file system paths") | |
9675 | (description "Pathlib offers a set of classes to handle file system paths. | |
9676 | It offers the following advantages over using string objects: | |
9677 | ||
9678 | @enumerate | |
9679 | @item No more cumbersome use of os and os.path functions. Everything can | |
9680 | be done easily through operators, attribute accesses, and method calls. | |
9681 | @item Embodies the semantics of different path types. For example, | |
9682 | comparing Windows paths ignores casing. | |
9683 | @item Well-defined semantics, eliminating any inconsistencies or | |
9684 | ambiguities (forward vs. backward slashes, etc.). | |
9685 | @end enumerate | |
9686 | ||
9687 | Note: In Python 3.4, pathlib is now part of the standard library. For other | |
9688 | Python versions please consider python-pathlib2 instead, which tracks the | |
9689 | standard library module. This module (python-pathlib) isn't maintained | |
9690 | anymore.") | |
9691 | (license license:expat))) | |
9692 | ||
9693 | (define-public python2-pathlib | |
9694 | (package-with-python2 python-pathlib)) | |
9695 | ||
9696 | (define-public python2-pathlib2 | |
9697 | (package | |
9698 | (name "python2-pathlib2") | |
54da6f9f | 9699 | (version "2.3.3") |
44d10b1f RW |
9700 | (source (origin |
9701 | (method url-fetch) | |
9702 | (uri (pypi-uri "pathlib2" version)) | |
9703 | (sha256 | |
9704 | (base32 | |
54da6f9f | 9705 | "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695")))) |
44d10b1f RW |
9706 | (build-system python-build-system) |
9707 | ;; We only need the the Python 2 variant, since for Python 3 our minimum | |
9708 | ;; version is 3.4 which already includes this package as part of the | |
9709 | ;; standard library. | |
9710 | (arguments | |
9711 | `(#:python ,python-2)) | |
9712 | (propagated-inputs | |
9713 | `(("python2-scandir" ,python2-scandir) | |
9714 | ("python2-six" ,python2-six))) | |
e85af137 | 9715 | (home-page "https://pypi.org/project/pathlib2/") |
44d10b1f RW |
9716 | (synopsis "Object-oriented file system paths - backport of standard |
9717 | pathlib module") | |
9718 | (description "The goal of pathlib2 is to provide a backport of standard | |
9719 | pathlib module which tracks the standard library module, so all the newest | |
9720 | features of the standard pathlib can be used also on older Python versions. | |
9721 | ||
9722 | Pathlib offers a set of classes to handle file system paths. It offers the | |
9723 | following advantages over using string objects: | |
9724 | ||
9725 | @enumerate | |
9726 | @item No more cumbersome use of os and os.path functions. Everything can | |
9727 | be done easily through operators, attribute accesses, and method calls. | |
9728 | @item Embodies the semantics of different path types. For example, | |
9729 | comparing Windows paths ignores casing. | |
9730 | @item Well-defined semantics, eliminating any inconsistencies or | |
9731 | ambiguities (forward vs. backward slashes, etc.). | |
9732 | @end enumerate") | |
9733 | (license license:expat))) | |
9734 | ||
9735 | (define-public python2-pathlib2-bootstrap | |
9736 | (hidden-package | |
9737 | (package | |
9738 | (inherit python2-pathlib2) | |
9739 | (name "python2-pathlib2-bootstrap") | |
9740 | (propagated-inputs | |
9741 | `(("python2-scandir" ,python2-scandir) | |
9742 | ("python2-six" ,python2-six-bootstrap)))))) | |
9743 | ||
9744 | (define-public python-jellyfish | |
9745 | (package | |
9746 | (name "python-jellyfish") | |
9747 | (version "0.5.6") | |
9748 | (source (origin | |
9749 | (method url-fetch) | |
9750 | (uri (pypi-uri "jellyfish" version)) | |
9751 | (sha256 | |
9752 | (base32 | |
9753 | "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8")))) | |
9754 | (build-system python-build-system) | |
9755 | (native-inputs | |
9756 | `(("python-pytest" ,python-pytest))) | |
9757 | (home-page "https://github.com/jamesturk/jellyfish") | |
9758 | (synopsis "Approximate and phonetic matching of strings") | |
9759 | (description "Jellyfish uses a variety of string comparison and phonetic | |
9760 | encoding algorithms to do fuzzy string matching.") | |
9761 | (license license:bsd-2) | |
9762 | (properties `((python2-variant . ,(delay python2-jellyfish)))))) | |
9763 | ||
9764 | (define-public python2-jellyfish | |
9765 | (let ((jellyfish (package-with-python2 | |
9766 | (strip-python2-variant python-jellyfish)))) | |
9767 | (package (inherit jellyfish) | |
9768 | (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv) | |
9769 | ,@(package-native-inputs jellyfish)))))) | |
9770 | ||
9771 | (define-public python2-unicodecsv | |
9772 | (package | |
9773 | (name "python2-unicodecsv") | |
9774 | (version "0.14.1") | |
9775 | (source (origin | |
f711b71b | 9776 | (method git-fetch) |
44d10b1f RW |
9777 | ;; The test suite is not included in the PyPi release. |
9778 | ;; https://github.com/jdunck/python-unicodecsv/issues/19 | |
f711b71b EF |
9779 | (uri (git-reference |
9780 | (url "https://github.com/jdunck/python-unicodecsv") | |
9781 | (commit version))) | |
9782 | (file-name (git-file-name name version)) | |
44d10b1f RW |
9783 | (sha256 |
9784 | (base32 | |
f711b71b | 9785 | "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy")))) |
44d10b1f RW |
9786 | (build-system python-build-system) |
9787 | (arguments | |
9788 | `(;; It supports Python 3, but Python 3 can already do Unicode CSV. | |
9789 | #:python ,python-2)) | |
9790 | (native-inputs | |
9791 | `(("python2-unittest2" ,python2-unittest2))) | |
9792 | (home-page "https://github.com/jdunck/python-unicodecsv") | |
9793 | (synopsis "Unicode CSV module for Python 2") | |
9794 | (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV | |
9795 | module, adding support for Unicode strings.") | |
9796 | (license license:bsd-2))) | |
9797 | ||
9798 | (define-public python-rarfile | |
9799 | (package | |
9800 | (name "python-rarfile") | |
9801 | (version "2.8") | |
9802 | (source (origin | |
9803 | (method url-fetch) | |
9804 | (uri (pypi-uri "rarfile" version)) | |
9805 | (sha256 | |
9806 | (base32 | |
9807 | "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra")))) | |
9808 | (build-system python-build-system) | |
9809 | (arguments | |
9810 | '(#:phases | |
9811 | (modify-phases %standard-phases | |
9812 | (replace 'check | |
9813 | ;; Many tests fail, but the installation proceeds. | |
e59dd341 | 9814 | (lambda _ (invoke "make" "-C" "test" "test")))))) |
44d10b1f RW |
9815 | (native-inputs |
9816 | `(("which" ,which))) ; required for tests | |
9817 | (propagated-inputs | |
9818 | `(("libarchive" ,libarchive))) | |
9819 | (home-page "https://github.com/markokr/rarfile") | |
9820 | (synopsis "RAR archive reader for Python") | |
9821 | (description "This is Python module for RAR archive reading. The interface | |
9822 | is made as zipfile like as possible.") | |
9823 | (license license:isc))) | |
9824 | ||
9825 | (define-public python2-rarfile | |
9826 | (package-with-python2 python-rarfile)) | |
9827 | ||
9828 | (define-public python-magic | |
9829 | (package | |
9830 | (name "python-magic") | |
9831 | (version "0.4.15") | |
9832 | (source | |
9833 | (origin | |
9834 | (method url-fetch) | |
9835 | (uri (pypi-uri "python-magic" version)) | |
9836 | (sha256 | |
9837 | (base32 | |
9838 | "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk")) | |
9839 | (file-name (string-append name "-" version "-checkout")))) | |
9840 | (build-system python-build-system) | |
9841 | (arguments | |
9842 | ;; The tests are unreliable, so don't run them. The tests fail | |
9843 | ;; under Python3 because they were written for Python2 and | |
9844 | ;; contain import statements that do not work in Python3. One of | |
9845 | ;; the tests fails under Python2 because its assertions are | |
9846 | ;; overly stringent; it relies on comparing output strings which | |
9847 | ;; are brittle and can change depending on the version of | |
9848 | ;; libmagic being used and the system on which the test is | |
9849 | ;; running. In my case, under GuixSD 0.10.0, only one test | |
9850 | ;; failed, and it seems to have failed only because the version | |
9851 | ;; of libmagic that is packaged in Guix outputs a slightly | |
9852 | ;; different (but not wrong) string than the one that the test | |
9853 | ;; expected. | |
9854 | '(#:tests? #f | |
9855 | #:phases (modify-phases %standard-phases | |
9856 | ;; Replace a specific method call with a hard-coded | |
9857 | ;; path to the necessary libmagic.so file in the | |
9858 | ;; store. If we don't do this, then the method call | |
9859 | ;; will fail to find the libmagic.so file, which in | |
9860 | ;; turn will cause any application using | |
9861 | ;; python-magic to fail. | |
9862 | (add-before 'build 'hard-code-path-to-libmagic | |
9863 | (lambda* (#:key inputs #:allow-other-keys) | |
9864 | (let ((file (assoc-ref inputs "file"))) | |
9865 | (substitute* "magic.py" | |
9866 | (("ctypes.util.find_library\\('magic'\\)") | |
9867 | (string-append "'" file "/lib/libmagic.so'"))) | |
9868 | #t))) | |
9869 | (add-before 'install 'disable-egg-compression | |
9870 | (lambda _ | |
9871 | (let ((port (open-file "setup.cfg" "a"))) | |
9872 | (display "\n[easy_install]\nzip_ok = 0\n" | |
9873 | port) | |
9874 | (close-port port) | |
9875 | #t)))))) | |
9876 | (inputs | |
9877 | ;; python-magic needs to be able to find libmagic.so. | |
9878 | `(("file" ,file))) | |
9879 | (home-page | |
9880 | "https://github.com/ahupp/python-magic") | |
9881 | (synopsis | |
9882 | "File type identification using libmagic") | |
9883 | (description | |
9884 | "This module uses ctypes to access the libmagic file type | |
9885 | identification library. It makes use of the local magic database and | |
9886 | supports both textual and MIME-type output. Note that this module and | |
9887 | the python-file module both provide a \"magic.py\" file; these two | |
9888 | modules, which are different and were developed separately, both serve | |
9889 | the same purpose: to provide Python bindings for libmagic.") | |
9890 | (license license:expat))) | |
9891 | ||
9892 | (define-public python2-magic | |
9893 | (package-with-python2 python-magic)) | |
9894 | ||
9895 | (define-public python2-s3cmd | |
9896 | (package | |
9897 | (name "python2-s3cmd") | |
9898 | (version "1.6.1") | |
9899 | (source | |
9900 | (origin | |
9901 | (method url-fetch) | |
9902 | (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/" | |
9903 | "s3cmd-" version ".tar.gz")) | |
9904 | (sha256 | |
9905 | (base32 | |
9906 | "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6")))) | |
9907 | (build-system python-build-system) | |
9908 | (arguments | |
9909 | ;; s3cmd is written for python2 only and contains no tests. | |
9910 | `(#:python ,python-2 | |
9911 | #:tests? #f)) | |
9912 | (propagated-inputs | |
9913 | `(("python2-dateutil" ,python2-dateutil) | |
9914 | ;; The python-file package also provides a magic.py module. | |
9915 | ;; This is an unfortunate state of affairs; however, s3cmd | |
9916 | ;; fails to install if it cannot find specifically the | |
9917 | ;; python-magic package. Thus we include it, instead of using | |
9918 | ;; python-file. Ironically, s3cmd sometimes works better | |
9919 | ;; without libmagic bindings at all: | |
9920 | ;; https://github.com/s3tools/s3cmd/issues/198 | |
9921 | ("python2-magic" ,python2-magic))) | |
9922 | (home-page "http://s3tools.org/s3cmd") | |
9923 | (synopsis "Command line tool for S3-compatible storage services") | |
9924 | (description | |
9925 | "S3cmd is a command line tool for uploading, retrieving and managing data | |
9926 | in storage services that are compatible with the Amazon Simple Storage | |
9927 | Service (S3) protocol, including S3 itself. It supports rsync-like backup, | |
9928 | GnuPG encryption, and more. It also supports management of Amazon's | |
9929 | CloudFront content delivery network.") | |
9930 | (license license:gpl2+))) | |
9931 | ||
9932 | (define-public python-pkgconfig | |
9933 | (package | |
9934 | (name "python-pkgconfig") | |
9935 | (version "1.3.1") | |
9936 | (source | |
9937 | (origin | |
9938 | (method url-fetch) | |
9939 | (uri (pypi-uri "pkgconfig" version)) | |
9940 | (sha256 | |
9941 | (base32 | |
9942 | "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb")))) | |
9943 | (build-system python-build-system) | |
9944 | (native-inputs | |
9945 | `(("python-nose" ,python-nose))) | |
9946 | (inputs | |
9947 | `(("pkg-config" ,pkg-config))) | |
9948 | (arguments | |
9949 | `(#:phases | |
9950 | (modify-phases %standard-phases | |
9951 | (add-before 'build 'patch | |
9952 | ;; Hard-code the path to pkg-config. | |
9953 | (lambda _ | |
9954 | (substitute* "pkgconfig/pkgconfig.py" | |
9955 | (("cmd = 'pkg-config") | |
9956 | (string-append "cmd = '" (which "pkg-config")))) | |
9957 | #t)) | |
9958 | (replace 'check | |
9959 | (lambda _ | |
9960 | (invoke "nosetests" "test.py")))))) | |
9961 | (home-page "https://github.com/matze/pkgconfig") | |
9962 | (synopsis "Python interface for pkg-config") | |
9963 | (description "This module provides a Python interface to pkg-config. It | |
9964 | can be used to find all pkg-config packages, check if a package exists, | |
9965 | check if a package meets certain version requirements, query CFLAGS and | |
9966 | LDFLAGS and parse the output to build extensions with setup.py.") | |
9967 | (license license:expat))) | |
9968 | ||
9969 | (define-public python2-pkgconfig | |
9970 | (package-with-python2 python-pkgconfig)) | |
9971 | ||
9972 | (define-public python-bz2file | |
9973 | (package | |
9974 | (name "python-bz2file") | |
9975 | (version "0.98") | |
9976 | (source | |
9977 | (origin | |
9978 | (method url-fetch) | |
9979 | (uri (pypi-uri "bz2file" version)) | |
9980 | (sha256 | |
9981 | (base32 | |
9982 | "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4")))) | |
9983 | (build-system python-build-system) | |
9984 | (arguments | |
9985 | `(#:tests? #f)) ; Tests use deprecated python modules. | |
9986 | (home-page "https://github.com/nvawda/bz2file") | |
9987 | (synopsis "Read and write bzip2-compressed files") | |
9988 | (description | |
9989 | "Bz2file is a Python library for reading and writing bzip2-compressed | |
9990 | files. It contains a drop-in replacement for the I/O interface in the | |
9991 | standard library's @code{bz2} module, including features from the latest | |
9992 | development version of CPython that are not available in older releases.") | |
9993 | (license license:asl2.0))) | |
9994 | ||
9995 | (define-public python2-bz2file | |
9996 | (package-with-python2 python-bz2file)) | |
9997 | ||
9998 | (define-public python-future | |
9999 | (package | |
10000 | (name "python-future") | |
d5d54030 | 10001 | (version "0.17.1") |
44d10b1f RW |
10002 | (source |
10003 | (origin | |
10004 | (method url-fetch) | |
10005 | (uri (pypi-uri "future" version)) | |
10006 | (sha256 | |
10007 | (base32 | |
d5d54030 | 10008 | "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137")))) |
44d10b1f RW |
10009 | (build-system python-build-system) |
10010 | ;; Many tests connect to the network or are otherwise flawed. | |
10011 | ;; https://github.com/PythonCharmers/python-future/issues/210 | |
10012 | (arguments | |
10013 | `(#:tests? #f)) | |
10014 | (home-page "http://python-future.org") | |
10015 | (synopsis "Single-source support for Python 3 and 2") | |
10016 | (description | |
10017 | "@code{python-future} is the missing compatibility layer between Python 2 and | |
10018 | Python 3. It allows you to use a single, clean Python 3.x-compatible codebase | |
10019 | to support both Python 2 and Python 3 with minimal overhead.") | |
10020 | (license license:expat))) | |
10021 | ||
10022 | (define-public python2-future | |
10023 | (package-with-python2 python-future)) | |
10024 | ||
10025 | (define-public python-cysignals | |
10026 | (package | |
10027 | (name "python-cysignals") | |
8e3e51df | 10028 | (version "1.9.0") |
44d10b1f RW |
10029 | (source |
10030 | (origin | |
10031 | (method url-fetch) | |
8e3e51df | 10032 | (uri (pypi-uri "cysignals" version)) |
44d10b1f RW |
10033 | (sha256 |
10034 | (base32 | |
8e3e51df | 10035 | "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2")))) |
44d10b1f RW |
10036 | (build-system python-build-system) |
10037 | (native-inputs | |
10038 | `(("python-cython" ,python-cython) | |
10039 | ("python-sphinx" ,python-sphinx))) | |
10040 | (inputs | |
10041 | `(("pari-gp" ,pari-gp))) | |
10042 | (arguments | |
10043 | `(#:modules ((guix build python-build-system) | |
10044 | ((guix build gnu-build-system) #:prefix gnu:) | |
10045 | (guix build utils)) | |
10046 | ;; FIXME: Tests are executed after installation and currently fail | |
10047 | ;; when not installing into standard locations; the author is working | |
10048 | ;; on a fix. | |
10049 | #:tests? #f | |
10050 | #:phases | |
10051 | (modify-phases %standard-phases | |
10052 | (add-before | |
10053 | 'build 'configure | |
10054 | (assoc-ref gnu:%standard-phases 'configure))))) | |
10055 | (home-page | |
10056 | "https://github.com/sagemath/cysignals") | |
10057 | (synopsis | |
10058 | "Handling of interrupts and signals for Cython") | |
10059 | (description | |
10060 | "The cysignals package provides mechanisms to handle interrupts (and | |
10061 | other signals and errors) in Cython code, using two related approaches, | |
10062 | for mixed Cython/Python code or external C libraries and pure Cython code, | |
10063 | respectively.") | |
10064 | (license license:lgpl3+))) | |
10065 | ||
10066 | (define-public python2-cysignals | |
10067 | (package-with-python2 python-cysignals)) | |
10068 | ||
10069 | (define-public python2-shedskin | |
10070 | (package | |
10071 | (name "python2-shedskin") | |
10072 | (version "0.9.4") | |
10073 | (source | |
10074 | (origin | |
10075 | (method url-fetch) | |
10076 | (uri (string-append "https://github.com/shedskin/shedskin/" | |
10077 | "releases/download/v" version | |
10078 | "/shedskin-" version ".tgz")) | |
10079 | (sha256 | |
10080 | (base32 | |
10081 | "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41")))) | |
10082 | (build-system python-build-system) | |
10083 | (arguments | |
10084 | `(#:python ,python-2 | |
10085 | #:phases (modify-phases %standard-phases | |
10086 | (add-after 'unpack 'fix-resulting-include-libs | |
10087 | (lambda* (#:key inputs #:allow-other-keys) | |
10088 | (let ((libgc (assoc-ref inputs "libgc")) | |
10089 | (pcre (assoc-ref inputs "pcre"))) | |
10090 | (substitute* "shedskin/makefile.py" | |
10091 | (("variable == 'CCFLAGS':[ ]*") | |
10092 | (string-append "variable == 'CCFLAGS':\n" | |
10093 | " line += ' -I " pcre "/include" | |
10094 | " -I " libgc "/include'")) | |
10095 | (("variable == 'LFLAGS':[ ]*") | |
10096 | (string-append "variable == 'LFLAGS':\n" | |
10097 | " line += ' -L" pcre "/lib" | |
10098 | " -L " libgc "/lib'"))) | |
10099 | #t)))))) | |
10100 | (inputs `(("pcre" ,pcre) | |
10101 | ("libgc" ,libgc))) | |
10102 | (home-page "https://shedskin.github.io/") | |
10103 | (synopsis "Experimental Python-2 to C++ Compiler") | |
10104 | (description (string-append "This is an experimental compiler for a subset of | |
10105 | Python. It generates C++ code and a Makefile.")) | |
10106 | (license (list license:gpl3 license:bsd-3 license:expat)))) | |
10107 | ||
10108 | (define-public python2-rope | |
10109 | (package | |
10110 | (name "python2-rope") | |
a9ba0a31 | 10111 | (version "0.11.0") |
44d10b1f RW |
10112 | (source |
10113 | (origin | |
10114 | (method url-fetch) | |
10115 | (uri (pypi-uri "rope" version)) | |
10116 | (sha256 | |
10117 | (base32 | |
a9ba0a31 | 10118 | "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251")))) |
44d10b1f | 10119 | (arguments |
afb29715 | 10120 | ;; Rope has only partial python3 support, see `python-rope' |
44d10b1f RW |
10121 | `(#:python ,python-2)) |
10122 | (build-system python-build-system) | |
10123 | (native-inputs | |
10124 | `(("python2-unittest2" ,python2-unittest2))) | |
10125 | (home-page "https://github.com/python-rope/rope") | |
10126 | (synopsis "Refactoring library for Python") | |
10127 | (description "Rope is a refactoring library for Python. It facilitates | |
10128 | the renaming, moving and extracting of attributes, functions, modules, fields | |
10129 | and parameters in Python 2 source code. These refactorings can also be applied | |
10130 | to occurrences in strings and comments.") | |
10131 | (license license:gpl2))) | |
10132 | ||
2c880ef4 LC |
10133 | (define-public python-rope |
10134 | (package | |
10135 | (inherit python2-rope) | |
10136 | (name "python-rope") | |
10137 | (arguments `(#:python ,python-wrapper | |
10138 | ;; XXX: Only partial python3 support, results in some failing | |
10139 | ;; tests: <https://github.com/python-rope/rope/issues/247>. | |
10140 | #:tests? #f)) | |
10141 | (properties `((python2-variant . ,(delay python2-rope)))))) | |
10142 | ||
44d10b1f RW |
10143 | (define-public python-py3status |
10144 | (package | |
10145 | (name "python-py3status") | |
ef68b35d | 10146 | (version "3.21") |
44d10b1f RW |
10147 | (source |
10148 | (origin | |
10149 | (method url-fetch) | |
10150 | (uri (pypi-uri "py3status" version)) | |
10151 | (sha256 | |
ef68b35d | 10152 | (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262")))) |
44d10b1f RW |
10153 | (build-system python-build-system) |
10154 | (inputs | |
10155 | `(("file" ,file))) | |
10156 | (arguments | |
10157 | '(#:phases | |
10158 | (modify-phases %standard-phases | |
10159 | ;; 'file' is used for detection of configuration file encoding | |
10160 | ;; let's make link the dependency to particular input | |
10161 | (add-before 'build 'patch-file-path | |
10162 | (lambda* (#:key inputs #:allow-other-keys) | |
10163 | (let ((file-path (assoc-ref inputs "file"))) | |
10164 | (substitute* "py3status/parse_config.py" | |
6a6b8a3f | 10165 | (("\\[\"file\", \"-b\"") |
44d10b1f RW |
10166 | (string-append "['" file-path "/bin/file', '-b'"))) |
10167 | #t)))) | |
10168 | #:tests? #f)) ; TODO: Requires many libraries not in Guix. | |
10169 | (home-page "https://github.com/ultrabug/py3status") | |
10170 | (synopsis "Extensible i3status wrapper written in Python") | |
10171 | (description "py3status is an i3status wrapper which extends i3status | |
10172 | functionality in a modular way, allowing you to extend your panel with your | |
10173 | own code, responding to click events and updating clock every second.") | |
10174 | (license license:bsd-3))) | |
10175 | ||
10176 | (define-public python-tblib | |
10177 | (package | |
10178 | (name "python-tblib") | |
10179 | (version "1.3.2") | |
10180 | (source (origin | |
10181 | (method url-fetch) | |
10182 | (uri (pypi-uri "tblib" version)) | |
10183 | (sha256 (base32 | |
10184 | "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3")))) | |
10185 | (build-system python-build-system) | |
10186 | (arguments | |
10187 | `(#:phases | |
10188 | (modify-phases %standard-phases | |
10189 | (add-before 'check 'adjust-tests | |
10190 | (lambda _ | |
10191 | (when (which "python3") | |
10192 | ;; Adjust the example output to match that of Python 3.7: | |
10193 | ;; <https://github.com/ionelmc/python-tblib/issues/36>. | |
10194 | (substitute* "README.rst" | |
10195 | (("Exception\\('fail',") "Exception('fail'")) | |
10196 | #t))) | |
10197 | (replace 'check | |
10198 | (lambda _ | |
10199 | ;; Upstream runs tests after installation and the package itself | |
10200 | ;; resides in a subdirectory. Extend PYTHONPATH so it will be | |
10201 | ;; found. | |
10202 | (setenv "PYTHONPATH" | |
10203 | (string-append (getcwd) "/build/lib:" | |
10204 | (getenv "PYTHONPATH"))) | |
10205 | (invoke "py.test" "-vv" "tests" "README.rst")))))) | |
10206 | (native-inputs | |
10207 | `(("python-pytest" ,python-pytest) | |
10208 | ("python-six" ,python-six))) | |
10209 | (home-page "https://github.com/ionelmc/python-tblib") | |
10210 | (synopsis "Traceback serialization library") | |
10211 | (description | |
10212 | "Traceback serialization allows you to: | |
10213 | ||
10214 | @enumerate | |
10215 | @item Pickle tracebacks and raise exceptions with pickled tracebacks in | |
10216 | different processes. This allows better error handling when running code over | |
10217 | multiple processes (imagine multiprocessing, billiard, futures, celery etc). | |
10218 | ||
10219 | @item Parse traceback strings and raise with the parsed tracebacks. | |
10220 | @end enumerate\n") | |
10221 | (license license:bsd-3))) | |
10222 | ||
10223 | (define-public python2-tblib | |
10224 | (package-with-python2 python-tblib)) | |
10225 | ||
10226 | (define-public python-greenlet | |
10227 | (package | |
10228 | (name "python-greenlet") | |
10229 | (version "0.4.15") | |
10230 | (source (origin | |
10231 | (method url-fetch) | |
10232 | (uri (pypi-uri "greenlet" version)) | |
10233 | (sha256 | |
10234 | (base32 | |
10235 | "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll")))) | |
10236 | (build-system python-build-system) | |
10237 | (home-page "https://greenlet.readthedocs.io/") | |
10238 | (synopsis "Lightweight in-process concurrent programming") | |
10239 | (description | |
10240 | "Greenlet package is a spin-off of Stackless, a version of CPython | |
10241 | that supports micro-threads called \"tasklets\". Tasklets run | |
10242 | pseudo-concurrently (typically in a single or a few OS-level threads) and | |
10243 | are synchronized with data exchanges on \"channels\".") | |
10244 | (license (list license:psfl license:expat)))) | |
10245 | ||
10246 | (define-public python2-greenlet | |
10247 | (package-with-python2 python-greenlet)) | |
10248 | ||
10249 | (define-public python-objgraph | |
10250 | (package | |
10251 | (name "python-objgraph") | |
eebc03bb | 10252 | (version "3.4.1") |
44d10b1f RW |
10253 | (source |
10254 | (origin | |
10255 | (method url-fetch) | |
10256 | (uri (pypi-uri "objgraph" version)) | |
10257 | (sha256 | |
10258 | (base32 | |
eebc03bb | 10259 | "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz")))) |
44d10b1f RW |
10260 | (build-system python-build-system) |
10261 | (propagated-inputs | |
10262 | `(("python-graphviz" ,python-graphviz))) | |
10263 | (native-inputs | |
10264 | `(("python-mock" ,python-mock) | |
10265 | ("graphviz" ,graphviz))) | |
10266 | (home-page "https://mg.pov.lt/objgraph/") | |
10267 | (synopsis "Draw Python object reference graphs with graphviz") | |
10268 | (description | |
10269 | "This package provides tools to draw Python object reference graphs with | |
10270 | graphviz.") | |
10271 | (license license:expat))) | |
10272 | ||
ffe58d1d MB |
10273 | (define-public python2-objgraph |
10274 | (package-with-python2 python-objgraph)) | |
10275 | ||
44d10b1f RW |
10276 | (define-public python-gevent |
10277 | (package | |
10278 | (name "python-gevent") | |
10279 | (version "1.3.7") | |
10280 | (source (origin | |
10281 | (method url-fetch) | |
10282 | (uri (pypi-uri "gevent" version)) | |
10283 | (sha256 | |
10284 | (base32 | |
10285 | "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz")) | |
10286 | (modules '((guix build utils))) | |
10287 | (snippet | |
10288 | '(begin | |
10289 | ;; unbunding libev and c-ares | |
10290 | (delete-file-recursively "deps") | |
10291 | #t)))) | |
10292 | (build-system python-build-system) | |
10293 | (arguments | |
10294 | `(#:modules ((ice-9 ftw) | |
10295 | (ice-9 match) | |
10296 | (srfi srfi-26) | |
10297 | (guix build utils) | |
10298 | (guix build python-build-system)) | |
10299 | #:phases (modify-phases %standard-phases | |
44d10b1f RW |
10300 | (add-before 'patch-source-shebangs 'patch-hard-coded-paths |
10301 | (lambda _ | |
10302 | (substitute* "src/gevent/subprocess.py" | |
10303 | (("/bin/sh") (which "sh"))) | |
10304 | (for-each (lambda (file) | |
10305 | (substitute* file | |
10306 | (("/bin/sh") (which "sh")) | |
10307 | (("/bin/true") (which "true")))) | |
10308 | (find-files "src/greentest" "\\.py$")) | |
10309 | #t)) | |
10310 | (add-before 'build 'do-not-use-bundled-sources | |
10311 | (lambda* (#:key inputs #:allow-other-keys) | |
10312 | (setenv "CONFIG_SHELL" (which "bash")) | |
10313 | (setenv "LIBEV_EMBED" "false") | |
10314 | (setenv "CARES_EMBED" "false") | |
10315 | (setenv "EMBED" "false") | |
10316 | ||
b5b56b7f MB |
10317 | ;; Prevent building bundled libev. |
10318 | (substitute* "setup.py" | |
10319 | (("run_make=_BUILDING") | |
10320 | "run_make=False")) | |
10321 | ||
44d10b1f RW |
10322 | (let ((greenlet (string-append |
10323 | (assoc-ref inputs "python-greenlet") | |
10324 | "/include"))) | |
10325 | (match (scandir greenlet | |
10326 | (lambda (item) | |
10327 | (string-prefix? "python" item))) | |
10328 | ((python) | |
b5b56b7f | 10329 | (setenv "C_INCLUDE_PATH" |
44d10b1f RW |
10330 | (string-append greenlet "/" python))))) |
10331 | #t)) | |
10332 | (add-before 'check 'skip-timer-test | |
10333 | (lambda _ | |
10334 | ;; XXX: Skip 'TestTimerResolution', which appears to be | |
10335 | ;; unreliable. | |
10336 | (substitute* "src/greentest/test__core_timer.py" | |
10337 | (("not greentest.RUNNING_ON_CI") "False")) | |
10338 | #t)) | |
10339 | (replace 'check | |
10340 | (lambda _ | |
10341 | ;; Make sure the build directory is on PYTHONPATH. | |
10342 | (setenv "PYTHONPATH" | |
10343 | (string-append | |
10344 | (getenv "PYTHONPATH") ":" | |
10345 | (getcwd) "/build/" | |
10346 | (car (scandir "build" (cut string-prefix? "lib." <>))))) | |
10347 | (with-directory-excursion "src/greentest" | |
10348 | ;; XXX: Many tests require network access. Instead we only | |
10349 | ;; run known-good tests. Unfortunately we cannot use | |
10350 | ;; recursion here since this directory also contains | |
10351 | ;; Python-version-specific subfolders. | |
10352 | (apply invoke "python" "testrunner.py" "--config" | |
10353 | "known_failures.py" | |
10354 | (scandir "." (cut regexp-exec | |
10355 | (make-regexp "test_+(subprocess|core)") | |
10356 | <>))))))))) | |
10357 | (propagated-inputs | |
10358 | `(("python-greenlet" ,python-greenlet) | |
10359 | ("python-objgraph" ,python-objgraph))) | |
10360 | (native-inputs | |
b5b56b7f | 10361 | `(("python-six" ,python-six))) |
44d10b1f RW |
10362 | (inputs |
10363 | `(("c-ares" ,c-ares) | |
10364 | ("libev" ,libev))) | |
10365 | (home-page "http://www.gevent.org/") | |
10366 | (synopsis "Coroutine-based network library") | |
10367 | (description | |
10368 | "gevent is a coroutine-based Python networking library that uses greenlet | |
10369 | to provide a high-level synchronous API on top of the libev event loop.") | |
10370 | (license license:expat) | |
10371 | (properties `((python2-variant . ,(delay python2-gevent)))))) | |
10372 | ||
10373 | (define-public python2-gevent | |
10374 | (let ((base (package-with-python2 | |
10375 | (strip-python2-variant python-gevent)))) | |
10376 | (package | |
10377 | (inherit base) | |
10378 | (native-inputs `(,@(package-native-inputs python-gevent) | |
10379 | ("python-mock" ,python2-mock)))))) | |
10380 | ||
10381 | (define-public python-fastimport | |
10382 | (package | |
10383 | (name "python-fastimport") | |
10384 | (version "0.9.6") | |
10385 | (source | |
10386 | (origin | |
10387 | (method url-fetch) | |
10388 | (uri (pypi-uri "fastimport" version)) | |
10389 | (sha256 | |
10390 | (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43")))) | |
10391 | (build-system python-build-system) | |
10392 | (home-page "https://github.com/jelmer/python-fastimport") | |
10393 | (synopsis "VCS fastimport parser and generator in Python") | |
10394 | (description "This package provides a parser for and generator of the Git | |
10395 | @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport} | |
10396 | format.") | |
10397 | (license license:gpl2+))) | |
10398 | ||
10399 | (define-public python2-fastimport | |
10400 | (package-with-python2 python-fastimport)) | |
10401 | ||
10402 | (define-public python-twisted | |
10403 | (package | |
10404 | (name "python-twisted") | |
fdfad2fc | 10405 | (version "19.7.0") |
44d10b1f RW |
10406 | (source (origin |
10407 | (method url-fetch) | |
10408 | (uri (pypi-uri "Twisted" version ".tar.bz2")) | |
10409 | (sha256 | |
10410 | (base32 | |
fdfad2fc | 10411 | "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym")))) |
44d10b1f RW |
10412 | (build-system python-build-system) |
10413 | (arguments | |
0107c9b8 | 10414 | '(#:tests? #f)) ; FIXME: some tests fail |
44d10b1f RW |
10415 | (propagated-inputs |
10416 | `(("python-zope-interface" ,python-zope-interface) | |
52ca1c4a | 10417 | ("python-pyhamcrest" ,python-pyhamcrest) |
44d10b1f | 10418 | ("python-incremental" ,python-incremental) |
e5ba2fe3 | 10419 | ("python-hyperlink" ,python-hyperlink) |
44d10b1f RW |
10420 | ("python-constantly" ,python-constantly) |
10421 | ("python-automat" ,python-automat))) | |
10422 | (home-page "https://twistedmatrix.com/") | |
10423 | (synopsis "Asynchronous networking framework written in Python") | |
10424 | (description | |
10425 | "Twisted is an extensible framework for Python programming, with special | |
10426 | focus on event-based network programming and multiprotocol integration.") | |
10427 | (license license:expat))) | |
10428 | ||
10429 | (define-public python2-twisted | |
10430 | (package-with-python2 python-twisted)) | |
10431 | ||
10432 | (define-public python-pika | |
10433 | (package | |
10434 | (name "python-pika") | |
10435 | (version "0.12.0") | |
10436 | (source | |
10437 | (origin | |
10438 | (method url-fetch) | |
10439 | (uri (pypi-uri "pika" version)) | |
10440 | (sha256 | |
10441 | (base32 | |
10442 | "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h")))) | |
10443 | (build-system python-build-system) | |
10444 | (native-inputs | |
10445 | `(("python-pyev" ,python-pyev) | |
10446 | ("python-tornado" ,python-tornado) | |
10447 | ("python-twisted" ,python-twisted))) | |
10448 | (home-page "https://pika.readthedocs.org") | |
10449 | (synopsis "Pure Python AMQP Client Library") | |
10450 | (description | |
10451 | "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing | |
10452 | Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying | |
10453 | network support library.") | |
10454 | (license license:bsd-3))) | |
10455 | ||
10456 | (define-public python2-pika | |
10457 | (package-with-python2 python-pika)) | |
10458 | ||
10459 | (define-public python-ply | |
10460 | (package | |
10461 | (name "python-ply") | |
10462 | (version "3.10") | |
10463 | (source | |
10464 | (origin | |
10465 | (method url-fetch) | |
10466 | (uri (pypi-uri "ply" version)) | |
10467 | (sha256 | |
10468 | (base32 | |
10469 | "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn")))) | |
10470 | (build-system python-build-system) | |
10471 | (home-page "http://www.dabeaz.com/ply/") | |
10472 | (synopsis "Python Lex & Yacc") | |
10473 | (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python. | |
10474 | It uses LR parsing and does extensive error checking.") | |
10475 | (license license:bsd-3))) | |
10476 | ||
10477 | (define-public python2-ply | |
10478 | (package-with-python2 python-ply)) | |
10479 | ||
10480 | (define-public python-tabulate | |
10481 | (package | |
10482 | (name "python-tabulate") | |
10483 | (version "0.7.7") | |
10484 | (source (origin | |
10485 | (method url-fetch) | |
10486 | (uri (pypi-uri "tabulate" version)) | |
10487 | (sha256 | |
10488 | (base32 | |
10489 | "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843")))) | |
10490 | (build-system python-build-system) | |
10491 | (arguments | |
10492 | ;; FIXME: The pypi release tarball is missing a 'test/common.py' | |
10493 | ;; and the latest release is not tagged in the upstream repository. | |
10494 | '(#:tests? #f)) | |
10495 | (home-page "https://bitbucket.org/astanin/python-tabulate") | |
10496 | (synopsis "Pretty-print tabular data") | |
10497 | (description | |
10498 | "Tabulate is a library and command-line utility to pretty-print tabular | |
10499 | data in Python.") | |
10500 | (license license:expat))) | |
10501 | ||
10502 | (define-public python2-tabulate | |
10503 | (package-with-python2 python-tabulate)) | |
10504 | ||
10505 | (define-public python-kazoo | |
10506 | (package | |
10507 | (name "python-kazoo") | |
10508 | (version "2.4.0") | |
10509 | (source | |
10510 | (origin | |
10511 | (method url-fetch) | |
10512 | (uri (pypi-uri "kazoo" version)) | |
10513 | (sha256 | |
10514 | (base32 | |
10515 | "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7")))) | |
10516 | (build-system python-build-system) | |
10517 | (arguments '(#:tests? #f)) ; XXX: needs zookeeper | |
10518 | (propagated-inputs | |
10519 | `(("python-six" ,python-six))) | |
10520 | (home-page "https://kazoo.readthedocs.org") | |
10521 | (synopsis "High-level Zookeeper client library") | |
10522 | (description | |
10523 | "Kazoo is a Python client library for the Apache Zookeeper distributed | |
10524 | application service. It is designed to be easy to use and to avoid common | |
10525 | programming errors.") | |
10526 | (license license:asl2.0))) | |
10527 | ||
10528 | (define-public python2-kazoo | |
10529 | (package-with-python2 python-kazoo)) | |
10530 | ||
10531 | (define-public python-pykafka | |
10532 | (package | |
10533 | (name "python-pykafka") | |
10534 | (version "2.4.0") | |
10535 | (source (origin | |
10536 | (method url-fetch) | |
0ca1d040 | 10537 | (uri (pypi-uri "pykafka" version)) |
44d10b1f RW |
10538 | (sha256 |
10539 | (base32 | |
10540 | "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv")))) | |
10541 | (build-system python-build-system) | |
10542 | (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc. | |
10543 | (propagated-inputs | |
10544 | `(("python-gevent" ,python-gevent) | |
10545 | ("python-kazoo" ,python-kazoo) | |
10546 | ("python-tabulate" ,python-tabulate))) | |
10547 | (inputs | |
10548 | `(("librdkafka" ,librdkafka))) | |
10549 | (home-page "https://pykafka.readthedocs.io/") | |
10550 | (synopsis "Apache Kafka client for Python") | |
10551 | (description | |
10552 | "PyKafka is a client for the Apache Kafka distributed messaging system. | |
10553 | It includes Python implementations of Kafka producers and consumers, which | |
10554 | are optionally backed by a C extension built on librdkafka.") | |
10555 | (license license:asl2.0))) | |
10556 | ||
10557 | (define-public python2-pykafka | |
10558 | (package-with-python2 python-pykafka)) | |
10559 | ||
10560 | (define-public python-wcwidth | |
28ac442b MB |
10561 | (package |
10562 | (name "python-wcwidth") | |
574a71a7 | 10563 | (version "0.1.8") |
28ac442b MB |
10564 | (source (origin |
10565 | (method url-fetch) | |
10566 | (uri (pypi-uri "wcwidth" version)) | |
10567 | (sha256 | |
10568 | (base32 | |
574a71a7 | 10569 | "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj")))) |
28ac442b MB |
10570 | (build-system python-build-system) |
10571 | (home-page "https://github.com/jquast/wcwidth") | |
10572 | (synopsis "Measure number of terminal column cells of wide-character codes") | |
10573 | (description "Wcwidth measures the number of terminal column cells of | |
44d10b1f RW |
10574 | wide-character codes. It is useful for those implementing a terminal emulator, |
10575 | or programs that carefully produce output to be interpreted by one. It is a | |
10576 | Python implementation of the @code{wcwidth} and @code{wcswidth} C functions | |
10577 | specified in POSIX.1-2001 and POSIX.1-2008.") | |
28ac442b | 10578 | (license license:expat))) |
44d10b1f RW |
10579 | |
10580 | (define-public python2-wcwidth | |
10581 | (package-with-python2 python-wcwidth)) | |
10582 | ||
10583 | (define-public python2-jsonrpclib | |
10584 | (package | |
10585 | (name "python2-jsonrpclib") | |
10586 | (version "0.1.7") | |
10587 | (source (origin | |
10588 | (method url-fetch) | |
6571bba0 | 10589 | (uri (pypi-uri "jsonrpclib" version)) |
44d10b1f RW |
10590 | (sha256 |
10591 | (base32 | |
10592 | "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z")))) | |
10593 | (build-system python-build-system) | |
10594 | (arguments | |
10595 | `(#:tests? #f | |
10596 | #:python ,python-2)) | |
10597 | (home-page "https://github.com/joshmarshall/jsonrpclib/") | |
10598 | (synopsis "Implementation of JSON-RPC specification for Python") | |
10599 | (description | |
10600 | "This library is an implementation of the JSON-RPC specification. | |
10601 | It supports both the original 1.0 specification, as well as the | |
10602 | new (proposed) 2.0 spec, which includes batch submission, keyword arguments, | |
10603 | etc.") | |
10604 | (license license:asl2.0))) | |
10605 | ||
10606 | (define-public python-chai | |
10607 | (package | |
10608 | (name "python-chai") | |
10609 | (version "1.1.2") | |
10610 | (source (origin | |
10611 | (method url-fetch) | |
10612 | (uri (pypi-uri "chai" version)) | |
10613 | (sha256 | |
10614 | (base32 | |
10615 | "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz")))) | |
10616 | (build-system python-build-system) | |
10617 | (home-page "https://github.com/agoragames/chai") | |
10618 | (synopsis "Mocking framework for Python") | |
10619 | (description | |
10620 | "Chai provides an api for mocking, stubbing and spying your python | |
10621 | objects, patterned after the Mocha library for Ruby.") | |
10622 | (license license:bsd-3))) | |
10623 | ||
10624 | (define-public python2-chai | |
10625 | (package-with-python2 python-chai)) | |
10626 | ||
10627 | (define-public python-inflection | |
10628 | (package | |
10629 | (name "python-inflection") | |
10630 | (version "0.3.1") | |
10631 | (source | |
10632 | (origin (method url-fetch) | |
10633 | (uri (pypi-uri "inflection" version)) | |
10634 | (sha256 | |
10635 | (base32 | |
10636 | "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq")))) | |
10637 | (build-system python-build-system) | |
10638 | (native-inputs | |
10639 | `(("python-pytest" ,python-pytest))) | |
10640 | (home-page "https://github.com/jpvanhal/inflection") | |
10641 | (synopsis "Python string transformation library") | |
10642 | (description | |
10643 | "Inflection is a string transformation library. It singularizes | |
10644 | and pluralizes English words, and transforms strings from CamelCase to | |
10645 | underscored string.") | |
10646 | (license license:expat))) | |
10647 | ||
10648 | (define-public python2-inflection | |
10649 | (package-with-python2 python-inflection)) | |
10650 | ||
10651 | (define-public python-pylev | |
10652 | (package | |
10653 | (name "python-pylev") | |
10654 | (version "1.3.0") | |
10655 | (source (origin | |
10656 | (method url-fetch) | |
10657 | (uri (pypi-uri "pylev" version)) | |
10658 | (sha256 | |
10659 | (base32 | |
10660 | "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86")))) | |
10661 | (build-system python-build-system) | |
10662 | (home-page "https://github.com/toastdriven/pylev") | |
10663 | (synopsis "Levenshtein distance implementation in Python") | |
10664 | (description "Pure Python Levenshtein implementation, based off the | |
10665 | Wikipedia code samples at | |
10666 | @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.") | |
10667 | (license license:bsd-3))) | |
10668 | ||
10669 | (define-public python2-pylev | |
10670 | (package-with-python2 python-pylev)) | |
10671 | ||
10672 | (define-public python-cleo | |
10673 | (package | |
10674 | (name "python-cleo") | |
0c101a04 | 10675 | (version "0.7.6") |
44d10b1f RW |
10676 | (source (origin |
10677 | (method url-fetch) | |
10678 | (uri (pypi-uri "cleo" version)) | |
10679 | (sha256 | |
10680 | (base32 | |
0c101a04 | 10681 | "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr")))) |
44d10b1f RW |
10682 | (build-system python-build-system) |
10683 | (native-inputs | |
af2d3713 | 10684 | `( ;; For testing |
44d10b1f RW |
10685 | ("python-mock" ,python-mock) |
10686 | ("python-pytest-mock" ,python-pytest-mock) | |
10687 | ("python-pytest" ,python-pytest))) | |
10688 | (propagated-inputs | |
10689 | `(("python-backpack" ,python-backpack) | |
0c101a04 | 10690 | ("python-clikit" ,python-clikit) |
44d10b1f RW |
10691 | ("python-pastel" ,python-pastel) |
10692 | ("python-pylev" ,python-pylev))) | |
10693 | (home-page "https://github.com/sdispater/cleo") | |
10694 | (synopsis "Command-line arguments library for Python") | |
10695 | (description | |
10696 | "Cleo allows you to create command-line commands with signature in | |
10697 | docstring and colored output.") | |
10698 | (license license:expat))) | |
10699 | ||
10700 | (define-public python2-cleo | |
10701 | (package-with-python2 python-cleo)) | |
10702 | ||
2be85c45 TLC |
10703 | (define-public python-tomlkit |
10704 | (package | |
10705 | (name "python-tomlkit") | |
20c9914e | 10706 | (version "0.5.8") |
2be85c45 TLC |
10707 | (source |
10708 | (origin | |
10709 | (method url-fetch) | |
10710 | (uri (pypi-uri "tomlkit" version)) | |
10711 | (sha256 | |
10712 | (base32 | |
20c9914e | 10713 | "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j")))) |
2be85c45 TLC |
10714 | (build-system python-build-system) |
10715 | (native-inputs | |
10716 | `(("python-pytest" ,python-pytest))) | |
10717 | (home-page | |
10718 | "https://github.com/sdispater/tomlkit") | |
10719 | (synopsis "Style preserving TOML library") | |
10720 | (description | |
10721 | "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that | |
10722 | preserves all comments, indentations, whitespace and internal element ordering, | |
10723 | and makes them accessible and editable via an intuitive API. It can also | |
10724 | create new TOML documents from scratch using the provided helpers. Part of the | |
10725 | implementation as been adapted, improved and fixed from Molten.") | |
10726 | (license license:expat))) | |
10727 | ||
0bb32201 TLC |
10728 | (define-public python-shellingham |
10729 | (package | |
10730 | (name "python-shellingham") | |
10731 | (version "1.3.1") | |
10732 | (source | |
10733 | (origin | |
10734 | (method url-fetch) | |
10735 | (uri (pypi-uri "shellingham" version)) | |
10736 | (sha256 | |
10737 | (base32 | |
10738 | "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq")))) | |
10739 | (build-system python-build-system) | |
10740 | (home-page | |
10741 | "https://github.com/sarugaku/shellingham") | |
10742 | (synopsis "Tool to detect surrounding shell") | |
10743 | (description | |
10744 | "Shellingham detects what shell the current Python executable is | |
10745 | running in.") | |
10746 | (license license:isc))) | |
10747 | ||
aee92957 TLC |
10748 | (define-public python-memcached |
10749 | (package | |
10750 | (name "python-memcached") | |
10751 | (version "1.59") | |
10752 | (source | |
10753 | (origin | |
10754 | (method url-fetch) | |
10755 | (uri (pypi-uri "python-memcached" version)) | |
10756 | (sha256 | |
10757 | (base32 | |
10758 | "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2")))) | |
10759 | (build-system python-build-system) | |
10760 | (propagated-inputs `(("python-six" ,python-six))) | |
10761 | (home-page | |
10762 | "https://github.com/linsomniac/python-memcached") | |
10763 | (synopsis "Pure python memcached client") | |
10764 | (description | |
10765 | "This software is a pure Python interface to the memcached memory cache | |
10766 | daemon. It is the client side software which allows storing values in one or | |
10767 | more, possibly remote, memcached servers.") | |
10768 | (license license:psfl))) | |
10769 | ||
b2ac2508 TLC |
10770 | (define-public python-clikit |
10771 | (package | |
10772 | (name "python-clikit") | |
4573b94d | 10773 | (version "0.4.1") |
b2ac2508 TLC |
10774 | (source |
10775 | (origin | |
10776 | (method url-fetch) | |
10777 | (uri (pypi-uri "clikit" version)) | |
10778 | (sha256 | |
10779 | (base32 | |
4573b94d | 10780 | "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a")))) |
b2ac2508 TLC |
10781 | (build-system python-build-system) |
10782 | (propagated-inputs | |
10783 | `(("python-pastel" ,python-pastel) | |
10784 | ("python-pylev" ,python-pylev))) | |
10785 | (home-page "https://github.com/sdispater/clikit") | |
10786 | (synopsis "Group of utilities to build command line interfaces") | |
10787 | (description | |
10788 | "CliKit is a group of utilities to build testable command line | |
10789 | interfaces.") | |
10790 | (license license:expat))) | |
10791 | ||
c6f008d6 TLC |
10792 | (define-public python-msgpack-python |
10793 | (package | |
10794 | (name "python-msgpack-python") | |
10795 | (version "0.5.6") | |
10796 | (source | |
10797 | (origin | |
10798 | (method url-fetch) | |
10799 | (uri (pypi-uri "msgpack-python" version)) | |
10800 | (sha256 | |
10801 | (base32 | |
10802 | "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p")))) | |
10803 | (build-system python-build-system) | |
10804 | (home-page "http://msgpack.org/") | |
10805 | (synopsis "Package to deserialize messages in MessagePack binary format") | |
10806 | (description | |
10807 | "MessagePack is an efficient binary serialization format. It lets you | |
10808 | exchange data among multiple languages like JSON. But it's faster and | |
10809 | smaller. Small integers are encoded into a single byte, and typical short | |
10810 | strings require only one extra byte in addition to the strings themselves.") | |
10811 | (license license:asl2.0))) | |
10812 | ||
badc1c63 TLC |
10813 | (define-public python-cachy |
10814 | (package | |
10815 | (name "python-cachy") | |
10816 | (version "0.2.0") | |
10817 | (source | |
10818 | (origin | |
10819 | (method url-fetch) | |
10820 | (uri (pypi-uri "cachy" version)) | |
10821 | (sha256 | |
10822 | (base32 | |
10823 | "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp")))) | |
10824 | (build-system python-build-system) | |
10825 | (native-inputs | |
10826 | `(("python-fakeredis" ,python-fakeredis) | |
10827 | ("python-flexmock" ,python-flexmock) | |
10828 | ("python-pytest" ,python-pytest))) | |
10829 | (propagated-inputs | |
10830 | `(("python-memcached" ,python-memcached) | |
10831 | ("python-msgpack-python" ,python-msgpack-python) | |
10832 | ("python-redis" ,python-redis))) | |
10833 | (home-page "https://github.com/sdispater/cachy") | |
10834 | (synopsis "Simple yet effective caching library") | |
10835 | (description | |
10836 | "Cachy provides a simple yet effective caching library. A simple but | |
10837 | powerful API: thread-safety; decorator syntax; support for memcached, redis, | |
10838 | database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.") | |
10839 | (license license:expat))) | |
10840 | ||
617bb67b TLC |
10841 | (define-public poetry |
10842 | (package | |
10843 | (name "poetry") | |
10844 | (version "0.12.17") | |
10845 | ;; Poetry can only be built from source with poetry. | |
10846 | (source | |
10847 | (origin | |
10848 | (method url-fetch) | |
10849 | (uri (pypi-uri "poetry" version)) | |
10850 | (sha256 | |
10851 | (base32 | |
10852 | "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf")))) | |
10853 | (build-system python-build-system) | |
10854 | (arguments | |
10855 | `(#:tests? #f ;; Pypi does not have tests. | |
10856 | #:phases | |
10857 | (modify-phases %standard-phases | |
10858 | (replace 'build | |
10859 | (lambda _ | |
10860 | ;; Bug in poetry https://github.com/sdispater/poetry/issues/866. | |
10861 | (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/" | |
10862 | "setup.py") | |
10863 | #t))))) | |
10864 | (propagated-inputs | |
10865 | `(("python-cachecontrol" ,python-cachecontrol) | |
10866 | ("python-cachy" ,python-cachy) | |
10867 | ("python-cleo" ,python-cleo) | |
10868 | ("python-glob2" ,python-glob2) | |
10869 | ("python-html5lib" ,python-html5lib) | |
10870 | ("python-jsonschema" ,python-jsonschema) | |
10871 | ("python-msgpack" ,python-msgpack) | |
617bb67b TLC |
10872 | ("python-pkginfo" ,python-pkginfo) |
10873 | ("python-pyparsing" ,python-pyparsing) | |
10874 | ("python-pyrsistent" ,python-pyrsistent) | |
10875 | ("python-requests" ,python-requests) | |
10876 | ("python-requests-toolbelt" ,python-requests-toolbelt) | |
10877 | ("python-shellingham" ,python-shellingham) | |
10878 | ("python-tomlkit" ,python-tomlkit) | |
10879 | ("python-virtualenv" ,python-virtualenv))) | |
10880 | (home-page "https://poetry.eustace.io/") | |
10881 | (synopsis "Python dependency management and packaging made easy") | |
10882 | (description "Poetry is a tool for dependency management and packaging | |
10883 | in Python. It allows you to declare the libraries your project depends on and | |
10884 | it will manage (install/update) them for you.") | |
10885 | (license license:expat))) | |
10886 | ||
44d10b1f RW |
10887 | (define-public python-lazy-object-proxy |
10888 | (package | |
10889 | (name "python-lazy-object-proxy") | |
7454078a | 10890 | (version "1.4.3") |
44d10b1f RW |
10891 | (source (origin |
10892 | (method url-fetch) | |
10893 | (uri (pypi-uri "lazy-object-proxy" version)) | |
10894 | (sha256 | |
10895 | (base32 | |
7454078a | 10896 | "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k")))) |
63d4873b MO |
10897 | (native-inputs |
10898 | `(("python-setuptools-scm" ,python-setuptools-scm-3.3))) | |
44d10b1f RW |
10899 | (build-system python-build-system) |
10900 | (home-page "https://github.com/ionelmc/python-lazy-object-proxy") | |
10901 | (synopsis "Lazy object proxy for python") | |
10902 | (description | |
10903 | "Lazy object proxy is an object that wraps a callable but defers the call | |
10904 | until the object is actually required, and caches the result of said call.") | |
10905 | (license license:bsd-2))) | |
10906 | ||
10907 | (define-public python2-lazy-object-proxy | |
10908 | (package-with-python2 python-lazy-object-proxy)) | |
10909 | ||
10910 | (define-public python-dnspython | |
10911 | (package | |
10912 | (name "python-dnspython") | |
10913 | (version "1.15.0") | |
10914 | (source (origin | |
10915 | (method url-fetch) | |
10916 | (uri (string-append "http://www.dnspython.org/kits/" | |
10917 | version "/dnspython-" version ".tar.gz")) | |
10918 | (sha256 | |
10919 | (base32 | |
10920 | "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i")))) | |
10921 | (build-system python-build-system) | |
10922 | (arguments '(#:tests? #f)) ; XXX: requires internet access | |
10923 | (home-page "http://www.dnspython.org") | |
10924 | (synopsis "DNS toolkit for Python") | |
10925 | (description | |
10926 | "dnspython is a DNS toolkit for Python. It supports almost all record | |
10927 | types. It can be used for queries, zone transfers, and dynamic updates. | |
10928 | It supports TSIG authenticated messages and EDNS0.") | |
10929 | (license license:expat))) | |
10930 | ||
10931 | (define-public python2-dnspython | |
10932 | (package-with-python2 python-dnspython)) | |
10933 | ||
10934 | (define-public python-email-validator | |
10935 | (package | |
10936 | (name "python-email-validator") | |
10937 | (version "1.0.2") | |
10938 | (source | |
10939 | (origin (method url-fetch) | |
10940 | (uri (pypi-uri "email_validator" version)) | |
10941 | (sha256 | |
10942 | (base32 | |
10943 | "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6")))) | |
10944 | (build-system python-build-system) | |
10945 | (arguments | |
10946 | '(#:phases | |
10947 | (modify-phases %standard-phases | |
10948 | (add-before 'build 'use-dnspython | |
10949 | (lambda _ | |
10950 | (substitute* "setup.py" | |
10951 | (("dnspython3") "dnspython")) | |
10952 | #t))))) | |
10953 | (propagated-inputs | |
10954 | `(("python-dnspython" ,python-dnspython) | |
10955 | ("python-idna" ,python-idna))) | |
10956 | (home-page "https://github.com/JoshData/python-email-validator") | |
10957 | (synopsis "Email address validation library for Python") | |
10958 | (description | |
10959 | "This library validates email address syntax and deliverability.") | |
10960 | (license license:cc0))) | |
10961 | ||
10962 | (define-public python2-email-validator | |
10963 | (package-with-python2 python-email-validator)) | |
10964 | ||
10965 | (define-public python-ukpostcodeparser | |
10966 | (package | |
10967 | (name "python-ukpostcodeparser") | |
10968 | (version "1.0.3") | |
10969 | (source (origin | |
10970 | (method url-fetch) | |
10971 | (uri (pypi-uri "UkPostcodeParser" version)) | |
10972 | (sha256 | |
10973 | (base32 | |
10974 | "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd")))) | |
10975 | (build-system python-build-system) | |
10976 | (home-page "https://github.com/hamstah/ukpostcodeparser") | |
10977 | (synopsis "UK Postcode parser for Python") | |
10978 | (description | |
10979 | "This library provides the @code{parse_uk_postcode} function for | |
10980 | parsing UK postcodes.") | |
10981 | (license license:expat))) | |
10982 | ||
10983 | (define-public python2-ukpostcodeparser | |
10984 | (package-with-python2 python-ukpostcodeparser)) | |
10985 | ||
10986 | (define-public python-faker | |
10987 | (package | |
10988 | (name "python-faker") | |
10989 | (version "0.7.9") | |
10990 | (source (origin | |
10991 | (method url-fetch) | |
10992 | (uri (pypi-uri "Faker" version)) | |
10993 | (sha256 | |
10994 | (base32 | |
10995 | "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm")) | |
10996 | (patches | |
10997 | (search-patches "python-faker-fix-build-32bit.patch")) | |
10998 | (modules '((guix build utils))) | |
10999 | (snippet | |
11000 | '(begin | |
11001 | (for-each delete-file (find-files "." "\\.pyc$")) | |
11002 | #t)))) | |
11003 | (build-system python-build-system) | |
11004 | (arguments | |
11005 | '(#:phases | |
11006 | (modify-phases %standard-phases | |
11007 | (replace 'check | |
49ff8827 | 11008 | (lambda _ (invoke "python" "-m" "unittest" "-v" "tests")))))) |
44d10b1f RW |
11009 | (native-inputs |
11010 | `(;; For testing | |
11011 | ("python-email-validator" ,python-email-validator) | |
11012 | ("python-mock" ,python-mock) | |
11013 | ("python-ukpostcodeparser" ,python-ukpostcodeparser))) | |
11014 | (propagated-inputs | |
11015 | `(("python-dateutil" ,python-dateutil) | |
11016 | ("python-six" ,python-six))) | |
11017 | (home-page "https://github.com/joke2k/faker") | |
11018 | (synopsis "Python package that generates fake data") | |
11019 | (description | |
11020 | "Faker is a Python package that generates fake data such as names, | |
11021 | addresses, and phone numbers.") | |
11022 | (license license:expat) | |
11023 | (properties `((python2-variant . ,(delay python2-faker)))))) | |
11024 | ||
11025 | (define-public python2-faker | |
11026 | (let ((base (package-with-python2 (strip-python2-variant | |
11027 | python-faker)))) | |
11028 | (package | |
11029 | (inherit base) | |
11030 | (propagated-inputs | |
11031 | `(("python2-ipaddress" ,python2-ipaddress) | |
11032 | ,@(package-propagated-inputs base)))))) | |
11033 | ||
11034 | (define-public python-pyaml | |
11035 | (package | |
11036 | (name "python-pyaml") | |
11037 | (version "18.11.0") | |
11038 | (source (origin | |
11039 | (method url-fetch) | |
11040 | (uri (pypi-uri "pyaml" version)) | |
11041 | (sha256 | |
11042 | (base32 | |
11043 | "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr")))) | |
11044 | (build-system python-build-system) | |
11045 | (native-inputs | |
11046 | `(("python-unidecode" ,python-unidecode))) | |
11047 | (propagated-inputs | |
11048 | `(("python-pyyaml" ,python-pyyaml))) | |
11049 | (home-page "https://github.com/mk-fg/pretty-yaml") | |
11050 | (synopsis "YAML pretty-print library for Python") | |
11051 | (description | |
11052 | "pyaml is a PyYAML based python module to produce pretty and readable | |
11053 | YAML-serialized data.") | |
492e3a7a | 11054 | (license license:wtfpl2))) |
44d10b1f RW |
11055 | |
11056 | (define-public python2-pyaml | |
11057 | (package-with-python2 python-pyaml)) | |
11058 | ||
11059 | (define-public python-backpack | |
11060 | (package | |
11061 | (name "python-backpack") | |
11062 | (version "0.1") | |
11063 | (source | |
11064 | (origin | |
11065 | (method url-fetch) | |
11066 | (uri (pypi-uri "backpack" version)) | |
11067 | (sha256 | |
11068 | (base32 | |
11069 | "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1")))) | |
11070 | (build-system python-build-system) | |
11071 | (native-inputs | |
11072 | `(("python-pytest" ,python-pytest) | |
11073 | ("python-nose" ,python-nose))) | |
11074 | (propagated-inputs | |
11075 | `(("python-simplejson" ,python-simplejson))) | |
11076 | (home-page "https://github.com/sdispater/backpack") | |
11077 | (synopsis "Utilities for working with Python collections") | |
11078 | (description "Backpack provides some useful utilities for working with | |
11079 | collections of data.") | |
11080 | (license license:expat))) | |
11081 | ||
11082 | (define-public python2-backpack | |
11083 | (package-with-python2 python-backpack)) | |
11084 | ||
11085 | (define-public python-prompt-toolkit | |
11086 | (package | |
11087 | (name "python-prompt-toolkit") | |
11088 | (version "2.0.7") | |
11089 | (source | |
11090 | (origin | |
11091 | (method url-fetch) | |
11092 | (uri (pypi-uri "prompt_toolkit" version ".tar.gz")) | |
11093 | (sha256 | |
11094 | (base32 | |
11095 | "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx")))) | |
11096 | (build-system python-build-system) | |
11097 | (arguments | |
11098 | `(#:phases | |
11099 | (modify-phases %standard-phases | |
11100 | (delete 'check) | |
11101 | (add-after 'install 'post-install-check | |
11102 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
11103 | ;; HOME is needed for the test | |
11104 | ;; "test_pathcompleter_can_expanduser". | |
11105 | (setenv "HOME" "/tmp") | |
11106 | (add-installed-pythonpath inputs outputs) | |
11107 | (invoke "py.test")))))) | |
11108 | (propagated-inputs | |
11109 | `(("python-wcwidth" ,python-wcwidth) | |
11110 | ("python-six" ,python-six) | |
11111 | ("python-pygments" ,python-pygments))) | |
11112 | (native-inputs | |
11113 | `(("python-pytest" ,python-pytest))) | |
11114 | (home-page "https://github.com/jonathanslenders/python-prompt-toolkit") | |
11115 | (synopsis "Library for building command line interfaces in Python") | |
11116 | (description | |
11117 | "Prompt-Toolkit is a library for building interactive command line | |
11118 | interfaces in Python. It's like GNU Readline but it also features syntax | |
11119 | highlighting while typing, out-of-the-box multi-line input editing, advanced | |
11120 | code completion, incremental search, support for Chinese double-width | |
11121 | characters, mouse support, and auto suggestions.") | |
11122 | (license license:bsd-3))) | |
11123 | ||
11124 | (define-public python2-prompt-toolkit | |
11125 | (package-with-python2 python-prompt-toolkit)) | |
11126 | ||
11127 | (define-public python-prompt-toolkit-1 | |
11128 | (package (inherit python-prompt-toolkit) | |
11129 | (version "1.0.15") | |
11130 | (source | |
11131 | (origin | |
11132 | (method url-fetch) | |
11133 | (uri (pypi-uri "prompt_toolkit" version ".tar.gz")) | |
11134 | (sha256 | |
11135 | (base32 | |
11136 | "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5")))))) | |
11137 | ||
11138 | (define-public python2-prompt-toolkit-1 | |
11139 | (package-with-python2 python-prompt-toolkit-1)) | |
11140 | ||
11141 | (define-public python-jedi | |
11142 | (package | |
11143 | (name "python-jedi") | |
296e1aea | 11144 | (version "0.15.1") |
44d10b1f RW |
11145 | (source |
11146 | (origin | |
11147 | (method url-fetch) | |
11148 | (uri (pypi-uri "jedi" version)) | |
11149 | (sha256 | |
11150 | (base32 | |
296e1aea | 11151 | "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds")))) |
44d10b1f RW |
11152 | (build-system python-build-system) |
11153 | (arguments | |
296e1aea | 11154 | `(#:phases |
44d10b1f | 11155 | (modify-phases %standard-phases |
296e1aea MC |
11156 | (add-after 'unpack 'disable-file-completion-test |
11157 | ;; A single parameterized test currently fail (see: | |
11158 | ;; https://github.com/davidhalter/jedi/issues/1395). Remove it. | |
11159 | (lambda _ | |
11160 | (substitute* "test/test_api/test_completion.py" | |
11161 | ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") "")) | |
11162 | #t)) | |
44d10b1f | 11163 | (replace 'check |
296e1aea MC |
11164 | (lambda _ |
11165 | (setenv "HOME" "/tmp") | |
11166 | (invoke "python" "-m" "pytest")))))) | |
44d10b1f RW |
11167 | (native-inputs |
11168 | `(("python-pytest" ,python-pytest) | |
11169 | ("python-docopt" ,python-docopt))) | |
11170 | (propagated-inputs | |
11171 | `(("python-parso" ,python-parso))) | |
11172 | (home-page "https://github.com/davidhalter/jedi") | |
11173 | (synopsis "Autocompletion and static analysis library for Python") | |
11174 | (description | |
11175 | "Jedi is a static analysis tool for Python that can be used in Integrated | |
11176 | Development Environments (@dfn{IDE}s) and text editors. It understands Python | |
11177 | on a deeper level than many other static analysis frameworks for Python. | |
11178 | ||
11179 | Jedi understands docstrings and you can use Jedi autocompletion in your REPL as | |
11180 | well.") | |
11181 | (license license:expat))) | |
11182 | ||
11183 | (define-public python2-jedi | |
296e1aea | 11184 | (package-with-python2 python-jedi)) |
44d10b1f RW |
11185 | |
11186 | (define-public ptpython | |
11187 | (package | |
11188 | (name "ptpython") | |
11189 | (version "0.34") | |
11190 | (source (origin | |
11191 | (method url-fetch) | |
11192 | (uri (pypi-uri "ptpython" version)) | |
11193 | (sha256 | |
11194 | (base32 | |
11195 | "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13")))) | |
11196 | (build-system python-build-system) | |
11197 | (arguments | |
11198 | '(#:tests? #f)) ; FIXME: No tests in pypi tarball. | |
11199 | (propagated-inputs | |
11200 | `(("python-docopt" ,python-docopt) | |
11201 | ("python-jedi" ,python-jedi) | |
11202 | ("python-prompt-toolkit" ,python-prompt-toolkit) | |
11203 | ("python-pygments" ,python-pygments))) | |
11204 | (home-page "https://github.com/jonathanslenders/ptpython") | |
11205 | (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features") | |
11206 | (description | |
11207 | "ptpython is a Python read-eval-print loop with IDE-like features. | |
11208 | It supports syntax highlighting, multiline editing, autocompletion, mouse, | |
11209 | color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters | |
11210 | etc.") | |
11211 | (license license:bsd-3) | |
11212 | (properties `((python2-variant . ,(delay ptpython-2)))))) | |
11213 | ||
11214 | (define-public ptpython-2 | |
11215 | (let ((base (package-with-python2 (strip-python2-variant ptpython)))) | |
11216 | (package | |
11217 | (inherit base) | |
11218 | (name "ptpython2")))) | |
11219 | ||
11220 | (define-public python-stem | |
11221 | (package | |
11222 | (name "python-stem") | |
e746d1c3 | 11223 | (version "1.7.1") |
44d10b1f RW |
11224 | (source |
11225 | (origin | |
11226 | (method url-fetch) | |
11227 | (uri (pypi-uri "stem" version)) | |
11228 | (sha256 | |
11229 | (base32 | |
e746d1c3 | 11230 | "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9")))) |
44d10b1f RW |
11231 | (build-system python-build-system) |
11232 | (arguments | |
11233 | `(#:phases | |
11234 | (modify-phases %standard-phases | |
11235 | (replace 'check | |
11236 | (lambda _ | |
11237 | (invoke "./run_tests.py" "--unit") | |
11238 | #t))))) | |
11239 | (native-inputs | |
11240 | `(("python-mock" ,python-mock) | |
11241 | ("python-pycodestyle" ,python-pycodestyle) | |
11242 | ("python-pyflakes" ,python-pyflakes))) | |
11243 | (home-page "https://stem.torproject.org/") | |
11244 | (synopsis | |
11245 | "Python controller library that allows applications to interact with Tor") | |
11246 | (description | |
11247 | "Stem is a Python controller library for Tor. With it you can use Tor's | |
11248 | control protocol to script against the Tor process and read descriptor data | |
11249 | relays publish about themselves.") | |
11250 | (license license:lgpl3))) | |
11251 | ||
11252 | (define-public python2-stem | |
11253 | (package-with-python2 python-stem)) | |
11254 | ||
11255 | (define-public python-pyserial | |
11256 | (package | |
11257 | (name "python-pyserial") | |
00d81f98 | 11258 | (version "3.4") |
44d10b1f RW |
11259 | (source |
11260 | (origin | |
11261 | (method url-fetch) | |
11262 | (uri (pypi-uri "pyserial" version)) | |
11263 | (sha256 | |
11264 | (base32 | |
00d81f98 | 11265 | "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf")))) |
44d10b1f RW |
11266 | (build-system python-build-system) |
11267 | (arguments | |
11268 | '(#:tests? #f)) ; FIXME: 3/49 tests are failing. | |
11269 | ;; #:phases | |
11270 | ;; (modify-phases %standard-phases | |
11271 | ;; (replace 'check | |
11272 | ;; (lambda _ | |
11273 | ;; (zero? (system* "python" "test/run_all_tests.py" "loop://"))))))) | |
11274 | (home-page | |
11275 | "https://github.com/pyserial/pyserial") | |
11276 | (synopsis "Python Serial Port Bindings") | |
11277 | (description "@code{pyserial} provide serial port bindings for Python. It | |
11278 | supports different byte sizes, stop bits, parity and flow control with RTS/CTS | |
11279 | and/or Xon/Xoff. The port is accessed in RAW mode.") | |
11280 | (license license:bsd-3))) | |
11281 | ||
11282 | (define-public python2-pyserial | |
11283 | (package-with-python2 python-pyserial)) | |
11284 | ||
11285 | (define-public python-kivy | |
11286 | (package | |
11287 | (name "python-kivy") | |
11288 | (version "1.10.1") | |
11289 | (source | |
11290 | (origin | |
11291 | (method url-fetch) | |
11292 | (uri (pypi-uri "Kivy" version)) | |
11293 | (file-name (string-append name "-" version ".tar.gz")) | |
11294 | (sha256 | |
11295 | (base32 | |
11296 | "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw")))) | |
11297 | (build-system python-build-system) | |
11298 | (arguments | |
11299 | `(#:tests? #f ; Tests require many optional packages | |
11300 | #:phases | |
11301 | (modify-phases %standard-phases | |
11302 | (add-after 'patch-generated-file-shebangs 'set-sdl-paths | |
11303 | (lambda* (#:key inputs #:allow-other-keys) | |
11304 | (setenv "KIVY_SDL2_PATH" | |
11305 | (string-append (assoc-ref inputs "sdl-union") | |
11306 | "/include/SDL2")) | |
11307 | #t))))) | |
11308 | (native-inputs | |
11309 | `(("git" ,git) | |
11310 | ("pkg-config" ,pkg-config) | |
11311 | ("python-cython" ,python-cython))) | |
11312 | (inputs | |
11313 | `(("gstreamer" ,gstreamer) | |
11314 | ("mesa" ,mesa) | |
11315 | ("sdl-union" | |
11316 | ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) | |
11317 | (home-page "http://kivy.org") | |
11318 | (synopsis | |
11319 | "Multitouch application framework") | |
11320 | (description | |
11321 | "A software library for rapid development of | |
11322 | hardware-accelerated multitouch applications.") | |
11323 | (license license:expat))) | |
11324 | ||
11325 | (define-public python2-kivy | |
11326 | (package-with-python2 python-kivy)) | |
11327 | ||
11328 | (define-public python-kivy-next | |
11329 | (deprecated-package "python-kivy-next" python-kivy)) | |
11330 | ||
11331 | (define-public python2-kivy-next | |
11332 | (deprecated-package "python2-kivy-next" python2-kivy)) | |
11333 | ||
11334 | (define-public python-binaryornot | |
11335 | (package | |
11336 | (name "python-binaryornot") | |
11337 | (version "0.4.4") | |
11338 | (source (origin | |
11339 | (method url-fetch) | |
11340 | (uri (pypi-uri "binaryornot" version)) | |
11341 | (sha256 | |
11342 | (base32 | |
11343 | "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m")))) | |
11344 | (build-system python-build-system) | |
86723f98 DM |
11345 | (arguments |
11346 | `(#:phases | |
11347 | (modify-phases %standard-phases | |
ee623903 | 11348 | (add-after 'unpack 'patch-tests |
86723f98 DM |
11349 | (lambda _ |
11350 | ;; TypeError: binary() got an unexpected keyword argument | |
11351 | ;; 'average_size'. | |
11352 | (substitute* "tests/test_check.py" | |
11353 | (("average_size=512") "")) | |
11354 | #t))))) | |
44d10b1f RW |
11355 | (propagated-inputs |
11356 | `(("python-chardet" ,python-chardet) | |
11357 | ("python-hypothesis" ,python-hypothesis))) | |
11358 | (home-page "https://github.com/audreyr/binaryornot") | |
11359 | (synopsis "Package to check if a file is binary or text") | |
11360 | (description "Ultra-lightweight pure Python package to check if a file is | |
11361 | binary or text.") | |
11362 | (license license:bsd-3) | |
11363 | (properties `((python2-variant . ,(delay python2-binaryornot)))))) | |
11364 | ||
11365 | (define-public python2-binaryornot | |
11366 | (let ((base (package-with-python2 (strip-python2-variant python-binaryornot)))) | |
11367 | (package (inherit base) | |
11368 | (propagated-inputs | |
11369 | `(("python2-enum34" ,python2-enum34) | |
11370 | ,@(package-propagated-inputs base)))))) | |
11371 | ||
f315673d | 11372 | (define-public python-binwalk |
9b9ab657 JK |
11373 | (package |
11374 | (name "python-binwalk") | |
11375 | (version "2.2.0") | |
11376 | (source | |
11377 | (origin | |
11378 | (method git-fetch) | |
11379 | (uri (git-reference | |
11380 | (url "https://github.com/ReFirmLabs/binwalk") | |
11381 | (commit (string-append "v" version)))) | |
11382 | (file-name (git-file-name name version)) | |
11383 | (sha256 | |
11384 | (base32 | |
11385 | "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc")))) | |
11386 | (build-system python-build-system) | |
11387 | (arguments | |
11388 | `(#:phases | |
11389 | (modify-phases %standard-phases | |
11390 | (add-before 'check 'set-pythonpath | |
11391 | (lambda _ | |
11392 | (setenv "PYTHONPATH" | |
11393 | (string-append | |
11394 | (getcwd) "/src/" | |
11395 | ":" (getenv "PYTHONPATH"))) | |
11396 | (setenv "HOME" "") | |
11397 | #t))))) | |
11398 | (native-inputs | |
11399 | `(("python-coverage" ,python-coverage) | |
11400 | ("python-nose" ,python-nose))) | |
11401 | (home-page "https://github.com/ReFirmLabs/binwalk") | |
11402 | (synopsis "Firmware analysis tool") | |
11403 | (description "Binwalk is a tool for analyzing, reverse engineering, and | |
11404 | extracting firmware images") | |
11405 | (license license:expat))) | |
f315673d | 11406 | |
44d10b1f RW |
11407 | (define-public python-nltk |
11408 | (package | |
11409 | (name "python-nltk") | |
11410 | (version "3.2.1") | |
11411 | (source (origin | |
11412 | (method url-fetch) | |
11413 | (uri (pypi-uri "nltk" version)) | |
11414 | (sha256 | |
11415 | (base32 | |
11416 | "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym")))) | |
11417 | (build-system python-build-system) | |
11418 | (arguments | |
11419 | '(;; The tests require some extra resources to be downloaded. | |
11420 | ;; TODO Try packaging these resources. | |
11421 | #:tests? #f)) | |
11422 | (home-page "http://nltk.org/") | |
11423 | (synopsis "Natural Language Toolkit") | |
11424 | (description "It provides interfaces to over 50 corpora and lexical | |
11425 | resources such as WordNet, along with a suite of text processing libraries | |
11426 | for classification, tokenization, stemming, tagging, parsing, and semantic | |
11427 | reasoning, wrappers for natural language processing libraries.") | |
11428 | (license license:asl2.0))) | |
11429 | ||
11430 | (define-public python2-nltk | |
11431 | (package-with-python2 python-nltk)) | |
11432 | ||
11433 | (define-public python-pymongo | |
11434 | (package | |
11435 | (name "python-pymongo") | |
11436 | (version "3.7.2") | |
11437 | (source (origin | |
11438 | (method url-fetch) | |
11439 | (uri (pypi-uri "pymongo" version)) | |
11440 | (sha256 | |
11441 | (base32 | |
11442 | "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c")))) | |
11443 | (build-system python-build-system) | |
11444 | (propagated-inputs | |
11445 | `(("python-certifi" ,python-certifi))) | |
11446 | (home-page "https://github.com/mongodb/mongo-python-driver") | |
11447 | (synopsis "Python driver for MongoDB") | |
11448 | (description "Python driver for MongoDB.") | |
11449 | (license license:asl2.0))) | |
11450 | ||
11451 | (define-public python2-pymongo | |
11452 | (package-with-python2 python-pymongo)) | |
11453 | ||
44d10b1f RW |
11454 | (define-public python-consul |
11455 | (package | |
11456 | (name "python-consul") | |
11457 | (version "0.6.1") | |
11458 | (source | |
11459 | (origin | |
11460 | (method url-fetch) | |
11461 | (uri (pypi-uri "python-consul" version)) | |
11462 | (sha256 | |
11463 | (base32 | |
11464 | "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8")))) | |
11465 | (build-system python-build-system) | |
11466 | (arguments | |
11467 | '(#:tests? #f)) ; The tests are not distributed | |
11468 | (propagated-inputs | |
11469 | `(("python-requests" ,python-requests) | |
11470 | ("python-six" ,python-six))) | |
11471 | (home-page "https://github.com/cablehead/python-consul") | |
11472 | (synopsis "Python client for Consul") | |
11473 | (description | |
11474 | "Python client for @url{http://www.consul.io/,Consul}, a tool for service | |
11475 | discovery, monitoring and configuration.") | |
11476 | (license license:expat))) | |
11477 | ||
11478 | (define-public python2-consul | |
11479 | (package-with-python2 python-consul)) | |
11480 | ||
11481 | (define-public python-schematics | |
11482 | (package | |
11483 | (name "python-schematics") | |
11484 | (version "1.1.1") | |
11485 | (source | |
1961d187 TGR |
11486 | (origin |
11487 | (method git-fetch) | |
11488 | (uri (git-reference | |
11489 | (url "https://github.com/schematics/schematics.git") | |
11490 | (commit (string-append "v" version)))) | |
11491 | (file-name (git-file-name name version)) | |
11492 | (sha256 | |
11493 | (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd")))) | |
44d10b1f RW |
11494 | (build-system python-build-system) |
11495 | (propagated-inputs | |
11496 | `(("python-six" ,python-six))) | |
11497 | (arguments | |
1961d187 TGR |
11498 | ;; The tests require a bunch of not very nice packages with fixed |
11499 | ;; version requirements (e.g. python-coveralls). | |
11500 | `(#:tests? #f)) | |
44d10b1f RW |
11501 | (home-page "https://github.com/schematics/schematics") |
11502 | (synopsis "Python Data Structures for Humans") | |
11503 | (description "Python Data Structures for Humans.") | |
11504 | (license license:bsd-3))) | |
11505 | ||
11506 | (define-public python2-schematics | |
11507 | (package-with-python2 python-schematics)) | |
11508 | ||
11509 | (define-public python-odfpy | |
11510 | (package | |
11511 | (name "python-odfpy") | |
11512 | (version "1.3.3") | |
11513 | (source (origin | |
11514 | (method url-fetch) | |
11515 | (uri (pypi-uri "odfpy" version)) | |
11516 | (sha256 | |
11517 | (base32 | |
11518 | "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw")))) | |
11519 | (arguments | |
11520 | `(#:modules ((srfi srfi-1) | |
11521 | (guix build python-build-system) | |
11522 | (guix build utils)) | |
11523 | #:phases | |
11524 | (modify-phases %standard-phases | |
11525 | (replace 'check | |
11526 | ;; The test runner invokes python2 and python3 for test*.py. | |
11527 | ;; To avoid having both in inputs, we replicate it here. | |
11528 | (lambda _ | |
21ccc01d RW |
11529 | (for-each (lambda (test-file) (invoke "python" test-file)) |
11530 | (find-files "tests" "^test.*\\.py$")) | |
11531 | #t))))) | |
44d10b1f RW |
11532 | (build-system python-build-system) |
11533 | (home-page "https://github.com/eea/odfpy") | |
11534 | (synopsis "Python API and tools to manipulate OpenDocument files") | |
11535 | (description "Collection of libraries and utility programs written in | |
11536 | Python to manipulate OpenDocument 1.2 files.") | |
11537 | (license | |
11538 | ;; The software is mainly dual GPL2+ and ASL2.0, but includes a | |
11539 | ;; number of files with other licenses. | |
11540 | (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0)))) | |
11541 | ||
11542 | (define-public python2-odfpy | |
11543 | (package-with-python2 python-odfpy)) | |
11544 | ||
11545 | (define-public python-natsort | |
11546 | (package | |
11547 | (name "python-natsort") | |
11548 | (version "5.4.1") | |
11549 | (source (origin | |
11550 | (method url-fetch) | |
11551 | (uri (pypi-uri "natsort" version)) | |
11552 | (sha256 | |
11553 | (base32 | |
11554 | "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf")))) | |
11555 | (build-system python-build-system) | |
11556 | (arguments | |
11557 | `(#:modules ((guix build utils) | |
11558 | (guix build python-build-system) | |
11559 | (srfi srfi-1) | |
11560 | (srfi srfi-26) | |
11561 | (ice-9 ftw)) | |
11562 | #:phases | |
11563 | (modify-phases %standard-phases | |
11564 | (add-before 'check 'set-cachedir | |
11565 | ;; Tests require write access to $HOME by default | |
11566 | (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)) | |
11567 | (replace 'check | |
11568 | (lambda _ | |
11569 | (let ((cwd (getcwd))) | |
11570 | (setenv "PYTHONPATH" | |
11571 | (string-append | |
11572 | cwd "/build/" | |
11573 | (find (cut string-prefix? "lib" <>) | |
11574 | (scandir (string-append cwd "/build"))) | |
11575 | ":" | |
11576 | (getenv "PYTHONPATH"))) | |
11577 | (invoke "pytest" "-v"))))))) | |
11578 | (native-inputs | |
11579 | `(("python-hypothesis" ,python-hypothesis) | |
11580 | ("python-pytest-cov" ,python-pytest-cov) | |
11581 | ("python-pytest-mock" ,python-pytest-mock) | |
11582 | ("python-pytest" ,python-pytest))) | |
11583 | (propagated-inputs ; TODO: Add python-fastnumbers. | |
11584 | `(("python-pyicu" ,python-pyicu))) | |
11585 | (home-page "https://github.com/SethMMorton/natsort") | |
11586 | (synopsis "Natural sorting for python and shell") | |
11587 | (description | |
11588 | "Natsort lets you apply natural sorting on lists instead of | |
11589 | lexicographical. If you use the built-in @code{sorted} method in python | |
36a4366d EF |
11590 | on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4}, |
11591 | @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20}, | |
11592 | @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that | |
11593 | identifies numbers and sorts them separately from strings. It can also sort | |
11594 | version numbers, real numbers, mixed types and more, and comes with a shell | |
11595 | command @command{natsort} that exposes this functionality in the command line.") | |
44d10b1f RW |
11596 | (license license:expat) |
11597 | (properties `((python2-variant . ,(delay python2-natsort)))))) | |
11598 | ||
11599 | (define-public python2-natsort | |
11600 | (let ((base (package-with-python2 (strip-python2-variant python-natsort)))) | |
11601 | (package (inherit base) | |
11602 | (native-inputs | |
11603 | `(("python2-pathlib" ,python2-pathlib) | |
11604 | ,@(package-native-inputs base)))))) | |
11605 | ||
11606 | (define-public python-glances | |
11607 | (package | |
11608 | (name "python-glances") | |
a4ac25df | 11609 | (version "3.1.2") |
44d10b1f RW |
11610 | (source |
11611 | (origin | |
11612 | (method url-fetch) | |
11613 | (uri (pypi-uri "Glances" version)) | |
11614 | (sha256 | |
a4ac25df | 11615 | (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk")) |
15b4c911 TGR |
11616 | (modules '((guix build utils))) |
11617 | (snippet | |
11618 | '(begin | |
11619 | ;; Glances phones PyPI for weekly update checks by default. | |
11620 | ;; Disable these. The user can re-enable them if desired. | |
11621 | (substitute* "glances/outdated.py" | |
11622 | (("^(.*)self\\.load_config\\(config\\)\n" line indentation) | |
11623 | (string-append indentation | |
11624 | "self.args.disable_check_update = True\n" | |
11625 | line))) | |
11626 | #t)))) | |
44d10b1f RW |
11627 | (build-system python-build-system) |
11628 | (propagated-inputs | |
9898a2d3 TGR |
11629 | `(("python-future" ,python-future) |
11630 | ("python-psutil" ,python-psutil))) | |
a4ac25df | 11631 | (home-page "https://github.com/nicolargo/glances") |
bab94ffa | 11632 | (synopsis "Cross-platform curses-based monitoring tool") |
44d10b1f RW |
11633 | (description |
11634 | "Glances is a curses-based monitoring tool for a wide variety of platforms. | |
bab94ffa TGR |
11635 | Glances uses the PsUtil library to get information from your system. It |
11636 | monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.") | |
44d10b1f RW |
11637 | (license license:lgpl3+))) |
11638 | ||
11639 | (define-public python2-glances | |
11640 | (package-with-python2 python-glances)) | |
11641 | ||
11642 | (define-public python-graphql-core | |
11643 | (package | |
11644 | (name "python-graphql-core") | |
11645 | (version "0.5.3") | |
11646 | (source | |
11647 | (origin | |
11648 | (method url-fetch) | |
11649 | (uri (pypi-uri "graphql-core" version)) | |
11650 | (sha256 | |
11651 | (base32 | |
11652 | "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0")))) | |
11653 | (build-system python-build-system) | |
11654 | (arguments | |
11655 | `(#:tests? #f ; Tests require the unpackaged pytest-benchmark. | |
11656 | #:phases | |
11657 | (modify-phases %standard-phases | |
11658 | (add-after 'unpack 'patch-hardcoded-version | |
11659 | (lambda _ (substitute* | |
11660 | "setup.py" | |
11661 | (("'gevent==1.1rc1'") "'gevent'")) | |
11662 | #t))))) | |
11663 | (native-inputs | |
11664 | `(("python-gevent" ,python-gevent) | |
11665 | ("python-mock" ,python-mock) | |
11666 | ("python-pytest-mock" ,python-pytest-mock))) | |
11667 | (propagated-inputs | |
11668 | `(("python-promise" ,python-promise) | |
11669 | ("python-six" ,python-six))) | |
11670 | (home-page "https://github.com/graphql-python/graphql-core") | |
11671 | (synopsis "GraphQL implementation for Python") | |
11672 | (description | |
11673 | "GraphQL implementation for Python. GraphQL is a data query language and | |
11674 | runtime designed and used to request and deliver data to mobile and web apps. | |
11675 | This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js} | |
11676 | to Python.") | |
11677 | (license license:expat))) | |
11678 | ||
11679 | (define-public python2-graphql-core | |
11680 | (package-with-python2 python-graphql-core)) | |
11681 | ||
11682 | (define-public python-graphql-relay | |
11683 | (package | |
11684 | (name "python-graphql-relay") | |
11685 | (version "0.4.5") | |
11686 | (source | |
11687 | (origin | |
11688 | (method url-fetch) | |
11689 | (uri (pypi-uri "graphql-relay" version)) | |
11690 | (sha256 | |
11691 | (base32 | |
11692 | "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7")))) | |
11693 | (build-system python-build-system) | |
11694 | (arguments | |
11695 | '(#:tests? #f)) ; The tests are not distributed | |
11696 | (propagated-inputs | |
11697 | `(("python-graphql-core" ,python-graphql-core) | |
11698 | ("python-promise" ,python-promise) | |
11699 | ("python-six" ,python-six))) | |
11700 | (home-page "https://github.com/graphql-python/graphql-relay-py") | |
11701 | (synopsis "Relay implementation for Python") | |
11702 | (description | |
11703 | "This is a library to allow the easy creation of Relay-compliant servers | |
11704 | using the GraphQL Python reference implementation of a GraphQL server. It | |
11705 | should be noted that the code is a exact port of the original | |
11706 | @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation} | |
11707 | from Facebook.") | |
11708 | (license license:expat))) | |
11709 | ||
11710 | (define-public python2-graphql-relay | |
11711 | (package-with-python2 python-graphql-relay)) | |
11712 | ||
11713 | (define-public python-graphene | |
11714 | (package | |
11715 | (name "python-graphene") | |
11716 | (version "0.10.2") | |
11717 | (source | |
11718 | (origin | |
11719 | (method url-fetch) | |
11720 | (uri (pypi-uri "graphene" version)) | |
11721 | (sha256 | |
11722 | (base32 | |
11723 | "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q")))) | |
11724 | (build-system python-build-system) | |
11725 | (propagated-inputs | |
11726 | `(("python-graphql-core" ,python-graphql-core) | |
11727 | ("python-graphql-relay" ,python-graphql-relay) | |
11728 | ("python-iso8601" ,python-iso8601) | |
11729 | ("python-promise" ,python-promise) | |
11730 | ("python-six" ,python-six))) | |
11731 | (arguments | |
11732 | `(#:tests? #f)) ; no tests/ in the PyPI tarball | |
3dd74c8d | 11733 | (home-page "https://graphene-python.org/") |
44d10b1f RW |
11734 | (synopsis "GraphQL Framework for Python") |
11735 | (description | |
11736 | "Graphene is a Python library for building GraphQL schemas/types. | |
11737 | A GraphQL schema describes your data model, and provides a GraphQL server | |
11738 | with an associated set of resolve methods that know how to fetch data.") | |
11739 | (properties `((python2-variant . ,(delay python2-graphene)))) | |
11740 | (license license:expat))) | |
11741 | ||
11742 | (define-public python2-graphene | |
11743 | (let ((base (package-with-python2 | |
11744 | (strip-python2-variant python-graphene)))) | |
11745 | (package (inherit base) | |
11746 | (native-inputs | |
11747 | `(("python2-sqlalchemy" ,python2-sqlalchemy) | |
11748 | ,@(package-native-inputs base)))))) | |
11749 | ||
11750 | (define-public python-nautilus | |
11751 | (package | |
11752 | (name "python-nautilus") | |
11753 | (version "0.4.9") | |
11754 | (source | |
11755 | (origin | |
11756 | (method url-fetch) | |
11757 | (uri (pypi-uri "nautilus" version)) | |
11758 | (sha256 | |
11759 | (base32 | |
11760 | "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p")))) | |
11761 | (build-system python-build-system) | |
11762 | (arguments `(#:tests? #f)) ; fails to import test modules | |
11763 | (propagated-inputs | |
11764 | `(("python-bcrypt" ,python-bcrypt) | |
11765 | ("python-click" ,python-click) | |
11766 | ("python-consul" ,python-consul) | |
11767 | ("python-graphene" ,python-graphene) | |
11768 | ("python-jinja2" ,python-jinja2) | |
11769 | ("python-peewee" ,python-peewee) | |
11770 | ("python-pika" ,python-pika) | |
11771 | ("python-tornado" ,python-tornado) | |
11772 | ("python-wtforms" ,python-wtforms))) | |
11773 | (native-inputs | |
11774 | `(("python-nose2" ,python-nose2))) | |
11775 | (home-page "https://github.com/AlecAivazis/nautilus") | |
11776 | (synopsis "Library for creating microservice applications") | |
11777 | (description | |
11778 | "Nautilus is a framework for flux based microservices that looks to | |
11779 | provide extendible implementations of common aspects of a cloud so that you can | |
11780 | focus on building massively scalable web applications.") | |
11781 | (license license:expat))) | |
11782 | ||
11783 | (define-public python-snowballstemmer | |
11784 | (package | |
11785 | (name "python-snowballstemmer") | |
11786 | (version "1.2.1") | |
11787 | (source (origin | |
11788 | (method url-fetch) | |
11789 | (uri (pypi-uri "snowballstemmer" version)) | |
11790 | (sha256 | |
11791 | (base32 | |
11792 | "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi")))) | |
11793 | (build-system python-build-system) | |
11794 | (arguments | |
11795 | `(;; No tests exist | |
11796 | #:tests? #f)) | |
11797 | (home-page "https://github.com/shibukawa/snowball_py") | |
11798 | (synopsis "Snowball stemming library collection for Python") | |
11799 | (description "This package provides 16 word stemmer algorithms generated | |
11800 | from Snowball algorithms. It includes the 15 original ones plus the Poerter | |
11801 | English stemmer.") | |
11802 | (license license:bsd-3))) | |
11803 | ||
11804 | (define-public python2-snowballstemmer | |
11805 | (package-with-python2 python-snowballstemmer)) | |
11806 | ||
44d10b1f RW |
11807 | (define-public python-setproctitle |
11808 | (package | |
11809 | (name "python-setproctitle") | |
11810 | (version "1.1.10") | |
11811 | (source | |
11812 | (origin | |
11813 | (method url-fetch) | |
11814 | (uri (pypi-uri "setproctitle" version)) | |
11815 | (sha256 | |
11816 | (base32 | |
11817 | "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2")))) | |
11818 | (build-system python-build-system) | |
11819 | (arguments | |
11820 | '(#:phases | |
11821 | (modify-phases %standard-phases | |
11822 | (add-before 'check 'patch-Makefile | |
11823 | ;; Stricly this is only required for the python2 variant. | |
11824 | ;; But adding a phase in an inherited package seems to be | |
11825 | ;; cumbersum. So we patch even for python3. | |
11826 | (lambda _ | |
11827 | (let ((nose (assoc-ref %build-inputs "python2-nose"))) | |
11828 | (when nose | |
11829 | (substitute* "Makefile" | |
11830 | (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ") | |
11831 | (string-append nose "/bin/nosetests ")))) | |
11832 | #t))) | |
11833 | (replace 'check | |
11834 | (lambda _ | |
11835 | (setenv "PYTHON" (or (which "python3") (which "python"))) | |
11836 | (setenv "PYCONFIG" (or (which "python3-config") | |
11837 | (which "python-config"))) | |
11838 | (setenv "CC" "gcc") | |
11839 | ;; No need to extend PYTHONPATH to find the built package, since | |
11840 | ;; the Makefile will build anyway | |
11841 | (invoke "make" "check")))))) | |
11842 | (native-inputs | |
11843 | `(("procps" ,procps))) ; required for tests | |
11844 | (home-page | |
11845 | "https://github.com/dvarrazzo/py-setproctitle") | |
11846 | (synopsis | |
11847 | "Setproctitle implementation for Python to customize the process title") | |
11848 | (description "The library allows a process to change its title (as displayed | |
11849 | by system tools such as ps and top). | |
11850 | ||
11851 | Changing the title is mostly useful in multi-process systems, for | |
11852 | example when a master process is forked: changing the children's title | |
11853 | allows to identify the task each process is busy with. The technique | |
11854 | is used by PostgreSQL and the OpenSSH Server for example.") | |
11855 | (license license:bsd-3) | |
11856 | (properties `((python2-variant . ,(delay python2-setproctitle)))))) | |
11857 | ||
11858 | (define-public python2-setproctitle | |
11859 | (let ((base (package-with-python2 | |
11860 | (strip-python2-variant python-setproctitle)))) | |
11861 | (package | |
11862 | (inherit base) | |
11863 | (native-inputs `(("python2-nose" ,python2-nose) | |
11864 | ,@(package-native-inputs base)))))) | |
11865 | ||
11866 | (define-public python-validictory | |
11867 | (package | |
11868 | (name "python-validictory") | |
11869 | (version "1.0.1") | |
11870 | (source | |
11871 | (origin | |
11872 | (method url-fetch) | |
11873 | (uri (pypi-uri "validictory" version)) | |
11874 | (sha256 | |
11875 | (base32 | |
11876 | "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q")))) | |
11877 | (build-system python-build-system) | |
11878 | (arguments | |
11879 | '(#:phases | |
11880 | (modify-phases %standard-phases | |
11881 | (add-after 'unpack 'bootstrap | |
11882 | ;; Move the tests out of the package directory to avoid | |
11883 | ;; packaging them. | |
11884 | (lambda* _ | |
11885 | (rename-file "validictory/tests" "tests") | |
11886 | (delete-file "tests/__init__.py"))) | |
11887 | (replace 'check | |
11888 | (lambda _ | |
11889 | ;; Extend PYTHONPATH so the built package will be found. | |
11890 | (setenv "PYTHONPATH" | |
11891 | (string-append (getcwd) "/build/lib:" | |
11892 | (getenv "PYTHONPATH"))) | |
6568bd5d | 11893 | (invoke "py.test" "-vv" )))))) |
44d10b1f RW |
11894 | (native-inputs |
11895 | `(("python-pytest" ,python-pytest))) | |
11896 | (home-page | |
11897 | "https://github.com/jamesturk/validictory") | |
11898 | (synopsis "General purpose Python data validator") | |
11899 | (description "It allows validation of arbitrary Python data structures. | |
11900 | ||
11901 | The schema format is based on the JSON Schema | |
11902 | proposal (http://json-schema.org), so combined with json the library is also | |
11903 | useful as a validator for JSON data.") | |
11904 | (license license:expat))) | |
11905 | ||
11906 | (define-public python2-validictory | |
11907 | (package-with-python2 python-validictory)) | |
11908 | ||
11909 | (define-public python-pyelftools | |
11910 | (package | |
11911 | (name "python-pyelftools") | |
11912 | (version "0.25") | |
11913 | (source | |
11914 | (origin | |
11915 | (method url-fetch) | |
11916 | (uri (pypi-uri "pyelftools" version)) | |
11917 | (sha256 | |
11918 | (base32 | |
11919 | "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9")))) | |
11920 | (build-system python-build-system) | |
11921 | (arguments | |
11922 | `(#:phases | |
11923 | (modify-phases %standard-phases | |
11924 | (add-before 'check 'set-pythonpath | |
11925 | (lambda _ | |
11926 | (setenv "PYTHONPATH" | |
11927 | (string-append | |
11928 | (getcwd) "/test/" | |
11929 | ":" (getenv "PYTHONPATH"))) | |
11930 | #t))))) | |
11931 | (home-page | |
11932 | "https://github.com/eliben/pyelftools") | |
11933 | (synopsis | |
11934 | "Analyze binary and library file information") | |
11935 | (description "This Python library provides interfaces for parsing and | |
11936 | analyzing two binary and library file formats; the Executable and Linking | |
11937 | Format (ELF), and debugging information in the Debugging With Attributed | |
11938 | Record Format (DWARF).") | |
11939 | (license license:public-domain))) | |
11940 | ||
11941 | (define-public python-pyev | |
11942 | (package | |
11943 | (name "python-pyev") | |
11944 | (version "0.9.0") | |
11945 | (source | |
11946 | (origin | |
11947 | (method url-fetch) | |
11948 | (uri (pypi-uri "pyev" version)) | |
11949 | (sha256 | |
11950 | (base32 | |
11951 | "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx")))) | |
11952 | (build-system python-build-system) | |
11953 | (arguments | |
11954 | `(#:tests? #f ; no test suite | |
11955 | #:phases | |
11956 | (modify-phases %standard-phases | |
11957 | (add-after 'unpack 'patch | |
11958 | (lambda* (#:key inputs #:allow-other-keys) | |
11959 | (let ((libev (string-append (assoc-ref inputs "libev") | |
11960 | "/lib/libev.so.4"))) | |
11961 | (substitute* "setup.py" | |
11962 | (("libev_dll_name = find_library\\(\\\"ev\\\"\\)") | |
11963 | (string-append "libev_dll_name = \"" libev "\""))))))))) | |
11964 | (inputs | |
11965 | `(("libev" ,libev))) | |
11966 | (home-page "http://pythonhosted.org/pyev/") | |
11967 | (synopsis "Python libev interface") | |
11968 | (description "Pyev provides a Python interface to libev.") | |
11969 | (license license:gpl3))) | |
11970 | ||
11971 | (define-public python2-pyev | |
11972 | (package-with-python2 python-pyev)) | |
11973 | ||
11974 | (define-public python-imagesize | |
11975 | (package | |
11976 | (name "python-imagesize") | |
11977 | (version "1.1.0") | |
11978 | (source | |
11979 | (origin | |
11980 | (method url-fetch) | |
11981 | (uri (pypi-uri "imagesize" version)) | |
11982 | (sha256 | |
11983 | (base32 | |
11984 | "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk")))) | |
11985 | (build-system python-build-system) | |
11986 | (home-page "https://github.com/shibukawa/imagesize_py") | |
11987 | (synopsis "Gets image size of files in various formats in Python") | |
11988 | (description | |
11989 | "This package allows determination of image size from | |
11990 | PNG, JPEG, JPEG2000 and GIF files in pure Python.") | |
11991 | (license license:expat))) | |
11992 | ||
11993 | (define-public python2-imagesize | |
11994 | (package-with-python2 python-imagesize)) | |
11995 | ||
11996 | (define-public python-termstyle | |
11997 | (package | |
11998 | (name "python-termstyle") | |
11999 | (version "0.1.11") | |
12000 | (source | |
12001 | (origin | |
12002 | (method url-fetch) | |
12003 | (uri (pypi-uri "termstyle" version)) | |
12004 | (sha256 | |
12005 | (base32 | |
12006 | "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g")))) | |
12007 | (build-system python-build-system) | |
12008 | (arguments | |
12009 | '(#:phases | |
12010 | (modify-phases %standard-phases | |
12011 | (replace 'check | |
12012 | (lambda _ | |
831080a6 | 12013 | (invoke "python" "test3.py")))))) |
44d10b1f RW |
12014 | (home-page "https://github.com/gfxmonk/termstyle") |
12015 | (synopsis "Console text coloring for Python") | |
12016 | (description "This package provides console text coloring for Python.") | |
12017 | (license license:bsd-3))) | |
12018 | ||
12019 | (define-public python-argcomplete | |
12020 | (package | |
12021 | (name "python-argcomplete") | |
98aecd3a | 12022 | (version "1.10.3") |
44d10b1f | 12023 | (source |
98aecd3a RW |
12024 | (origin |
12025 | (method url-fetch) | |
12026 | (uri (pypi-uri "argcomplete" version)) | |
12027 | (sha256 | |
12028 | (base32 | |
12029 | "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3")))) | |
44d10b1f | 12030 | (build-system python-build-system) |
98aecd3a RW |
12031 | (arguments |
12032 | `(#:phases | |
12033 | (modify-phases %standard-phases | |
12034 | (add-after 'unpack 'embed-tool-references | |
12035 | (lambda _ | |
12036 | (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh" | |
12037 | ((" grep") | |
12038 | (string-append " " (which "grep"))) | |
12039 | ((" egrep") | |
12040 | (string-append " " (which "egrep"))) | |
12041 | (("elif which") | |
12042 | (string-append "elif " (which "which"))) | |
12043 | (("\\$\\(which") | |
12044 | (string-append "$(" (which "which")))) | |
12045 | #t))))) | |
12046 | (inputs | |
12047 | `(("grep" ,grep) | |
12048 | ("which" ,which))) | |
44d10b1f | 12049 | (native-inputs |
98aecd3a RW |
12050 | `(("python-coverage" ,python-coverage) |
12051 | ("python-flake8" ,python-flake8) | |
12052 | ("python-pexpect" ,python-pexpect) | |
12053 | ("python-wheel" ,python-wheel) | |
44d10b1f | 12054 | ("tcsh" ,tcsh) |
98aecd3a RW |
12055 | ("fish" ,fish) |
12056 | ("bash-full" ,bash))) ;full Bash for 'test_file_completion' | |
44d10b1f RW |
12057 | (home-page "https://github.com/kislyuk/argcomplete") |
12058 | (synopsis "Shell tab completion for Python argparse") | |
12059 | (description "argcomplete provides extensible command line tab completion | |
12060 | of arguments and options for Python scripts using @code{argparse}. It's | |
12061 | particularly useful for programs with many options or sub-parsers that can | |
12062 | dynamically suggest completions; for example, when browsing resources over the | |
12063 | network.") | |
12064 | (license license:asl2.0))) | |
12065 | ||
12066 | (define-public python2-argcomplete | |
12067 | (package-with-python2 python-argcomplete)) | |
12068 | ||
12069 | (define-public python-xopen | |
12070 | (package | |
12071 | (name "python-xopen") | |
24d64989 | 12072 | (version "0.5.0") |
44d10b1f RW |
12073 | (source |
12074 | (origin | |
12075 | (method url-fetch) | |
12076 | (uri (pypi-uri "xopen" version)) | |
12077 | (sha256 | |
12078 | (base32 | |
24d64989 | 12079 | "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh")))) |
44d10b1f | 12080 | (build-system python-build-system) |
24d64989 RW |
12081 | (propagated-inputs |
12082 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
44d10b1f RW |
12083 | (home-page "https://github.com/marcelm/xopen/") |
12084 | (synopsis "Open compressed files transparently") | |
12085 | (description "This module provides an @code{xopen} function that works like | |
12086 | Python's built-in @code{open} function, but can also deal with compressed files. | |
12087 | Supported compression formats are gzip, bzip2 and, xz, and are automatically | |
12088 | recognized by their file extensions. The focus is on being as efficient as | |
12089 | possible on all supported Python versions.") | |
12090 | (license license:expat))) | |
12091 | ||
12092 | (define-public python2-xopen | |
12093 | (let ((base (package-with-python2 | |
12094 | (strip-python2-variant python-xopen)))) | |
12095 | (package | |
12096 | (inherit base) | |
12097 | (propagated-inputs `(("python2-bz2file" ,python2-bz2file) | |
12098 | ,@(package-propagated-inputs base)))))) | |
12099 | ||
12100 | (define-public python-cheetah | |
12101 | (package | |
12102 | (name "python-cheetah") | |
12103 | (version "3.1.0") | |
12104 | (source | |
12105 | (origin | |
12106 | (method url-fetch) | |
12107 | (uri (pypi-uri "Cheetah3" version)) | |
12108 | (sha256 | |
12109 | (base32 | |
12110 | "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9")))) | |
12111 | (build-system python-build-system) | |
12112 | (arguments | |
12113 | `(#:modules ((guix build utils) | |
12114 | (guix build python-build-system) | |
12115 | (ice-9 ftw) | |
12116 | (srfi srfi-1) | |
12117 | (srfi srfi-26)) | |
12118 | #:phases (modify-phases %standard-phases | |
12119 | (add-after 'unpack 'use-absolute-python | |
12120 | (lambda _ | |
12121 | (substitute* "Cheetah/CheetahWrapper.py" | |
12122 | (("#!/usr/bin/env python") | |
12123 | (string-append "#!" (which "python")))) | |
12124 | #t)) | |
12125 | (replace 'check | |
12126 | (lambda _ | |
12127 | (let ((cwd (getcwd))) | |
12128 | (setenv "PYTHONPATH" | |
12129 | (string-append | |
12130 | cwd "/build/" | |
12131 | (find (cut string-prefix? "lib" <>) | |
12132 | (scandir (string-append cwd "/build"))) | |
12133 | ":" (getenv "PYTHONPATH"))) | |
12134 | (setenv "PATH" | |
12135 | (string-append (getenv "PATH") | |
12136 | ":" cwd "/bin")) | |
12137 | (setenv "TMPDIR" "/tmp") | |
12138 | ||
12139 | (substitute* "Cheetah/Tests/Test.py" | |
12140 | (("unittest.TextTestRunner\\(\\)") | |
12141 | "unittest.TextTestRunner(verbosity=2)")) | |
12142 | ||
12143 | (invoke "python" "Cheetah/Tests/Test.py"))))))) | |
12144 | (propagated-inputs | |
12145 | `(("python-markdown" ,python-markdown))) ;optional | |
12146 | (home-page "http://cheetahtemplate.org/") | |
12147 | (synopsis "Template engine") | |
12148 | (description "Cheetah is a text-based template engine and Python code | |
12149 | generator. | |
12150 | ||
12151 | Cheetah can be used as a standalone templating utility or referenced as | |
12152 | a library from other Python applications. It has many potential uses, | |
12153 | but web developers looking for a viable alternative to ASP, JSP, PHP and | |
12154 | PSP are expected to be its principle user group. | |
12155 | ||
12156 | Features: | |
12157 | @enumerate | |
12158 | @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other | |
12159 | text-based format. | |
12160 | @item Cleanly separates content, graphic design, and program code. | |
12161 | @item Blends the power and flexibility of Python with a simple template language | |
12162 | that non-programmers can understand. | |
12163 | @item Gives template writers full access to any Python data structure, module, | |
12164 | function, object, or method in their templates. | |
12165 | @item Makes code reuse easy by providing an object-orientated interface to | |
12166 | templates that is accessible from Python code or other Cheetah templates. | |
12167 | One template can subclass another and selectively reimplement sections of it. | |
12168 | @item Provides a simple, yet powerful, caching mechanism that can dramatically | |
12169 | improve the performance of a dynamic website. | |
12170 | @item Compiles templates into optimized, yet readable, Python code. | |
12171 | @end enumerate") | |
12172 | (license (license:x11-style "file://LICENSE")))) | |
12173 | ||
12174 | (define-public python2-cheetah | |
12175 | (package-with-python2 python-cheetah)) | |
12176 | ||
12177 | (define-public python-dulwich | |
12178 | (package | |
12179 | (name "python-dulwich") | |
12180 | (version "0.18.6") | |
12181 | (source | |
12182 | (origin | |
12183 | (method url-fetch) | |
12184 | (uri (list (string-append "https://www.dulwich.io/releases/" | |
12185 | "dulwich-" version ".tar.gz") | |
12186 | (pypi-uri "dulwich" version))) | |
12187 | (sha256 | |
12188 | (base32 | |
12189 | "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q")))) | |
12190 | (build-system python-build-system) | |
12191 | (arguments | |
12192 | `(#:phases | |
12193 | (modify-phases %standard-phases | |
12194 | (add-before 'check 'fix-tests | |
12195 | (lambda* (#:key inputs #:allow-other-keys) | |
12196 | ;; The tests use Popen with a custom environment which doesn't | |
12197 | ;; include PATH. | |
12198 | (substitute* "dulwich/tests/compat/utils.py" | |
12199 | (("'git'") (string-append "'" | |
12200 | (which "git") | |
12201 | "'"))) | |
12202 | (substitute* '("dulwich/tests/test_repository.py" | |
12203 | "dulwich/tests/test_hooks.py") | |
12204 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
12205 | (setenv "TEST_RUNNER" "unittest") | |
12206 | (setenv "PYTHONHASHSEED" "random") | |
12207 | #t))))) | |
12208 | (propagated-inputs | |
12209 | `(("python-fastimport" ,python-fastimport))) | |
12210 | (native-inputs | |
12211 | `(("python-mock" ,python-mock) | |
12212 | ("python-geventhttpclient" ,python-geventhttpclient) | |
12213 | ("git" ,git))) | |
12214 | (home-page "https://www.dulwich.io/") | |
12215 | (synopsis "Git implementation in Python") | |
12216 | (description "Dulwich is an implementation of the Git file formats and | |
12217 | protocols written in pure Python.") | |
12218 | ;; Can be used with either license. | |
12219 | (license (list license:asl2.0 license:gpl2+)))) | |
12220 | ||
12221 | (define-public python2-dulwich | |
12222 | (package-with-python2 python-dulwich)) | |
12223 | ||
12224 | (define-public python-pbkdf2 | |
12225 | (package | |
12226 | (name "python-pbkdf2") | |
12227 | (version "1.3") | |
12228 | (source | |
12229 | (origin | |
12230 | (method url-fetch) | |
12231 | (uri (pypi-uri "pbkdf2" version)) | |
12232 | (sha256 | |
12233 | (base32 | |
12234 | "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc")))) | |
12235 | (build-system python-build-system) | |
12236 | (arguments | |
12237 | '(#:phases | |
12238 | (modify-phases %standard-phases | |
12239 | (replace 'check | |
12240 | (lambda _ | |
12241 | (setenv "PYTHONPATH" | |
12242 | (string-append (getcwd) "/build/lib:" | |
12243 | (getenv "PYTHONPATH"))) | |
ee2bb944 | 12244 | (invoke "python" "test/test_pbkdf2.py")))))) |
44d10b1f RW |
12245 | (propagated-inputs |
12246 | `(("python-pycrypto" ,python-pycrypto))) ; optional | |
12247 | (home-page "https://www.dlitz.net/software/python-pbkdf2/") | |
12248 | (synopsis "Password-based key derivation") | |
12249 | (description "This module implements the password-based key derivation | |
12250 | function, PBKDF2, specified in RSA PKCS#5 v2.0. | |
12251 | ||
12252 | PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which | |
12253 | is part of the RSA Public Key Cryptography Standards series. The provided | |
12254 | implementation takes a password or a passphrase and a salt value (and | |
12255 | optionally a iteration count, a digest module, and a MAC module) and provides | |
12256 | a file-like object from which an arbitrarly-sized key can be read.") | |
12257 | (license license:expat))) | |
12258 | ||
12259 | (define-public python2-pbkdf2 | |
12260 | (package-with-python2 python-pbkdf2)) | |
12261 | ||
12262 | (define-public python-qrcode | |
12263 | (package | |
12264 | (name "python-qrcode") | |
217ea1a1 | 12265 | (version "6.1") |
44d10b1f RW |
12266 | (source |
12267 | (origin | |
12268 | (method url-fetch) | |
12269 | (uri (pypi-uri "qrcode" version)) | |
12270 | (sha256 | |
217ea1a1 | 12271 | (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh")))) |
44d10b1f RW |
12272 | (build-system python-build-system) |
12273 | (arguments | |
12274 | ;; FIXME: Tests require packaging 'pymaging'. | |
12275 | '(#:tests? #f)) | |
12276 | (propagated-inputs | |
12277 | `(("python-lxml" ,python-lxml) ; for SVG output | |
12278 | ("python-pillow" ,python-pillow) ; for PNG output | |
12279 | ("python-six" ,python-six))) | |
44d10b1f RW |
12280 | (home-page "https://github.com/lincolnloop/python-qrcode") |
12281 | (synopsis "QR Code image generator") | |
12282 | (description "This package provides a pure Python QR Code generator | |
12283 | module. It uses the Python Imaging Library (PIL) to allow for the generation | |
12284 | of QR Codes. | |
12285 | ||
12286 | In addition this package provides a command line tool to generate QR codes and | |
12287 | either write these QR codes to a file or do the output as ascii art at the | |
12288 | console.") | |
12289 | (license license:bsd-3))) | |
12290 | ||
12291 | (define-public python2-qrcode | |
12292 | (package-with-python2 python-qrcode)) | |
12293 | ||
12294 | (define-public python-rst2ansi | |
12295 | (package | |
12296 | (name "python-rst2ansi") | |
12297 | (version "0.1.5") | |
12298 | (source | |
12299 | (origin | |
12300 | (method url-fetch) | |
12301 | (uri (pypi-uri "rst2ansi" version)) | |
12302 | (sha256 | |
12303 | (base32 | |
12304 | "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv")))) | |
12305 | (build-system python-build-system) | |
12306 | (propagated-inputs | |
12307 | `(("python-docutils" ,python-docutils))) | |
12308 | (home-page "https://github.com/Snaipe/python-rst-to-ansi") | |
12309 | (synopsis "Convert RST to ANSI-decorated console output") | |
12310 | (description | |
12311 | "Python module dedicated to rendering RST (reStructuredText) documents | |
12312 | to ansi-escaped strings suitable for display in a terminal.") | |
12313 | (license license:expat))) | |
12314 | ||
12315 | (define-public python-ansi2html | |
12316 | (package | |
12317 | (name "python-ansi2html") | |
12318 | (version "1.2.0") | |
12319 | (source | |
12320 | (origin | |
12321 | (method url-fetch) | |
12322 | (uri (pypi-uri "ansi2html" version)) | |
12323 | (sha256 | |
12324 | (base32 | |
12325 | "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y")))) | |
12326 | (build-system python-build-system) | |
12327 | (native-inputs | |
12328 | `(("python-mock" ,python-mock) | |
12329 | ("python-nose" ,python-nose))) | |
12330 | (propagated-inputs | |
12331 | `(("python-six" ,python-six))) | |
12332 | (home-page "https://github.com/ralphbean/ansi2html") | |
12333 | (synopsis "Convert ANSI-decorated console output to HTML") | |
12334 | (description | |
12335 | "@command{ansi2html} is a Python library and command line utility for | |
12336 | convering text with ANSI color codes to HTML or LaTeX.") | |
12337 | (license license:gpl3+))) | |
12338 | ||
12339 | (define-public python2-ansi2html | |
12340 | (package-with-python2 python-ansi2html)) | |
12341 | ||
12342 | (define-public python-ddt | |
12343 | (package | |
12344 | (name "python-ddt") | |
12345 | (version "1.1.3") | |
12346 | (source | |
12347 | (origin | |
12348 | (method url-fetch) | |
12349 | (uri (pypi-uri "ddt" version)) | |
12350 | (sha256 | |
12351 | (base32 | |
12352 | "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk")))) | |
12353 | (build-system python-build-system) | |
12354 | (native-inputs | |
12355 | `(("python-mock" ,python-mock) | |
12356 | ("python-nose" ,python-nose))) | |
12357 | (propagated-inputs | |
12358 | `(("python-six" ,python-six) | |
12359 | ("python-pyyaml" ,python-pyyaml))) | |
12360 | (home-page "https://github.com/txels/ddt") | |
12361 | (synopsis "Data-Driven Tests") | |
12362 | (description | |
12363 | "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by | |
12364 | running it with different test data, and make it appear as multiple test | |
12365 | cases.") | |
12366 | (license license:expat))) | |
12367 | ||
12368 | (define-public python2-ddt | |
12369 | (package-with-python2 python-ddt)) | |
12370 | ||
12371 | (define-public python-pycountry | |
12372 | (package | |
12373 | (name "python-pycountry") | |
12374 | (version "18.5.26") | |
12375 | (source | |
12376 | (origin | |
12377 | (method url-fetch) | |
12378 | (uri (pypi-uri "pycountry" version)) | |
12379 | (sha256 | |
12380 | (base32 | |
12381 | "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz")))) | |
12382 | (build-system python-build-system) | |
12383 | (home-page "https://bitbucket.org/flyingcircus/pycountry") | |
12384 | (synopsis "ISO databases for languages, countries, currencies, etc.") | |
12385 | (description | |
12386 | "@code{pycountry} provides the ISO databases for the standards: | |
12387 | @enumerate | |
12388 | @item 639-3 (Languages) | |
12389 | @item 3166 (Countries) | |
12390 | @item 3166-3 (Deleted Countries) | |
12391 | @item 3166-2 (Subdivisions of countries) | |
12392 | @item 4217 (Currencies) | |
12393 | @item 15924 (Scripts) | |
12394 | @end enumerate | |
12395 | It includes a copy from Debian’s pkg-isocodes and makes the data accessible | |
12396 | through a Python API.") | |
12397 | (license license:lgpl2.1+))) | |
12398 | ||
12399 | (define-public python2-pycountry | |
12400 | (package-with-python2 python-pycountry)) | |
12401 | ||
12402 | (define-public python-pycosat | |
12403 | (package | |
12404 | (name "python-pycosat") | |
12405 | (version "0.6.1") | |
12406 | (source | |
12407 | (origin | |
12408 | (method url-fetch) | |
12409 | (uri (pypi-uri "pycosat" version)) | |
12410 | (sha256 | |
12411 | (base32 | |
12412 | "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l")))) | |
12413 | ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/ | |
12414 | (build-system python-build-system) | |
12415 | (home-page "https://github.com/ContinuumIO/pycosat") | |
12416 | (synopsis "Bindings to picosat (a SAT solver)") | |
12417 | (description | |
12418 | "This package provides efficient Python bindings to @code{picosat} on | |
12419 | the C level. When importing pycosat, the @code{picosat} solver becomes part | |
12420 | of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability | |
12421 | Problem} (SAT) solver.") | |
12422 | (license license:expat))) | |
12423 | ||
12424 | (define-public python2-pycosat | |
12425 | (package-with-python2 python-pycosat)) | |
12426 | ||
12427 | (define-public python2-ruamel.ordereddict | |
12428 | (package | |
12429 | (name "python2-ruamel.ordereddict") | |
12430 | (version "0.4.9") | |
12431 | (source | |
12432 | (origin | |
12433 | (method url-fetch) | |
12434 | (uri (pypi-uri "ruamel.ordereddict" version)) | |
12435 | (sha256 | |
12436 | (base32 | |
12437 | "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h")))) | |
12438 | (build-system python-build-system) | |
12439 | (arguments | |
12440 | `(#:python ,python-2 | |
12441 | #:phases | |
12442 | (modify-phases %standard-phases | |
12443 | (delete 'check) | |
12444 | (add-after 'install 'check | |
12445 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
12446 | (add-installed-pythonpath inputs outputs) | |
f987ac30 | 12447 | (invoke "python" "test/testordereddict.py")))))) |
44d10b1f RW |
12448 | (home-page "https://bitbucket.org/ruamel/ordereddict") |
12449 | (synopsis "Version of dict that keeps keys in insertion order") | |
12450 | (description | |
12451 | "This is an implementation of an ordered dictionary with @dfn{Key | |
12452 | Insertion Order} (KIO: updates of values do not affect the position of the | |
12453 | key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is | |
12454 | removed and put at the back). The standard library module @code{OrderedDict}, | |
12455 | implemented later, implements a subset of @code{ordereddict} functionality. | |
12456 | Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted | |
12457 | Order} (KSO, no sorting function can be specified, but a transform can be | |
12458 | specified to apply on the key before comparison (e.g. @code{string.lower})).") | |
12459 | (license license:expat))) | |
12460 | ||
12461 | (define-public python-pypeg2 | |
12462 | (package | |
12463 | (name "python-pypeg2") | |
12464 | (version "2.15.2") | |
12465 | (source | |
12466 | (origin | |
12467 | (method url-fetch) | |
12468 | (uri (pypi-uri "pyPEG2" version)) | |
12469 | (sha256 | |
12470 | (base32 | |
12471 | "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b")))) | |
12472 | (build-system python-build-system) | |
12473 | (propagated-inputs `(("python-lxml" ,python-lxml))) | |
12474 | (arguments | |
12475 | ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35 | |
12476 | '(#:tests? #f)) | |
12477 | (home-page "https://fdik.org/pyPEG/") | |
12478 | (synopsis "Parsering Expression Grammars in Python") | |
12479 | (description "PyPEG is an intrinsic parser interpreter framework for | |
12480 | Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can | |
12481 | parse many formal languages.") | |
12482 | (license license:gpl2))) | |
12483 | ||
12484 | (define-public python-incremental | |
12485 | (package | |
12486 | (name "python-incremental") | |
12487 | (version "17.5.0") | |
12488 | (source | |
12489 | (origin | |
12490 | (method url-fetch) | |
12491 | (uri (pypi-uri "incremental" version)) | |
12492 | (sha256 | |
12493 | (base32 | |
12494 | "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv")))) | |
12495 | (build-system python-build-system) | |
12496 | (home-page "https://github.com/hawkowl/incremental") | |
12497 | (synopsis "Library for versioning Python projects") | |
12498 | (description "Incremental is a small library that versions your Python | |
12499 | projects.") | |
12500 | (license license:expat))) | |
12501 | ||
12502 | (define-public python2-incremental | |
12503 | (package-with-python2 python-incremental)) | |
12504 | ||
12505 | (define-public python-invoke | |
12506 | (package | |
12507 | (name "python-invoke") | |
b5544cb4 | 12508 | (home-page "https://www.pyinvoke.org/") |
a5662319 | 12509 | (version "1.3.0") |
44d10b1f RW |
12510 | (source (origin |
12511 | (method url-fetch) | |
12512 | (uri (pypi-uri "invoke" version)) | |
12513 | (sha256 | |
12514 | (base32 | |
a5662319 | 12515 | "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5")))) |
44d10b1f RW |
12516 | (build-system python-build-system) |
12517 | (arguments | |
12518 | ;; XXX: Requires many dependencies that are not yet in Guix. | |
12519 | `(#:tests? #f)) | |
12520 | (synopsis "Pythonic task execution") | |
12521 | (description | |
12522 | "Invoke is a Python task execution tool and library, drawing inspiration | |
12523 | from various sources to arrive at a powerful and clean feature set. It is | |
12524 | evolved from the Fabric project, but focuses on local and abstract concerns | |
12525 | instead of servers and network commands.") | |
12526 | (license license:bsd-3))) | |
12527 | ||
12528 | (define-public python2-invoke | |
12529 | (package-with-python2 python-invoke)) | |
12530 | ||
12531 | (define-public python-automat | |
12532 | (package | |
12533 | (name "python-automat") | |
919d80a0 | 12534 | (version "0.7.0") |
44d10b1f RW |
12535 | (source (origin |
12536 | (method url-fetch) | |
12537 | (uri (pypi-uri "Automat" version)) | |
12538 | (sha256 | |
12539 | (base32 | |
919d80a0 | 12540 | "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb")))) |
44d10b1f RW |
12541 | (build-system python-build-system) |
12542 | ;; We disable the tests because they require python-twisted, while | |
12543 | ;; python-twisted depends on python-automat. Twisted is optional, but the | |
12544 | ;; tests fail if it is not available. Also see | |
12545 | ;; <https://github.com/glyph/automat/issues/71>. | |
12546 | (arguments '(#:tests? #f)) | |
12547 | (native-inputs | |
12548 | `(("python-m2r" ,python-m2r) | |
12549 | ("python-setuptools-scm" ,python-setuptools-scm) | |
12550 | ("python-graphviz" ,python-graphviz))) | |
12551 | (propagated-inputs | |
12552 | `(("python-six" ,python-six) | |
12553 | ("python-attrs" ,python-attrs))) | |
12554 | (home-page "https://github.com/glyph/Automat") | |
12555 | (synopsis "Self-service finite-state machines") | |
12556 | (description "Automat is a library for concise, idiomatic Python | |
12557 | expression of finite-state automata (particularly deterministic finite-state | |
12558 | transducers).") | |
12559 | (license license:expat))) | |
12560 | ||
12561 | (define-public python2-automat | |
12562 | (package-with-python2 python-automat)) | |
12563 | ||
12564 | (define-public python-m2r | |
12565 | (package | |
12566 | (name "python-m2r") | |
bcfb8fac | 12567 | (version "0.2.1") |
44d10b1f RW |
12568 | (source (origin |
12569 | (method url-fetch) | |
12570 | (uri (pypi-uri "m2r" version)) | |
12571 | (sha256 | |
12572 | (base32 | |
bcfb8fac | 12573 | "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z")))) |
44d10b1f RW |
12574 | (build-system python-build-system) |
12575 | (propagated-inputs | |
12576 | `(("python-docutils" ,python-docutils) | |
12577 | ("python-mistune" ,python-mistune))) | |
12578 | (native-inputs | |
12579 | `(("python-pygments" ,python-pygments) | |
12580 | ("python-mock" ,python-mock))) | |
12581 | (home-page "https://github.com/miyakogi/m2r") | |
12582 | (synopsis "Markdown to reStructuredText converter") | |
12583 | (description "M2R converts a markdown file including reST markups to valid | |
12584 | reST format.") | |
12585 | (license license:expat))) | |
12586 | ||
12587 | (define-public python2-m2r | |
12588 | (package-with-python2 python-m2r)) | |
12589 | ||
12590 | (define-public python-constantly | |
12591 | (package | |
12592 | (name "python-constantly") | |
12593 | (version "15.1.0") | |
12594 | (source (origin | |
12595 | (method url-fetch) | |
12596 | (uri (pypi-uri "constantly" version)) | |
12597 | (sha256 | |
12598 | (base32 | |
12599 | "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq")))) | |
12600 | (build-system python-build-system) | |
12601 | (home-page "https://github.com/twisted/constantly") | |
12602 | (synopsis "Symbolic constants in Python") | |
12603 | (description "Constantly is a Python library that provides symbolic | |
12604 | constant support. It includes collections and constants with text, numeric, | |
12605 | and bit flag values.") | |
12606 | (license license:expat))) | |
12607 | ||
12608 | (define-public python2-constantly | |
12609 | (package-with-python2 python-constantly)) | |
12610 | ||
12611 | (define-public python-attrs | |
12612 | (package | |
12613 | (name "python-attrs") | |
c41d5144 | 12614 | (version "19.1.0") |
44d10b1f RW |
12615 | (source (origin |
12616 | (method url-fetch) | |
12617 | (uri (pypi-uri "attrs" version)) | |
12618 | (sha256 | |
12619 | (base32 | |
c41d5144 | 12620 | "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h")))) |
44d10b1f RW |
12621 | (build-system python-build-system) |
12622 | (arguments | |
12623 | `(#:modules ((guix build utils) | |
12624 | (guix build python-build-system) | |
12625 | (ice-9 ftw) | |
12626 | (srfi srfi-1) | |
12627 | (srfi srfi-26)) | |
12628 | #:phases (modify-phases %standard-phases | |
12629 | (replace 'check | |
12630 | (lambda _ | |
12631 | (let ((cwd (getcwd))) | |
12632 | (setenv "PYTHONPATH" | |
12633 | (string-append | |
12634 | cwd "/build/" | |
12635 | (find (cut string-prefix? "lib" <>) | |
12636 | (scandir (string-append cwd "/build"))) | |
12637 | ":" | |
12638 | (getenv "PYTHONPATH"))) | |
12639 | (invoke "python" "-m" "pytest"))))))) | |
12640 | (native-inputs | |
12641 | `(("python-coverage" ,python-coverage) | |
12642 | ("python-hypothesis" ,python-hypothesis) | |
12643 | ("python-pympler" ,python-pympler) | |
12644 | ("python-pytest" ,python-pytest) | |
12645 | ("python-six" ,python-six) | |
12646 | ("python-sphinx" ,python-sphinx) | |
12647 | ("python-zope-interface" ,python-zope-interface))) | |
12648 | (home-page "https://github.com/python-attrs/attrs/") | |
12649 | (synopsis "Attributes without boilerplate") | |
12650 | (description "@code{attrs} is a Python package with class decorators that | |
12651 | ease the chores of implementing the most common attribute-related object | |
12652 | protocols.") | |
12653 | (license license:expat))) | |
12654 | ||
12655 | (define-public python2-attrs | |
12656 | (package-with-python2 python-attrs)) | |
12657 | ||
12658 | (define-public python-attrs-bootstrap | |
12659 | (package | |
12660 | (inherit python-attrs) | |
12661 | (name "python-attrs-bootstrap") | |
44d10b1f RW |
12662 | (native-inputs `()) |
12663 | (arguments `(#:tests? #f)))) | |
12664 | ||
12665 | (define-public python2-attrs-bootstrap | |
12666 | (package-with-python2 python-attrs-bootstrap)) | |
12667 | ||
12668 | (define-public python2-cliapp | |
12669 | (package | |
12670 | (name "python2-cliapp") | |
9064b84e | 12671 | (version "1.20180812.1") |
44d10b1f RW |
12672 | (source |
12673 | (origin | |
12674 | (method url-fetch) | |
12675 | (uri (string-append | |
12676 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-" | |
12677 | version ".tar.gz")) | |
12678 | (sha256 | |
12679 | (base32 | |
9064b84e | 12680 | "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x")))) |
44d10b1f RW |
12681 | (build-system python-build-system) |
12682 | (arguments | |
12683 | `(#:python ,python-2 | |
12684 | #:phases | |
12685 | (modify-phases %standard-phases | |
12686 | ;; check phase needs to be run before the build phase. If not, | |
12687 | ;; coverage-test-runner looks for tests for the built source files, | |
12688 | ;; and fails. | |
12689 | (delete 'check) | |
12690 | (add-before 'build 'check | |
12691 | (lambda _ | |
12692 | ;; Disable python3 tests | |
12693 | (substitute* "check" | |
12694 | (("python3") "# python3")) | |
6c826d32 | 12695 | (invoke "./check")))))) |
44d10b1f RW |
12696 | (native-inputs |
12697 | `(("python2-coverage-test-runner" ,python2-coverage-test-runner) | |
12698 | ("python2-pep8" ,python2-pep8))) | |
12699 | (propagated-inputs | |
12700 | `(("python2-pyaml" ,python2-pyaml))) | |
12701 | (home-page "https://liw.fi/cliapp/") | |
12702 | (synopsis "Python framework for command line programs") | |
12703 | (description "@code{python2-cliapp} is a python framework for | |
12704 | command line programs. It contains the typical stuff such programs | |
12705 | need to do, such as parsing the command line for options, and | |
12706 | iterating over input files.") | |
12707 | (license license:gpl2+))) | |
12708 | ||
12709 | (define-public python2-ttystatus | |
12710 | (package | |
12711 | (name "python2-ttystatus") | |
e516a9c2 | 12712 | (version "0.36") |
44d10b1f RW |
12713 | (source |
12714 | (origin | |
12715 | (method url-fetch) | |
12716 | (uri (string-append | |
12717 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-" | |
12718 | version ".tar.gz")) | |
12719 | (sha256 | |
12720 | (base32 | |
e516a9c2 | 12721 | "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by")))) |
44d10b1f RW |
12722 | (build-system python-build-system) |
12723 | (native-inputs | |
12724 | `(("python2-coverage-test-runner" ,python2-coverage-test-runner) | |
12725 | ("python2-pep8" ,python2-pep8))) | |
12726 | (arguments | |
12727 | `(#:python ,python-2 | |
12728 | #:phases | |
12729 | (modify-phases %standard-phases | |
12730 | ;; check phase needs to be run before the build phase. If not, | |
12731 | ;; coverage-test-runner looks for tests for the built source files, | |
12732 | ;; and fails. | |
12733 | (delete 'check) | |
12734 | (add-before 'build 'check | |
cbeee881 | 12735 | (lambda _ (invoke "make" "check")))))) |
44d10b1f RW |
12736 | (home-page "https://liw.fi/ttystatus/") |
12737 | (synopsis "Python library for showing progress reporting and | |
12738 | status updates on terminals") | |
12739 | (description "@code{python2-ttystatus} is a python library for | |
12740 | showing progress reporting and status updates on terminals, for | |
12741 | command line programs. Output is automatically adapted to the width | |
12742 | of the terminal: truncated if it does not fit, and resized if the | |
12743 | terminal size changes.") | |
12744 | (license license:gpl3+))) | |
12745 | ||
12746 | (define-public python2-tracing | |
12747 | (package | |
12748 | (name "python2-tracing") | |
12749 | (version "0.10") | |
12750 | (source | |
12751 | (origin | |
12752 | (method url-fetch) | |
12753 | (uri (string-append | |
12754 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-" | |
12755 | version ".tar.gz")) | |
12756 | (sha256 | |
12757 | (base32 | |
12758 | "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw")))) | |
12759 | (build-system python-build-system) | |
12760 | (arguments | |
12761 | `(#:python ,python-2)) | |
12762 | (home-page "https://liw.fi/tracing/") | |
12763 | (synopsis "Python debug logging helper") | |
12764 | (description "@code{python2-tracing} is a python library for | |
12765 | logging debug messages. It provides a way to turn debugging messages | |
12766 | on and off, based on the filename they occur in. It is much faster | |
12767 | than using @code{logging.Filter} to accomplish the same thing, which | |
12768 | matters when code is run in production mode. The actual logging still | |
12769 | happens using the @code{logging} library.") | |
12770 | (license license:gpl3+))) | |
12771 | ||
12772 | (define-public python2-larch | |
12773 | (package | |
12774 | (name "python2-larch") | |
12775 | (version "1.20151025") | |
12776 | (source | |
12777 | (origin | |
12778 | (method url-fetch) | |
12779 | (uri (string-append | |
12780 | "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-" | |
12781 | version ".tar.gz")) | |
12782 | (patches (search-patches | |
12783 | "python2-larch-coverage-4.0a6-compatibility.patch")) | |
12784 | (sha256 | |
12785 | (base32 | |
12786 | "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663")))) | |
12787 | (build-system python-build-system) | |
12788 | (arguments | |
12789 | `(#:python ,python-2 | |
12790 | #:phases | |
12791 | (modify-phases %standard-phases | |
12792 | ;; check phase needs to be run before the build phase. If not, | |
12793 | ;; coverage-test-runner looks for tests for the built source files, | |
12794 | ;; and fails. | |
12795 | (delete 'check) | |
12796 | (add-before 'build 'check | |
204ad455 | 12797 | (lambda _ (invoke "make" "check")))))) |
44d10b1f RW |
12798 | (native-inputs |
12799 | `(("cmdtest" ,cmdtest) | |
12800 | ("python2-coverage-test-runner" ,python2-coverage-test-runner))) | |
12801 | (propagated-inputs | |
12802 | `(("python2-tracing" ,python2-tracing))) | |
12803 | (home-page "https://liw.fi/larch/") | |
12804 | (synopsis "Python copy-on-write B-tree library") | |
12805 | (description "@code{python2-larch} is an implementation of | |
12806 | particular kind of B-tree, based on research by Ohad Rodeh. See | |
12807 | @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details | |
12808 | on the data structure. | |
12809 | ||
12810 | The distinctive feature of this B-tree is that a node is never | |
12811 | (conceptually) modified. Instead, all updates are done by | |
12812 | copy-on-write. This makes it easy to clone a tree, and modify only the | |
12813 | clone, while other processes access the original tree.") | |
12814 | (license license:gpl3+))) | |
12815 | ||
12816 | (define-public python-astroid | |
12817 | (package | |
12818 | (name "python-astroid") | |
1c43c698 | 12819 | (version "2.3.3") |
44d10b1f RW |
12820 | (source |
12821 | (origin | |
12822 | (method url-fetch) | |
12823 | (uri (pypi-uri "astroid" version)) | |
12824 | (sha256 | |
1c43c698 | 12825 | (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski")))) |
44d10b1f RW |
12826 | (build-system python-build-system) |
12827 | (propagated-inputs | |
12828 | `(("python-lazy-object-proxy" ,python-lazy-object-proxy) | |
12829 | ("python-six" ,python-six) | |
f0935460 | 12830 | ("python-typed-ast" ,python-typed-ast) |
44d10b1f RW |
12831 | ("python-wrapt" ,python-wrapt))) |
12832 | (native-inputs | |
12833 | `(("python-dateutil" ,python-dateutil) | |
12834 | ("python-nose" ,python-nose) | |
12835 | ("python-pytest" ,python-pytest) | |
12836 | ("python-pytest-runner" ,python-pytest-runner))) | |
12837 | (arguments | |
12838 | `(#:phases | |
12839 | (modify-phases %standard-phases | |
12840 | (add-after 'unpack 'remove-spurious-test | |
12841 | (lambda _ | |
12842 | ;; This can be removed after upgrading from python-3.7 | |
12843 | ;; https://github.com/PyCQA/astroid/issues/593 | |
12844 | ;; https://bugs.python.org/issue34056 | |
12845 | (delete-file "astroid/tests/unittest_modutils.py") | |
12846 | #t)) | |
12847 | (replace 'check | |
12848 | (lambda _ | |
12849 | (invoke "pytest" "astroid")))))) | |
12850 | (home-page "https://github.com/PyCQA/astroid") | |
12851 | (synopsis "Common base representation of python source code for pylint and | |
12852 | other projects") | |
12853 | (description "@code{python-astroid} provides a common base representation | |
12854 | of python source code for projects such as pychecker, pyreverse, pylint, etc. | |
12855 | ||
12856 | It provides a compatible representation which comes from the _ast module. It | |
12857 | rebuilds the tree generated by the builtin _ast module by recursively walking | |
12858 | down the AST and building an extended ast. The new node classes have | |
12859 | additional methods and attributes for different usages. They include some | |
12860 | support for static inference and local name scopes. Furthermore, astroid | |
12861 | builds partial trees by inspecting living objects.") | |
12862 | (license license:lgpl2.1+) | |
12863 | (properties `((python2-variant . ,(delay python2-astroid)))))) | |
12864 | ||
12865 | (define-public python2-astroid | |
12866 | (let ((base (package-with-python2 | |
12867 | (strip-python2-variant python-astroid)))) | |
12868 | (package (inherit base) | |
12869 | ;; Version 2.x removes python2 support. | |
12870 | (version "1.6.5") | |
12871 | (source | |
12872 | (origin | |
12873 | (method url-fetch) | |
12874 | (uri (pypi-uri "astroid" version)) | |
12875 | (sha256 | |
12876 | (base32 | |
12877 | "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw")))) | |
12878 | (arguments | |
12879 | (substitute-keyword-arguments (package-arguments base) | |
12880 | ((#:phases phases) | |
12881 | `(modify-phases ,phases | |
12882 | (add-after 'unpack 'remove-spurious-test | |
12883 | (lambda _ | |
12884 | ;; https://github.com/PyCQA/astroid/issues/276 | |
12885 | (delete-file "astroid/tests/unittest_brain.py") | |
12886 | #t)) | |
12887 | (replace 'check | |
12888 | (lambda _ | |
12889 | (invoke"python" "-m" "unittest" "discover" | |
12890 | "-p" "unittest*.py"))))))) | |
12891 | (native-inputs `()) | |
12892 | (propagated-inputs | |
12893 | `(("python2-backports-functools-lru-cache" | |
12894 | ,python2-backports-functools-lru-cache) | |
12895 | ("python2-enum34" ,python2-enum34) | |
12896 | ("python2-singledispatch" ,python2-singledispatch) | |
741f98b3 MO |
12897 | ,@(alist-delete "python-typed-ast" |
12898 | (package-propagated-inputs base))))))) | |
44d10b1f RW |
12899 | |
12900 | (define-public python-isort | |
12901 | (package | |
12902 | (name "python-isort") | |
e2227b6a | 12903 | (version "4.3.4") |
44d10b1f RW |
12904 | (source |
12905 | (origin | |
e2227b6a EF |
12906 | (method git-fetch) |
12907 | (uri (git-reference | |
12908 | ;; Tests pass only from the Github sources | |
12909 | (url "https://github.com/timothycrosley/isort") | |
12910 | (commit version))) | |
12911 | (file-name (git-file-name name version)) | |
44d10b1f RW |
12912 | (sha256 |
12913 | (base32 | |
e2227b6a | 12914 | "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6")))) |
44d10b1f RW |
12915 | (build-system python-build-system) |
12916 | (native-inputs | |
12917 | `(("python-mock" ,python-mock) | |
12918 | ("python-pytest" ,python-pytest))) | |
12919 | (home-page "https://github.com/timothycrosley/isort") | |
12920 | (synopsis "Python utility/library to sort python imports") | |
12921 | (description "@code{python-isort} is a python utility/library to sort | |
12922 | imports alphabetically, and automatically separated into sections. It | |
12923 | provides a command line utility, a python library and plugins for various | |
12924 | editors.") | |
e2227b6a EF |
12925 | (license license:expat) |
12926 | (properties `((python2-variant . ,(delay python2-isort)))))) | |
44d10b1f RW |
12927 | |
12928 | (define-public python2-isort | |
e2227b6a EF |
12929 | (let ((base (package-with-python2 |
12930 | (strip-python2-variant python-isort)))) | |
12931 | (package (inherit base) | |
12932 | (native-inputs | |
12933 | `(("python2-futures" ,python2-futures) | |
12934 | ,@(package-native-inputs base)))))) | |
44d10b1f RW |
12935 | |
12936 | (define-public python2-backports-functools-lru-cache | |
12937 | (package | |
12938 | (name "python2-backports-functools-lru-cache") | |
12939 | (version "1.5") | |
12940 | (source | |
12941 | (origin | |
12942 | (method url-fetch) | |
12943 | ;; only the pypi tarballs contain the necessary metadata | |
12944 | (uri (pypi-uri "backports.functools_lru_cache" version)) | |
12945 | (sha256 | |
12946 | (base32 | |
12947 | "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x")))) | |
12948 | (build-system python-build-system) | |
12949 | (native-inputs | |
12950 | `(("python2-setuptools-scm" ,python2-setuptools-scm))) | |
12951 | (arguments | |
12952 | `(#:python ,python-2)) | |
12953 | (home-page "https://github.com/jaraco/backports.functools_lru_cache") | |
12954 | (synopsis "Backport of functools.lru_cache from Python 3.3") | |
12955 | (description "@code{python2-backports-functools-lru-cache} is a backport | |
12956 | of @code{functools.lru_cache} from python 3.3.") | |
12957 | (license license:expat))) | |
12958 | ||
12959 | (define-public python-configparser | |
12960 | (package | |
12961 | (name "python-configparser") | |
84127f8c | 12962 | (version "3.7.1") |
44d10b1f RW |
12963 | (source |
12964 | (origin | |
12965 | (method url-fetch) | |
84127f8c | 12966 | (uri (pypi-uri "configparser" version)) |
44d10b1f RW |
12967 | (sha256 |
12968 | (base32 | |
84127f8c | 12969 | "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav")))) |
44d10b1f | 12970 | (build-system python-build-system) |
809f003f | 12971 | (home-page "https://github.com/jaraco/configparser/") |
44d10b1f RW |
12972 | (synopsis "Backport of configparser from python 3.5") |
12973 | (description "@code{python-configparser} is a backport of | |
12974 | @code{configparser} from Python 3.5 so that it can be used directly | |
12975 | in other versions.") | |
12976 | (license license:expat))) | |
12977 | ||
12978 | (define-public python2-configparser | |
12979 | (package-with-python2 python-configparser)) | |
12980 | ||
12981 | (define-public python-mando | |
12982 | (package | |
12983 | (name "python-mando") | |
12984 | (version "0.6.4") | |
12985 | (source (origin | |
12986 | (method url-fetch) | |
12987 | (uri (pypi-uri "mando" version)) | |
12988 | (sha256 | |
12989 | (base32 | |
12990 | "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr")))) | |
12991 | (build-system python-build-system) | |
12992 | (propagated-inputs | |
12993 | `(("python-rst2ansi" ,python-rst2ansi) | |
12994 | ("python-six" ,python-six))) | |
12995 | (native-inputs | |
12996 | `(("python-pytest" ,python-pytest))) | |
12997 | (home-page "https://mando.readthedocs.org/") | |
12998 | (synopsis | |
12999 | "Wrapper around argparse, allowing creation of complete CLI applications") | |
13000 | (description | |
13001 | "This package is a wrapper around argparse, allowing you to write complete CLI | |
13002 | applications in seconds while maintaining all the flexibility.") | |
13003 | (license license:expat))) | |
13004 | ||
13005 | (define-public python2-mando | |
13006 | (package-with-python2 python-mando)) | |
13007 | ||
70daf82f RW |
13008 | (define-public python2-argparse |
13009 | (package | |
13010 | (name "python2-argparse") | |
13011 | (version "1.4.0") | |
13012 | (source | |
13013 | (origin | |
13014 | (method url-fetch) | |
13015 | (uri (pypi-uri "argparse" version)) | |
13016 | (sha256 | |
13017 | (base32 | |
13018 | "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32")))) | |
13019 | (build-system python-build-system) | |
13020 | (arguments | |
13021 | `(#:python ,python-2)) | |
13022 | (home-page "https://github.com/ThomasWaldmann/argparse/") | |
13023 | (synopsis "Python command-line parsing library") | |
13024 | (description | |
13025 | "This package is mostly for people who want to have @code{argparse} on | |
13026 | older Pythons because it was not part of the standard library back then.") | |
13027 | (license license:psfl))) | |
13028 | ||
44d10b1f RW |
13029 | (define-public python-fudge |
13030 | (package | |
13031 | (name "python-fudge") | |
13032 | ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2 | |
13033 | ;; package, which is currently the only use of this package. | |
13034 | (version "0.9.6") | |
13035 | (source | |
13036 | (origin | |
13037 | (method url-fetch) | |
13038 | (uri (pypi-uri "fudge" version)) | |
13039 | (sha256 | |
13040 | (base32 | |
13041 | "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l")))) | |
13042 | (build-system python-build-system) | |
13043 | (arguments | |
13044 | `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package. | |
13045 | (home-page "https://github.com/fudge-py/fudge") | |
13046 | (synopsis "Replace real objects with fakes/mocks/stubs while testing") | |
13047 | (description | |
13048 | "Fudge is a Python module for using fake objects (mocks and stubs) to | |
13049 | test real ones. | |
13050 | ||
13051 | In readable Python code, you declare the methods available on your fake object | |
13052 | and how they should be called. Then you inject that into your application and | |
13053 | start testing. This declarative approach means you don’t have to record and | |
13054 | playback actions and you don’t have to inspect your fakes after running code. | |
13055 | If the fake object was used incorrectly then you’ll see an informative | |
13056 | exception message with a traceback that points to the culprit.") | |
13057 | (license license:expat))) | |
13058 | ||
13059 | (define-public python2-fudge | |
13060 | (package-with-python2 python-fudge)) | |
13061 | ||
13062 | (define-public python-mwclient | |
13063 | (package | |
13064 | (name "python-mwclient") | |
957c6833 | 13065 | (version "0.10.0") |
44d10b1f RW |
13066 | (source |
13067 | (origin | |
957c6833 | 13068 | (method git-fetch) |
44d10b1f | 13069 | ;; The PyPI version wouldn't contain tests. |
957c6833 EF |
13070 | (uri (git-reference |
13071 | (url "https://github.com/mwclient/mwclient") | |
13072 | (commit (string-append "v" version)))) | |
13073 | (file-name (git-file-name name version)) | |
44d10b1f RW |
13074 | (sha256 |
13075 | (base32 | |
957c6833 | 13076 | "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v")))) |
44d10b1f RW |
13077 | (build-system python-build-system) |
13078 | (propagated-inputs | |
957c6833 | 13079 | `(("python-requests-oauthlib" ,python-requests-oauthlib) |
44d10b1f RW |
13080 | ("python-six" ,python-six))) |
13081 | (native-inputs | |
13082 | `(("python-mock" ,python-mock) | |
13083 | ("python-pytest" ,python-pytest) | |
44d10b1f | 13084 | ("python-pytest-cov" ,python-pytest-cov) |
957c6833 | 13085 | ("python-pytest-runner" ,python-pytest-runner) |
44d10b1f RW |
13086 | ("python-responses" ,python-responses))) |
13087 | (home-page "https://github.com/btongminh/mwclient") | |
13088 | (synopsis "MediaWiki API client") | |
13089 | (description "This package provides a MediaWiki API client.") | |
13090 | (license license:expat))) | |
13091 | ||
13092 | (define-public python2-mwclient | |
13093 | (package-with-python2 python-mwclient)) | |
13094 | ||
13095 | (define-public python-utils | |
13096 | (package | |
13097 | (name "python-utils") | |
13098 | (version "2.1.0") | |
13099 | (source (origin | |
13100 | (method url-fetch) | |
13101 | (uri (pypi-uri "python-utils" version)) | |
13102 | (sha256 | |
13103 | (base32 | |
13104 | "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p")))) | |
13105 | (build-system python-build-system) | |
13106 | (native-inputs | |
13107 | `(("pytest-runner" ,python-pytest-runner) | |
13108 | ("pytest" ,python-pytest) | |
13109 | ("six" ,python-six))) | |
13110 | (home-page "https://github.com/WoLpH/python-utils") | |
13111 | (synopsis "Convenient utilities not included with the standard Python install") | |
13112 | (description | |
13113 | "Python Utils is a collection of small Python functions and classes which | |
13114 | make common patterns shorter and easier.") | |
13115 | (license license:bsd-2))) | |
13116 | ||
13117 | (define-public python2-utils | |
13118 | (package-with-python2 python-utils)) | |
13119 | ||
44d10b1f RW |
13120 | (define-public python-diff-match-patch |
13121 | (package | |
13122 | (name "python-diff-match-patch") | |
13123 | (version "20121119") | |
13124 | (source | |
13125 | (origin | |
13126 | (method url-fetch) | |
13127 | (uri (pypi-uri "diff-match-patch" version)) | |
13128 | (sha256 | |
13129 | (base32 | |
13130 | "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx")))) | |
13131 | (build-system python-build-system) | |
13132 | (home-page "https://code.google.com/p/google-diff-match-patch") | |
13133 | (synopsis "Synchronize plain text") | |
13134 | (description "Diff Match and Patch libraries offer robust algorithms to | |
13135 | perform the operations required for synchronizing plain text.") | |
13136 | (license license:asl2.0))) | |
13137 | ||
13138 | (define-public python2-diff-match-patch | |
13139 | (package-with-python2 python-diff-match-patch)) | |
13140 | ||
13141 | (define-public python-dirsync | |
13142 | (package | |
13143 | (name "python-dirsync") | |
13144 | (version "2.2.3") | |
13145 | (source | |
13146 | (origin | |
13147 | (method url-fetch) | |
13148 | (uri (pypi-uri "dirsync" version)) | |
13149 | (sha256 | |
13150 | (base32 | |
13151 | "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z")))) | |
13152 | (build-system python-build-system) | |
13153 | (propagated-inputs | |
13154 | `(("six" ,python-six))) | |
13155 | (home-page "https://bitbucket.org/tkhyn/dirsync") | |
13156 | (synopsis "Advanced directory tree synchronisation tool") | |
13157 | (description "Advanced directory tree synchronisation tool.") | |
13158 | (license license:expat))) | |
13159 | ||
13160 | (define-public python2-dirsync | |
13161 | (package-with-python2 python-dirsync)) | |
13162 | ||
13163 | (define-public python-levenshtein | |
13164 | (package | |
13165 | (name "python-levenshtein") | |
13166 | (version "0.12.0") | |
13167 | (source | |
13168 | (origin | |
13169 | (method url-fetch) | |
13170 | (uri (pypi-uri "python-Levenshtein" version)) | |
13171 | (sha256 | |
13172 | (base32 | |
13173 | "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3")))) | |
13174 | (build-system python-build-system) | |
13175 | (home-page "https://github.com/ztane/python-Levenshtein") | |
13176 | (synopsis "Fast computation of Levenshtein distance and string similarity") | |
13177 | (description | |
13178 | "The Levenshtein Python C extension module contains functions for fast computation of | |
13179 | @enumerate | |
13180 | @item Levenshtein (edit) distance, and edit operations | |
13181 | @item string similarity | |
13182 | @item approximate median strings, and generally string averaging | |
13183 | @item string sequence and set similarity | |
13184 | @end enumerate | |
13185 | It supports both normal and Unicode strings.") | |
13186 | (license license:gpl2+))) | |
13187 | ||
13188 | (define-public python2-levenshtein | |
13189 | (package-with-python2 python-levenshtein)) | |
13190 | ||
13191 | (define-public python-scandir | |
13192 | (package | |
13193 | (name "python-scandir") | |
13194 | (version "1.9.0") | |
13195 | (source | |
13196 | (origin | |
13197 | (method url-fetch) | |
13198 | (uri (pypi-uri "scandir" version)) | |
13199 | (sha256 | |
13200 | (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4")))) | |
13201 | (build-system python-build-system) | |
13202 | (arguments | |
13203 | `(#:phases (modify-phases %standard-phases | |
13204 | (replace 'check | |
13205 | (lambda _ | |
13206 | (invoke "python" "test/run_tests.py")))))) | |
13207 | (home-page "https://github.com/benhoyt/scandir") | |
13208 | (synopsis "Directory iteration function") | |
13209 | (description | |
13210 | "Directory iteration function like os.listdir(), except that instead of | |
13211 | returning a list of bare filenames, it yields DirEntry objects that include | |
13212 | file type and stat information along with the name. Using scandir() increases | |
13213 | the speed of os.walk() by 2-20 times (depending on the platform and file | |
13214 | system) by avoiding unnecessary calls to os.stat() in most cases. | |
13215 | ||
13216 | This package is part of the Python standard library since version 3.5.") | |
13217 | (license license:bsd-3))) | |
13218 | ||
13219 | (define-public python2-scandir | |
13220 | (package-with-python2 python-scandir)) | |
13221 | ||
13222 | (define-public python2-stemming | |
13223 | (package | |
13224 | (name "python2-stemming") | |
13225 | (version "1.0.1") | |
13226 | (source | |
13227 | (origin | |
13228 | (method url-fetch) | |
13229 | (uri (pypi-uri "stemming" version)) | |
13230 | (sha256 | |
13231 | (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr")))) | |
13232 | (build-system python-build-system) | |
13233 | (arguments | |
13234 | `(#:python ,python-2)) | |
13235 | (home-page "https://bitbucket.org/mchaput/stemming/overview") | |
13236 | (synopsis "Python implementations of various stemming algorithms") | |
13237 | (description | |
13238 | "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins | |
13239 | stemming algorithms for English. These implementations are straightforward and | |
13240 | efficient, unlike some Python versions of the same algorithms available on the | |
13241 | Web. This package is an extraction of the stemming code included in the Whoosh | |
13242 | search engine.") | |
13243 | (license license:public-domain))) | |
13244 | ||
13245 | (define-public python-factory-boy | |
13246 | (package | |
13247 | (name "python-factory-boy") | |
13248 | (version "2.8.1") | |
13249 | (source | |
13250 | (origin | |
13251 | (method url-fetch) | |
13252 | (uri (pypi-uri "factory_boy" version)) | |
13253 | (sha256 | |
13254 | (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56")))) | |
13255 | (build-system python-build-system) | |
13256 | (arguments | |
13257 | ;; Tests are not included in the tarball. | |
13258 | `(#:tests? #f)) | |
13259 | (propagated-inputs | |
13260 | `(("faker" ,python-faker))) | |
13261 | (home-page "https://github.com/benhoyt/scandir") | |
13262 | (synopsis "Versatile test fixtures replacement") | |
13263 | (description | |
13264 | "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl. | |
13265 | ||
13266 | As a fixtures replacement tool, it aims to replace static, hard to maintain | |
13267 | fixtures with easy-to-use factories for complex object. | |
13268 | ||
13269 | Instead of building an exhaustive test setup with every possible combination | |
13270 | of corner cases, factory_boy allows you to use objects customized for the | |
13271 | current test, while only declaring the test-specific fields") | |
13272 | (license license:expat))) | |
13273 | ||
13274 | (define-public python2-factory-boy | |
13275 | (package-with-python2 python-factory-boy)) | |
13276 | ||
13277 | (define-public python-translate-toolkit | |
13278 | (package | |
13279 | (name "python-translate-toolkit") | |
13280 | (version "2.1.0") | |
13281 | (source | |
13282 | (origin | |
13283 | (method url-fetch) | |
13284 | (uri (pypi-uri "translate-toolkit" version ".tar.bz2")) | |
13285 | (sha256 | |
13286 | (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq")))) | |
13287 | (build-system python-build-system) | |
13288 | (native-inputs | |
13289 | `(("python-pytest" ,python-pytest) | |
13290 | ("python-sphinx" ,python-sphinx))) | |
13291 | (propagated-inputs | |
13292 | `(("python-babel" ,python-babel) | |
13293 | ("python-beautifulsoup4" ,python-beautifulsoup4) | |
13294 | ("python-chardet" ,python-chardet) | |
13295 | ("python-diff-match-patch" ,python-diff-match-patch) | |
13296 | ("python-levenshtein" ,python-levenshtein) | |
13297 | ("python-lxml" ,python-lxml) | |
13298 | ("python-six" ,python-six) | |
13299 | ("python-vobject" ,python-vobject) | |
13300 | ("python-pyyaml" ,python-pyyaml))) | |
13301 | (arguments | |
13302 | ;; TODO: tests are not run, because they end with | |
13303 | ;; TypeError: parse() missing 2 required positional arguments: 'tree' and | |
13304 | ;; 'parse_funcs' | |
13305 | ;; during test setup. | |
13306 | `(#:tests? #f)) | |
18919cf9 | 13307 | (home-page "https://toolkit.translatehouse.org") |
44d10b1f RW |
13308 | (synopsis "Tools and API for translation and localization engineering") |
13309 | (description | |
13310 | "Tools and API for translation and localization engineering. It contains | |
13311 | several utilities, as well as an API for building localization tools.") | |
13312 | (license license:gpl2+))) | |
13313 | ||
13314 | (define-public python2-translate-toolkit | |
13315 | (package-with-python2 python-translate-toolkit)) | |
13316 | ||
13317 | (define-public python-packaging | |
13318 | (package | |
13319 | (name "python-packaging") | |
a72a1892 | 13320 | (version "20.0") |
44d10b1f RW |
13321 | (source |
13322 | (origin | |
13323 | (method url-fetch) | |
13324 | (uri (pypi-uri "packaging" version)) | |
20bf58bf MB |
13325 | ;; XXX: The URL in the patch file is wrong, it should be |
13326 | ;; <https://github.com/pypa/packaging/pull/256>. | |
fdd0c369 | 13327 | (patches (search-patches "python-packaging-test-arch.patch")) |
44d10b1f RW |
13328 | (sha256 |
13329 | (base32 | |
a72a1892 | 13330 | "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy")))) |
44d10b1f RW |
13331 | (build-system python-build-system) |
13332 | (arguments | |
13333 | `(#:phases (modify-phases %standard-phases | |
13334 | (replace 'check | |
13335 | (lambda _ (invoke "py.test" "-vv")))))) | |
13336 | (native-inputs | |
13337 | `(("python-pretend" ,python-pretend) | |
13338 | ("python-pytest" ,python-pytest))) | |
13339 | (propagated-inputs | |
13340 | `(("python-pyparsing" ,python-pyparsing) | |
13341 | ("python-six" ,python-six))) | |
13342 | (home-page "https://github.com/pypa/packaging") | |
13343 | (synopsis "Core utilities for Python packages") | |
13344 | (description "Packaging is a Python module for dealing with Python packages. | |
13345 | It offers an interface for working with package versions, names, and dependency | |
13346 | information.") | |
13347 | ;; From 'LICENSE': This software is made available under the terms of | |
13348 | ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD. | |
13349 | ;; Contributions to this software is made under the terms of *both* these | |
13350 | ;; licenses. | |
13351 | (license (list license:asl2.0 license:bsd-2)))) | |
13352 | ||
13353 | (define-public python2-packaging | |
13354 | (package-with-python2 python-packaging)) | |
13355 | ||
13356 | (define-public python-relatorio | |
13357 | (package | |
13358 | (name "python-relatorio") | |
13359 | (version "0.8.0") | |
13360 | (source | |
13361 | (origin | |
13362 | (method url-fetch) | |
13363 | (uri (pypi-uri "relatorio" version)) | |
13364 | (sha256 | |
13365 | (base32 | |
13366 | "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx")))) | |
13367 | (build-system python-build-system) | |
13368 | (propagated-inputs | |
13369 | `(("python-lxml" ,python-lxml) | |
13370 | ("python-genshi" ,python-genshi))) | |
13371 | (native-inputs | |
13372 | `(("python-magic" ,python-magic))) | |
13373 | (home-page "https://relatorio.tryton.org/") | |
13374 | (synopsis "Templating library able to output ODT and PDF files") | |
13375 | (description "Relatorio is a templating library which provides a way to | |
13376 | easily output ODT, ODS, PNG, SVG and several other kinds of files. Support | |
13377 | for more filetypes can be easily added by creating plugins for them.") | |
13378 | (license license:gpl3+))) | |
13379 | ||
13380 | (define-public python2-relatorio | |
13381 | (package-with-python2 python-relatorio)) | |
13382 | ||
13383 | (define-public python-radon | |
13384 | (package | |
13385 | (name "python-radon") | |
f675ab4f | 13386 | (version "4.1.0") |
44d10b1f RW |
13387 | (source |
13388 | (origin | |
13389 | (method url-fetch) | |
13390 | (uri (pypi-uri "radon" version)) | |
13391 | (sha256 | |
13392 | (base32 | |
f675ab4f | 13393 | "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n")))) |
44d10b1f RW |
13394 | (build-system python-build-system) |
13395 | (arguments | |
13396 | `(#:phases (modify-phases %standard-phases | |
13397 | (replace 'check | |
13398 | (lambda _ | |
13399 | (invoke "python" "radon/tests/run.py")))))) | |
13400 | (propagated-inputs | |
13401 | `(("python-colorama" ,python-colorama) | |
13402 | ("python-flake8-polyfill" ,python-flake8-polyfill) | |
13403 | ("python-mando" ,python-mando))) | |
13404 | (native-inputs | |
13405 | `(("python-pytest" ,python-pytest) | |
13406 | ("python-pytest-mock" ,python-pytest-mock))) | |
13407 | (home-page "https://radon.readthedocs.org/") | |
13408 | (synopsis "Code Metrics in Python") | |
13409 | (description "Radon is a Python tool which computes various code metrics. | |
13410 | Supported metrics are: | |
13411 | @itemize @bullet | |
13412 | @item raw metrics: SLOC, comment lines, blank lines, &c. | |
13413 | @item Cyclomatic Complexity (i.e. McCabe’s Complexity) | |
13414 | @item Halstead metrics (all of them) | |
13415 | @item the Maintainability Index (a Visual Studio metric) | |
13416 | @end itemize") | |
13417 | (license license:expat))) | |
13418 | ||
13419 | (define-public python2-radon | |
13420 | (package-with-python2 python-radon)) | |
13421 | ||
13422 | (define-public python-sure | |
13423 | (package | |
13424 | (name "python-sure") | |
13425 | (version "1.4.11") | |
13426 | (source | |
13427 | (origin | |
13428 | (method url-fetch) | |
13429 | (uri (pypi-uri "sure" version)) | |
13430 | (sha256 | |
13431 | (base32 | |
13432 | "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w")))) | |
13433 | (build-system python-build-system) | |
13434 | (propagated-inputs | |
13435 | `(("python-mock" ,python-mock) | |
13436 | ("python-six" ,python-six))) | |
13437 | (native-inputs | |
13438 | `(("python-nose" ,python-nose))) | |
13439 | (home-page "https://github.com/gabrielfalcao/sure") | |
13440 | (synopsis "Automated testing library in python for python") | |
13441 | (description | |
13442 | "Sure is a python library that leverages a DSL for writing assertions. | |
13443 | Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.") | |
13444 | (license license:gpl3+))) | |
13445 | ||
13446 | (define-public python2-sure | |
13447 | (package-with-python2 python-sure)) | |
13448 | ||
13449 | (define-public python2-couleur | |
13450 | ;; This package does not seem to support python3 at all, hence, | |
13451 | ;; only the python2 variant definition is provided. | |
13452 | (package | |
13453 | (name "python2-couleur") | |
13454 | (version "0.6.2") | |
13455 | (source | |
13456 | (origin | |
13457 | (method url-fetch) | |
13458 | (uri (pypi-uri "couleur" version)) | |
13459 | (sha256 | |
13460 | (base32 | |
13461 | "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1")))) | |
13462 | (build-system python-build-system) | |
13463 | (arguments | |
13464 | `(#:python ,python-2)) | |
13465 | (home-page "https://github.com/gabrielfalcao/couleur") | |
13466 | (synopsis | |
13467 | "ANSI terminal tool for python, colored shell and other handy fancy features") | |
13468 | (description | |
13469 | "@code{Couleur} provides python programs a way to use the ANSI features in a unix | |
13470 | terminal such as coloured output in the shell, overwriting output, indentation, etc.") | |
13471 | ;; README.md says ASL2.0, but all source code headers are LGPL3+. | |
13472 | ;; https://github.com/gabrielfalcao/couleur/issues/11 | |
13473 | (license license:lgpl3+))) | |
13474 | ||
13475 | (define-public python-misaka | |
13476 | (package | |
13477 | (name "python-misaka") | |
0dcb3412 | 13478 | (version "2.1.1") |
44d10b1f RW |
13479 | (source |
13480 | (origin | |
13481 | (method url-fetch) | |
13482 | (uri (pypi-uri "misaka" version)) | |
13483 | (sha256 | |
13484 | (base32 | |
0dcb3412 | 13485 | "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2")))) |
44d10b1f RW |
13486 | (build-system python-build-system) |
13487 | (arguments | |
13488 | `(;; Line 37 of setup.py calls self.run_command('develop') | |
13489 | ;; in the 'check' phase. This command seems to be trying | |
13490 | ;; to write to | |
13491 | ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/ | |
13492 | ;; for which it does not have the permission to write. | |
13493 | #:tests? #f)) | |
13494 | (propagated-inputs | |
13495 | `(("python-cffi" ,python-cffi))) | |
13496 | (home-page "https://github.com/FSX/misaka") | |
13497 | (synopsis "Python binding for Hoedown") | |
13498 | (description | |
13499 | "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing | |
13500 | library written in C. It features a fast HTML renderer and functionality to make custom | |
13501 | renderers (e.g. man pages or LaTeX).") | |
13502 | (license license:expat))) | |
13503 | ||
13504 | (define-public python2-misaka | |
13505 | (package-with-python2 python-misaka)) | |
13506 | ||
13507 | (define-public python2-steadymark | |
13508 | ;; This is forced into being a python2 only variant | |
13509 | ;; due to its dependence on couleur that has no support | |
13510 | ;; for python3 | |
13511 | (package | |
13512 | (name "python2-steadymark") | |
13513 | (version "0.7.3") | |
13514 | (source | |
13515 | (origin | |
13516 | (method url-fetch) | |
13517 | (uri (pypi-uri "steadymark" version)) | |
13518 | (sha256 | |
13519 | (base32 | |
13520 | "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v")))) | |
13521 | (build-system python-build-system) | |
13522 | (native-inputs | |
13523 | `(("python-couleur" ,python2-couleur) | |
13524 | ("python-sure" ,python2-sure) | |
13525 | ("python-misaka" ,python2-misaka))) | |
13526 | (arguments | |
13527 | `(#:python ,python-2 | |
13528 | #:phases | |
13529 | (modify-phases %standard-phases | |
13530 | (add-before 'build 'patch-setup-py | |
13531 | (lambda _ | |
13532 | ;; Update requirements from dependency==version | |
13533 | ;; to dependency>=version | |
13534 | (substitute* "setup.py" | |
13535 | (("==") ">=")) | |
13536 | #t))))) | |
13537 | (home-page "https://github.com/gabrielfalcao/steadymark") | |
13538 | (synopsis "Markdown-based test runner for python") | |
13539 | (description | |
13540 | "@code{Steadymark} allows documentation to be written in github-flavoured | |
13541 | markdown. The documentation may contain snippets of code surrounded by python | |
13542 | code blocks and @code{Steadymark} will find these snippets and run them, making | |
13543 | sure that there are no old malfunctional examples in the documentation examples.") | |
13544 | (license license:expat))) | |
13545 | ||
13546 | (define-public python-jsonpointer | |
13547 | (package | |
13548 | (name "python-jsonpointer") | |
13549 | (version "1.10") | |
13550 | (source | |
13551 | (origin | |
13552 | (method url-fetch) | |
13553 | (uri (pypi-uri "jsonpointer" version)) | |
13554 | (sha256 | |
13555 | (base32 | |
13556 | "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz")))) | |
13557 | (build-system python-build-system) | |
13558 | (home-page "https://github.com/stefankoegl/python-json-pointer") | |
13559 | (synopsis "Identify specific nodes in a JSON document") | |
13560 | (description "@code{jsonpointer} allows you to access specific nodes | |
13561 | by path in a JSON document (see RFC 6901).") | |
13562 | (license license:bsd-3))) | |
13563 | ||
13564 | (define-public python2-jsonpointer | |
13565 | (package-with-python2 python-jsonpointer)) | |
13566 | ||
13567 | (define-public python-jsonpatch | |
13568 | (package | |
13569 | (name "python-jsonpatch") | |
13570 | (version "1.16") | |
13571 | (source | |
13572 | (origin | |
854c5c95 | 13573 | (method git-fetch) |
44d10b1f | 13574 | ;; pypi version lacks tests.js |
854c5c95 EF |
13575 | (uri (git-reference |
13576 | (url "https://github.com/stefankoegl/python-json-patch") | |
13577 | (commit (string-append "v" version)))) | |
13578 | (file-name (git-file-name name version)) | |
44d10b1f RW |
13579 | (sha256 |
13580 | (base32 | |
854c5c95 | 13581 | "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr")))) |
44d10b1f RW |
13582 | (build-system python-build-system) |
13583 | (native-inputs | |
13584 | `(("python-jsonpointer" ,python-jsonpointer))) | |
13585 | (home-page "https://github.com/stefankoegl/python-json-patch") | |
13586 | (synopsis "Applying JSON Patches in Python 2.6+ and 3.x") | |
13587 | (description "@code{jsonpatch} is a library and program that allows | |
13588 | applying JSON Patches according to RFC 6902.") | |
13589 | (license license:bsd-3))) | |
13590 | ||
13591 | (define-public python2-jsonpatch | |
13592 | (package-with-python2 python-jsonpatch)) | |
13593 | ||
13594 | (define-public python-jsonpatch-0.4 | |
13595 | (package (inherit python-jsonpatch) | |
13596 | (name "python-jsonpatch") | |
13597 | (version "0.4") | |
13598 | (source | |
13599 | (origin | |
a9722d0d EF |
13600 | (method git-fetch) |
13601 | (uri (git-reference | |
13602 | (url "https://github.com/stefankoegl/python-json-patch") | |
13603 | (commit (string-append "v" version)))) | |
13604 | (file-name (git-file-name name version)) | |
44d10b1f RW |
13605 | (sha256 |
13606 | (base32 | |
a9722d0d | 13607 | "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk")))))) |
44d10b1f RW |
13608 | |
13609 | (define-public python2-jsonpatch-0.4 | |
13610 | (package-with-python2 python-jsonpatch-0.4)) | |
13611 | ||
13612 | (define-public python-rfc3986 | |
13613 | (package | |
13614 | (name "python-rfc3986") | |
13615 | (version "1.1.0") | |
13616 | (source (origin | |
13617 | (method url-fetch) | |
13618 | (uri (pypi-uri "rfc3986" version)) | |
13619 | (sha256 | |
13620 | (base32 | |
13621 | "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44")))) | |
13622 | (build-system python-build-system) | |
13623 | (arguments | |
13624 | `(#:modules ((guix build utils) | |
13625 | (guix build python-build-system) | |
13626 | (ice-9 ftw) | |
13627 | (srfi srfi-1) | |
13628 | (srfi srfi-26)) | |
13629 | #:phases | |
13630 | (modify-phases %standard-phases | |
13631 | (replace 'check | |
13632 | (lambda _ | |
13633 | (let ((cwd (getcwd))) | |
13634 | (setenv "PYTHONPATH" | |
13635 | (string-append cwd "/build/" | |
13636 | (find (cut string-prefix? "lib" <>) | |
13637 | (scandir (string-append cwd "/build"))) | |
13638 | ":" | |
13639 | (getenv "PYTHONPATH"))) | |
13640 | (invoke "pytest" "-v"))))))) | |
13641 | (native-inputs | |
13642 | `(("python-pytest" ,python-pytest))) | |
13643 | (home-page "https://rfc3986.readthedocs.io/") | |
13644 | (synopsis "Parse and validate URI references") | |
13645 | (description | |
13646 | "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including | |
13647 | validation and authority parsing. This module also supports RFC@tie{}6874 | |
13648 | which adds support for zone identifiers to IPv6 addresses.") | |
13649 | (license license:asl2.0))) | |
13650 | ||
13651 | (define-public python2-rfc3986 | |
13652 | (package-with-python2 python-rfc3986)) | |
13653 | ||
13654 | (define-public python-rfc3987 | |
13655 | (package | |
13656 | (name "python-rfc3987") | |
13657 | (version "1.3.7") | |
13658 | (source | |
13659 | (origin | |
13660 | (method url-fetch) | |
13661 | (uri (pypi-uri "rfc3987" version)) | |
13662 | (sha256 | |
13663 | (base32 | |
13664 | "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi")))) | |
13665 | (build-system python-build-system) | |
e85af137 | 13666 | (home-page "https://pypi.org/project/rfc3987/") |
44d10b1f RW |
13667 | (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)") |
13668 | (description "@code{rfc3987} provides routines for parsing and | |
13669 | validation of URIs (see RFC 3986) and IRIs (see RFC 3987).") | |
13670 | (license license:gpl3+))) | |
13671 | ||
13672 | (define-public python2-rfc3987 | |
13673 | (package-with-python2 python-rfc3987)) | |
13674 | ||
13675 | (define-public python-validate-email | |
13676 | (package | |
13677 | (name "python-validate-email") | |
13678 | (version "1.3") | |
13679 | (source | |
13680 | (origin | |
13681 | (method url-fetch) | |
13682 | (uri (pypi-uri "validate_email" version)) | |
13683 | (sha256 | |
13684 | (base32 | |
13685 | "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq")))) | |
13686 | (build-system python-build-system) | |
13687 | (home-page "https://github.com/syrusakbary/validate_email") | |
13688 | (synopsis "Verifies if an email address is valid and really exists") | |
13689 | (description "@code{validate_email} can be used to verify if an email | |
13690 | address is valid and really exists.") | |
13691 | (license license:lgpl3+))) | |
13692 | ||
13693 | (define-public python2-validate-email | |
13694 | (package-with-python2 python-validate-email)) | |
13695 | ||
13696 | (define-public python-flex | |
13697 | (package | |
13698 | (name "python-flex") | |
13699 | (version "6.10.0") | |
13700 | (source | |
13701 | (origin | |
13702 | (method url-fetch) | |
13703 | (uri (pypi-uri "flex" version)) | |
13704 | (sha256 | |
13705 | (base32 | |
13706 | "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk")))) | |
13707 | (build-system python-build-system) | |
13708 | (propagated-inputs | |
13709 | `(("python-click" ,python-click) | |
13710 | ("python-iso8601" ,python-iso8601) | |
13711 | ("python-jsonpointer" ,python-jsonpointer) | |
13712 | ("python-pyyaml" ,python-pyyaml) | |
13713 | ("python-requests" ,python-requests) | |
13714 | ("python-rfc3987" ,python-rfc3987) | |
13715 | ("python-six" ,python-six) | |
13716 | ("python-validate-email" ,python-validate-email))) | |
13717 | (home-page "https://github.com/pipermerriam/flex") | |
13718 | (synopsis "Validates Swagger schemata") | |
13719 | (description "@code{flex} can be used to validate Swagger schemata.") | |
13720 | (license license:bsd-3))) | |
13721 | ||
13722 | (define-public python2-flex | |
13723 | (package-with-python2 python-flex)) | |
13724 | ||
13725 | (define-public python-marshmallow | |
13726 | (package | |
13727 | (name "python-marshmallow") | |
13728 | (version "3.0.0b14") | |
13729 | (source | |
13730 | (origin | |
13731 | (method url-fetch) | |
13732 | (uri (pypi-uri "marshmallow" version)) | |
13733 | (sha256 | |
13734 | (base32 | |
13735 | "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3")))) | |
13736 | (build-system python-build-system) | |
13737 | (propagated-inputs | |
13738 | `(("python-dateutil" ,python-dateutil) | |
13739 | ("python-simplejson" ,python-simplejson))) | |
13740 | (native-inputs | |
13741 | `(("python-pytest" ,python-pytest) | |
13742 | ("python-pytz" ,python-pytz))) | |
13743 | (home-page "https://github.com/marshmallow-code/marshmallow") | |
13744 | (synopsis "Convert complex datatypes to and from native | |
13745 | Python datatypes.") | |
13746 | (description "@code{marshmallow} provides a library for converting | |
13747 | complex datatypes to and from native Python datatypes.") | |
13748 | (license license:expat))) | |
13749 | ||
13750 | (define-public python2-marshmallow | |
13751 | (package-with-python2 python-marshmallow)) | |
13752 | ||
13753 | (define-public python-apispec | |
13754 | (package | |
13755 | (name "python-apispec") | |
13756 | (version "0.25.3") | |
13757 | (source | |
13758 | (origin | |
13759 | (method url-fetch) | |
13760 | (uri (pypi-uri "apispec" version)) | |
13761 | (sha256 | |
13762 | (base32 | |
13763 | "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9")))) | |
13764 | (build-system python-build-system) | |
13765 | (propagated-inputs | |
13766 | `(("python-pyyaml" ,python-pyyaml))) | |
13767 | (native-inputs | |
13768 | `(("python-pytest" ,python-pytest) | |
13769 | ("python-flask" ,python-flask) | |
13770 | ("python-marshmallow" ,python-marshmallow) | |
13771 | ("python-tornado" ,python-tornado) | |
13772 | ("python-bottle" ,python-bottle) | |
13773 | ("python-mock" ,python-mock))) | |
13774 | (home-page "https://github.com/marshmallow-code/apispec") | |
13775 | (synopsis "Swagger 2.0 API specification generator") | |
13776 | (description "@code{python-apispec} is a pluggable API specification | |
13777 | generator. Currently supports the OpenAPI specification (f.k.a. | |
13778 | Swagger 2.0).") | |
13779 | (license license:expat))) | |
13780 | ||
13781 | (define-public python2-apispec | |
13782 | (package-with-python2 python-apispec)) | |
13783 | ||
13784 | (define-public python-flasgger | |
13785 | (package | |
13786 | (name "python-flasgger") | |
13787 | (version "0.6.3") | |
13788 | (source | |
13789 | (origin | |
1a04d421 TGR |
13790 | (method git-fetch) |
13791 | (uri (git-reference | |
13792 | (url "https://github.com/rochacbruno/flasgger.git") | |
13793 | (commit version))) | |
13794 | (file-name (git-file-name name version)) | |
44d10b1f | 13795 | (sha256 |
1a04d421 | 13796 | (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn")))) |
44d10b1f RW |
13797 | (build-system python-build-system) |
13798 | (arguments | |
13799 | `(#:phases | |
13800 | (modify-phases %standard-phases | |
13801 | (replace 'check | |
13802 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
13803 | (substitute* "Makefile" | |
13804 | (("flake8 flasgger --ignore=F403") | |
13805 | "flake8 flasgger --ignore=E731,F403")) | |
13806 | (setenv "PYTHONPATH" (string-append (getcwd) | |
13807 | ":" | |
13808 | (getenv "PYTHONPATH"))) | |
ac599a09 | 13809 | (invoke "py.test")))))) |
44d10b1f RW |
13810 | (propagated-inputs |
13811 | `(("python-flask" ,python-flask) | |
13812 | ("python-pyyaml" ,python-pyyaml) | |
13813 | ("python-jsonschema" ,python-jsonschema) | |
13814 | ("python-mistune" ,python-mistune) | |
13815 | ("python-six" ,python-six))) | |
13816 | (native-inputs | |
13817 | `(("python-decorator" ,python-decorator) | |
13818 | ("python-flake8" ,python-flake8) | |
13819 | ("python-flask-restful" ,python-flask-restful) | |
13820 | ("python-flex" ,python-flex) | |
13821 | ("python-pytest" ,python-pytest) | |
13822 | ("python-pytest-cov" ,python-pytest-cov) | |
13823 | ("python-marshmallow" ,python-marshmallow) | |
13824 | ("python-apispec" ,python-apispec))) | |
13825 | (home-page "https://github.com/rochacbruno/flasgger/") | |
13826 | (synopsis "Extract Swagger specs from your Flask project") | |
13827 | (description "@code{python-flasgger} allows extracting Swagger specs | |
13828 | from your Flask project. It is a fork of Flask-Swagger.") | |
13829 | (license license:expat))) | |
13830 | ||
13831 | (define-public python2-flasgger | |
13832 | (package-with-python2 python-flasgger)) | |
13833 | ||
13834 | (define-public python-swagger-spec-validator | |
13835 | (package | |
13836 | (name "python-swagger-spec-validator") | |
fe9c5b1d | 13837 | (version "2.4.3") |
44d10b1f RW |
13838 | (source |
13839 | (origin | |
13840 | (method url-fetch) | |
13841 | (uri (pypi-uri "swagger-spec-validator" version)) | |
13842 | (sha256 | |
13843 | (base32 | |
fe9c5b1d | 13844 | "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp")))) |
44d10b1f RW |
13845 | (build-system python-build-system) |
13846 | (propagated-inputs | |
13847 | `(("python-jsonschema" ,python-jsonschema) | |
fe9c5b1d | 13848 | ("python-pyyaml" ,python-pyyaml) |
44d10b1f RW |
13849 | ("python-six" ,python-six))) |
13850 | (home-page | |
13851 | "https://github.com/Yelp/swagger_spec_validator") | |
13852 | (synopsis "Validation of Swagger specifications") | |
13853 | (description "@code{swagger_spec_validator} provides a library for | |
13854 | validating Swagger API specifications.") | |
13855 | (license license:asl2.0))) | |
13856 | ||
13857 | (define-public python2-swagger-spec-validator | |
13858 | (package-with-python2 python-swagger-spec-validator)) | |
13859 | ||
13860 | (define-public python-apache-libcloud | |
13861 | (package | |
13862 | (name "python-apache-libcloud") | |
13863 | (version "2.4.0") | |
13864 | (source | |
13865 | (origin | |
13866 | (method url-fetch) | |
13867 | (uri (pypi-uri "apache-libcloud" version)) | |
13868 | (sha256 | |
13869 | (base32 | |
13870 | "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j")))) | |
13871 | (build-system python-build-system) | |
13872 | (arguments | |
13873 | `(#:phases | |
13874 | (modify-phases %standard-phases | |
13875 | (add-after 'unpack 'patch-ssh | |
13876 | (lambda* (#:key inputs #:allow-other-keys) | |
13877 | (substitute* "libcloud/compute/ssh.py" | |
13878 | (("'ssh'") (string-append "'" (assoc-ref inputs "openssh") | |
13879 | "/bin/ssh" "'"))) | |
13880 | #t)) | |
13881 | (add-after 'unpack 'patch-tests | |
13882 | (lambda _ | |
13883 | (substitute* "./libcloud/test/test_file_fixtures.py" | |
13884 | ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>. | |
13885 | (("def _ascii") "def _raw_data(self, method, url, body, headers): | |
13886 | return (httplib.OK, | |
13887 | \"1234abcd\", | |
13888 | {\"test\": \"value\"}, | |
13889 | httplib.responses[httplib.OK]) | |
13890 | def _ascii")) | |
13891 | (substitute* "libcloud/test/compute/test_ssh_client.py" | |
13892 | (("class ShellOutSSHClientTests") | |
13893 | "@unittest.skip(\"Guix container doesn't have ssh service\") | |
13894 | class ShellOutSSHClientTests") | |
13895 | ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>. | |
13896 | (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'") | |
13897 | (("'.xF0', '.x90', '.x8D', '.x88'") | |
13898 | "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'")) | |
13899 | #t)) | |
13900 | (add-before 'check 'copy-secret | |
13901 | (lambda _ | |
13902 | (copy-file "libcloud/test/secrets.py-dist" | |
13903 | "libcloud/test/secrets.py") | |
13904 | #t))))) | |
13905 | (inputs | |
13906 | `(("openssh" ,openssh))) | |
13907 | (propagated-inputs | |
13908 | `(("python-paramiko" ,python-paramiko) | |
13909 | ("python-requests" ,python-requests))) | |
13910 | (native-inputs | |
13911 | `(("python-lockfile" ,python-lockfile) | |
13912 | ("python-mock" ,python-mock) | |
13913 | ("python-pytest" ,python-pytest) | |
13914 | ("python-pytest-runner" ,python-pytest-runner) | |
13915 | ("python-requests-mock" ,python-requests-mock))) | |
13916 | (home-page "https://libcloud.apache.org/") | |
13917 | (synopsis "Unified Cloud API") | |
13918 | (description "@code{libcloud} is a Python library for interacting with | |
13919 | many of the popular cloud service providers using a unified API.") | |
13920 | (license license:asl2.0))) | |
13921 | ||
13922 | (define-public python2-apache-libcloud | |
13923 | (package-with-python2 python-apache-libcloud)) | |
13924 | ||
1639e0b7 | 13925 | (define-public python-smmap |
44d10b1f | 13926 | (package |
1639e0b7 MC |
13927 | (name "python-smmap") |
13928 | (version "3.0.1") | |
44d10b1f RW |
13929 | (source |
13930 | (origin | |
13931 | (method url-fetch) | |
1639e0b7 | 13932 | (uri (pypi-uri "smmap" version)) |
44d10b1f | 13933 | (sha256 |
1639e0b7 | 13934 | (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p")))) |
44d10b1f RW |
13935 | (build-system python-build-system) |
13936 | (native-inputs | |
13937 | `(("python-nosexcover" ,python-nosexcover))) | |
13938 | (home-page "https://github.com/Byron/smmap") | |
13939 | (synopsis "Python sliding window memory map manager") | |
1639e0b7 | 13940 | (description "@code{smmap} is a pure Python implementation of a sliding |
44d10b1f RW |
13941 | window memory map manager.") |
13942 | (license license:bsd-3))) | |
13943 | ||
1639e0b7 MC |
13944 | (define-public python-smmap2 |
13945 | (deprecated-package "python-smmap2" python-smmap)) | |
13946 | ||
13947 | (define-public python2-smmap | |
13948 | (package-with-python2 python-smmap)) | |
13949 | ||
44d10b1f | 13950 | (define-public python2-smmap2 |
1639e0b7 | 13951 | (deprecated-package "python2-smmap2" python2-smmap)) |
44d10b1f RW |
13952 | |
13953 | (define-public python-regex | |
13954 | (package | |
13955 | (name "python-regex") | |
c187c9d7 | 13956 | (version "2019.04.14") |
44d10b1f RW |
13957 | (source (origin |
13958 | (method url-fetch) | |
13959 | (uri (pypi-uri "regex" version)) | |
13960 | (sha256 | |
13961 | (base32 | |
c187c9d7 BT |
13962 | "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m")))) |
13963 | ;; TODO: Fix and enable regex_test.py tests that complain about the | |
13964 | ;; test.support module not existing. | |
44d10b1f RW |
13965 | (build-system python-build-system) |
13966 | (home-page "https://bitbucket.org/mrabarnett/mrab-regex") | |
13967 | (synopsis "Alternative regular expression module") | |
13968 | (description "This regular expression implementation is backwards- | |
13969 | compatible with the standard @code{re} module, but offers additional | |
13970 | functionality like full case-folding for case-insensitive matches in Unicode.") | |
13971 | (license license:psfl))) | |
13972 | ||
13973 | (define-public python2-regex | |
13974 | (package-with-python2 python-regex)) | |
13975 | ||
13976 | (define-public python2-pyopengl | |
13977 | (package | |
13978 | (name "python2-pyopengl") | |
13979 | (version "3.1.0") | |
13980 | (source | |
13981 | (origin | |
13982 | (method url-fetch) | |
13983 | (uri (pypi-uri "PyOpenGL" version)) | |
13984 | (sha256 | |
13985 | (base32 | |
13986 | "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv")))) | |
13987 | (arguments | |
13988 | `(#:python ,python-2)) | |
13989 | (build-system python-build-system) | |
13990 | (home-page "http://pyopengl.sourceforge.net") | |
13991 | (synopsis "Standard OpenGL bindings for Python") | |
13992 | (description | |
13993 | "PyOpenGL is the most common cross platform Python binding to OpenGL and | |
13994 | related APIs. The binding is created using the standard @code{ctypes} | |
13995 | library.") | |
13996 | (license license:bsd-3))) | |
13997 | ||
13998 | (define-public python2-pyopengl-accelerate | |
13999 | (package | |
14000 | (inherit python2-pyopengl) | |
14001 | (name "python2-pyopengl-accelerate") | |
14002 | (version "3.1.0") | |
14003 | (source | |
14004 | (origin | |
14005 | (method url-fetch) | |
14006 | (uri (pypi-uri "PyOpenGL-accelerate" version)) | |
14007 | (sha256 | |
14008 | (base32 | |
14009 | "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj")))) | |
14010 | (synopsis "Acceleration code for PyOpenGL") | |
14011 | (description | |
14012 | "This is the Cython-coded accelerator module for PyOpenGL."))) | |
14013 | ||
14014 | (define-public python-rencode | |
14015 | (package | |
14016 | (name "python-rencode") | |
14017 | (version "1.0.5") | |
14018 | (source | |
14019 | (origin | |
14020 | (method url-fetch) | |
14021 | (uri (pypi-uri "rencode" version)) | |
14022 | (sha256 | |
14023 | (base32 | |
14024 | "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv")))) | |
14025 | (build-system python-build-system) | |
14026 | (arguments | |
14027 | `(#:phases | |
14028 | (modify-phases %standard-phases | |
14029 | (add-before 'check 'delete-bogus-test | |
14030 | ;; This test requires /home/aresch/Downloads, which is not provided by | |
14031 | ;; the build environment. | |
14032 | (lambda _ | |
14033 | (delete-file "rencode/t.py") | |
14034 | #t))))) | |
14035 | (native-inputs `(("pkg-config" ,pkg-config) | |
14036 | ("python-cython" ,python-cython))) | |
14037 | (home-page "https://github.com/aresch/rencode") | |
14038 | (synopsis "Serialization of heterogeneous data structures") | |
14039 | (description | |
14040 | "The @code{rencode} module is a data structure serialization library, | |
14041 | similar to @code{bencode} from the BitTorrent project. For complex, | |
14042 | heterogeneous data structures with many small elements, r-encoding stake up | |
14043 | significantly less space than b-encodings. This version of rencode is a | |
14044 | complete rewrite in Cython to attempt to increase the performance over the | |
14045 | pure Python module.") | |
14046 | (license license:bsd-3))) | |
14047 | ||
14048 | (define-public python2-rencode | |
14049 | (package-with-python2 python-rencode)) | |
14050 | ||
14051 | (define-public python-xenon | |
14052 | (package | |
14053 | (name "python-xenon") | |
8c06d6d8 | 14054 | (version "0.7.0") |
44d10b1f RW |
14055 | (source |
14056 | (origin | |
14057 | (method url-fetch) | |
14058 | (uri (pypi-uri "xenon" version)) | |
14059 | (sha256 | |
14060 | (base32 | |
8c06d6d8 | 14061 | "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y")))) |
44d10b1f RW |
14062 | (build-system python-build-system) |
14063 | (native-inputs | |
14064 | `(("python-pyyaml" ,python-pyyaml) | |
14065 | ("python-radon" ,python-radon) | |
14066 | ("python-requests" ,python-requests) | |
14067 | ("python-flake8" ,python-flake8) | |
14068 | ("python-tox" ,python-tox))) | |
14069 | (arguments | |
8c06d6d8 MC |
14070 | `(#:tests? #f ;test suite not shipped with the PyPI archive |
14071 | #:phases | |
44d10b1f RW |
14072 | (modify-phases %standard-phases |
14073 | (add-before 'build 'patch-test-requirements | |
14074 | (lambda _ | |
14075 | ;; Remove httpretty dependency for tests. | |
14076 | (substitute* "setup.py" | |
14077 | (("httpretty") "")) | |
14078 | #t))))) | |
14079 | (home-page "https://xenon.readthedocs.org/") | |
14080 | (synopsis "Monitor code metrics for Python on your CI server") | |
14081 | (description | |
14082 | "Xenon is a monitoring tool based on Radon. It monitors code complexity. | |
14083 | Ideally, @code{xenon} is run every time code is committed. Through command | |
14084 | line options, various thresholds can be set for the complexity of code. It | |
14085 | will fail (i.e. it will exit with a non-zero exit code) when any of these | |
14086 | requirements is not met.") | |
14087 | (license license:expat))) | |
14088 | ||
14089 | (define-public python2-xenon | |
14090 | (package-with-python2 python-xenon)) | |
14091 | ||
14092 | (define-public python-pysocks | |
14093 | (package | |
14094 | (name "python-pysocks") | |
b8725cdf | 14095 | (version "1.7.0") |
44d10b1f RW |
14096 | (source |
14097 | (origin | |
14098 | (method url-fetch) | |
14099 | (uri (pypi-uri "PySocks" version)) | |
14100 | (sha256 | |
14101 | (base32 | |
b8725cdf | 14102 | "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr")))) |
44d10b1f RW |
14103 | (build-system python-build-system) |
14104 | (arguments `(#:tests? #f)) | |
14105 | (home-page "https://github.com/Anorov/PySocks") | |
14106 | (synopsis "SOCKS client module") | |
14107 | (description "@code{pysocks} is an updated and semi-actively maintained | |
14108 | version of @code{SocksiPy} with bug fixes and extra features.") | |
14109 | (license license:bsd-3))) | |
14110 | ||
14111 | (define-public python2-pysocks | |
14112 | (package-with-python2 python-pysocks)) | |
14113 | ||
14114 | (define-public python-pydiff | |
14115 | (package | |
14116 | (name "python-pydiff") | |
14117 | (version "0.2") | |
14118 | (source | |
14119 | (origin | |
14120 | (method url-fetch) | |
14121 | (uri (pypi-uri "pydiff" version)) | |
14122 | (sha256 | |
14123 | (base32 | |
14124 | "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44")))) | |
14125 | (build-system python-build-system) | |
14126 | (home-page "https://github.com/myint/pydiff") | |
14127 | (synopsis "Library to diff two Python files at the bytecode level") | |
14128 | (description | |
14129 | "@code{pydiff} makes it easy to look for actual code changes while | |
14130 | ignoring formatting changes.") | |
14131 | (license license:expat))) | |
14132 | ||
14133 | (define-public python2-pydiff | |
14134 | (package-with-python2 python-pydiff)) | |
14135 | ||
14136 | (define-public python-tqdm | |
14137 | (package | |
14138 | (name "python-tqdm") | |
14139 | (version "4.19.6") | |
14140 | (source | |
14141 | (origin | |
14142 | (method url-fetch) | |
14143 | (uri (pypi-uri "tqdm" version)) | |
14144 | (sha256 | |
14145 | (base32 | |
14146 | "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y")))) | |
14147 | (build-system python-build-system) | |
14148 | (native-inputs | |
14149 | `(("python-flake8" ,python-flake8) | |
14150 | ("python-nose" ,python-nose) | |
14151 | ("python-coverage" ,python-coverage))) | |
14152 | (home-page "https://github.com/tqdm/tqdm") | |
14153 | (synopsis "Fast, extensible progress meter") | |
14154 | (description | |
14155 | "Make loops show a progress bar on the console by just wrapping any | |
14156 | iterable with @code{|tqdm(iterable)|}. Offers many options to define | |
14157 | design and layout.") | |
f875d76f PL |
14158 | (license (list license:mpl2.0 license:expat)) |
14159 | (properties `((python2-variant . ,(delay python2-tqdm)))))) | |
44d10b1f RW |
14160 | |
14161 | (define-public python2-tqdm | |
f875d76f PL |
14162 | (let ((tqdm (package-with-python2 |
14163 | (strip-python2-variant python-tqdm)))) | |
14164 | (package (inherit tqdm) | |
14165 | (native-inputs `(("python2-functools32" ,python2-functools32) | |
14166 | ,@(package-native-inputs tqdm)))))) | |
44d10b1f RW |
14167 | |
14168 | (define-public python-pkginfo | |
14169 | (package | |
14170 | (name "python-pkginfo") | |
14171 | (version "1.4.2") | |
14172 | (source | |
14173 | (origin | |
14174 | (method url-fetch) | |
14175 | (uri (pypi-uri "pkginfo" version)) | |
14176 | (sha256 | |
14177 | (base32 | |
14178 | "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q")))) | |
14179 | (build-system python-build-system) | |
14180 | (arguments | |
14181 | ;; The tests are broken upstream. | |
14182 | '(#:tests? #f)) | |
14183 | (home-page | |
14184 | "https://code.launchpad.net/~tseaver/pkginfo/trunk") | |
14185 | (synopsis | |
14186 | "Query metadatdata from sdists, bdists, and installed packages") | |
14187 | (description | |
14188 | "API to query the distutils metadata written in @file{PKG-INFO} inside a | |
14189 | source distriubtion (an sdist) or a binary distribution (e.g., created by | |
14190 | running bdist_egg). It can also query the EGG-INFO directory of an installed | |
14191 | distribution, and the *.egg-info stored in a \"development checkout\" (e.g, | |
14192 | created by running @code{python setup.py develop}).") | |
14193 | (license license:expat))) | |
14194 | ||
14195 | (define-public python2-pkginfo | |
14196 | (package-with-python2 python-pkginfo)) | |
14197 | ||
14198 | (define-public python-twine | |
14199 | (package | |
14200 | (name "python-twine") | |
14201 | (version "1.9.1") | |
14202 | (source | |
14203 | (origin | |
14204 | (method url-fetch) | |
14205 | (uri (pypi-uri "twine" version)) | |
14206 | (sha256 | |
14207 | (base32 | |
14208 | "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a")))) | |
14209 | (build-system python-build-system) | |
14210 | (propagated-inputs | |
14211 | `(("python-tqdm" ,python-tqdm) | |
14212 | ("python-pkginfo" ,python-pkginfo) | |
14213 | ("python-requests" ,python-requests) | |
14214 | ("python-requests-toolbelt" ,python-requests-toolbelt))) | |
14215 | (home-page "https://github.com/pypa/twine") | |
14216 | (synopsis "Collection of utilities for interacting with PyPI") | |
14217 | (description | |
14218 | "@code{twine} currently supports registering projects and uploading | |
14219 | distributions. It authenticates the user over HTTPS, allows them to pre-sign | |
14220 | their files and supports any packaging format (including wheels).") | |
14221 | (license license:asl2.0))) | |
14222 | ||
14223 | (define-public python2-twine | |
14224 | (package-with-python2 python-twine)) | |
14225 | ||
14226 | (define-public python-linecache2 | |
14227 | (package | |
14228 | (name "python-linecache2") | |
14229 | (version "1.0.0") | |
14230 | (source | |
14231 | (origin | |
14232 | (method url-fetch) | |
14233 | (uri (pypi-uri "linecache2" version)) | |
14234 | (sha256 | |
14235 | (base32 | |
14236 | "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb")))) | |
14237 | (build-system python-build-system) | |
14238 | (arguments | |
14239 | `(;; The tests depend on unittest2, and our version is a bit too old. | |
14240 | #:tests? #f)) | |
14241 | (native-inputs | |
14242 | `(("python-pbr" ,python-pbr-minimal))) | |
14243 | (home-page | |
14244 | "https://github.com/testing-cabal/linecache2") | |
14245 | (synopsis "Backports of the linecache module") | |
14246 | (description | |
14247 | "The linecache module allows one to get any line from any file, while | |
14248 | attempting to optimize internally, using a cache, the common case where many | |
14249 | lines are read from a single file.") | |
14250 | (license license:psfl))) | |
14251 | ||
14252 | (define-public python2-linecache2 | |
14253 | (package-with-python2 python-linecache2)) | |
14254 | ||
14255 | (define-public python-traceback2 | |
14256 | (package | |
14257 | (name "python-traceback2") | |
14258 | (version "1.4.0") | |
14259 | (source | |
14260 | (origin | |
14261 | (method url-fetch) | |
14262 | (uri (pypi-uri "traceback2" version)) | |
14263 | (sha256 | |
14264 | (base32 | |
14265 | "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05")))) | |
14266 | (build-system python-build-system) | |
14267 | (arguments | |
14268 | `(;; python-traceback2 and python-unittest2 depend on one another. | |
14269 | #:tests? #f)) | |
14270 | (native-inputs | |
14271 | `(("python-pbr" ,python-pbr-minimal))) | |
14272 | (propagated-inputs | |
14273 | `(("python-linecache2" ,python-linecache2))) | |
14274 | (home-page | |
14275 | "https://github.com/testing-cabal/traceback2") | |
14276 | (synopsis "Backports of the traceback module") | |
14277 | (description | |
14278 | "This module provides a standard interface to extract, format and print | |
14279 | stack traces of Python programs. It exactly mimics the behavior of the Python | |
14280 | interpreter when it prints a stack trace.") | |
14281 | (license license:psfl))) | |
14282 | ||
14283 | (define-public python2-traceback2 | |
14284 | (package-with-python2 python-traceback2)) | |
14285 | ||
14286 | (define-public python-ratelimiter | |
14287 | (package | |
14288 | (name "python-ratelimiter") | |
14289 | (version "1.2.0") | |
14290 | (source | |
14291 | (origin | |
14292 | (method url-fetch) | |
14293 | (uri (pypi-uri "ratelimiter" version)) | |
14294 | (sha256 | |
14295 | (base32 | |
14296 | "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p")))) | |
14297 | (build-system python-build-system) | |
14298 | (arguments | |
14299 | '(#:tests? #f)) ; There are no tests in the pypi archive. | |
14300 | (home-page "https://github.com/RazerM/ratelimiter") | |
14301 | (synopsis "Simple rate limiting object") | |
14302 | (description | |
14303 | "The @code{ratelimiter} module ensures that an operation will not be | |
14304 | executed more than a given number of times during a given period.") | |
14305 | (license license:asl2.0))) | |
14306 | ||
14307 | (define-public python2-ratelimiter | |
14308 | (package-with-python2 python-ratelimiter)) | |
14309 | ||
14310 | (define-public python-dukpy | |
14311 | (package | |
14312 | (name "python-dukpy") | |
14313 | (version "0.3") | |
14314 | (source | |
14315 | (origin | |
5b77ebe1 TGR |
14316 | (method git-fetch) |
14317 | (uri (git-reference | |
14318 | (url "https://github.com/kovidgoyal/dukpy.git") | |
14319 | (commit (string-append "v" version)))) | |
14320 | (file-name (git-file-name name version)) | |
44d10b1f | 14321 | (sha256 |
5b77ebe1 | 14322 | (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls")))) |
44d10b1f RW |
14323 | (build-system python-build-system) |
14324 | (home-page "https://github.com/kovidgoyal/dukpy") | |
14325 | (synopsis "Run JavaScript in python") | |
14326 | (description | |
14327 | "dukpy is a JavaScript runtime environment for Python using the duktape | |
14328 | embeddable JavaScript engine.") | |
14329 | ;; Dukpy is licensed under MIT like the embedded duktape library, | |
14330 | ;; with 'errors.c' as GPL3. | |
14331 | (license (list license:expat license:gpl3)))) | |
14332 | ||
14333 | (define-public python2-dukpy | |
14334 | (package-with-python2 python-dukpy)) | |
14335 | ||
14336 | (define-public python-jsonrpclib-pelix | |
14337 | (package | |
14338 | (name "python-jsonrpclib-pelix") | |
14339 | (version "0.3.2") | |
14340 | (source | |
14341 | (origin | |
14342 | (method url-fetch) | |
14343 | (uri (pypi-uri "jsonrpclib-pelix" version)) | |
14344 | (sha256 | |
14345 | (base32 | |
14346 | "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl")))) | |
14347 | (build-system python-build-system) | |
14348 | (arguments | |
14349 | `(#:tests? #f)) ; no tests in PyPI tarball | |
14350 | (home-page "https://github.com/tcalmant/jsonrpclib/") | |
14351 | (synopsis "JSON-RPC 2.0 client library for Python") | |
14352 | (description | |
14353 | "This library implements the JSON-RPC v2.0 | |
14354 | specification (backwards-compatible) as a client library for Python. This | |
14355 | version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote | |
14356 | services.") | |
14357 | (license license:asl2.0))) | |
14358 | ||
14359 | (define-public python2-jsonrpclib-pelix | |
14360 | (package-with-python2 python-jsonrpclib-pelix)) | |
14361 | ||
14362 | (define-public python-setuptools-scm-git-archive | |
14363 | (package | |
14364 | (name "python-setuptools-scm-git-archive") | |
14365 | (version "1.0") | |
14366 | (source | |
14367 | (origin | |
14368 | (method url-fetch) | |
14369 | (uri (pypi-uri "setuptools_scm_git_archive" version)) | |
14370 | (sha256 | |
14371 | (base32 | |
14372 | "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj")))) | |
14373 | (build-system python-build-system) | |
14374 | (native-inputs | |
14375 | `(("python-pytest" ,python-pytest))) | |
14376 | (propagated-inputs | |
14377 | `(("python-setuptools-scm" ,python-setuptools-scm))) | |
14378 | (home-page "https://github.com/Changaco/setuptools_scm_git_archive/") | |
14379 | (synopsis "Setuptools_scm plugin for git archives") | |
14380 | (description | |
14381 | "The setuptools_scm_git_archive package is a plugin to | |
14382 | setuptools_scm, which supports obtaining versions from git archives that | |
14383 | belong to tagged versions.") | |
14384 | (license license:expat))) | |
14385 | ||
14386 | (define-public python2-setuptools-scm-git-archive | |
14387 | (package-with-python2 python-setuptools-scm-git-archive)) | |
14388 | ||
724a350c RW |
14389 | (define-public python-setuptools-git |
14390 | (package | |
14391 | (name "python-setuptools-git") | |
14392 | (version "1.2") | |
14393 | (source | |
14394 | (origin | |
14395 | (method url-fetch) | |
14396 | (uri (pypi-uri "setuptools-git" version)) | |
14397 | (sha256 | |
14398 | (base32 | |
14399 | "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z")))) | |
14400 | (build-system python-build-system) | |
14401 | (arguments | |
14402 | `(#:phases | |
14403 | (modify-phases %standard-phases | |
14404 | ;; This is needed for tests. | |
14405 | (add-after 'unpack 'configure-git | |
14406 | (lambda _ | |
14407 | (setenv "HOME" "/tmp") | |
14408 | (invoke "git" "config" "--global" "user.email" "guix") | |
14409 | (invoke "git" "config" "--global" "user.name" "guix") | |
14410 | #t))))) | |
14411 | (native-inputs | |
14412 | `(("git" ,git-minimal))) | |
14413 | (home-page "https://github.com/msabramo/setuptools-git") | |
14414 | (synopsis "Setuptools revision control system plugin for Git") | |
14415 | (description | |
14416 | "This package provides a plugin for Setuptools for revision control with | |
14417 | Git.") | |
14418 | (license license:bsd-3))) | |
14419 | ||
44d10b1f RW |
14420 | (define-public python-pyclipper |
14421 | (package | |
14422 | (name "python-pyclipper") | |
ff3d1b99 | 14423 | (version "1.1.0.post3") |
44d10b1f RW |
14424 | (source |
14425 | (origin | |
14426 | (method url-fetch) | |
14427 | (uri (pypi-uri "pyclipper" version ".zip")) | |
14428 | (sha256 | |
ff3d1b99 | 14429 | (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i")) |
44d10b1f RW |
14430 | (modules '((guix build utils))) |
14431 | (snippet | |
14432 | '(begin | |
14433 | ;; This file is generated by Cython. | |
14434 | (delete-file "pyclipper/pyclipper.cpp") #t)))) | |
14435 | (build-system python-build-system) | |
14436 | (arguments | |
14437 | `(#:phases | |
14438 | (modify-phases %standard-phases | |
14439 | (add-before 'build 'cythonize-sources | |
14440 | (lambda _ | |
14441 | (with-directory-excursion "pyclipper" | |
14442 | (invoke "cython" "--cplus" "pyclipper.pyx"))))))) | |
14443 | (propagated-inputs | |
14444 | `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive))) | |
14445 | (native-inputs | |
14446 | `(("python-cython" ,python-cython) | |
14447 | ("python-pytest" ,python-pytest) | |
14448 | ("python-pytest-runner" ,python-pytest-runner) | |
14449 | ("python-unittest2" ,python-unittest2) | |
14450 | ("unzip" ,unzip))) | |
14451 | (home-page "https://github.com/greginvm/pyclipper") | |
14452 | (synopsis "Wrapper for Angus Johnson's Clipper library") | |
14453 | (description | |
14454 | "Pyclipper is a Cython wrapper for the C++ translation of the | |
14455 | Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).") | |
14456 | (license license:expat))) | |
14457 | ||
14458 | (define-public python2-pyclipper | |
14459 | (package-with-python2 python-pyclipper)) | |
14460 | ||
14461 | (define-public python2-booleanoperations | |
14462 | (package | |
14463 | (name "python2-booleanoperations") | |
14464 | (version "0.7.1") | |
14465 | (source | |
14466 | (origin | |
14467 | (method url-fetch) | |
14468 | (uri (pypi-uri "booleanOperations" version ".zip")) | |
14469 | (sha256 | |
14470 | (base32 | |
14471 | "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn")))) | |
14472 | (build-system python-build-system) | |
14473 | (arguments | |
14474 | `(#:python ,python-2)) | |
14475 | (native-inputs | |
14476 | `(("unzip" ,unzip) | |
14477 | ("python2-pytest" ,python2-pytest) | |
14478 | ("python2-pytest-runner" ,python2-pytest-runner))) | |
14479 | (propagated-inputs | |
14480 | `(("python-fonttools" ,python2-fonttools) | |
14481 | ("python-pyclipper" ,python2-pyclipper) | |
14482 | ("python-ufolib" ,python2-ufolib))) | |
14483 | (home-page "https://github.com/typemytype/booleanOperations") | |
14484 | (synopsis "Boolean operations on paths") | |
14485 | (description | |
14486 | "BooleanOperations provides a Python library that enables | |
14487 | boolean operations on paths.") | |
14488 | (license license:expat))) | |
14489 | ||
14490 | (define-public python-tempdir | |
14491 | (package | |
14492 | (name "python-tempdir") | |
14493 | (version "0.7.1") | |
14494 | (source | |
14495 | (origin | |
14496 | (method url-fetch) | |
14497 | (uri (pypi-uri "tempdir" version)) | |
14498 | (sha256 | |
14499 | (base32 | |
14500 | "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8")))) | |
14501 | (build-system python-build-system) | |
14502 | (home-page "https://pypi.org/project/tempdir/") | |
14503 | (arguments | |
14504 | ;; the package has no tests | |
14505 | '(#:tests? #f)) | |
14506 | (synopsis "Python library for managing temporary directories") | |
14507 | (description | |
14508 | "This library manages temporary directories that are automatically | |
14509 | deleted with all their contents when they are no longer needed. It is | |
14510 | particularly convenient for use in tests.") | |
14511 | (license license:expat))) | |
14512 | ||
14513 | (define-public python2-tempdir | |
14514 | (package-with-python2 python-tempdir)) | |
14515 | ||
14516 | (define-public python-activepapers | |
14517 | (package | |
14518 | (name "python-activepapers") | |
14519 | (version "0.2.2") | |
14520 | (source | |
14521 | (origin | |
14522 | (method url-fetch) | |
14523 | (uri (pypi-uri "ActivePapers.Py" version)) | |
14524 | (sha256 | |
14525 | (base32 | |
14526 | "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8")))) | |
14527 | (build-system python-build-system) | |
14528 | (arguments | |
14529 | `(#:modules ((ice-9 ftw) | |
14530 | (srfi srfi-1) | |
14531 | (guix build utils) | |
14532 | (guix build python-build-system)) | |
14533 | ||
14534 | #:phases | |
14535 | (modify-phases %standard-phases | |
14536 | (add-after 'unpack 'delete-python2-code | |
14537 | (lambda _ | |
14538 | (for-each delete-file | |
14539 | '("lib/activepapers/builtins2.py" | |
14540 | "lib/activepapers/standardlib2.py" | |
14541 | "lib/activepapers/utility2.py")))) | |
14542 | (replace 'check | |
14543 | (lambda _ | |
14544 | ;; Deactivate the test cases that download files | |
14545 | (setenv "NO_NETWORK_ACCESS" "1") | |
14546 | ;; For some strange reason, some tests fail if nosetests runs all | |
14547 | ;; test modules in a single execution. They pass if each test | |
14548 | ;; module is run individually. | |
14549 | (for-each (lambda (filename) | |
14550 | (invoke "nosetests" | |
14551 | (string-append "tests/" filename))) | |
14552 | (scandir "tests" | |
14553 | (lambda (filename) | |
14554 | (string-suffix? ".py" filename))))))))) | |
14555 | (native-inputs | |
14556 | `(("python-tempdir" ,python-tempdir) | |
14557 | ("python-nose" ,python-nose))) | |
14558 | (propagated-inputs | |
14559 | `(("python-h5py" ,python-h5py))) | |
26827dfe | 14560 | (home-page "https://www.activepapers.org/") |
44d10b1f RW |
14561 | (synopsis "Executable papers for scientific computing") |
14562 | (description | |
14563 | "ActivePapers is a tool for working with executable papers, which | |
14564 | combine data, code, and documentation in single-file packages, | |
14565 | suitable for publication as supplementary material or on repositories | |
14566 | such as figshare or Zenodo.") | |
14567 | (properties `((python2-variant . ,(delay python2-activepapers)))) | |
14568 | (license license:bsd-3))) | |
14569 | ||
14570 | (define-public python2-activepapers | |
14571 | (let ((base (package-with-python2 | |
14572 | (strip-python2-variant python-activepapers)))) | |
14573 | (package | |
14574 | (inherit base) | |
14575 | (arguments | |
14576 | (substitute-keyword-arguments (package-arguments base) | |
14577 | ((#:phases phases) | |
14578 | `(modify-phases ,phases | |
14579 | (delete 'delete-python2-code) | |
14580 | (add-after 'unpack 'delete-python3-code | |
14581 | (lambda _ | |
14582 | (for-each delete-file | |
14583 | '("lib/activepapers/builtins3.py" | |
14584 | "lib/activepapers/standardlib3.py" | |
14585 | "lib/activepapers/utility3.py"))))))))))) | |
14586 | ||
14587 | (define-public python-semver | |
14588 | (package | |
14589 | (name "python-semver") | |
594280b1 | 14590 | (version "2.9.0") |
44d10b1f | 14591 | (source |
2ecbba24 BG |
14592 | (origin |
14593 | (method url-fetch) | |
14594 | (uri (pypi-uri "semver" version)) | |
14595 | (sha256 | |
14596 | (base32 | |
14597 | "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd")))) | |
44d10b1f | 14598 | (build-system python-build-system) |
44d10b1f | 14599 | (native-inputs |
b4e1ca06 RJ |
14600 | `(("python-appdirs" ,python-appdirs) |
14601 | ("python-distlib" ,python-distlib) | |
14602 | ("python-importlib-metadata" ,python-importlib-metadata) | |
14603 | ("python-filelock" ,python-filelock) | |
14604 | ("python-six" ,python-six) | |
14605 | ("python-tox" ,python-tox) | |
44d10b1f RW |
14606 | ("python-virtualenv" ,python-virtualenv))) |
14607 | (home-page "https://github.com/k-bx/python-semver") | |
14608 | (synopsis "Python helper for Semantic Versioning") | |
14609 | (description "This package provides a Python library for | |
14610 | @url{Semantic Versioning, http://semver.org/}.") | |
14611 | (license license:bsd-3))) | |
14612 | ||
14613 | (define-public python2-semver | |
14614 | (package-with-python2 python-semver)) | |
14615 | ||
14616 | (define-public python-pyro4 | |
14617 | (package | |
14618 | (name "python-pyro4") | |
3ce91d44 | 14619 | (version "4.77") |
44d10b1f RW |
14620 | (source |
14621 | (origin | |
14622 | (method url-fetch) | |
14623 | (uri (pypi-uri "Pyro4" version)) | |
14624 | (sha256 | |
3ce91d44 | 14625 | (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib")))) |
44d10b1f | 14626 | (build-system python-build-system) |
3ce91d44 GL |
14627 | (arguments |
14628 | '(#:tests? #f)) ;FIXME: Some tests require network access. | |
14629 | (native-inputs | |
14630 | `(("python-cloudpickle" ,python-cloudpickle) | |
14631 | ("python-dill" ,python-dill) | |
14632 | ("python-msgpack" ,python-msgpack))) | |
44d10b1f RW |
14633 | (propagated-inputs |
14634 | `(("python-serpent" ,python-serpent))) | |
14635 | (home-page "https://pyro4.readthedocs.io") | |
14636 | (synopsis "Distributed object middleware for Python") | |
14637 | (description | |
14638 | "Pyro enables you to build applications in which objects can talk to each | |
14639 | other over the network. You can just use normal Python method calls to call | |
14640 | objects on other machines, also known as remote procedure calls (RPC).") | |
14641 | (license license:expat))) | |
14642 | ||
14643 | (define-public python2-pyro | |
14644 | (package | |
14645 | (name "python2-pyro") | |
14646 | (version "3.16") | |
14647 | (source | |
14648 | (origin | |
14649 | (method url-fetch) | |
14650 | (uri (pypi-uri "Pyro" version)) | |
14651 | (file-name (string-append "Pyro-" version ".tar.gz")) | |
14652 | (sha256 | |
14653 | (base32 | |
14654 | "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v")))) | |
14655 | (build-system python-build-system) | |
14656 | (arguments | |
14657 | ;; Pyro is not compatible with Python 3 | |
14658 | `(#:python ,python-2 | |
14659 | ;; Pyro has no test cases for automatic execution | |
14660 | #:tests? #f)) | |
14661 | (home-page "http://pythonhosted.org/Pyro/") | |
14662 | (synopsis "Distributed object manager for Python") | |
14663 | (description "Pyro is a Distributed Object Technology system | |
14664 | written in Python that is designed to be easy to use. It resembles | |
14665 | Java's Remote Method Invocation (RMI). It has less similarity to CORBA, | |
14666 | which is a system and language independent Distributed Object Technology | |
14667 | and has much more to offer than Pyro or RMI. Pyro 3.x is no | |
14668 | longer maintained. New projects should use Pyro4 instead, which | |
14669 | is the new Pyro version that is actively developed.") | |
14670 | (license license:expat))) | |
14671 | ||
14672 | (define-public python2-scientific | |
14673 | (package | |
14674 | (name "python2-scientific") | |
14675 | (version "2.9.4") | |
14676 | (source | |
14677 | (origin | |
c695f011 KH |
14678 | (method git-fetch) |
14679 | (uri (git-reference | |
14680 | (url "https://github.com/khinsen/ScientificPython") | |
14681 | (commit (string-append "rel" version)))) | |
14682 | (file-name (git-file-name name version)) | |
44d10b1f RW |
14683 | (sha256 |
14684 | (base32 | |
c695f011 | 14685 | "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl")))) |
44d10b1f RW |
14686 | (build-system python-build-system) |
14687 | (inputs | |
14688 | `(("netcdf" ,netcdf))) | |
14689 | (propagated-inputs | |
14690 | `(("python-numpy" ,python2-numpy-1.8) | |
14691 | ("python-pyro" ,python2-pyro))) | |
14692 | (arguments | |
14693 | ;; ScientificPython is not compatible with Python 3 | |
14694 | `(#:python ,python-2 | |
14695 | #:tests? #f ; No test suite | |
14696 | #:phases | |
14697 | (modify-phases %standard-phases | |
14698 | (replace 'build | |
14699 | (lambda* (#:key inputs #:allow-other-keys) | |
77e61e25 RW |
14700 | (invoke "python" "setup.py" "build" |
14701 | (string-append "--netcdf_prefix=" | |
14702 | (assoc-ref inputs "netcdf")))))))) | |
c695f011 | 14703 | (home-page "http://dirac.cnrs-orleans.fr/ScientificPython") |
44d10b1f RW |
14704 | (synopsis "Python modules for scientific computing") |
14705 | (description "ScientificPython is a collection of Python modules that are | |
14706 | useful for scientific computing. Most modules are rather general (Geometry, | |
14707 | physical units, automatic derivatives, ...) whereas others are more | |
14708 | domain-specific (e.g. netCDF and PDB support). The library is currently | |
14709 | not actively maintained and works only with Python 2 and NumPy < 1.9.") | |
14710 | (license license:cecill-c))) | |
14711 | ||
14712 | (define-public python2-mmtk | |
14713 | (package | |
14714 | (name "python2-mmtk") | |
fe9b72c5 | 14715 | (version "2.7.12") |
44d10b1f RW |
14716 | (source |
14717 | (origin | |
fe9b72c5 KH |
14718 | (method git-fetch) |
14719 | (uri (git-reference | |
14720 | (url "https://github.com/khinsen/MMTK") | |
14721 | (commit (string-append "rel" version)))) | |
14722 | (file-name (git-file-name name version)) | |
44d10b1f RW |
14723 | (sha256 |
14724 | (base32 | |
fe9b72c5 | 14725 | "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1")))) |
44d10b1f RW |
14726 | (build-system python-build-system) |
14727 | (native-inputs | |
14728 | `(("netcdf" ,netcdf))) | |
14729 | (propagated-inputs | |
14730 | `(("python-scientific" ,python2-scientific) | |
14731 | ("python-tkinter" ,python-2 "tk"))) | |
14732 | (arguments | |
14733 | `(#:python ,python-2 | |
14734 | #:tests? #f | |
14735 | #:phases | |
14736 | (modify-phases %standard-phases | |
14737 | (add-before 'build 'includes-from-scientific | |
14738 | (lambda* (#:key inputs #:allow-other-keys) | |
14739 | (mkdir-p "Include/Scientific") | |
14740 | (copy-recursively | |
14741 | (string-append | |
14742 | (assoc-ref inputs "python-scientific") | |
14743 | "/include/python2.7/Scientific") | |
14744 | "Include/Scientific")))))) | |
14745 | (home-page "http://dirac.cnrs-orleans.fr/MMTK") | |
14746 | (synopsis "Python library for molecular simulation") | |
14747 | (description "MMTK is a library for molecular simulations with an emphasis | |
14748 | on biomolecules. It provides widely used methods such as Molecular Dynamics | |
14749 | and normal mode analysis, but also basic routines for implementing new methods | |
14750 | for simulation and analysis. The library is currently not actively maintained | |
14751 | and works only with Python 2 and NumPy < 1.9.") | |
14752 | (license license:cecill-c))) | |
14753 | ||
14754 | (define-public python-phonenumbers | |
14755 | (package | |
14756 | (name "python-phonenumbers") | |
14757 | (version "8.9.1") | |
14758 | (source | |
14759 | (origin | |
14760 | (method url-fetch) | |
14761 | (uri (pypi-uri "phonenumbers" version)) | |
14762 | (sha256 | |
14763 | (base32 | |
14764 | "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1")))) | |
14765 | (build-system python-build-system) | |
14766 | (home-page | |
14767 | "https://github.com/daviddrysdale/python-phonenumbers") | |
14768 | (synopsis | |
14769 | "Python library for dealing with international phone numbers") | |
14770 | (description | |
14771 | "This package provides a Python port of Google's libphonenumber library.") | |
14772 | (license license:asl2.0))) | |
14773 | ||
14774 | (define-public python2-phonenumbers | |
14775 | (package-with-python2 python-phonenumbers)) | |
14776 | ||
14777 | (define-public python-send2trash | |
14778 | (package | |
14779 | (name "python-send2trash") | |
d9b0216b | 14780 | (version "1.5.0") |
44d10b1f | 14781 | (source |
d9b0216b | 14782 | (origin (method git-fetch) |
44d10b1f | 14783 | ;; Source tarball on PyPI doesn't include tests. |
d9b0216b RW |
14784 | (uri (git-reference |
14785 | (url "https://github.com/hsoft/send2trash.git") | |
14786 | (commit version))) | |
14787 | (file-name (git-file-name name version)) | |
44d10b1f RW |
14788 | (sha256 |
14789 | (base32 | |
d9b0216b | 14790 | "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v")))) |
44d10b1f RW |
14791 | (build-system python-build-system) |
14792 | (arguments | |
14793 | '(#:phases | |
14794 | (modify-phases %standard-phases | |
14795 | (add-before 'check 'pre-check | |
14796 | (lambda _ | |
14797 | (mkdir-p "/tmp/foo") | |
14798 | (setenv "HOME" "/tmp/foo") | |
14799 | #t))))) | |
14800 | (home-page "https://github.com/hsoft/send2trash") | |
14801 | (synopsis "Send files to the user's @file{~/Trash} directory") | |
14802 | (description "This package provides a Python library to send files to the | |
14803 | user's @file{~/Trash} directory.") | |
20b3fde7 | 14804 | (properties `((python2-variant . ,(delay python2-send2trash)))) |
44d10b1f RW |
14805 | (license license:bsd-3))) |
14806 | ||
14807 | (define-public python2-send2trash | |
14808 | (package | |
f32164ab | 14809 | (inherit (package-with-python2 (strip-python2-variant python-send2trash))) |
44d10b1f RW |
14810 | (arguments |
14811 | (substitute-keyword-arguments (package-arguments python-send2trash) | |
14812 | ((#:phases phases) | |
14813 | `(modify-phases ,phases | |
14814 | (add-before 'check 'setenv | |
14815 | (lambda _ | |
14816 | (setenv "PYTHONPATH" | |
14817 | (string-append (getcwd) ":" (getenv "PYTHONPATH"))) | |
4782a06f | 14818 | #t)))))))) |
44d10b1f RW |
14819 | |
14820 | (define-public python-yapf | |
14821 | (package | |
14822 | (name "python-yapf") | |
19ba75dc | 14823 | (version "0.29.0") |
44d10b1f RW |
14824 | (source |
14825 | (origin | |
14826 | (method url-fetch) | |
14827 | (uri (pypi-uri "yapf" version)) | |
14828 | (sha256 | |
14829 | (base32 | |
19ba75dc | 14830 | "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki")))) |
44d10b1f RW |
14831 | (build-system python-build-system) |
14832 | (home-page "https://github.com/google/yapf") | |
14833 | (synopsis "Formatter for Python code") | |
14834 | (description "YAPF is a formatter for Python code. It's based off of | |
14835 | @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm | |
14836 | takes the code and reformats it to the best formatting that conforms to the | |
14837 | style guide, even if the original code didn't violate the style guide.") | |
14838 | (license license:asl2.0))) | |
14839 | ||
14840 | (define-public python2-yapf | |
14841 | (package-with-python2 python-yapf)) | |
14842 | ||
14843 | (define-public python-gyp | |
14844 | (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f") | |
14845 | (revision "0")) | |
14846 | (package | |
14847 | (name "python-gyp") | |
14848 | ;; Google does not release versions, | |
14849 | ;; based on second most recent commit date. | |
14850 | (version (git-version "0.0.0" revision commit)) | |
14851 | (source | |
14852 | (origin | |
14853 | ;; Google does not release tarballs, | |
14854 | ;; git checkout is needed. | |
14855 | (method git-fetch) | |
14856 | (uri (git-reference | |
14857 | (url "https://chromium.googlesource.com/external/gyp") | |
14858 | (commit commit))) | |
14859 | (file-name (git-file-name name version)) | |
14860 | (sha256 | |
14861 | (base32 | |
14862 | "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9")))) | |
14863 | (build-system python-build-system) | |
14864 | (home-page "https://gyp.gsrc.io/") | |
14865 | (synopsis "GYP is a Meta-Build system") | |
14866 | (description | |
14867 | "GYP builds build systems for large, cross platform applications. | |
14868 | It can be used to generate XCode projects, Visual Studio projects, Ninja build | |
14869 | files, and Makefiles.") | |
14870 | (license license:bsd-3)))) | |
14871 | ||
14872 | (define-public python2-gyp | |
14873 | (package-with-python2 python-gyp)) | |
14874 | ||
14875 | (define-public python-whatever | |
14876 | (package | |
14877 | (name "python-whatever") | |
97610a66 | 14878 | (version "0.6") |
44d10b1f RW |
14879 | (source |
14880 | (origin | |
ac0ea38c EF |
14881 | (method git-fetch) |
14882 | (uri (git-reference | |
14883 | (url "https://github.com/Suor/whatever") | |
14884 | (commit version))) | |
14885 | (file-name (git-file-name name version)) | |
44d10b1f | 14886 | (sha256 |
ac0ea38c | 14887 | (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5")))) |
44d10b1f RW |
14888 | (build-system python-build-system) |
14889 | (arguments | |
14890 | `(#:phases | |
14891 | (modify-phases %standard-phases | |
14892 | (replace 'check | |
14893 | (lambda _ | |
14894 | (invoke "py.test")))))) | |
14895 | (native-inputs | |
14896 | `(("python-pytest" ,python-pytest))) | |
14897 | (home-page "http://github.com/Suor/whatever") | |
14898 | (synopsis "Make anonymous functions by partial application of operators") | |
14899 | (description "@code{whatever} provides an easy way to make anonymous | |
14900 | functions by partial application of operators.") | |
14901 | (license license:bsd-3))) | |
14902 | ||
14903 | (define-public python2-whatever | |
14904 | (package-with-python2 python-whatever)) | |
14905 | ||
14906 | (define-public python-funcy | |
14907 | (package | |
14908 | (name "python-funcy") | |
9e396ab8 | 14909 | (version "1.11") |
44d10b1f RW |
14910 | (source |
14911 | (origin | |
a85c6027 TGR |
14912 | (method git-fetch) |
14913 | (uri (git-reference | |
14914 | (url "https://github.com/Suor/funcy.git") | |
14915 | (commit version))) | |
44d10b1f | 14916 | (sha256 |
a85c6027 TGR |
14917 | (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw")) |
14918 | (file-name (git-file-name name version)))) | |
44d10b1f RW |
14919 | (build-system python-build-system) |
14920 | (arguments | |
14921 | `(#:phases | |
14922 | (modify-phases %standard-phases | |
14923 | (replace 'check | |
14924 | (lambda _ | |
14925 | (invoke "py.test")))))) | |
14926 | (native-inputs | |
14927 | `(("python-pytest" ,python-pytest) | |
14928 | ("python-whatever" ,python-whatever))) | |
14929 | (home-page "http://github.com/Suor/funcy") | |
14930 | (synopsis "Functional tools") | |
14931 | (description "@code{funcy} is a library that provides functional tools. | |
14932 | Examples are: | |
14933 | @enumerate | |
14934 | @item merge - Merges collections of the same type | |
14935 | @item walk - Type-preserving map | |
14936 | @item select - Selects a part of a collection | |
14937 | @item take - Takes the first n items of a collection | |
14938 | @item first - Takes the first item of a collection | |
14939 | @item remove - Predicated-removes items of a collection | |
14940 | @item concat - Concatenates two collections | |
14941 | @item flatten - Flattens a collection with subcollections | |
14942 | @item distinct - Returns only distinct items | |
14943 | @item split - Predicated-splits a collection | |
14944 | @item split_at - Splits a collection at a given item | |
14945 | @item group_by - Groups items by group | |
14946 | @item pairwise - Pairs off adjacent items | |
14947 | @item partial - Partially-applies a function | |
14948 | @item curry - Curries a function | |
14949 | @item compose - Composes functions | |
14950 | @item complement - Complements a predicate | |
14951 | @item all_fn - \"all\" with predicate | |
14952 | @end enumerate") | |
14953 | (license license:bsd-3))) | |
14954 | ||
14955 | (define-public python2-funcy | |
14956 | (package-with-python2 python-funcy)) | |
14957 | ||
14958 | (define-public python-isoweek | |
14959 | (package | |
14960 | (name "python-isoweek") | |
14961 | (version "1.3.3") | |
14962 | (source | |
14963 | (origin | |
14964 | (method url-fetch) | |
14965 | (uri (pypi-uri "isoweek" version)) | |
14966 | (sha256 | |
14967 | (base32 | |
14968 | "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk")))) | |
14969 | (build-system python-build-system) | |
14970 | (home-page "https://github.com/gisle/isoweek") | |
14971 | (synopsis "Objects representing a week") | |
14972 | (description "The @code{isoweek} module provide the class Week that | |
14973 | implements the week definition of ISO 8601. This standard also defines | |
14974 | a notation for identifying weeks; yyyyWww (where the W is a literal). | |
14975 | Week instances stringify to this form.") | |
14976 | (license license:bsd-3))) | |
14977 | ||
14978 | (define-public python2-isoweek | |
14979 | (package-with-python2 python-isoweek)) | |
14980 | ||
14981 | (define-public python-tokenize-rt | |
14982 | (package | |
14983 | (name "python-tokenize-rt") | |
14984 | (version "2.0.1") | |
14985 | (source | |
14986 | (origin | |
14987 | (method url-fetch) | |
14988 | (uri (pypi-uri "tokenize-rt" version)) | |
14989 | (sha256 | |
14990 | (base32 | |
14991 | "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw")))) | |
14992 | (build-system python-build-system) | |
14993 | (home-page "https://github.com/asottile/tokenize-rt") | |
14994 | (synopsis "Wrapper around the stdlib tokenize which roundtrips.") | |
14995 | (description | |
14996 | "This Python library is a wrapper around @code{tokenize} from the Python | |
14997 | standard library. It provides two additional tokens @code{ESCAPED_NL} and | |
14998 | @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens} | |
14999 | and @code{tokens_to_src} to roundtrip.") | |
15000 | (license license:expat))) | |
15001 | ||
15002 | (define-public python-future-fstrings | |
15003 | (package | |
15004 | (name "python-future-fstrings") | |
15005 | (version "0.4.1") | |
15006 | (source | |
15007 | (origin | |
15008 | (method url-fetch) | |
15009 | (uri (pypi-uri "future_fstrings" version)) | |
15010 | (sha256 | |
15011 | (base32 | |
15012 | "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47")))) | |
15013 | (build-system python-build-system) | |
15014 | (propagated-inputs | |
15015 | `(("python-tokenize-rt" ,python-tokenize-rt))) | |
15016 | (home-page "https://github.com/asottile/future-fstrings") | |
15017 | (synopsis "Backport of fstrings to Python < 3.6") | |
15018 | (description | |
15019 | "This package provides a UTF-8 compatible encoding | |
15020 | @code{future_fstrings}, which performs source manipulation. It decodes the | |
15021 | source bytes using the UTF-8 encoding and then rewrites Python 3.6 style | |
15022 | @code{f} strings.") | |
15023 | (license license:expat))) | |
15024 | ||
dae2eb1c MC |
15025 | (define-public python-typed-ast |
15026 | (package | |
15027 | (name "python-typed-ast") | |
bae89583 | 15028 | (version "1.4.0") |
dae2eb1c MC |
15029 | (source |
15030 | (origin | |
bae89583 MO |
15031 | (method git-fetch) |
15032 | (uri (git-reference | |
15033 | (url "https://github.com/python/typed_ast.git") | |
15034 | (commit version))) | |
dae2eb1c | 15035 | (sha256 |
bae89583 MO |
15036 | (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb")) |
15037 | (file-name (git-file-name name version)))) | |
dae2eb1c MC |
15038 | (build-system python-build-system) |
15039 | (arguments | |
15040 | `(#:modules ((guix build utils) | |
15041 | (guix build python-build-system) | |
15042 | (ice-9 ftw) | |
15043 | (srfi srfi-1) | |
15044 | (srfi srfi-26)) | |
15045 | #:phases | |
15046 | (modify-phases %standard-phases | |
15047 | (replace 'check | |
15048 | (lambda _ | |
15049 | (let ((cwd (getcwd))) | |
15050 | (setenv "PYTHONPATH" | |
15051 | (string-append cwd "/build/" | |
15052 | (find (cut string-prefix? "lib" <>) | |
15053 | (scandir (string-append cwd "/build"))) | |
15054 | ":" | |
15055 | (getenv "PYTHONPATH")))) | |
15056 | (invoke "pytest") | |
15057 | #t))))) | |
15058 | (native-inputs `(("python-pytest" ,python-pytest))) | |
15059 | (home-page "https://github.com/python/typed_ast") | |
15060 | (synopsis "Fork of Python @code{ast} modules with type comment support") | |
15061 | (description "This package provides a parser similar to the standard | |
15062 | @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast} | |
15063 | include PEP 484 type comments and are independent of the version of Python | |
15064 | under which they are run. The @code{typed_ast} parsers produce the standard | |
15065 | Python AST (plus type comments), and are both fast and correct, as they are | |
15066 | based on the CPython 2.7 and 3.7 parsers.") | |
15067 | ;; See the file "LICENSE" for the details. | |
15068 | (license (list license:psfl | |
15069 | license:asl2.0 | |
15070 | license:expat)))) ;ast27/Parser/spark.py | |
15071 | ||
44d10b1f RW |
15072 | (define-public python-typing |
15073 | (package | |
15074 | (name "python-typing") | |
15075 | (version "3.6.6") | |
15076 | (source | |
15077 | (origin | |
15078 | (method url-fetch) | |
15079 | (uri (pypi-uri "typing" version)) | |
15080 | (sha256 | |
15081 | (base32 | |
15082 | "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0")))) | |
15083 | (build-system python-build-system) | |
15084 | (home-page "https://docs.python.org/3/library/typing.html") | |
15085 | (synopsis "Type hints for Python") | |
15086 | (description "This is a backport of the standard library @code{typing} | |
15087 | module to Python versions older than 3.5. Typing defines a standard notation | |
15088 | for Python function and variable type annotations. The notation can be used | |
15089 | for documenting code in a concise, standard format, and it has been designed | |
15090 | to also be used by static and runtime type checkers, static analyzers, IDEs | |
15091 | and other tools.") | |
15092 | (license license:psfl))) | |
15093 | ||
15094 | (define-public python2-typing | |
15095 | (package-with-python2 python-typing)) | |
15096 | ||
f89d443b VC |
15097 | (define-public python-typing-extensions |
15098 | (package | |
15099 | (name "python-typing-extensions") | |
15100 | (version "3.7.2") | |
15101 | (source | |
15102 | (origin | |
15103 | (method url-fetch) | |
15104 | (uri (pypi-uri "typing_extensions" version)) | |
15105 | (sha256 | |
15106 | (base32 | |
15107 | "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v")))) | |
15108 | (build-system python-build-system) | |
15109 | (home-page | |
15110 | "https://github.com/python/typing/blob/master/typing_extensions/README.rst") | |
15111 | (synopsis "Experimental type hints for Python") | |
15112 | (description | |
15113 | "The typing_extensions module contains additional @code{typing} hints not | |
15114 | yet present in the of the @code{typing} standard library. | |
15115 | Included are implementations of: | |
15116 | @enumerate | |
15117 | @item ClassVar | |
15118 | @item ContextManager | |
15119 | @item Counter | |
15120 | @item DefaultDict | |
15121 | @item Deque | |
15122 | @item NewType | |
15123 | @item NoReturn | |
15124 | @item overload | |
15125 | @item Protocol | |
15126 | @item runtime | |
15127 | @item Text | |
15128 | @item Type | |
15129 | @item TYPE_CHECKING | |
15130 | @item AsyncGenerator | |
15131 | @end enumerate\n") | |
15132 | (license license:psfl))) | |
15133 | ||
44d10b1f RW |
15134 | (define-public bpython |
15135 | (package | |
15136 | (name "bpython") | |
4de93b2f | 15137 | (version "0.18") |
44d10b1f RW |
15138 | (source |
15139 | (origin | |
15140 | (method url-fetch) | |
15141 | (uri (pypi-uri "bpython" version)) | |
15142 | (sha256 | |
4de93b2f | 15143 | (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n")))) |
44d10b1f RW |
15144 | (build-system python-build-system) |
15145 | (arguments | |
15146 | `(#:phases | |
15147 | (modify-phases %standard-phases | |
15148 | (add-after 'unpack 'remove-failing-test | |
15149 | (lambda _ | |
15150 | ;; Remove failing test. FIXME: make it pass | |
15151 | (delete-file "bpython/test/test_args.py") | |
15152 | #t)) | |
15153 | (add-after 'wrap 'add-aliases | |
15154 | ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc. | |
15155 | (lambda* (#:key outputs #:allow-other-keys) | |
15156 | (let ((out (assoc-ref outputs "out"))) | |
15157 | (for-each | |
15158 | (lambda (old new) | |
15159 | (symlink old (string-append out "/bin/" new))) | |
15160 | '("bpython" "bpython-curses" "bpython-urwid" "bpdb") | |
15161 | '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3"))) | |
15162 | #t))))) | |
15163 | (propagated-inputs | |
15164 | `(("python-pygments" ,python-pygments) | |
15165 | ("python-requests" ,python-requests) | |
4de93b2f | 15166 | ("python-babel" ,python-babel) ; optional, for internationalization |
44d10b1f RW |
15167 | ("python-curtsies" ,python-curtsies) ; >= 0.1.18 |
15168 | ("python-greenlet" ,python-greenlet) | |
4de93b2f | 15169 | ("python-urwid" ,python-urwid) ; for bpython-urwid only |
44d10b1f RW |
15170 | ("python-six" ,python-six))) |
15171 | (native-inputs | |
15172 | `(("python-sphinx" ,python-sphinx) | |
15173 | ("python-mock" ,python-mock))) | |
15174 | (home-page "https://bpython-interpreter.org/") | |
15175 | (synopsis "Fancy interface to the Python interpreter") | |
15176 | (description "Bpython is a fancy interface to the Python | |
15177 | interpreter. bpython's main features are | |
15178 | ||
15179 | @enumerate | |
15180 | @item in-line syntax highlighting, | |
15181 | @item readline-like autocomplete with suggestions displayed as you type, | |
15182 | @item expected parameter list for any Python function, | |
15183 | @item \"rewind\" function to pop the last line of code from memory and | |
15184 | re-evaluate, | |
15185 | @item send the code you've entered off to a pastebin, | |
15186 | @item save the code you've entered to a file, and | |
15187 | @item auto-indentation. | |
15188 | @end enumerate") | |
15189 | (license license:expat))) | |
15190 | ||
15191 | (define-public bpython2 | |
15192 | (let ((base (package-with-python2 | |
15193 | (strip-python2-variant bpython)))) | |
15194 | (package (inherit base) | |
15195 | (name "bpython2") | |
15196 | (arguments | |
15197 | `(#:python ,python-2 | |
15198 | #:phases | |
15199 | (modify-phases %standard-phases | |
15200 | (add-after 'unpack 'remove-failing-test | |
15201 | (lambda _ | |
15202 | ;; Remove failing test. FIXME: make it pass | |
15203 | (delete-file "bpython/test/test_args.py") | |
15204 | ;; Disable failing test-cases (renaming inhibits they are | |
15205 | ;; discovered) | |
15206 | (substitute* "bpython/test/test_curtsies_repl.py" | |
15207 | (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b) | |
15208 | (string-append a "xxx_off_" b)) | |
15209 | (("^(\\s*def )(test_complex\\W)" _ a b) | |
15210 | (string-append a "xxx_off_" b))) | |
15211 | #t)) | |
15212 | (add-before 'build 'rename-scripts | |
15213 | ;; rename the scripts to bypthon2, bpdb2, etc. | |
15214 | (lambda _ | |
15215 | (substitute* "setup.py" | |
15216 | (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest) | |
15217 | (string-append name "2" rest "\n")) | |
15218 | (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest) | |
15219 | (string-append name "2" (or sub "") rest "\n"))) | |
15220 | #t)))))))) | |
15221 | ||
15222 | (define-public python-pyinotify | |
15223 | (package | |
15224 | (name "python-pyinotify") | |
15225 | (version "0.9.6") | |
15226 | (source (origin | |
15227 | (method url-fetch) | |
15228 | (uri (pypi-uri "pyinotify" version)) | |
15229 | (sha256 | |
15230 | (base32 | |
15231 | "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw")))) | |
15232 | (build-system python-build-system) | |
15233 | (arguments `(#:tests? #f)) ;no tests | |
15234 | (home-page "https://github.com/seb-m/pyinotify") | |
15235 | (synopsis "Python library for monitoring inotify events") | |
15236 | (description | |
15237 | "@code{pyinotify} provides a Python interface for monitoring | |
15238 | file system events on Linux.") | |
15239 | (license license:expat))) | |
15240 | ||
15241 | (define-public python2-pyinotify | |
15242 | (package-with-python2 python-pyinotify)) | |
15243 | ||
15244 | ;; Ada parser uses this version. | |
15245 | (define-public python2-quex-0.67.3 | |
15246 | (package | |
15247 | (name "python2-quex") | |
15248 | (version "0.67.3") | |
15249 | (source | |
15250 | (origin | |
15251 | (method url-fetch) | |
15252 | (uri (string-append "mirror://sourceforge/quex/HISTORY/" | |
15253 | (version-major+minor version) | |
15254 | "/quex-" version ".zip")) | |
15255 | (sha256 | |
15256 | (base32 | |
15257 | "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw")))) | |
15258 | (build-system python-build-system) | |
15259 | (native-inputs | |
15260 | `(("unzip" ,unzip))) | |
15261 | (arguments | |
15262 | `(#:python ,python-2 | |
15263 | #:tests? #f | |
15264 | #:phases | |
15265 | (modify-phases %standard-phases | |
15266 | (delete 'configure) | |
15267 | (delete 'build) | |
15268 | (replace 'install | |
15269 | (lambda* (#:key outputs #:allow-other-keys) | |
15270 | (let* ((out (assoc-ref outputs "out")) | |
15271 | (share/quex (string-append out "/share/quex")) | |
15272 | (bin (string-append out "/bin"))) | |
15273 | (copy-recursively "." share/quex) | |
15274 | (mkdir-p bin) | |
15275 | (symlink (string-append share/quex "/quex-exe.py") | |
15276 | (string-append bin "/quex")) | |
15277 | #t)))))) | |
15278 | (native-search-paths | |
15279 | (list (search-path-specification | |
15280 | (variable "QUEX_PATH") | |
15281 | (files '("share/quex"))))) | |
15282 | (home-page "http://quex.sourceforge.net/") | |
15283 | (synopsis "Lexical analyzer generator in Python") | |
15284 | (description "@code{quex} is a lexical analyzer generator in Python.") | |
15285 | (license license:lgpl2.1+))) ; Non-military | |
15286 | ||
15287 | (define-public python2-quex | |
15288 | (package (inherit python2-quex-0.67.3) | |
15289 | (name "python2-quex") | |
15290 | (version "0.68.1") | |
15291 | (source | |
15292 | (origin | |
15293 | (method url-fetch) | |
15294 | (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz")) | |
15295 | (sha256 | |
15296 | (base32 | |
15297 | "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j")) | |
15298 | (file-name (string-append name "-" version ".tar.gz")))))) | |
15299 | ||
15300 | (define-public python-more-itertools | |
15301 | (package | |
15302 | (name "python-more-itertools") | |
1b066827 | 15303 | (version "7.1.0") |
44d10b1f RW |
15304 | (source |
15305 | (origin | |
15306 | (method url-fetch) | |
15307 | (uri (pypi-uri "more-itertools" version)) | |
15308 | (sha256 | |
15309 | (base32 | |
1b066827 | 15310 | "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b")))) |
44d10b1f | 15311 | (build-system python-build-system) |
44d10b1f RW |
15312 | (home-page "https://github.com/erikrose/more-itertools") |
15313 | (synopsis "More routines for operating on iterables, beyond itertools") | |
15314 | (description "Python's built-in @code{itertools} module implements a | |
15315 | number of iterator building blocks inspired by constructs from APL, Haskell, | |
15316 | and SML. @code{more-itertools} includes additional building blocks for | |
15317 | working with iterables.") | |
47f66348 | 15318 | (properties `((python2-variant . ,(delay python2-more-itertools)))) |
44d10b1f RW |
15319 | (license license:expat))) |
15320 | ||
47f66348 | 15321 | ;; The 5.x series are the last versions supporting Python 2.7. |
44d10b1f | 15322 | (define-public python2-more-itertools |
47f66348 MB |
15323 | (package |
15324 | (inherit python-more-itertools) | |
15325 | (name "python2-more-itertools") | |
15326 | (version "5.0.0") | |
15327 | (source (origin | |
15328 | (method url-fetch) | |
15329 | (uri (pypi-uri "more-itertools" version)) | |
15330 | (sha256 | |
15331 | (base32 | |
15332 | "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q")))) | |
15333 | (arguments | |
15334 | `(#:python ,python2-minimal)) | |
15335 | (propagated-inputs | |
15336 | `(("python2-six" ,python2-six-bootstrap))))) | |
44d10b1f RW |
15337 | |
15338 | (define-public python-latexcodec | |
15339 | (package | |
15340 | (name "python-latexcodec") | |
f3415ba5 | 15341 | (version "1.0.7") |
44d10b1f RW |
15342 | (source |
15343 | (origin | |
15344 | (method url-fetch) | |
15345 | (uri (pypi-uri "latexcodec" version)) | |
15346 | (sha256 | |
f3415ba5 | 15347 | (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb")))) |
44d10b1f RW |
15348 | (build-system python-build-system) |
15349 | (inputs | |
15350 | `(("python-six" ,python-six))) | |
15351 | (home-page "https://readthedocs.org/projects/latexcodec/") | |
15352 | (synopsis "Work with LaTeX code in Python") | |
15353 | (description "Lexer and codec to work with LaTeX code in Python.") | |
15354 | (license license:expat))) | |
15355 | ||
15356 | (define-public python-pybtex | |
15357 | (package | |
15358 | (name "python-pybtex") | |
9441a9c1 | 15359 | (version "0.22.2") |
44d10b1f RW |
15360 | (source |
15361 | (origin | |
15362 | (method url-fetch) | |
15363 | (uri (pypi-uri "pybtex" version)) | |
15364 | (sha256 | |
9441a9c1 | 15365 | (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080")))) |
44d10b1f RW |
15366 | (build-system python-build-system) |
15367 | (native-inputs | |
15368 | `(("python-nose" ,python-nose))) | |
15369 | (inputs | |
15370 | `(("python-latexcodec" ,python-latexcodec) | |
15371 | ("python-pyyaml" ,python-pyyaml) | |
15372 | ("python-six" ,python-six))) | |
15373 | (arguments | |
15374 | `(#:test-target "nosetests")) | |
15375 | (home-page "https://pybtex.org/") | |
15376 | (synopsis "BibTeX-compatible bibliography processor") | |
15377 | (description "Pybtex is a BibTeX-compatible bibliography processor written | |
15378 | in Python. You can simply type pybtex instead of bibtex.") | |
15379 | (license license:expat))) | |
15380 | ||
15381 | (define-public python-onetimepass | |
15382 | (package | |
15383 | (name "python-onetimepass") | |
15384 | (version "1.0.1") | |
15385 | (source | |
15386 | (origin | |
15387 | (method url-fetch) | |
15388 | (uri (pypi-uri "onetimepass" version)) | |
15389 | (sha256 | |
15390 | (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5")))) | |
15391 | (build-system python-build-system) | |
15392 | (propagated-inputs `(("python-six" ,python-six))) | |
15393 | (home-page "https://github.com/tadeck/onetimepass/") | |
15394 | (synopsis "One-time password library") | |
15395 | (description "Python one-time password library for HMAC-based (HOTP) and | |
15396 | time-based (TOTP) passwords.") | |
15397 | (license license:expat))) | |
15398 | ||
15399 | (define-public python-parso | |
15400 | (package | |
15401 | (name "python-parso") | |
170d5844 | 15402 | (version "0.5.2") |
44d10b1f RW |
15403 | (source |
15404 | (origin | |
15405 | (method url-fetch) | |
15406 | (uri (pypi-uri "parso" version)) | |
15407 | (sha256 | |
15408 | (base32 | |
170d5844 | 15409 | "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm")))) |
44d10b1f RW |
15410 | (native-inputs |
15411 | `(("python-pytest" ,python-pytest))) | |
15412 | (build-system python-build-system) | |
4eb97c25 MC |
15413 | (arguments |
15414 | `(#:phases (modify-phases %standard-phases | |
15415 | (replace 'check | |
15416 | (lambda _ (invoke "pytest" "-vv")))))) | |
44d10b1f RW |
15417 | (home-page "https://github.com/davidhalter/parso") |
15418 | (synopsis "Python Parser") | |
15419 | (description "Parso is a Python parser that supports error recovery and | |
15420 | round-trip parsing for different Python versions (in multiple Python versions). | |
15421 | Parso is also able to list multiple syntax errors in your Python file.") | |
15422 | (license license:expat))) | |
15423 | ||
15424 | (define-public python2-parso | |
15425 | (package-with-python2 python-parso)) | |
15426 | ||
15427 | (define-public python-async-generator | |
15428 | (package | |
15429 | (name "python-async-generator") | |
94fcbf8d | 15430 | (version "1.10") |
44d10b1f RW |
15431 | (source |
15432 | (origin | |
15433 | (method url-fetch) | |
15434 | (uri (pypi-uri "async_generator" version)) | |
15435 | (sha256 | |
15436 | (base32 | |
94fcbf8d | 15437 | "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf")))) |
44d10b1f RW |
15438 | (build-system python-build-system) |
15439 | (native-inputs | |
15440 | `(("python-pytest" ,python-pytest))) | |
15441 | (home-page "https://github.com/python-trio/async_generator") | |
15442 | (synopsis "Async generators and context managers for Python 3.5+") | |
15443 | (description "@code{async_generator} back-ports Python 3.6's native async | |
15444 | generators and Python 3.7's context managers into Python 3.5.") | |
15445 | ;; Dual licensed. | |
15446 | (license (list license:expat license:asl2.0)))) | |
15447 | ||
15448 | (define-public python-async-timeout | |
15449 | (package | |
15450 | (name "python-async-timeout") | |
15451 | (version "3.0.1") | |
15452 | (source | |
15453 | (origin | |
15454 | (method url-fetch) | |
15455 | (uri (pypi-uri "async-timeout" version)) | |
15456 | (sha256 | |
15457 | (base32 | |
15458 | "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c")))) | |
15459 | (build-system python-build-system) | |
15460 | (home-page "https://github.com/aio-libs/async_timeout/") | |
15461 | (synopsis "Timeout context manager for asyncio programs") | |
15462 | (description "@code{async-timeout} provides a timeout timeout context | |
15463 | manager compatible with @code{asyncio}.") | |
15464 | (license license:asl2.0))) | |
15465 | ||
15466 | (define-public python-glob2 | |
15467 | (package | |
15468 | (name "python-glob2") | |
4df49d19 | 15469 | (version "0.7") |
8fa2bcc7 TGR |
15470 | (source |
15471 | (origin | |
15472 | (method git-fetch) | |
15473 | (uri (git-reference | |
15474 | (url "https://github.com/miracle2k/python-glob2.git") | |
4df49d19 | 15475 | (commit (string-append "v" version)))) |
8fa2bcc7 TGR |
15476 | (file-name (git-file-name name version)) |
15477 | (sha256 | |
4df49d19 | 15478 | (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919")))) |
44d10b1f RW |
15479 | (build-system python-build-system) |
15480 | (home-page "https://github.com/miracle2k/python-glob2/") | |
15481 | (synopsis "Extended Version of the python buildin glob module") | |
15482 | (description "This is an extended version of the Python | |
15483 | @url{http://docs.python.org/library/glob.html, built-in glob module} which | |
15484 | adds: | |
15485 | ||
15486 | @itemize | |
15487 | @item The ability to capture the text matched by glob patterns, and return | |
15488 | those matches alongside the file names. | |
15489 | @item A recursive @code{**} globbing syntax, akin for example to the | |
15490 | @code{globstar} option of Bash. | |
15491 | @item The ability to replace the file system functions used, in order to glob | |
15492 | on virtual file systems. | |
15493 | @item Compatible with Python 2 and Python 3 (tested with 3.3). | |
15494 | @end itemize | |
15495 | ||
15496 | Glob2 currently based on the glob code from Python 3.3.1.") | |
15497 | (license license:bsd-2))) | |
15498 | ||
15499 | (define-public python2-glob2 | |
15500 | (package-with-python2 python-glob2)) | |
15501 | ||
15502 | (define-public python-gipc | |
15503 | (package | |
15504 | (name "python-gipc") | |
15505 | (version "0.6.0") | |
15506 | (source | |
15507 | (origin | |
15508 | (method url-fetch) | |
15509 | (uri (pypi-uri "gipc" version ".zip")) | |
15510 | (sha256 | |
15511 | (base32 | |
15512 | "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2")))) | |
15513 | (build-system python-build-system) | |
15514 | (native-inputs | |
15515 | `(("unzip" ,unzip))) | |
15516 | (propagated-inputs | |
15517 | `(("python-gevent" ,python-gevent))) | |
fd3ae040 | 15518 | (home-page "https://gehrcke.de/gipc/") |
44d10b1f RW |
15519 | (synopsis "Child process management in the context of gevent") |
15520 | (description "Usage of Python's multiprocessing package in a | |
15521 | gevent-powered application may raise problems. With @code{gipc}, | |
15522 | process-based child processes can safely be created anywhere within a | |
15523 | gevent-powered application.") | |
15524 | (license license:expat))) | |
15525 | ||
15526 | (define-public python2-gipc | |
15527 | (package-with-python2 python-gipc)) | |
15528 | ||
15529 | (define-public python-fusepy | |
15530 | (package | |
15531 | (name "python-fusepy") | |
15532 | (version "2.0.4") | |
15533 | (source | |
15534 | (origin | |
15535 | (method url-fetch) | |
15536 | (uri (pypi-uri "fusepy" version)) | |
15537 | (sha256 | |
15538 | (base32 | |
15539 | "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h")))) | |
15540 | (build-system python-build-system) | |
15541 | (arguments | |
15542 | `(#:phases | |
15543 | (modify-phases %standard-phases | |
15544 | (add-before 'build 'set-library-file-name | |
15545 | (lambda* (#:key inputs #:allow-other-keys) | |
15546 | (let ((fuse (assoc-ref inputs "fuse"))) | |
15547 | (substitute* "fuse.py" | |
15548 | (("find_library\\('fuse'\\)") | |
15549 | (string-append "'" fuse "/lib/libfuse.so'"))) | |
15550 | #t)))))) | |
15551 | (propagated-inputs | |
15552 | `(("fuse" ,fuse))) | |
15553 | (home-page "https://github.com/fusepy/fusepy") | |
15554 | (synopsis "Simple ctypes bindings for FUSE") | |
15555 | (description "Python module that provides a simple interface to FUSE and | |
15556 | MacFUSE. The binding is created using the standard @code{ctypes} library.") | |
15557 | (license license:isc))) | |
15558 | ||
15559 | (define-public python2-fusepy | |
15560 | (package-with-python2 python-fusepy)) | |
15561 | ||
15562 | (define-public python2-gdrivefs | |
15563 | (package | |
15564 | (name "python2-gdrivefs") | |
15565 | (version "0.14.9") | |
15566 | (source | |
15567 | (origin | |
15568 | (method url-fetch) | |
15569 | (uri (pypi-uri "gdrivefs" version)) | |
15570 | (sha256 | |
15571 | (base32 | |
15572 | "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7")))) | |
15573 | (build-system python-build-system) | |
15574 | (arguments | |
15575 | `(#:python ,python-2 | |
15576 | #:phases | |
15577 | (modify-phases %standard-phases | |
15578 | (add-before 'build 'patch-setup-py | |
15579 | (lambda _ | |
15580 | ;; Update requirements from dependency==version | |
15581 | ;; to dependency>=version | |
15582 | (substitute* "gdrivefs/resources/requirements.txt" | |
15583 | (("==") ">=")) | |
15584 | #t))))) | |
15585 | (native-inputs | |
15586 | `(("python2-gipc" ,python2-gipc) | |
15587 | ("python2-gevent" ,python2-gevent) | |
15588 | ("python2-greenlet" ,python2-greenlet) | |
15589 | ("python2-httplib2" ,python2-httplib2) | |
15590 | ("python2-uritemplate" ,python2-uritemplate) | |
15591 | ("python2-oauth2client" ,python2-oauth2client) | |
15592 | ("python2-six" ,python2-six))) | |
15593 | (propagated-inputs | |
15594 | `(("python2-dateutil" ,python2-dateutil) | |
15595 | ("python2-fusepy" ,python2-fusepy) | |
15596 | ("python2-google-api-client" ,python2-google-api-client))) | |
15597 | (home-page "https://github.com/dsoprea/GDriveFS") | |
15598 | (synopsis "Mount Google Drive as a local file system") | |
15599 | (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive | |
15600 | under Python 2.7.") | |
15601 | (license license:gpl2))) | |
15602 | ||
15603 | (define-public pybind11 | |
15604 | (package | |
15605 | (name "pybind11") | |
0690f324 | 15606 | (version "2.4.3") |
44d10b1f RW |
15607 | (source (origin |
15608 | (method git-fetch) | |
15609 | (uri (git-reference | |
15610 | (url "https://github.com/pybind/pybind11.git") | |
15611 | (commit (string-append "v" version)))) | |
15612 | (sha256 | |
15613 | (base32 | |
0690f324 | 15614 | "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd")) |
44d10b1f RW |
15615 | (file-name (git-file-name name version)))) |
15616 | (build-system cmake-build-system) | |
15617 | (native-inputs | |
3cf579e9 | 15618 | `(("python" ,python-wrapper) |
ae8db9ce LC |
15619 | |
15620 | ;; The following dependencies are used for tests. | |
15621 | ("python-pytest" ,python-pytest) | |
15622 | ("catch" ,catch-framework2-1) | |
15623 | ("eigen" ,eigen))) | |
44d10b1f | 15624 | (arguments |
ae8db9ce LC |
15625 | `(#:configure-flags |
15626 | (list (string-append "-DCATCH_INCLUDE_DIR=" | |
15627 | (assoc-ref %build-inputs "catch") | |
15628 | "/include/catch")) | |
15629 | ||
3cf579e9 LC |
15630 | #:phases (modify-phases %standard-phases |
15631 | (add-after 'install 'install-python | |
15632 | (lambda* (#:key outputs #:allow-other-keys) | |
15633 | (let ((out (assoc-ref outputs "out"))) | |
15634 | (with-directory-excursion "../source" | |
15635 | (setenv "PYBIND11_USE_CMAKE" "yes") | |
15636 | (invoke "python" "setup.py" "install" | |
15637 | "--single-version-externally-managed" | |
15638 | "--root=/" | |
15639 | (string-append "--prefix=" out))))))) | |
15640 | ||
ae8db9ce | 15641 | #:test-target "check")) |
44d10b1f RW |
15642 | (home-page "https://github.com/pybind/pybind11/") |
15643 | (synopsis "Seamless operability between C++11 and Python") | |
ab17297a LC |
15644 | (description |
15645 | "@code{pybind11} is a lightweight header-only library that exposes C++ | |
15646 | types in Python and vice versa, mainly to create Python bindings of existing | |
15647 | C++ code. Its goals and syntax are similar to the @code{Boost.Python} | |
15648 | library: to minimize boilerplate code in traditional extension modules by | |
15649 | inferring type information using compile-time introspection.") | |
65eada58 | 15650 | (license license:bsd-3))) |
44d10b1f RW |
15651 | |
15652 | (define-public python-fasteners | |
15653 | (package | |
15654 | (name "python-fasteners") | |
15655 | (version "0.14.1") | |
15656 | (source | |
15657 | (origin | |
15658 | (method url-fetch) | |
15659 | (uri (pypi-uri "fasteners" version)) | |
15660 | (sha256 | |
15661 | (base32 | |
15662 | "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22")))) | |
15663 | (build-system python-build-system) | |
15664 | (propagated-inputs | |
15665 | `(("python-monotonic" ,python-monotonic) | |
15666 | ("python-six" ,python-six) | |
15667 | ("python-testtools" ,python-testtools))) | |
15668 | (home-page "https://github.com/harlowja/fasteners") | |
15669 | (synopsis "Python package that provides useful locks") | |
15670 | (description | |
15671 | "This package provides a Python program that provides following locks: | |
15672 | ||
15673 | @itemize | |
15674 | @item Locking decorator | |
15675 | @item Reader-writer locks | |
15676 | @item Inter-process locks | |
15677 | @item Generic helpers | |
15678 | @end itemize\n") | |
15679 | (properties `((python2-variant . ,(delay python2-fasteners)))) | |
15680 | (license license:asl2.0))) | |
15681 | ||
15682 | (define-public python2-fasteners | |
15683 | (let ((base (package-with-python2 (strip-python2-variant python-fasteners)))) | |
15684 | (package | |
15685 | (inherit base) | |
15686 | (propagated-inputs | |
15687 | `(("python2-futures" ,python2-futures) | |
15688 | ,@(package-propagated-inputs base)))))) | |
15689 | ||
15690 | (define-public python-requests-file | |
15691 | (package | |
15692 | (name "python-requests-file") | |
15693 | (version "1.4.3") | |
15694 | (source | |
15695 | (origin | |
15696 | (method url-fetch) | |
15697 | (uri (pypi-uri "requests-file" version)) | |
15698 | (sha256 | |
15699 | (base32 | |
15700 | "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g")))) | |
15701 | (build-system python-build-system) | |
15702 | (propagated-inputs | |
15703 | `(("python-requests" ,python-requests) | |
15704 | ("python-six" ,python-six))) | |
15705 | (home-page | |
15706 | "https://github.com/dashea/requests-file") | |
15707 | (synopsis "File transport adapter for Requests") | |
15708 | (description | |
15709 | "Requests-File is a transport adapter for use with the Requests Python | |
52beae7b | 15710 | library to allow local file system access via @code{file://} URLs.") |
44d10b1f RW |
15711 | (license license:asl2.0))) |
15712 | ||
15713 | (define-public python2-requests-file | |
15714 | (package-with-python2 python-requests-file)) | |
15715 | ||
15716 | (define-public python-tldextract | |
15717 | (package | |
15718 | (name "python-tldextract") | |
15719 | (version "2.2.0") | |
15720 | (source | |
15721 | (origin | |
15722 | (method url-fetch) | |
15723 | (uri (pypi-uri "tldextract" version)) | |
15724 | (sha256 | |
15725 | (base32 | |
15726 | "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99")))) | |
15727 | (build-system python-build-system) | |
15728 | (native-inputs | |
15729 | `(("python-pytest" ,python-pytest) | |
15730 | ("python-responses" ,python-responses))) | |
15731 | (propagated-inputs | |
15732 | `(("python-idna" ,python-idna) | |
15733 | ("python-requests" ,python-requests) | |
15734 | ("python-requests-file" ,python-requests-file))) | |
15735 | (home-page | |
15736 | "https://github.com/john-kurkowski/tldextract") | |
15737 | (synopsis | |
15738 | "Separate the TLD from the registered domain and subdomains of a URL") | |
15739 | (description | |
15740 | "TLDExtract accurately separates the TLD from the registered domain and | |
15741 | subdomains of a URL, using the Public Suffix List. By default, this includes | |
15742 | the public ICANN TLDs and their exceptions. It can optionally support the | |
15743 | Public Suffix List's private domains as well.") | |
15744 | (license license:bsd-3))) | |
15745 | ||
15746 | (define-public python2-tldextract | |
15747 | (package-with-python2 python-tldextract)) | |
15748 | ||
15749 | (define-public python-pynamecheap | |
15750 | (package | |
15751 | (name "python-pynamecheap") | |
15752 | (version "0.0.3") | |
15753 | (source | |
15754 | (origin | |
15755 | (method url-fetch) | |
15756 | (uri (pypi-uri "PyNamecheap" version)) | |
15757 | (sha256 | |
15758 | (base32 | |
15759 | "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l")))) | |
15760 | (build-system python-build-system) | |
15761 | (propagated-inputs | |
15762 | `(("python-requests" ,python-requests))) | |
15763 | (home-page | |
15764 | "https://github.com/Bemmu/PyNamecheap") | |
15765 | (synopsis | |
15766 | "Namecheap API client in Python") | |
15767 | (description | |
15768 | "PyNamecheap is a Namecheap API client in Python.") | |
15769 | (license license:expat))) | |
15770 | ||
15771 | (define-public python2-pynamecheap | |
15772 | (package-with-python2 python-pynamecheap)) | |
15773 | ||
15774 | (define-public python-dns-lexicon | |
15775 | (package | |
15776 | (name "python-dns-lexicon") | |
15777 | (version "2.4.0") | |
15778 | (source | |
15779 | (origin | |
15780 | (method url-fetch) | |
15781 | (uri (pypi-uri "dns-lexicon" version)) | |
15782 | (sha256 | |
15783 | (base32 | |
15784 | "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m")))) | |
15785 | (build-system python-build-system) | |
15786 | (arguments | |
15787 | `(#:tests? #f)) ;requires internet access | |
15788 | (propagated-inputs | |
15789 | `(("python-future" ,python-future) | |
15790 | ("python-pynamecheap" ,python-pynamecheap) | |
15791 | ("python-requests" ,python-requests) | |
15792 | ("python-tldextract" ,python-tldextract) | |
15793 | ("python-urllib3" ,python-urllib3))) | |
15794 | (home-page "https://github.com/AnalogJ/lexicon") | |
15795 | (synopsis | |
15796 | "Manipulate DNS records on various DNS providers") | |
15797 | (description | |
15798 | "Lexicon provides a way to manipulate DNS records on multiple DNS | |
15799 | providers in a standardized way. It has a CLI but it can also be used as a | |
15800 | Python library. It was designed to be used in automation, specifically with | |
15801 | Let's Encrypt.") | |
15802 | (license license:expat))) | |
15803 | ||
15804 | (define-public python2-dns-lexicon | |
15805 | (package-with-python2 python-dns-lexicon)) | |
15806 | ||
15807 | (define-public python-commandlines | |
15808 | (package | |
15809 | (name "python-commandlines") | |
15810 | (version "0.4.1") | |
15811 | (source | |
15812 | (origin | |
15813 | (method url-fetch) | |
15814 | (uri (pypi-uri "commandlines" version)) | |
15815 | (sha256 | |
15816 | (base32 | |
15817 | "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6")))) | |
15818 | (build-system python-build-system) | |
15819 | (home-page "https://github.com/chrissimpkins/commandlines") | |
15820 | (synopsis "Command line argument to object parsing library") | |
15821 | (description | |
15822 | "@code{Commandlines} is a Python library for command line application | |
15823 | development that supports command line argument parsing, command string | |
15824 | validation testing and application logic.") | |
15825 | (license license:expat))) | |
15826 | ||
15827 | ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with | |
15828 | ;; python-numba. They have a very unflexible relationship. | |
15829 | (define-public python-numba | |
15830 | (package | |
15831 | (name "python-numba") | |
65f84096 | 15832 | (version "0.46.0") |
44d10b1f RW |
15833 | (source |
15834 | (origin | |
15835 | (method url-fetch) | |
15836 | (uri (pypi-uri "numba" version)) | |
15837 | (sha256 | |
15838 | (base32 | |
65f84096 | 15839 | "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2")))) |
44d10b1f RW |
15840 | (build-system python-build-system) |
15841 | (arguments | |
15842 | `(#:modules ((guix build utils) | |
15843 | (guix build python-build-system) | |
15844 | (ice-9 ftw) | |
15845 | (srfi srfi-1) | |
15846 | (srfi srfi-26)) | |
15847 | #:phases | |
15848 | (modify-phases %standard-phases | |
15849 | (add-after 'unpack 'disable-proprietary-features | |
15850 | (lambda _ | |
15851 | (setenv "NUMBA_DISABLE_HSA" "1") | |
15852 | (setenv "NUMBA_DISABLE_CUDA" "1") | |
15853 | #t)) | |
15854 | (add-after 'unpack 'remove-failing-tests | |
15855 | (lambda _ | |
65f84096 | 15856 | ;; FIXME: These tests fail for unknown reasons: |
44d10b1f RW |
15857 | ;; test_non_writable_pycache, test_non_creatable_pycache, and |
15858 | ;; test_frozen (all in numba.tests.test_dispatcher.TestCache). | |
15859 | (substitute* "numba/tests/test_dispatcher.py" | |
15860 | (("def test(_non_writable_pycache)" _ m) | |
15861 | (string-append "def guix_skip" m)) | |
15862 | (("def test(_non_creatable_pycache)" _ m) | |
15863 | (string-append "def guix_skip" m)) | |
15864 | (("def test(_frozen)" _ m) | |
15865 | (string-append "def guix_skip" m))) | |
15866 | ||
15867 | ;; These tests fail because we don't run the tests from the build | |
15868 | ;; directory: test_setup_py_distutils, test_setup_py_setuptools | |
65f84096 | 15869 | ;; They are in numba.tests.test_pycc.TestDistutilsSupport. |
44d10b1f RW |
15870 | (substitute* "numba/tests/test_pycc.py" |
15871 | (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m) | |
15872 | (string-append "def guix_skip" m))) | |
65f84096 BG |
15873 | |
15874 | ;; These tests fail because our version of Python does not have | |
15875 | ;; a recognizable front-end for the Numba distribution to use | |
15876 | ;; to check against. | |
15877 | (substitute* "numba/tests/test_entrypoints.py" | |
15878 | (("def test(_init_entrypoint)" _ m) | |
15879 | (string-append "def guix_skip" m))) | |
15880 | (substitute* "numba/tests/test_jitclasses.py" | |
15881 | (("def test(_jitclass_longlabel_not_truncated)" _ m) | |
15882 | (string-append "def guix_skip" m))) | |
44d10b1f RW |
15883 | #t)) |
15884 | (replace 'check | |
15885 | (lambda _ | |
15886 | (let ((cwd (getcwd))) | |
15887 | (setenv "PYTHONPATH" | |
15888 | (string-append cwd "/build/" | |
15889 | (find (cut string-prefix? "lib" <>) | |
15890 | (scandir (string-append cwd "/build"))) | |
15891 | ":" | |
15892 | (getenv "PYTHONPATH"))) | |
15893 | ;; Something is wrong with the PYTHONPATH when running the | |
15894 | ;; tests from the build directory, as it complains about not being | |
15895 | ;; able to import certain modules. | |
15896 | (with-directory-excursion "/tmp" | |
15897 | (invoke "python3" "-m" "numba.runtests" "-v" "-m"))) | |
15898 | #t))))) | |
15899 | (propagated-inputs | |
15900 | `(("python-llvmlite" ,python-llvmlite) | |
15901 | ("python-numpy" ,python-numpy) | |
15902 | ("python-singledispatch" ,python-singledispatch))) | |
15903 | ;; Needed for tests. | |
15904 | (inputs | |
15905 | `(("python-jinja2" ,python-jinja2) | |
15906 | ("python-pygments" ,python-pygments))) | |
15907 | (home-page "https://numba.pydata.org") | |
15908 | (synopsis "Compile Python code using LLVM") | |
15909 | (description "Numba gives you the power to speed up your applications with | |
15910 | high performance functions written directly in Python. With a few | |
15911 | annotations, array-oriented and math-heavy Python code can be just-in-time | |
15912 | compiled to native machine instructions, similar in performance to C, C++ and | |
15913 | Fortran, without having to switch languages or Python interpreters. | |
15914 | ||
15915 | Numba works by generating optimized machine code using the LLVM compiler | |
15916 | infrastructure at import time, runtime, or statically (using the included pycc | |
15917 | tool).") | |
15918 | (license license:bsd-3))) | |
15919 | ||
241409cd RW |
15920 | (define-public python-numcodecs |
15921 | (package | |
15922 | (name "python-numcodecs") | |
15923 | (version "0.6.4") | |
15924 | (source | |
15925 | (origin | |
15926 | (method url-fetch) | |
15927 | (uri (pypi-uri "numcodecs" version)) | |
15928 | (sha256 | |
15929 | (base32 | |
15930 | "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g")))) | |
15931 | (build-system python-build-system) | |
15932 | (propagated-inputs | |
15933 | `(("python-numpy" ,python-numpy) | |
15934 | ("python-msgpack" ,python-msgpack))) | |
15935 | (native-inputs | |
15936 | `(("python-pytest" ,python-pytest) | |
15937 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
15938 | (home-page "https://github.com/zarr-developers/numcodecs") | |
15939 | (synopsis "Buffer compression and transformation codecs") | |
15940 | (description | |
15941 | "This Python package provides buffer compression and transformation | |
15942 | codecs for use in data storage and communication applications.") | |
15943 | (license license:expat))) | |
15944 | ||
8e04b233 RW |
15945 | (define-public python-asciitree |
15946 | (package | |
15947 | (name "python-asciitree") | |
15948 | (version "0.3.3") | |
15949 | (source | |
15950 | (origin | |
15951 | (method url-fetch) | |
15952 | (uri (pypi-uri "asciitree" version)) | |
15953 | (sha256 | |
15954 | (base32 | |
15955 | "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a")))) | |
15956 | (build-system python-build-system) | |
15957 | (home-page "https://github.com/mbr/asciitree") | |
15958 | (synopsis "Draws ASCII trees") | |
15959 | (description "This package draws tree structures using characters.") | |
15960 | (license license:expat))) | |
15961 | ||
7032c1cc RW |
15962 | (define-public python-zarr |
15963 | (package | |
15964 | (name "python-zarr") | |
15965 | (version "2.4.0") | |
15966 | (source | |
15967 | (origin | |
15968 | (method url-fetch) | |
15969 | (uri (pypi-uri "zarr" version)) | |
15970 | (sha256 | |
15971 | (base32 | |
15972 | "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk")))) | |
15973 | (build-system python-build-system) | |
15974 | (arguments | |
15975 | `(#:phases | |
15976 | (modify-phases %standard-phases | |
15977 | (add-after 'unpack 'disable-service-tests | |
15978 | (lambda _ | |
15979 | (setenv "ZARR_TEST_ABS" "0") | |
15980 | (setenv "ZARR_TEST_MONGO" "0") | |
15981 | (setenv "ZARR_TEST_REDIS" "0") | |
15982 | #t)) | |
15983 | (replace 'check | |
15984 | (lambda _ | |
15985 | (invoke "pytest" "-vv" "-k" "not lmdb") | |
15986 | #t))))) | |
15987 | (propagated-inputs | |
15988 | `(("python-asciitree" ,python-asciitree) | |
15989 | ("python-fasteners" ,python-fasteners) | |
15990 | ("python-numcodecs" ,python-numcodecs) | |
15991 | ("python-numpy" ,python-numpy))) | |
15992 | (native-inputs | |
15993 | `(("python-pytest" ,python-pytest) | |
15994 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
15995 | (home-page "https://github.com/zarr-developers/zarr-python") | |
15996 | (synopsis "Chunked, compressed, N-dimensional arrays for Python") | |
15997 | (description | |
15998 | "This package provides an implementation of chunked, compressed, | |
15999 | N-dimensional arrays for Python.") | |
16000 | (license license:expat))) | |
16001 | ||
44d10b1f RW |
16002 | (define-public python-anndata |
16003 | (package | |
16004 | (name "python-anndata") | |
a098b349 | 16005 | (version "0.7.1") |
44d10b1f RW |
16006 | (source |
16007 | (origin | |
16008 | (method url-fetch) | |
16009 | (uri (pypi-uri "anndata" version)) | |
16010 | (sha256 | |
16011 | (base32 | |
a098b349 | 16012 | "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09")))) |
44d10b1f | 16013 | (build-system python-build-system) |
a098b349 RW |
16014 | (arguments |
16015 | `(#:phases | |
16016 | (modify-phases %standard-phases | |
16017 | (add-after 'unpack 'delete-inconvenient-tests | |
16018 | (lambda _ | |
16019 | ;; This test depends on python-scikit-learn. | |
16020 | (delete-file "anndata/tests/test_inplace_subset.py") | |
16021 | #t)) | |
16022 | (delete 'check) | |
16023 | (add-after 'install 'check | |
16024 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
16025 | (add-installed-pythonpath inputs outputs) | |
16026 | (invoke "pytest" "-vv")))))) | |
44d10b1f RW |
16027 | (propagated-inputs |
16028 | `(("python-h5py" ,python-h5py) | |
a098b349 | 16029 | ("python-importlib-metadata" ,python-importlib-metadata) |
44d10b1f | 16030 | ("python-natsort" ,python-natsort) |
a098b349 RW |
16031 | ("python-numcodecs" ,python-numcodecs) |
16032 | ("python-packaging" ,python-packaging) | |
44d10b1f | 16033 | ("python-pandas" ,python-pandas) |
a098b349 RW |
16034 | ("python-scipy" ,python-scipy) |
16035 | ("python-zarr" ,python-zarr))) | |
16036 | (native-inputs | |
16037 | `(("python-joblib" ,python-joblib) | |
16038 | ("python-pytest" ,python-pytest) | |
16039 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
44d10b1f RW |
16040 | (home-page "https://github.com/theislab/anndata") |
16041 | (synopsis "Annotated data for data analysis pipelines") | |
16042 | (description "Anndata is a package for simple (functional) high-level APIs | |
16043 | for data analysis pipelines. In this context, it provides an efficient, | |
16044 | scalable way of keeping track of data together with learned annotations and | |
16045 | reduces the code overhead typically encountered when using a mostly | |
16046 | object-oriented library such as @code{scikit-learn}.") | |
16047 | (license license:bsd-3))) | |
16048 | ||
16049 | (define-public python-dill | |
16050 | (package | |
16051 | (name "python-dill") | |
32be3577 | 16052 | (version "0.3.1.1") |
44d10b1f RW |
16053 | (source |
16054 | (origin | |
16055 | (method url-fetch) | |
16056 | (uri (pypi-uri "dill" version)) | |
16057 | (sha256 | |
32be3577 | 16058 | (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22")))) |
44d10b1f | 16059 | (build-system python-build-system) |
32be3577 MIP |
16060 | (arguments |
16061 | `(#:phases | |
16062 | (modify-phases %standard-phases | |
16063 | (replace 'check | |
16064 | (lambda _ | |
16065 | (with-directory-excursion "/tmp" | |
16066 | (invoke "nosetests" "-v")) | |
16067 | #t))))) | |
16068 | (native-inputs | |
16069 | `(("python-nose" ,python-nose))) | |
16070 | (home-page "https://pypi.org/project/dill/") | |
44d10b1f RW |
16071 | (synopsis "Serialize all of Python") |
16072 | (description "Dill extends Python's @code{pickle} module for serializing | |
16073 | and de-serializing Python objects to the majority of the built-in Python | |
16074 | types. Dill provides the user the same interface as the @code{pickle} module, | |
16075 | and also includes some additional features. In addition to pickling Python | |
16076 | objects, @code{dill} provides the ability to save the state of an interpreter | |
61985d65 | 16077 | session in a single command. Hence, it would be feasible to save a |
44d10b1f RW |
16078 | interpreter session, close the interpreter, ship the pickled file to another |
16079 | computer, open a new interpreter, unpickle the session and thus continue from | |
16080 | the saved state of the original interpreter session.") | |
16081 | (license license:bsd-3))) | |
16082 | ||
16083 | (define-public python-multiprocess | |
16084 | (package | |
16085 | (name "python-multiprocess") | |
fcc4e9e7 | 16086 | (version "0.70.9") |
44d10b1f RW |
16087 | (source |
16088 | (origin | |
16089 | (method url-fetch) | |
16090 | (uri (pypi-uri "multiprocess" version)) | |
16091 | (sha256 | |
16092 | (base32 | |
fcc4e9e7 | 16093 | "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz")))) |
44d10b1f | 16094 | (build-system python-build-system) |
fcc4e9e7 MIP |
16095 | (arguments |
16096 | `(#:phases | |
16097 | (modify-phases %standard-phases | |
16098 | (add-after 'unpack 'disable-broken-tests | |
16099 | (lambda _ | |
16100 | ;; This test is broken as there is no keyboard interrupt. | |
16101 | (substitute* "py3.7/multiprocess/tests/__init__.py" | |
16102 | (("^(.*)def test_wait_result" | |
16103 | line indent) | |
16104 | (string-append indent | |
16105 | "@unittest.skip(\"Disabled by Guix\")\n" | |
16106 | line))) | |
16107 | #t)) | |
16108 | ;; Tests must be run after installation. | |
16109 | (delete 'check) | |
16110 | (add-after 'install 'check | |
16111 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
16112 | (add-installed-pythonpath inputs outputs) | |
16113 | (invoke "python" "-m" "multiprocess.tests") | |
16114 | #t))))) | |
44d10b1f RW |
16115 | (propagated-inputs |
16116 | `(("python-dill" ,python-dill))) | |
fcc4e9e7 | 16117 | (home-page "https://pypi.org/project/multiprocess/") |
44d10b1f RW |
16118 | (synopsis "Multiprocessing and multithreading in Python") |
16119 | (description | |
16120 | "This package is a fork of the multiprocessing Python package, a package | |
16121 | which supports the spawning of processes using the API of the standard | |
16122 | library's @code{threading} module.") | |
16123 | (license license:bsd-3))) | |
16124 | ||
16125 | (define-public python-toolz | |
16126 | (package | |
16127 | (name "python-toolz") | |
16128 | (version "0.9.0") | |
16129 | (source | |
16130 | (origin | |
16131 | (method url-fetch) | |
16132 | (uri (pypi-uri "toolz" version)) | |
16133 | (sha256 | |
16134 | (base32 | |
16135 | "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj")))) | |
16136 | (build-system python-build-system) | |
16137 | ;; FIXME: tests cannot be computed: "Can't perform this operation for | |
16138 | ;; unregistered loader type" | |
16139 | (arguments '(#:tests? #f)) | |
16140 | (home-page "https://github.com/pytoolz/toolz/") | |
16141 | (synopsis "List processing tools and functional utilities") | |
16142 | (description | |
16143 | "This package provides a set of utility functions for iterators, | |
16144 | functions, and dictionaries.") | |
16145 | (license license:bsd-3))) | |
16146 | ||
16147 | (define-public python2-toolz | |
16148 | (package-with-python2 python-toolz)) | |
16149 | ||
16150 | (define-public python-cytoolz | |
16151 | (package | |
16152 | (name "python-cytoolz") | |
16153 | (version "0.9.0.1") | |
16154 | (source | |
16155 | (origin | |
16156 | (method url-fetch) | |
16157 | (uri (pypi-uri "cytoolz" version)) | |
16158 | (sha256 | |
16159 | (base32 | |
16160 | "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44")))) | |
16161 | (build-system python-build-system) | |
16162 | ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute | |
16163 | ;; 'exceptions'" | |
16164 | (arguments '(#:tests? #f)) | |
16165 | (propagated-inputs | |
16166 | `(("python-toolz" ,python-toolz))) | |
16167 | (native-inputs | |
16168 | `(("python-cython" ,python-cython))) | |
16169 | (home-page "https://github.com/pytoolz/cytoolz") | |
16170 | (synopsis "High performance functional utilities") | |
16171 | (description | |
16172 | "The cytoolz package implements the same API as provided by toolz. The | |
16173 | main differences are that @code{cytoolz} is faster and cytoolz offers a C API | |
16174 | that is accessible to other projects developed in Cython.") | |
16175 | (license license:bsd-3))) | |
16176 | ||
16177 | (define-public python-sortedcontainers | |
16178 | (package | |
16179 | (name "python-sortedcontainers") | |
b244f166 | 16180 | (version "2.1.0") |
44d10b1f RW |
16181 | (source |
16182 | (origin | |
16183 | (method url-fetch) | |
16184 | (uri (pypi-uri "sortedcontainers" version)) | |
16185 | (sha256 | |
16186 | (base32 | |
b244f166 | 16187 | "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp")))) |
44d10b1f RW |
16188 | (build-system python-build-system) |
16189 | (native-inputs | |
16190 | `(("python-tox" ,python-tox))) | |
16191 | (home-page "http://www.grantjenks.com/docs/sortedcontainers/") | |
16192 | (synopsis "Sorted List, Sorted Dict, Sorted Set") | |
16193 | (description | |
16194 | "This package provides a sorted collections library, written in | |
16195 | pure-Python.") | |
16196 | (license license:asl2.0))) | |
16197 | ||
16198 | (define-public python-cloudpickle | |
16199 | (package | |
16200 | (name "python-cloudpickle") | |
16201 | (version "0.6.1") | |
16202 | (source | |
16203 | (origin | |
16204 | (method url-fetch) | |
16205 | (uri (pypi-uri "cloudpickle" version)) | |
16206 | (sha256 | |
16207 | (base32 | |
16208 | "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi")))) | |
16209 | (build-system python-build-system) | |
16210 | ;; FIXME: there are 5 errors in 122 tests: | |
16211 | ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest) | |
16212 | ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest) | |
16213 | ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest) | |
16214 | ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest) | |
16215 | ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests) | |
16216 | ;; TypeError: cannot serialize '_io.BufferedRandom' object | |
16217 | (arguments '(#:tests? #f)) | |
16218 | (native-inputs | |
16219 | `(("python-pytest" ,python-pytest) | |
16220 | ("python-mock" ,python-mock) | |
16221 | ("python-tornado" ,python-tornado))) | |
16222 | (home-page "https://github.com/cloudpipe/cloudpickle") | |
16223 | (synopsis "Extended pickling support for Python objects") | |
16224 | (description | |
16225 | "Cloudpickle makes it possible to serialize Python constructs not | |
16226 | supported by the default pickle module from the Python standard library. It | |
16227 | is especially useful for cluster computing where Python expressions are | |
16228 | shipped over the network to execute on remote hosts, possibly close to the | |
16229 | data.") | |
16230 | (license license:bsd-3))) | |
16231 | ||
16232 | (define-public python2-cloudpickle | |
16233 | (package-with-python2 python-cloudpickle)) | |
16234 | ||
16235 | (define-public python-locket | |
16236 | (package | |
16237 | (name "python-locket") | |
16238 | (version "0.2.0") | |
16239 | (source | |
16240 | (origin | |
16241 | (method url-fetch) | |
16242 | (uri (pypi-uri "locket" version)) | |
16243 | (sha256 | |
16244 | (base32 | |
16245 | "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz")))) | |
16246 | (build-system python-build-system) | |
16247 | (home-page "https://github.com/mwilliamson/locket.py") | |
16248 | (synopsis "File-based locks for Python") | |
16249 | (description | |
16250 | "Locket implements a lock that can be used by multiple processes provided | |
16251 | they use the same path.") | |
16252 | (license license:bsd-2))) | |
16253 | ||
16254 | (define-public python2-locket | |
16255 | (package-with-python2 python-locket)) | |
16256 | ||
16257 | (define-public python-blosc | |
16258 | (package | |
16259 | (name "python-blosc") | |
16260 | (version "1.5.1") | |
16261 | (source | |
16262 | (origin | |
16263 | (method url-fetch) | |
16264 | (uri (pypi-uri "blosc" version)) | |
16265 | (sha256 | |
16266 | (base32 | |
16267 | "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw")))) | |
16268 | (build-system python-build-system) | |
16269 | ;; FIXME: all tests pass, but then this error is printed: | |
16270 | ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test | |
16271 | (arguments '(#:tests? #f)) | |
16272 | (propagated-inputs | |
16273 | `(("python-numpy" ,python-numpy))) | |
16274 | (home-page "https://github.com/blosc/python-blosc") | |
16275 | (synopsis "Python wrapper for the Blosc data compressor library") | |
16276 | (description "Blosc is a high performance compressor optimized for binary | |
16277 | data. It has been designed to transmit data to the processor cache faster | |
16278 | than the traditional, non-compressed, direct memory fetch approach via a | |
16279 | @code{memcpy()} system call. | |
16280 | ||
16281 | Blosc works well for compressing numerical arrays that contains data with | |
16282 | relatively low entropy, like sparse data, time series, grids with | |
16283 | regular-spaced values, etc. | |
16284 | ||
16285 | This Python package wraps the Blosc library.") | |
16286 | (license license:bsd-3))) | |
16287 | ||
16288 | (define-public python2-blosc | |
16289 | (package-with-python2 python-blosc)) | |
16290 | ||
16291 | (define-public python-partd | |
16292 | (package | |
16293 | (name "python-partd") | |
16294 | (version "0.3.9") | |
16295 | (source | |
16296 | (origin | |
16297 | (method url-fetch) | |
16298 | (uri (pypi-uri "partd" version)) | |
16299 | (sha256 | |
16300 | (base32 | |
16301 | "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz")))) | |
16302 | (build-system python-build-system) | |
16303 | (propagated-inputs | |
16304 | `(("python-blosc" ,python-blosc) | |
16305 | ("python-locket" ,python-locket) | |
16306 | ("python-numpy" ,python-numpy) | |
16307 | ("python-pandas" ,python-pandas) | |
16308 | ("python-pyzmq" ,python-pyzmq) | |
16309 | ("python-toolz" ,python-toolz))) | |
16310 | (home-page "https://github.com/dask/partd/") | |
16311 | (synopsis "Appendable key-value storage") | |
16312 | (description "Partd stores key-value pairs. Values are raw bytes. We | |
16313 | append on old values. Partd excels at shuffling operations.") | |
16314 | (license license:bsd-3))) | |
16315 | ||
16316 | (define-public python2-partd | |
16317 | (package-with-python2 python-partd)) | |
16318 | ||
c70a0191 RW |
16319 | (define-public python-fsspec |
16320 | (package | |
16321 | (name "python-fsspec") | |
16322 | (version "0.6.1") | |
16323 | (source | |
16324 | (origin | |
16325 | (method url-fetch) | |
16326 | (uri (pypi-uri "fsspec" version)) | |
16327 | (sha256 | |
16328 | (base32 | |
16329 | "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj")))) | |
16330 | (build-system python-build-system) | |
16331 | (arguments '(#:tests? #f)) ; there are none | |
16332 | (home-page "https://github.com/intake/filesystem_spec") | |
16333 | (synopsis "File-system specification") | |
16334 | (description "The purpose of this package is to produce a template or | |
16335 | specification for a file-system interface, that specific implementations | |
16336 | should follow, so that applications making use of them can rely on a common | |
16337 | behavior and not have to worry about the specific internal implementation | |
16338 | decisions with any given backend.") | |
16339 | (license license:bsd-3))) | |
16340 | ||
44d10b1f RW |
16341 | (define-public python-dask |
16342 | (package | |
16343 | (name "python-dask") | |
86c7ca07 | 16344 | (version "2.9.0") |
44d10b1f RW |
16345 | (source |
16346 | (origin | |
16347 | (method url-fetch) | |
16348 | (uri (pypi-uri "dask" version)) | |
16349 | (sha256 | |
86c7ca07 | 16350 | (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b")))) |
44d10b1f | 16351 | (build-system python-build-system) |
44d10b1f RW |
16352 | (arguments |
16353 | `(#:phases | |
16354 | (modify-phases %standard-phases | |
86c7ca07 | 16355 | (add-after 'unpack 'disable-broken-tests |
44d10b1f | 16356 | (lambda _ |
86c7ca07 | 16357 | ;; This test is marked as xfail when pytest-xdist is used. |
44d10b1f RW |
16358 | (substitute* "dask/tests/test_threaded.py" |
16359 | (("def test_interrupt\\(\\)" m) | |
16360 | (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" | |
16361 | m))) | |
86c7ca07 RW |
16362 | ;; This one fails with a type error: |
16363 | ;; TypeError: Already tz-aware, use tz_convert to convert. | |
16364 | (substitute* "dask/dataframe/tests/test_shuffle.py" | |
16365 | (("def test_set_index_timestamp\\(\\)" m) | |
16366 | (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" | |
16367 | m))) | |
44d10b1f RW |
16368 | #t)) |
16369 | (replace 'check | |
16370 | (lambda _ (invoke "pytest" "-vv")))))) | |
16371 | (propagated-inputs | |
16372 | `(("python-cloudpickle" ,python-cloudpickle) | |
86c7ca07 | 16373 | ("python-fsspec" ,python-fsspec) |
44d10b1f | 16374 | ("python-numpy" ,python-numpy) |
86c7ca07 | 16375 | ("python-packaging" ,python-packaging) |
44d10b1f RW |
16376 | ("python-pandas" ,python-pandas) |
16377 | ("python-partd" ,python-partd) | |
16378 | ("python-toolz" ,python-toolz) | |
16379 | ("python-pyyaml" ,python-pyyaml))) | |
16380 | (native-inputs | |
16381 | `(("python-pytest" ,python-pytest) | |
16382 | ("python-pytest-runner" ,python-pytest-runner))) | |
16383 | (home-page "https://github.com/dask/dask/") | |
16384 | (synopsis "Parallel computing with task scheduling") | |
16385 | (description | |
16386 | "Dask is a flexible parallel computing library for analytics. It | |
16387 | consists of two components: dynamic task scheduling optimized for computation, | |
16388 | and large data collections like parallel arrays, dataframes, and lists that | |
16389 | extend common interfaces like NumPy, Pandas, or Python iterators to | |
16390 | larger-than-memory or distributed environments. These parallel collections | |
16391 | run on top of the dynamic task schedulers. ") | |
16392 | (license license:bsd-3))) | |
16393 | ||
44d10b1f RW |
16394 | (define-public python-ilinkedlist |
16395 | (package | |
16396 | (name "python-ilinkedlist") | |
16397 | (version "0.4.0") | |
16398 | (source | |
16399 | (origin | |
16400 | (method url-fetch) | |
16401 | (uri (pypi-uri "ilinkedlist" version)) | |
16402 | (sha256 | |
16403 | (base32 | |
16404 | "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l")))) | |
16405 | (build-system python-build-system) | |
16406 | (native-inputs `(("python-pytest" ,python-pytest))) | |
16407 | (inputs `(("python" ,python))) | |
16408 | (home-page "https://github.com/luther9/ilinkedlist-py") | |
16409 | (synopsis "Immutable linked list library") | |
16410 | (description | |
16411 | "This is a implementation of immutable linked lists for Python. It | |
16412 | contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes. | |
16413 | Since a linked list is treated as immutable, it is hashable, and its length | |
16414 | can be retrieved in constant time. Some of the terminology is inspired by | |
16415 | LISP. It is possible to create an improper list by creating a @code{Pair} | |
16416 | with a non-list @code{cdr}.") | |
16417 | (license license:gpl3+))) | |
16418 | ||
16419 | (define-public python-readlike | |
16420 | (package | |
16421 | (name "python-readlike") | |
16422 | (version "0.1.3") | |
16423 | (source | |
16424 | (origin | |
16425 | (method url-fetch) | |
16426 | (uri (pypi-uri "readlike" version)) | |
16427 | (sha256 | |
16428 | (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4")))) | |
16429 | (build-system python-build-system) | |
16430 | (home-page "https://github.com/jangler/readlike") | |
16431 | (synopsis "GNU Readline-like line editing module") | |
16432 | (description | |
16433 | "This Python module provides line editing functions similar to the default | |
16434 | Emacs-style ones of GNU Readline. Unlike the Python standard library's | |
16435 | @code{readline} package, this one allows access to those capabilties in settings | |
16436 | outside of a standard command-line interface. It is especially well-suited to | |
16437 | interfacing with Urwid, due to a shared syntax for describing key inputs. | |
16438 | ||
16439 | Currently, all stateless Readline commands are implemented. Yanking and history | |
16440 | are not supported.") | |
16441 | (license license:expat))) | |
16442 | ||
16443 | (define-public python2-readlike | |
16444 | (package-with-python2 python-readlike)) | |
16445 | ||
16446 | (define-public python-reparser | |
16447 | (package | |
16448 | (name "python-reparser") | |
16449 | (version "1.4.3") | |
16450 | (source | |
16451 | (origin | |
16452 | (method url-fetch) | |
16453 | (uri (pypi-uri "ReParser" version)) | |
16454 | (sha256 | |
16455 | (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776")))) | |
16456 | (build-system python-build-system) | |
16457 | (home-page "https://github.com/xmikos/reparser") | |
16458 | (synopsis "Simple lexer/parser for inline markup based on regular expressions") | |
16459 | (description | |
16460 | "This Python library provides a simple lexer/parser for inline markup based | |
16461 | on regular expressions.") | |
16462 | (license license:expat))) | |
16463 | ||
16464 | (define-public python2-reparser | |
16465 | (let ((reparser (package-with-python2 | |
16466 | (strip-python2-variant python-reparser)))) | |
16467 | (package (inherit reparser) | |
16468 | (propagated-inputs | |
16469 | `(("python2-enum34" ,python2-enum34) | |
16470 | ,@(package-propagated-inputs reparser)))))) | |
16471 | ||
16472 | (define-public python-precis-i18n | |
16473 | (package | |
16474 | (name "python-precis-i18n") | |
16475 | (version "1.0.0") | |
16476 | (source | |
16477 | (origin | |
16478 | (method url-fetch) | |
16479 | (uri (pypi-uri "precis_i18n" version)) | |
16480 | (sha256 | |
16481 | (base32 | |
16482 | "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2")))) | |
16483 | (build-system python-build-system) | |
16484 | (home-page "https://github.com/byllyfish/precis_i18n") | |
16485 | (synopsis "Implementation of the PRECIS framework") | |
16486 | (description | |
16487 | "This module implements the PRECIS Framework as described in RFC 8264, | |
16488 | RFC 8265 and RFC 8266.") | |
16489 | (license license:expat))) | |
16490 | ||
d0446c4b RW |
16491 | (define-public python-absl-py |
16492 | (package | |
16493 | (name "python-absl-py") | |
16494 | (version "0.6.1") | |
16495 | (source | |
16496 | (origin | |
16497 | (method url-fetch) | |
16498 | (uri (pypi-uri "absl-py" version)) | |
16499 | (sha256 | |
16500 | (base32 | |
16501 | "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7")))) | |
16502 | (build-system python-build-system) | |
16503 | (propagated-inputs | |
16504 | `(("python-six" ,python-six))) | |
16505 | (home-page "https://github.com/abseil/abseil-py") | |
16506 | (synopsis "Abseil Python common libraries") | |
16507 | (description | |
16508 | "This package provides the Abseil Python Common Libraries, a collection | |
16509 | of Python libraries for building Python applications.") | |
16510 | (license license:asl2.0))) | |
16511 | ||
81bed4e9 RW |
16512 | (define-public python-astor |
16513 | (package | |
16514 | (name "python-astor") | |
16515 | (version "0.7.1") | |
16516 | (source | |
16517 | (origin | |
16518 | (method url-fetch) | |
16519 | (uri (pypi-uri "astor" version)) | |
16520 | (sha256 | |
16521 | (base32 | |
16522 | "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm")))) | |
16523 | (build-system python-build-system) | |
16524 | ;; FIXME: There are two errors and two test failures. | |
16525 | (arguments `(#:tests? #f)) | |
16526 | (home-page "https://github.com/berkerpeksag/astor") | |
39ee82ff | 16527 | (synopsis "Read and write Python ASTs") |
81bed4e9 | 16528 | (description "Astor is designed to allow easy manipulation of Python |
39ee82ff | 16529 | source via the Abstract Syntax Tree.") |
81bed4e9 RW |
16530 | (license license:bsd-3))) |
16531 | ||
39ee82ff RW |
16532 | (define-public python2-astor |
16533 | (package-with-python2 python-astor)) | |
16534 | ||
22e623ae RW |
16535 | (define-public python-grpcio |
16536 | (package | |
16537 | (name "python-grpcio") | |
16538 | (version "1.17.1") | |
16539 | (source | |
16540 | (origin | |
16541 | (method url-fetch) | |
16542 | (uri (pypi-uri "grpcio" version)) | |
16543 | (sha256 | |
16544 | (base32 | |
16545 | "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx")))) | |
16546 | (build-system python-build-system) | |
16547 | (propagated-inputs | |
16548 | `(("python-six" ,python-six))) | |
16549 | (home-page "https://grpc.io") | |
16550 | (synopsis "HTTP/2-based RPC framework") | |
16551 | (description "This package provides a Python library for communicating | |
16552 | with the HTTP/2-based RPC framework gRPC.") | |
16553 | (license license:asl2.0))) | |
16554 | ||
79869f80 RW |
16555 | (define-public python-astunparse |
16556 | (package | |
16557 | (name "python-astunparse") | |
47d79541 | 16558 | (version "1.6.2") |
79869f80 RW |
16559 | (source |
16560 | (origin | |
16561 | (method url-fetch) | |
16562 | (uri (pypi-uri "astunparse" version)) | |
16563 | (sha256 | |
47d79541 | 16564 | (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys")))) |
79869f80 | 16565 | (build-system python-build-system) |
47d79541 | 16566 | (arguments '(#:tests? #f)) ; there are none |
79869f80 RW |
16567 | (propagated-inputs |
16568 | `(("python-six" ,python-six) | |
16569 | ("python-wheel" ,python-wheel))) | |
16570 | (home-page "https://github.com/simonpercivall/astunparse") | |
16571 | (synopsis "AST unparser for Python") | |
16572 | (description "This package provides an AST unparser for Python. It is a | |
16573 | factored out version of @code{unparse} found in the Python source | |
16574 | distribution.") | |
16575 | (license license:bsd-3))) | |
16576 | ||
2884aac0 RW |
16577 | (define-public python-gast |
16578 | (package | |
16579 | (name "python-gast") | |
bd300261 | 16580 | (version "0.2.2") |
2884aac0 RW |
16581 | (source |
16582 | (origin | |
16583 | (method url-fetch) | |
16584 | (uri (pypi-uri "gast" version)) | |
16585 | (sha256 | |
bd300261 | 16586 | (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy")))) |
2884aac0 RW |
16587 | (build-system python-build-system) |
16588 | (propagated-inputs | |
16589 | `(("python-astunparse" ,python-astunparse))) | |
16590 | (home-page "https://pypi.org/project/gast/") | |
16591 | (synopsis "Generic Python AST that abstracts the underlying Python version") | |
16592 | (description | |
16593 | "GAST provides a compatibility layer between the AST of various Python | |
16594 | versions, as produced by @code{ast.parse} from the standard @code{ast} | |
16595 | module.") | |
16596 | (license license:bsd-3))) | |
16597 | ||
44d10b1f RW |
16598 | (define-public python-wikidata |
16599 | (package | |
16600 | (name "python-wikidata") | |
16601 | (version "0.6.1") | |
16602 | (source | |
16603 | (origin | |
16604 | (method url-fetch) | |
16605 | (uri (pypi-uri "Wikidata" version)) | |
16606 | (sha256 | |
16607 | (base32 | |
16608 | "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9")))) | |
16609 | (build-system python-build-system) | |
16610 | (propagated-inputs | |
16611 | `(("python-babel" ,python-babel))) | |
16612 | (home-page "https://github.com/dahlia/wikidata") | |
16613 | (synopsis "Wikidata client library") | |
16614 | (description | |
16615 | "This package provides a Python interface to | |
16616 | @url{https://www.wikidata.org/, Wikidata}.") | |
16617 | (properties '((upstream-name . "Wikidata"))) | |
16618 | (license license:gpl3+))) | |
16619 | ||
16620 | (define-public python-doctest-ignore-unicode | |
16621 | (package | |
16622 | (name "python-doctest-ignore-unicode") | |
16623 | (version "0.1.2") | |
16624 | (source | |
16625 | (origin | |
16626 | (method url-fetch) | |
16627 | (uri (pypi-uri "doctest-ignore-unicode" version)) | |
16628 | (sha256 | |
16629 | (base32 | |
16630 | "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w")))) | |
16631 | (build-system python-build-system) | |
16632 | (native-inputs | |
16633 | `(("python-nose" ,python-nose))) | |
16634 | (home-page "https://github.com/gnublade/doctest-ignore-unicode") | |
16635 | (synopsis "Ignore Unicode literal prefixes in doctests") | |
16636 | (description | |
16637 | "This package adds support for a flag to ignore Unicode literal prefixes | |
16638 | in doctests.") | |
16639 | (license license:asl2.0))) | |
16640 | ||
16641 | (define-public python-attr | |
16642 | (package | |
16643 | (name "python-attr") | |
16644 | (version "0.3.1") | |
16645 | (source | |
16646 | (origin | |
16647 | (method url-fetch) | |
16648 | (uri (pypi-uri "attr" version)) | |
16649 | (sha256 | |
16650 | (base32 | |
16651 | "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch")))) | |
16652 | (build-system python-build-system) | |
16653 | (home-page "https://github.com/denis-ryzhkov/attr") | |
16654 | (synopsis "Decorator for attributes of target function or class") | |
16655 | (description "Simple decorator to set attributes of target function or | |
16656 | class in a @acronym{DRY, Don't Repeat Yourself} way.") | |
16657 | (license license:expat))) | |
f98232a3 VC |
16658 | |
16659 | (define-public python-construct | |
16660 | (package | |
16661 | (name "python-construct") | |
d854ab15 | 16662 | (version "2.10.56") |
f98232a3 VC |
16663 | (source |
16664 | (origin | |
16665 | (method url-fetch) | |
16666 | (uri (pypi-uri "construct" version)) | |
16667 | (sha256 | |
16668 | (base32 | |
d854ab15 | 16669 | "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp")))) |
f98232a3 VC |
16670 | (build-system python-build-system) |
16671 | (arguments | |
16672 | `(#:tests? #f)) ; No tests exist. | |
16673 | (propagated-inputs | |
16674 | `(("python-extras" ,python-extras) | |
16675 | ("python-arrow" ,python-arrow) | |
16676 | ("python-numpy" ,python-numpy) | |
16677 | ("python-ruamel.yaml" ,python-ruamel.yaml))) | |
aabc8954 | 16678 | (home-page "https://construct.readthedocs.io") |
f98232a3 VC |
16679 | (synopsis "Declarative and symmetrical parser and builder for binary data") |
16680 | (description | |
16681 | "This package provides both simple, atomic constructs (such as | |
16682 | integers of various sizes), as well as composite ones which allow you | |
16683 | form hierarchical and sequential structures of increasing complexity. | |
16684 | It features bit and byte granularity, easy debugging and testing, an | |
16685 | easy-to-extend subclass system, and lots of primitive constructs to | |
16686 | make your work easier.") | |
16687 | (license license:expat))) | |
b742c006 LF |
16688 | |
16689 | (define-public python-humanize | |
16690 | (package | |
16691 | (name "python-humanize") | |
16692 | (version "0.5.1") | |
16693 | (source | |
16694 | (origin | |
16695 | (method url-fetch) | |
16696 | (uri (pypi-uri "humanize" version)) | |
16697 | (sha256 | |
16698 | (base32 | |
16699 | "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4")))) | |
16700 | (arguments | |
16701 | '(#:tests? #f)) ; tests not in pypi archive | |
16702 | (build-system python-build-system) | |
16703 | (home-page "https://github.com/jmoiron/humanize") | |
16704 | (synopsis "Print numerical information in a human-readable form") | |
16705 | (description "This package provides a Python module that displays numbers | |
16706 | and dates in \"human readable\" forms. For example, it would display | |
16707 | \"12345591313\" as \"12.3 billion\".") | |
16708 | (license license:expat))) | |
d5bbf66d LF |
16709 | |
16710 | (define-public python-txaio | |
16711 | (package | |
16712 | (name "python-txaio") | |
16713 | (version "18.8.1") | |
16714 | (source | |
16715 | (origin | |
16716 | (method url-fetch) | |
16717 | (uri (pypi-uri "txaio" version)) | |
16718 | (sha256 | |
16719 | (base32 | |
16720 | "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7")))) | |
16721 | (build-system python-build-system) | |
16722 | (propagated-inputs | |
16723 | `(("python-twisted" ,python-twisted) | |
16724 | ("python-six" ,python-six))) | |
16725 | (home-page "https://github.com/crossbario/txaio") | |
16726 | (synopsis "Compatibility layer between Python asyncio and Twisted") | |
16727 | (description "Txaio provides a compatibility layer between the Python | |
16728 | @code{asyncio} module and @code{Twisted}.") | |
16729 | (license license:expat))) | |
963dfd3a RW |
16730 | |
16731 | (define-public python-toolshed | |
16732 | (package | |
16733 | (name "python-toolshed") | |
16734 | (version "0.4.6") | |
16735 | (source | |
16736 | (origin | |
16737 | (method url-fetch) | |
16738 | (uri (pypi-uri "toolshed" version)) | |
16739 | (sha256 | |
16740 | (base32 | |
16741 | "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3")))) | |
16742 | (build-system python-build-system) | |
16743 | (native-inputs | |
16744 | `(("python-nose" ,python-nose))) | |
16745 | (home-page "https://github.com/brentp/toolshed/") | |
16746 | (synopsis "Collection of modules and functions for working with data") | |
16747 | (description "This is a collection of well-tested, simple modules and | |
16748 | functions that aim to reduce boilerplate when working with data.") | |
16749 | (license license:bsd-2))) | |
c91ecf2d RW |
16750 | |
16751 | (define-public python-annoy | |
16752 | (package | |
16753 | (name "python-annoy") | |
16754 | (version "1.15.1") | |
16755 | (source | |
16756 | (origin | |
16757 | (method url-fetch) | |
16758 | (uri (pypi-uri "annoy" version)) | |
16759 | (sha256 | |
16760 | (base32 | |
16761 | "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp")))) | |
16762 | (build-system python-build-system) | |
16763 | (native-inputs | |
16764 | `(("python-nose" ,python-nose))) | |
16765 | (home-page "https://github.com/spotify/annoy/") | |
16766 | (synopsis "Approximate nearest neighbors library") | |
16767 | (description | |
16768 | "Annoy is a C++ library with Python bindings to search for points in | |
16769 | space that are close to a given query point. It also creates large read-only | |
16770 | file-based data structures that are @code{mmap}ped into memory so that many | |
16771 | processes may share the same data.") | |
16772 | (license license:asl2.0))) | |
412342d1 | 16773 | |
79bfa422 | 16774 | (define-public python-pylzma |
412342d1 | 16775 | (package |
79bfa422 DM |
16776 | (name "python-pylzma") |
16777 | (version "0.5.0") | |
16778 | (source | |
16779 | (origin | |
16780 | (method url-fetch) | |
16781 | (uri (pypi-uri "pylzma" version)) | |
16782 | (sha256 | |
16783 | (base32 | |
16784 | "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q")))) | |
412342d1 | 16785 | (build-system python-build-system) |
79bfa422 DM |
16786 | (home-page "http://www.joachim-bauch.de/projects/pylzma/") |
16787 | (synopsis "Python bindings for the LZMA library by Igor Pavlov.") | |
16788 | (description "This package provides Python bindings for the LZMA library | |
16789 | by Igor Pavlov.") | |
16790 | (license license:lgpl2.1+))) | |
16791 | ||
16792 | (define-public python2-pylzma | |
16793 | (package-with-python2 python-pylzma)) | |
f825e605 | 16794 | |
6609ebe7 AG |
16795 | (define-public python2-zeroconf |
16796 | (package | |
16797 | (name "python2-zeroconf") | |
16798 | ||
16799 | ;; This is the last version that supports Python 2.x. | |
16800 | (version "0.19.1") | |
16801 | (source | |
16802 | (origin | |
16803 | (method url-fetch) | |
16804 | (uri (pypi-uri "zeroconf" version)) | |
16805 | (sha256 | |
16806 | (base32 | |
16807 | "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3")))) | |
16808 | (build-system python-build-system) | |
16809 | (arguments | |
16810 | `(#:python ,python-2 | |
16811 | #:phases | |
16812 | (modify-phases %standard-phases | |
16813 | (add-after 'unpack 'patch-requires | |
16814 | (lambda* (#:key inputs #:allow-other-keys) | |
16815 | (substitute* "setup.py" | |
16816 | (("enum-compat") | |
16817 | "enum34")) | |
16818 | #t))))) | |
16819 | (native-inputs | |
16820 | `(("python2-six" ,python2-six) | |
16821 | ("python2-enum32" ,python2-enum34) | |
16822 | ("python2-netifaces" ,python2-netifaces) | |
16823 | ("python2-typing" ,python2-typing))) | |
16824 | (home-page "https://github.com/jstasiak/python-zeroconf") | |
16825 | (synopsis "Pure Python mDNS service discovery") | |
16826 | (description | |
16827 | "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi | |
16828 | compatible).") | |
16829 | (license license:lgpl2.1+))) | |
16830 | ||
f825e605 GLV |
16831 | (define-public python-bsddb3 |
16832 | (package | |
16833 | (name "python-bsddb3") | |
16834 | (version "6.2.6") | |
16835 | (source | |
16836 | (origin | |
16837 | (method url-fetch) | |
16838 | (uri (pypi-uri "bsddb3" version)) | |
16839 | (sha256 | |
16840 | (base32 | |
16841 | "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2")))) | |
16842 | (build-system python-build-system) | |
16843 | (inputs | |
16844 | `(("bdb" ,bdb))) | |
16845 | (arguments | |
16846 | '(#:phases | |
16847 | (modify-phases %standard-phases | |
16848 | (add-after 'unpack 'configure-locations | |
16849 | (lambda* (#:key inputs #:allow-other-keys) | |
16850 | (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb")) | |
16851 | (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1") | |
16852 | #t)) | |
16853 | (replace 'check | |
16854 | (lambda _ | |
16855 | (invoke "python3" "test3.py" "-v")))))) | |
16856 | (home-page "https://www.jcea.es/programacion/pybsddb.htm") | |
16857 | (synopsis "Python bindings for Oracle Berkeley DB") | |
16858 | (description | |
16859 | "This module provides a nearly complete wrapping of the Oracle/Sleepycat | |
16860 | C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and | |
16861 | Transaction objects, and each of these is exposed as a Python type in the | |
16862 | bsddb3.db module. The database objects can use various access methods: btree, | |
16863 | hash, recno, and queue. Complete support of Berkeley DB distributed | |
16864 | transactions. Complete support for Berkeley DB Replication Manager. | |
16865 | Complete support for Berkeley DB Base Replication. Support for RPC.") | |
16866 | (license license:bsd-3))) | |
edeb04bf PL |
16867 | |
16868 | (define-public python-dbfread | |
16869 | (package | |
16870 | (name "python-dbfread") | |
16871 | (version "2.0.7") | |
16872 | (source (origin | |
16873 | (method url-fetch) | |
16874 | (uri (pypi-uri "dbfread" version)) | |
16875 | (sha256 | |
16876 | (base32 | |
16877 | "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07")))) | |
16878 | (build-system python-build-system) | |
16879 | (native-inputs | |
16880 | `(("python-pytest" ,python-pytest))) | |
16881 | (home-page "https://dbfread.readthedocs.io") | |
16882 | (synopsis "Read DBF Files with Python") | |
16883 | (description | |
16884 | "This library reads DBF files and returns the data as native Python data | |
16885 | types for further processing. It is primarily intended for batch jobs and | |
16886 | one-off scripts.") | |
16887 | (license license:expat))) | |
e308b4f0 JM |
16888 | |
16889 | (define-public python-cached-property | |
16890 | (package | |
16891 | (name "python-cached-property") | |
16892 | (version "1.5.1") | |
16893 | (source | |
16894 | (origin | |
16895 | (method url-fetch) | |
16896 | (uri (pypi-uri "cached-property" version)) | |
16897 | (sha256 | |
16898 | (base32 | |
16899 | "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj")))) | |
16900 | (build-system python-build-system) | |
16901 | (arguments | |
16902 | `(#:phases | |
16903 | (modify-phases %standard-phases | |
16904 | ;; https://github.com/pydanny/cached-property/issues/131 | |
16905 | ;; recent versions of freezegun break one test | |
16906 | (add-after 'unpack 'disable-broken-test | |
16907 | (lambda _ | |
16908 | (substitute* "tests/test_cached_property.py" | |
16909 | (("def test_threads_ttl_expiry\\(self\\)" m) | |
16910 | (string-append "@unittest.skip(\"Disabled by Guix\")\n" | |
16911 | " " m))) | |
16912 | #t))))) | |
16913 | (native-inputs | |
16914 | `(("python-freezegun" ,python-freezegun))) | |
16915 | (home-page | |
16916 | "https://github.com/pydanny/cached-property") | |
16917 | (synopsis | |
16918 | "Decorator for caching properties in classes") | |
16919 | (description | |
16920 | "This package provides a decorator which makes caching | |
16921 | time-or-computationally-expensive properties quick and easy and works in Python | |
16922 | 2 or 3.") | |
16923 | (license license:bsd-3))) | |
dfe8a704 NG |
16924 | |
16925 | (define-public python-folium | |
16926 | (package | |
16927 | (name "python-folium") | |
d3bc1ea9 | 16928 | (version "0.10.1") |
dfe8a704 NG |
16929 | (source |
16930 | (origin | |
16931 | (method url-fetch) | |
16932 | (uri (pypi-uri "folium" version)) | |
16933 | (sha256 | |
16934 | (base32 | |
d3bc1ea9 | 16935 | "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd")))) |
dfe8a704 NG |
16936 | (build-system python-build-system) |
16937 | (propagated-inputs | |
16938 | `(("python-branca" ,python-branca) | |
16939 | ("python-jinja2" ,python-jinja2) | |
16940 | ("python-numpy" ,python-numpy) | |
16941 | ("python-requests" ,python-requests))) | |
16942 | (native-inputs | |
16943 | `(("python-pytest" ,python-pytest))) | |
16944 | (home-page "https://github.com/python-visualization/folium") | |
16945 | (synopsis "Make beautiful maps with Leaflet.js & Python") | |
16946 | (description "@code{folium} makes it easy to visualize data that’s been | |
16947 | manipulated in Python on an interactive leaflet map. It enables both the | |
16948 | binding of data to a map for @code{choropleth} visualizations as well as | |
16949 | passing rich vector/raster/HTML visualizations as markers on the map. | |
16950 | ||
16951 | The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and | |
16952 | Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It | |
16953 | supports Image, Video, GeoJSON and TopoJSON overlays.") | |
16954 | (license license:expat))) | |
9dd5f475 LC |
16955 | |
16956 | (define-public jube | |
16957 | (package | |
16958 | ;; This is a command-line tool, so no "python-" prefix. | |
16959 | (name "jube") | |
16960 | (version "2.2.2") | |
16961 | (source (origin | |
16962 | (method url-fetch) | |
16963 | (uri (string-append | |
16964 | "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version=" | |
16965 | version)) | |
16966 | (sha256 | |
16967 | (base32 | |
16968 | "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk")) | |
16969 | (file-name (string-append "jube-" version ".tar.gz")))) | |
16970 | (build-system python-build-system) | |
16971 | (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html") | |
16972 | (synopsis "Benchmarking environment") | |
16973 | (description | |
16974 | "JUBE helps perform and analyze benchmarks in a systematic way. For each | |
16975 | benchmarked application, benchmark data is stored in a format that allows JUBE | |
16976 | to deduct the desired information. This data can be parsed by automatic pre- | |
16977 | and post-processing scripts that draw information and store it more densely | |
16978 | for manual interpretation.") | |
a9f33960 | 16979 | (license license:gpl3+))) |
66436424 NG |
16980 | |
16981 | (define-public python-pyroutelib3 | |
16982 | (package | |
16983 | (name "python-pyroutelib3") | |
16984 | (version "1.3.post1") | |
16985 | (source | |
16986 | (origin | |
16987 | (method url-fetch) | |
16988 | (uri (pypi-uri "pyroutelib3" version)) | |
16989 | (sha256 | |
16990 | (base32 | |
16991 | "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj")))) | |
16992 | (build-system python-build-system) | |
16993 | (propagated-inputs | |
16994 | `(("python-dateutil" ,python-dateutil))) | |
16995 | (home-page "https://github.com/MKuranowski/pyroutelib3") | |
16996 | (synopsis "Library for simple routing on OSM data") | |
16997 | (description "Library for simple routing on OSM data") | |
16998 | (license license:gpl3+))) | |
30e7c03a | 16999 | |
c1bbef69 WŻ |
17000 | (define-public python-bibtexparser |
17001 | (package | |
17002 | (name "python-bibtexparser") | |
17003 | (version "1.1.0") | |
17004 | (source | |
17005 | (origin | |
17006 | (method url-fetch) | |
17007 | (uri (pypi-uri "bibtexparser" version)) | |
17008 | (sha256 | |
17009 | (base32 | |
17010 | "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz")))) | |
17011 | (build-system python-build-system) | |
17012 | (propagated-inputs | |
17013 | `(("python-pyparsing" ,python-pyparsing))) | |
17014 | (native-inputs | |
17015 | `(("python-future" ,python-future))) | |
17016 | (home-page "https://github.com/sciunto-org/python-bibtexparser") | |
17017 | (synopsis "Python library to parse BibTeX files") | |
17018 | (description "BibtexParser is a Python library to parse BibTeX files.") | |
17019 | (license (list license:bsd-3 license:lgpl3)))) | |
8581b40d HG |
17020 | |
17021 | (define-public python-distro | |
17022 | (package | |
17023 | (name "python-distro") | |
17024 | (version "1.4.0") | |
17025 | (source | |
17026 | (origin | |
17027 | (method url-fetch) | |
17028 | (uri (pypi-uri "distro" version)) | |
17029 | (sha256 | |
17030 | (base32 | |
17031 | "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n")))) | |
17032 | (build-system python-build-system) | |
17033 | (native-inputs | |
17034 | `(("python-pytest" ,python-pytest))) | |
17035 | (home-page "https://github.com/nir0s/distro") | |
17036 | (synopsis | |
17037 | "OS platform information API") | |
17038 | (description | |
17039 | "@code{distro} provides information about the OS distribution it runs on, | |
17040 | such as a reliable machine-readable ID, or version information. | |
17041 | ||
17042 | It is the recommended replacement for Python's original | |
17043 | `platform.linux_distribution` function (which will be removed in Python 3.8). | |
17044 | @code{distro} also provides a command-line interface to output the platform | |
17045 | information in various formats.") | |
17046 | (license license:asl2.0))) | |
f2f41e1a HG |
17047 | |
17048 | (define-public python-cairosvg | |
17049 | (package | |
17050 | (name "python-cairosvg") | |
17051 | (version "2.4.2") | |
17052 | (source | |
17053 | (origin | |
17054 | (method url-fetch) | |
17055 | (uri (pypi-uri "CairoSVG" version)) | |
17056 | (sha256 | |
17057 | (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf")))) | |
17058 | (build-system python-build-system) | |
17059 | (arguments | |
17060 | `(#:phases | |
17061 | (modify-phases %standard-phases | |
17062 | (replace 'check | |
17063 | (lambda _ (invoke "pytest")))))) | |
17064 | (propagated-inputs | |
17065 | `(("python-cairocffi" ,python-cairocffi) | |
17066 | ("python-cssselect2" ,python-cssselect2) | |
17067 | ("python-defusedxml" ,python-defusedxml) | |
17068 | ("python-pillow" ,python-pillow) | |
17069 | ("python-tinycss2" ,python-tinycss2))) | |
17070 | (native-inputs | |
17071 | `(("python-pytest-flake8" ,python-pytest-flake8) | |
17072 | ("python-pytest-isort" ,python-pytest-isort) | |
17073 | ("python-pytest-runner" ,python-pytest-runner))) | |
17074 | (home-page "https://cairosvg.org/") | |
17075 | (synopsis "SVG to PDF/PS/PNG converter based on Cairo") | |
17076 | (description "CairoSVG is a SVG converter based on Cairo. It can export | |
17077 | SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a | |
17078 | SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once | |
17079 | parsed, the result is drawn to a Cairo surface that can be exported to | |
17080 | qvarious formats: PDF, PostScript, PNG and even SVG.") | |
17081 | (license license:lgpl3+))) | |
ea1801e0 HG |
17082 | |
17083 | (define-public python-pyphen | |
17084 | (package | |
17085 | (name "python-pyphen") | |
17086 | (version "0.9.5") | |
17087 | (source | |
17088 | (origin | |
17089 | (method url-fetch) | |
17090 | (uri (pypi-uri "Pyphen" version)) | |
17091 | (sha256 | |
17092 | (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv")))) | |
17093 | (build-system python-build-system) | |
17094 | ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the | |
17095 | ;; embedded set provided by upstream - like Debian does. | |
17096 | (home-page "https://github.com/Kozea/Pyphen") | |
17097 | (synopsis "Pure Python module to hyphenate text") | |
17098 | (description "Pyphen is a pure Python module to hyphenate text using | |
17099 | existing Hunspell hyphenation dictionaries.") | |
17100 | (license (list license:gpl2 license:lgpl2.1 license:mpl1.1)))) | |
85cfb0e9 CL |
17101 | |
17102 | (define-public python-intelhex | |
17103 | (package | |
17104 | (name "python-intelhex") | |
17105 | (version "2.2.1") | |
17106 | (source | |
17107 | (origin | |
17108 | (method url-fetch) | |
17109 | (uri (pypi-uri "intelhex" version)) | |
17110 | (sha256 | |
17111 | (base32 | |
17112 | "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780")))) | |
17113 | (build-system python-build-system) | |
17114 | (arguments '(#:tests? #f)) ;issue with version | |
17115 | (home-page "https://pypi.org/project/IntelHex/") | |
17116 | (synopsis "Python library for Intel HEX files manipulations") | |
17117 | (description "The Intel HEX file format is widely used in microprocessors | |
17118 | and microcontrollers area (embedded systems etc.) as the de facto standard for | |
17119 | representation of code to be programmed into microelectronic devices. This | |
17120 | package provides an intelhex Python library to read, write, create from | |
17121 | scratch and manipulate data from Intel HEX file format. It also includes | |
17122 | several convenience Python scripts, including \"classic\" hex2bin and bin2hex | |
17123 | converters and more, those based on the library itself.") | |
17124 | (license license:bsd-3))) | |
34bf6869 CL |
17125 | |
17126 | (define-public python-pykwalify | |
17127 | (package | |
17128 | (name "python-pykwalify") | |
17129 | (version "1.7.0") | |
17130 | (source | |
17131 | (origin | |
17132 | (method url-fetch) | |
17133 | (uri (pypi-uri "pykwalify" version)) | |
17134 | (sha256 | |
17135 | (base32 | |
17136 | "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy")))) | |
17137 | (build-system python-build-system) | |
17138 | (arguments '(#:tests? #f)) ;missing dependencies | |
17139 | (propagated-inputs | |
17140 | `(("python-dateutil" ,python-dateutil) | |
17141 | ("python-docopt" ,python-docopt) | |
17142 | ("python-pyyaml" ,python-pyyaml))) | |
17143 | (home-page "https://github.com/grokzen/pykwalify") | |
17144 | (synopsis | |
17145 | "Python lib/cli for JSON/YAML schema validation") | |
17146 | (description | |
17147 | "This package provides a parser, schema validator, and data binding tool | |
17148 | for YAML and JSON.") | |
17149 | (license license:expat))) | |
e2ebbbcc KK |
17150 | |
17151 | (define-public python-dbusmock | |
17152 | (package | |
022b0d5f BG |
17153 | (name "python-dbusmock") |
17154 | (version "0.18.3") | |
17155 | (source | |
17156 | (origin | |
17157 | (method url-fetch) | |
17158 | (uri (pypi-uri "python-dbusmock" version)) | |
17159 | (sha256 | |
e2ebbbcc | 17160 | (base32 |
022b0d5f BG |
17161 | "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr")))) |
17162 | (build-system python-build-system) | |
17163 | (arguments | |
17164 | '(#:phases | |
17165 | (modify-phases %standard-phases | |
17166 | (add-after 'unpack 'patch-shell-path | |
17167 | (lambda _ | |
17168 | (substitute* "tests/test_code.py" | |
17169 | (("/bin/bash") (which "bash"))) | |
17170 | #t))))) | |
17171 | (native-inputs | |
17172 | `(;; For tests. | |
17173 | ("dbus" ,dbus) ; for dbus-daemon | |
17174 | ("python-nose" ,python-nose) | |
17175 | ("which" ,which))) | |
17176 | (propagated-inputs | |
17177 | `(("python-dbus" ,python-dbus) | |
17178 | ("python-pygobject" ,python-pygobject))) | |
17179 | (home-page "https://github.com/martinpitt/python-dbusmock") | |
17180 | (synopsis "Python library for mock D-Bus objects") | |
17181 | (description "python-dbusmock allows for the easy creation of mock objects on | |
e2ebbbcc KK |
17182 | D-Bus. This is useful for writing tests for software which talks to D-Bus |
17183 | services such as upower, systemd, logind, gnome-session or others, and it is | |
17184 | hard (or impossible without root privileges) to set the state of the real | |
17185 | services to what you expect in your tests.") | |
022b0d5f | 17186 | (license license:lgpl3+))) |
b657b23f BG |
17187 | |
17188 | (define-public python-ujson | |
17189 | (package | |
17190 | (name "python-ujson") | |
17191 | (version "1.35") | |
17192 | (source | |
17193 | (origin | |
17194 | (method url-fetch) | |
17195 | (uri (pypi-uri "ujson" version)) | |
17196 | (sha256 | |
17197 | (base32 | |
17198 | "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n")))) | |
17199 | (build-system python-build-system) | |
17200 | (home-page "http://www.esn.me") | |
17201 | (synopsis | |
17202 | "Ultra fast JSON encoder and decoder for Python") | |
17203 | (description | |
17204 | "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with | |
17205 | bindings for Python 2.5+ and 3.") | |
17206 | (license license:bsd-3))) | |
17207 | ||
17208 | (define-public python2-ujson | |
17209 | (package-with-python2 python-ujson)) | |
dbcef44a MIP |
17210 | |
17211 | (define-public python-iocapture | |
17212 | ;; The latest release is more than a year older than this commit. | |
17213 | (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c") | |
17214 | (revision "1")) | |
17215 | (package | |
17216 | (name "python-iocapture") | |
17217 | (version "0.1.2") | |
17218 | (source | |
17219 | (origin | |
17220 | (method git-fetch) | |
17221 | (uri (git-reference | |
17222 | (url "https://github.com/oinume/iocapture.git") | |
17223 | (commit commit))) | |
17224 | (file-name (git-file-name name version)) | |
17225 | (sha256 | |
17226 | (base32 | |
17227 | "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz")))) | |
17228 | (build-system python-build-system) | |
17229 | (arguments | |
17230 | `(#:phases | |
17231 | (modify-phases %standard-phases | |
17232 | (delete 'check) | |
17233 | (add-after 'install 'check | |
17234 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
17235 | (add-installed-pythonpath inputs outputs) | |
17236 | (invoke "py.test" "-v" "tests") | |
17237 | #t))))) | |
17238 | (propagated-inputs | |
17239 | `(("python-flexmock" ,python-flexmock) | |
17240 | ("python-pytest" ,python-pytest) | |
17241 | ("python-pytest-cov" ,python-pytest-cov) | |
17242 | ("python-six" ,python-six))) | |
17243 | (home-page "https://github.com/oinume/iocapture") | |
17244 | (synopsis "Python capturing tool for stdout and stderr") | |
17245 | (description | |
17246 | "This package helps you to capture the standard out (stdout) and the | |
17247 | standard error channel (stderr) in your program.") | |
17248 | (license license:expat)))) | |
db6bd842 MIP |
17249 | |
17250 | (define-public python-argh | |
17251 | ;; There are 21 commits since the latest release containing important | |
17252 | ;; improvements. | |
17253 | (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4") | |
17254 | (revision "1")) | |
17255 | (package | |
17256 | (name "python-argh") | |
17257 | (version (git-version "0.26.2" revision commit)) | |
17258 | (source | |
17259 | (origin | |
17260 | (method git-fetch) | |
17261 | (uri (git-reference | |
17262 | (url "https://github.com/neithere/argh.git") | |
17263 | (commit commit))) | |
17264 | (file-name (git-file-name name version)) | |
17265 | (sha256 | |
17266 | (base32 | |
17267 | "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns")))) | |
17268 | (build-system python-build-system) | |
17269 | (propagated-inputs | |
17270 | `(("python-iocapture" ,python-iocapture) | |
17271 | ("python-mock" ,python-mock) | |
17272 | ("python-pytest" ,python-pytest) | |
17273 | ("python-pytest-cov" ,python-pytest-cov) | |
17274 | ("python-pytest-xdist" ,python-pytest-xdist) | |
17275 | ("python-tox" ,python-tox))) | |
17276 | (home-page "https://github.com/neithere/argh/") | |
17277 | (synopsis "Argparse wrapper with natural syntax") | |
17278 | (description | |
17279 | "python-argh is a small library that provides several layers of | |
17280 | abstraction on top of @code{python-argparse}. The layers can be mixed. It is | |
17281 | always possible to declare a command with the highest possible (and least | |
17282 | flexible) layer and then tune the behaviour with any of the lower layers | |
17283 | including the native API of @code{python-argparse}.") | |
17284 | (license license:lgpl3+)))) | |
073723fa MIP |
17285 | |
17286 | (define-public python-ppft | |
17287 | (package | |
17288 | (name "python-ppft") | |
17289 | (version "1.6.6.1") | |
17290 | (source | |
17291 | (origin | |
17292 | (method url-fetch) | |
17293 | (uri (pypi-uri "ppft" version)) | |
17294 | (sha256 | |
17295 | (base32 | |
17296 | "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy")))) | |
17297 | (build-system python-build-system) | |
17298 | (arguments '(#:tests? #f)) ; there are none | |
17299 | (propagated-inputs | |
17300 | `(("python-six" ,python-six))) | |
17301 | (home-page "https://pypi.org/project/ppft/") | |
17302 | (synopsis "Fork of Parallel Python") | |
17303 | (description | |
17304 | "This package is a fork of Parallel Python. The Parallel Python | |
17305 | module (@code{pp}) provides an easy and efficient way to create | |
17306 | parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP) | |
17307 | computers and clusters. It features cross-platform portability and dynamic | |
17308 | load balancing.") | |
17309 | (license license:bsd-3))) | |
8451ea19 MIP |
17310 | |
17311 | (define-public python-pox | |
17312 | (package | |
17313 | (name "python-pox") | |
17314 | (version "0.2.7") | |
17315 | (source | |
17316 | (origin | |
17317 | (method url-fetch) | |
17318 | (uri (pypi-uri "pox" version)) | |
17319 | (sha256 | |
17320 | (base32 | |
17321 | "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6")))) | |
17322 | (build-system python-build-system) | |
17323 | (arguments | |
17324 | `(#:phases | |
17325 | (modify-phases %standard-phases | |
17326 | (replace 'check | |
17327 | (lambda _ | |
17328 | (mkdir-p "/tmp/guix") | |
17329 | (setenv "SHELL" "bash") | |
17330 | (setenv "USERNAME" "guix") | |
17331 | (setenv "HOME" "/tmp/guix") ; must end on USERNAME... | |
17332 | (invoke "py.test" "-vv") | |
17333 | #t))))) | |
17334 | (native-inputs | |
17335 | `(("python-pytest" ,python-pytest) | |
17336 | ("which" ,which))) | |
17337 | (home-page "https://pypi.org/project/pox/") | |
17338 | (synopsis "Python utilities for filesystem exploration and automated builds") | |
17339 | (description | |
17340 | "Pox provides a collection of utilities for navigating and manipulating | |
17341 | filesystems. This module is designed to facilitate some of the low level | |
17342 | operating system interactions that are useful when exploring a filesystem on a | |
17343 | remote host. Pox provides Python equivalents of several shell commands such | |
17344 | as @command{which} and @command{find}. These commands allow automated | |
17345 | discovery of what has been installed on an operating system, and where the | |
17346 | essential tools are located.") | |
17347 | (license license:bsd-3))) | |
7e476ae8 MIP |
17348 | |
17349 | (define-public python-pathos | |
17350 | (package | |
17351 | (name "python-pathos") | |
17352 | (version "0.2.5") | |
17353 | (source | |
17354 | (origin | |
17355 | (method url-fetch) | |
17356 | (uri (pypi-uri "pathos" version)) | |
17357 | (sha256 | |
17358 | (base32 | |
17359 | "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1")))) | |
17360 | (build-system python-build-system) | |
8f82e7e3 EF |
17361 | (arguments |
17362 | '(#:phases | |
17363 | (modify-phases %standard-phases | |
17364 | (replace 'check | |
17365 | (lambda _ | |
17366 | (setenv "PYTHONPATH" | |
17367 | (string-append (getcwd) ":" (getenv "PYTHONPATH"))) | |
17368 | (invoke "python" "./tests/__main__.py")))))) | |
7e476ae8 MIP |
17369 | (propagated-inputs |
17370 | `(("python-dill" ,python-dill) | |
17371 | ("python-multiprocess" ,python-multiprocess) | |
17372 | ("python-pox" ,python-pox) | |
17373 | ("python-ppft" ,python-ppft))) | |
8f82e7e3 EF |
17374 | (native-inputs |
17375 | `(("python-pytest" ,python-pytest))) | |
7e476ae8 MIP |
17376 | (home-page "https://pypi.org/project/pathos/") |
17377 | (synopsis | |
17378 | "Parallel graph management and execution in heterogeneous computing") | |
17379 | (description | |
17380 | "Python-pathos is a framework for heterogenous computing. It provides a | |
17381 | consistent high-level interface for configuring and launching parallel | |
17382 | computations across heterogenous resources. Python-pathos provides configurable | |
17383 | launchers for parallel and distributed computing, where each launcher contains | |
17384 | the syntactic logic to configure and launch jobs in an execution environment.") | |
17385 | (license license:bsd-3))) | |
54e5ee5a BG |
17386 | |
17387 | (define-public python-flit | |
17388 | (package | |
17389 | (name "python-flit") | |
17390 | (version "2.1.0") | |
17391 | (source | |
17392 | (origin | |
17393 | (method url-fetch) | |
17394 | (uri (pypi-uri "flit" version)) | |
17395 | (sha256 | |
17396 | (base32 | |
17397 | "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc")))) | |
17398 | (build-system python-build-system) | |
17399 | (arguments | |
17400 | `(#:tests? #f)) ; XXX: Check requires network access. | |
17401 | (home-page "https://flit.readthedocs.io/") | |
17402 | (synopsis | |
17403 | "Simple packaging tool for simple packages") | |
17404 | (description | |
17405 | "Flit is a simple way to put Python packages and modules on PyPI. Flit | |
17406 | packages a single importable module or package at a time, using the import | |
17407 | name as the name on PyPI. All subpackages and data files within a package | |
17408 | are included automatically.") | |
17409 | (license license:bsd-3))) | |
02139b42 BG |
17410 | |
17411 | (define-public python-pathtools | |
17412 | (package | |
17413 | (name "python-pathtools") | |
17414 | (version "0.1.2") | |
17415 | (source | |
17416 | (origin | |
17417 | (method url-fetch) | |
17418 | (uri (pypi-uri "pathtools" version)) | |
17419 | (sha256 | |
17420 | (base32 | |
17421 | "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw")))) | |
17422 | (build-system python-build-system) | |
17423 | (home-page | |
17424 | "https://github.com/gorakhargosh/pathtools") | |
17425 | (synopsis "Path utilities for Python") | |
17426 | (description "Pattern matching and various utilities for file systems | |
17427 | paths.") | |
17428 | (license license:expat))) | |
6b520177 JG |
17429 | |
17430 | (define-public python-fastentrypoints | |
17431 | (package | |
17432 | (name "python-fastentrypoints") | |
17433 | (version "0.12") | |
17434 | (source | |
17435 | (origin | |
17436 | (method url-fetch) | |
17437 | (uri (pypi-uri "fastentrypoints" version)) | |
17438 | (sha256 | |
17439 | (base32 | |
17440 | "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z")))) | |
17441 | (build-system python-build-system) | |
17442 | (home-page | |
17443 | "https://github.com/ninjaaron/fast-entry_points") | |
17444 | (synopsis | |
17445 | "Makes entry_points specified in setup.py load more quickly") | |
17446 | (description | |
17447 | "Using entry_points in your setup.py makes scripts that start really | |
17448 | slowly because it imports pkg_resources. This package allows such setup | |
17449 | scripts to load entry points more quickly.") | |
17450 | (license license:bsd-3))) | |
c5eb8cf8 JG |
17451 | |
17452 | (define-public python-funcparserlib | |
17453 | (package | |
17454 | (name "python-funcparserlib") | |
17455 | (version "0.3.6") | |
17456 | (source | |
17457 | (origin | |
17458 | (method url-fetch) | |
17459 | (uri (pypi-uri "funcparserlib" version)) | |
17460 | (sha256 | |
17461 | (base32 | |
17462 | "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp")))) | |
17463 | (native-inputs | |
17464 | `(("python-tox" ,python-tox))) | |
17465 | (arguments | |
17466 | `(#:phases | |
17467 | (modify-phases %standard-phases | |
17468 | (replace 'check | |
17469 | (lambda _ | |
17470 | (invoke "tox")))))) | |
17471 | (build-system python-build-system) | |
17472 | (home-page | |
17473 | "https://github.com/vlasovskikh/funcparserlib") | |
17474 | (synopsis | |
17475 | "Recursive descent parsing library based on functional combinators") | |
17476 | (description | |
11140cf1 | 17477 | "This package is a recursive descent parsing library for Python based on |
c5eb8cf8 JG |
17478 | functional combinators. Parser combinators are just higher-order functions |
17479 | that take parsers as their arguments and return them as result values.") | |
17480 | (license license:expat))) | |
602f3b67 NG |
17481 | |
17482 | (define-public python-speg | |
17483 | (package | |
17484 | (name "python-speg") | |
17485 | (version "0.3") | |
17486 | (source | |
17487 | (origin | |
17488 | (method url-fetch) | |
17489 | (uri (pypi-uri "speg" version ".zip")) | |
17490 | (sha256 | |
17491 | (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh")))) | |
17492 | (arguments | |
17493 | `(#:tests? #f)) ;FIXME: tests fail, not sure why | |
17494 | (native-inputs | |
17495 | `(("unzip" ,unzip))) | |
17496 | (build-system python-build-system) | |
17497 | (home-page "https://github.com/avakar/speg") | |
17498 | (synopsis "PEG-based parser interpreter with memoization") | |
17499 | (description "This package is a PEG-based parser and interpreter with | |
17500 | memoization.") | |
17501 | (license license:expat))) | |
07c8177b NG |
17502 | |
17503 | (define-public python-cson | |
17504 | (package | |
17505 | (name "python-cson") | |
17506 | (version "0.8") | |
17507 | (source | |
17508 | (origin | |
17509 | (method url-fetch) | |
17510 | (uri (pypi-uri "cson" version)) | |
17511 | (sha256 | |
17512 | (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f")))) | |
17513 | (build-system python-build-system) | |
17514 | (propagated-inputs | |
17515 | `(("python-speg" ,python-speg))) | |
17516 | (home-page "https://github.com/avakar/pycson") | |
17517 | (synopsis "Parser for Coffeescript Object Notation (CSON)") | |
17518 | (description "This package is a parser for Coffeescript Object | |
17519 | Notation (CSON).") | |
17520 | (license license:expat))) | |
e24c672e LDB |
17521 | |
17522 | (define-public python-asynctest | |
17523 | (package | |
17524 | (name "python-asynctest") | |
17525 | (version "0.13.0") | |
17526 | (source | |
17527 | (origin | |
17528 | (method url-fetch) | |
17529 | (uri (pypi-uri "asynctest" version)) | |
17530 | (sha256 | |
17531 | (base32 | |
17532 | "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62")))) | |
17533 | (build-system python-build-system) | |
17534 | (arguments | |
17535 | '(#:phases | |
17536 | (modify-phases %standard-phases | |
17537 | (replace 'check | |
17538 | (lambda _ | |
17539 | (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test"))) | |
17540 | (add-after 'unpack 'disable-tests | |
17541 | (lambda* _ | |
17542 | (substitute* "test/test_selector.py" | |
17543 | ;; XXX: This test fails for unknown reason inside the build | |
17544 | ;; environment. | |
17545 | (("def test_events_watched_outside_test_are_ignored") | |
17546 | "@unittest.skip('disabled by guix') | |
17547 | def test_events_watched_outside_test_are_ignored"))))))) | |
17548 | (home-page "https://github.com/Martiusweb/asynctest") | |
17549 | (synopsis "Extension of unittest for testing asyncio libraries") | |
17550 | (description | |
17551 | "The package asynctest is built on top of the standard unittest module | |
17552 | and cuts down boilerplate code when testing libraries for asyncio.") | |
17553 | (license license:asl2.0))) | |
1cc9c38e LDB |
17554 | |
17555 | (define-public python-aionotify | |
17556 | (package | |
17557 | (name "python-aionotify") | |
17558 | (version "0.2.0") | |
17559 | (source | |
17560 | (origin | |
17561 | ;; Source tarball on PyPi lacks tests | |
17562 | (method git-fetch) | |
17563 | (uri (git-reference | |
17564 | (url "https://github.com/rbarrois/aionotify") | |
17565 | (commit (string-append "v" version)))) | |
17566 | (file-name (git-file-name name version)) | |
17567 | (sha256 | |
17568 | (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y")))) | |
17569 | (build-system python-build-system) | |
17570 | (native-inputs `(("python-asynctest" ,python-asynctest))) | |
17571 | (home-page "https://github.com/rbarrois/aionotify") | |
17572 | (synopsis "Asyncio-powered inotify library") | |
17573 | (description | |
17574 | "@code{aionotify} is a simple, asyncio-based inotify library.") | |
17575 | (license license:bsd-3))) | |
84efaa3b LDB |
17576 | |
17577 | (define-public python-forbiddenfruit | |
17578 | (package | |
17579 | (name "python-forbiddenfruit") | |
17580 | (version "0.1.3") | |
17581 | (source | |
17582 | (origin | |
17583 | ;; Source tarball on PyPi lacks Makefile that builds and runs tests | |
17584 | (method git-fetch) | |
17585 | (uri (git-reference | |
17586 | (url "https://github.com/clarete/forbiddenfruit") | |
17587 | (commit version))) | |
17588 | (file-name (git-file-name name version)) | |
17589 | (sha256 | |
17590 | (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2")))) | |
17591 | (build-system python-build-system) | |
17592 | (arguments | |
17593 | '(#:phases | |
17594 | (modify-phases %standard-phases | |
17595 | (replace 'check | |
17596 | (lambda _ | |
17597 | (invoke "make" "SKIP_DEPS=1")))))) | |
17598 | (native-inputs | |
17599 | `(("python-nose" ,python-nose) | |
17600 | ("python-coverage" ,python-coverage))) | |
17601 | (home-page "https://github.com/clarete/forbiddenfruit") | |
17602 | (synopsis "Patch python built-in objects") | |
17603 | (description "This project allows Python code to extend built-in types.") | |
17604 | (license (list license:gpl3+ license:expat)))) | |
9786258b LDB |
17605 | |
17606 | (define-public python-shouldbe | |
17607 | (package | |
17608 | (name "python-shouldbe") | |
17609 | (version "0.1.2") | |
17610 | (source | |
17611 | (origin | |
17612 | (method url-fetch) | |
17613 | (uri (pypi-uri "shouldbe" version)) | |
17614 | (sha256 | |
17615 | (base32 | |
17616 | "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj")))) | |
17617 | (build-system python-build-system) | |
17618 | (propagated-inputs | |
17619 | `(("python-forbiddenfruit" ,python-forbiddenfruit))) | |
17620 | (native-inputs | |
17621 | `(("python-nose" ,python-nose))) | |
17622 | (home-page "https://github.com/directxman12/should_be") | |
17623 | (synopsis "Python Assertion Helpers inspired by Shouldly") | |
17624 | (description | |
17625 | "Python Assertion Helpers inspired by Shouldly.") | |
17626 | (license license:isc))) | |
72c2478a LDB |
17627 | |
17628 | (define-public python-k5test | |
17629 | (package | |
17630 | (name "python-k5test") | |
17631 | (version "0.9.2") | |
17632 | (source | |
17633 | (origin | |
17634 | (method url-fetch) | |
17635 | (uri (pypi-uri "k5test" version)) | |
17636 | (sha256 | |
17637 | (base32 | |
17638 | "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8")))) | |
17639 | (build-system python-build-system) | |
17640 | (propagated-inputs | |
17641 | `(("python-six" ,python-six) | |
17642 | ;; `which`, `kadmin.local` binaries called inside library | |
17643 | ("which" ,which) | |
17644 | ("mit-krb5" ,mit-krb5))) | |
17645 | (native-inputs `(("mit-krb5" ,mit-krb5))) | |
17646 | (arguments | |
17647 | '(#:phases | |
17648 | (modify-phases %standard-phases | |
17649 | (add-after 'unpack 'patch-paths | |
17650 | (lambda* _ | |
17651 | (substitute* "k5test/realm.py" | |
17652 | (("'kadmin_local'") "'kadmin.local'"))))))) | |
17653 | (home-page "https://github.com/pythongssapi/k5test") | |
17654 | (synopsis "Library for setting up self-contained Kerberos 5 environments") | |
17655 | (description | |
17656 | "@code{k5test} is a library for setting up self-contained Kerberos 5 | |
17657 | environments, and running Python unit tests inside those environments. It is | |
17658 | based on the file of the same name found alongside the MIT Kerberos 5 unit | |
17659 | tests.") | |
17660 | (license license:isc))) | |
a8ef4978 LDB |
17661 | |
17662 | (define-public python-gssapi | |
17663 | (package | |
17664 | (name "python-gssapi") | |
17665 | (version "1.6.1") | |
17666 | (source | |
17667 | (origin | |
17668 | (method url-fetch) | |
17669 | (uri (pypi-uri "gssapi" version)) | |
17670 | (sha256 | |
17671 | (base32 | |
17672 | "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr")))) | |
17673 | (build-system python-build-system) | |
17674 | (propagated-inputs | |
17675 | `(("python-decorator" ,python-decorator) | |
17676 | ("python-six" ,python-six))) | |
17677 | (inputs | |
17678 | `(("mit-krb5" ,mit-krb5))) | |
17679 | ;; for tests | |
17680 | (native-inputs | |
17681 | `(("python-shouldbe" ,python-shouldbe) | |
17682 | ("python-parameterized" ,python-parameterized) | |
17683 | ("python-k5test" ,python-k5test) | |
17684 | ("python-nose" ,python-nose))) | |
17685 | (home-page "https://github.com/pythongssapi/python-gssapi") | |
17686 | (synopsis "Python GSSAPI Wrapper") | |
17687 | (description | |
17688 | "Python-GSSAPI provides both low-level and high level wrappers around the | |
17689 | GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should | |
17690 | also be useable with other GSSAPI mechanisms.") | |
17691 | (license license:isc))) | |
7261bdca JL |
17692 | |
17693 | (define-public python-check-manifest | |
17694 | (package | |
17695 | (name "python-check-manifest") | |
17696 | (version "0.37") | |
17697 | (source | |
17698 | (origin | |
17699 | (method url-fetch) | |
17700 | (uri (pypi-uri "check-manifest" version)) | |
17701 | (sha256 | |
17702 | (base32 | |
17703 | "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4")))) | |
17704 | (build-system python-build-system) | |
17705 | (native-inputs | |
17706 | `(("python-mock" ,python-mock) | |
17707 | ("git" ,git))) | |
17708 | (home-page "https://github.com/mgedmin/check-manifest") | |
17709 | (synopsis "Check MANIFEST.in in a Python source package for completeness") | |
17710 | (description "Python package can include a MANIFEST.in file to help with | |
17711 | sending package files to the Python Package Index. This package checks that | |
17712 | file to ensure it completely and accurately describes your project.") | |
17713 | (license license:expat))) | |
b487b7b5 JL |
17714 | |
17715 | (define-public python-android-stringslib | |
17716 | (package | |
17717 | (name "python-android-stringslib") | |
17718 | (version "0.1.2") | |
17719 | (source | |
17720 | (origin | |
17721 | (method git-fetch) | |
17722 | (uri (git-reference | |
17723 | (url "https://framagit.org/tyreunom/python-android-strings-lib") | |
17724 | (commit (string-append "v" version)))) | |
17725 | (file-name (git-file-name name version)) | |
17726 | (sha256 | |
17727 | (base32 | |
17728 | "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4")))) | |
17729 | (build-system python-build-system) | |
17730 | (arguments | |
17731 | `(#:tests? #f)) | |
17732 | (home-page "https://framagit.org/tyreunom/python-android-strings-lib") | |
17733 | (synopsis "Android strings.xml support") | |
17734 | (description "Android Strings Lib provides support for android's strings.xml | |
17735 | files. These files are used to translate strings in android apps.") | |
17736 | (license license:expat))) | |
87435943 | 17737 | |
7dec888f JL |
17738 | (define-public python-watchdog |
17739 | (package | |
17740 | (name "python-watchdog") | |
17741 | (version "0.9.0") | |
17742 | (source | |
17743 | (origin | |
17744 | (method url-fetch) | |
17745 | (uri (pypi-uri "watchdog" version)) | |
17746 | (sha256 | |
17747 | (base32 | |
17748 | "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn")))) | |
17749 | (build-system python-build-system) | |
17750 | (arguments | |
17751 | `(#:phases | |
17752 | (modify-phases %standard-phases | |
17753 | (add-before 'check 'remove-failing | |
17754 | (lambda _ | |
17755 | (delete-file "tests/test_inotify_buffer.py") | |
17756 | (delete-file "tests/test_snapshot_diff.py") | |
17757 | #t))))) | |
17758 | (propagated-inputs | |
17759 | `(("python-argh" ,python-argh) | |
17760 | ("python-pathtools" ,python-pathtools) | |
17761 | ("python-pyyaml" ,python-pyyaml))) | |
17762 | (native-inputs | |
17763 | `(("python-pytest-cov" ,python-pytest-cov) | |
17764 | ("python-pytest-timeout" ,python-pytest-timeout))) | |
17765 | (home-page "https://github.com/gorakhargosh/watchdog") | |
17766 | (synopsis "Filesystem events monitoring") | |
17767 | (description "This package provides a way to monitor filesystem events | |
17768 | such as a file modification and trigger an action. This is similar to inotify, | |
17769 | but portable.") | |
17770 | (license license:asl2.0))) | |
2cbede59 | 17771 | |
9c9704a9 MC |
17772 | (define-public python-wget |
17773 | (package | |
17774 | (name "python-wget") | |
17775 | (version "3.2") | |
17776 | (source | |
17777 | (origin | |
17778 | (method url-fetch) | |
17779 | (uri (pypi-uri "wget" version ".zip")) | |
17780 | (sha256 | |
17781 | (base32 | |
17782 | "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim")))) | |
17783 | (build-system python-build-system) | |
17784 | (native-inputs `(("unzip" ,unzip))) | |
17785 | (home-page "https://bitbucket.org/techtonik/python-wget/") | |
17786 | (synopsis "Pure Python download utility") | |
17787 | (description "The python-wget library provides an API to download files | |
17788 | with features similar to the @command{wget} utility.") | |
17789 | (license license:unlicense))) | |
17790 | ||
2cbede59 JL |
17791 | (define-public offlate |
17792 | (package | |
17793 | (name "offlate") | |
17794 | (version "0.5") | |
17795 | (source | |
17796 | (origin | |
17797 | (method git-fetch) | |
17798 | (uri (git-reference | |
17799 | (url "https://framagit.org/tyreunom/offlate") | |
17800 | (commit version))) | |
17801 | (file-name (git-file-name name version)) | |
17802 | (sha256 | |
17803 | (base32 | |
17804 | "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7")))) | |
17805 | (build-system python-build-system) | |
17806 | (arguments | |
17807 | ;; No tests | |
17808 | `(#:tests? #f)) | |
17809 | (propagated-inputs | |
17810 | `(("python-android-stringslib" ,python-android-stringslib) | |
17811 | ("python-dateutil" ,python-dateutil) | |
17812 | ("python-gitlab" ,python-gitlab) | |
17813 | ("python-lxml" ,python-lxml) | |
17814 | ("python-polib" ,python-polib) | |
17815 | ("python-pyenchant" ,python-pyenchant) | |
17816 | ("python-pygit2" ,python-pygit2) | |
17817 | ("python-pygithub" ,python-pygithub) | |
17818 | ("python-pyqt" ,python-pyqt) | |
17819 | ("python-requests" ,python-requests) | |
17820 | ("python-ruamel.yaml" ,python-ruamel.yaml) | |
17821 | ("python-translation-finder" ,python-translation-finder) | |
17822 | ("python-watchdog" ,python-watchdog))) | |
17823 | (native-inputs | |
17824 | `(("qttools" ,qttools))) | |
17825 | (home-page "https://framagit.org/tyreunom/offlate") | |
17826 | (synopsis "Offline translation interface for online translation tools") | |
17827 | (description "Offlate offers a unified interface for different translation | |
17828 | file formats, as well as many different online translation platforms. You can | |
17829 | use it to get work from online platforms, specialized such as the Translation | |
17830 | Project, or not such a gitlab instance when your upstream doesn't use any | |
17831 | dedicated platform. The tool proposes a unified interface for any format and | |
17832 | an upload option to send your work back to the platform.") | |
17833 | (license license:gpl3+))) | |
479f4013 JK |
17834 | |
17835 | (define-public python-pypng | |
17836 | (package | |
17837 | (name "python-pypng") | |
17838 | (version "0.0.20") | |
17839 | (source | |
17840 | (origin | |
17841 | (method url-fetch) | |
17842 | (uri (pypi-uri "pypng" version)) | |
17843 | (sha256 | |
17844 | (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh")))) | |
17845 | (build-system python-build-system) | |
17846 | (home-page "https://github.com/drj11/pypng") | |
17847 | (synopsis "Pure Python PNG image encoder/decoder") | |
17848 | (description | |
17849 | "The PyPNG module implements support for PNG images. It reads and writes | |
17850 | PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per | |
17851 | pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA, | |
17852 | LA (greyscale with alpha) with 8/16 bits per channel; colour mapped | |
17853 | images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing. | |
17854 | A number of optional chunks can be specified (when writing) and | |
17855 | understood (when reading): tRNS, bKGD, gAMA. | |
17856 | ||
17857 | PyPNG is not a high level toolkit for image processing (like PIL) and does not | |
17858 | aim at being a replacement or competitor. Its strength lies in fine-grained | |
17859 | extensive support of PNG features. It can also read and write Netpbm PAM | |
17860 | files, with a focus on its use as an intermediate format for implementing | |
17861 | custom PNG processing.") | |
17862 | (license license:expat))) | |
da8ca4c3 | 17863 | |
17864 | (define-public python-fuzzywuzzy | |
17865 | (package | |
17866 | (name "python-fuzzywuzzy") | |
17867 | (version "0.18.0") | |
17868 | (source | |
17869 | (origin | |
17870 | (method url-fetch) | |
17871 | (uri (pypi-uri "fuzzywuzzy" version)) | |
17872 | (sha256 | |
17873 | (base32 | |
17874 | "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5")))) | |
17875 | (build-system python-build-system) | |
17876 | (native-inputs | |
17877 | `(("python-hypothesis" ,python-hypothesis) | |
17878 | ("python-pycodestyle" ,python-pycodestyle) | |
17879 | ("python-pytest" ,python-pytest))) | |
17880 | (propagated-inputs | |
17881 | `(("python-levenshtein" ,python-levenshtein))) | |
17882 | (home-page "https://github.com/seatgeek/fuzzywuzzy") | |
7d9f8db2 | 17883 | (synopsis "Fuzzy string matching in Python") |
da8ca4c3 | 17884 | (description "Approximate string matching using |
17885 | @emph{Levenshtein Distance} to calculate the differences between | |
17886 | sequences.") | |
17887 | (license license:gpl2))) | |
17888 | ||
17889 | (define-public python2-fuzzywuzzy | |
17890 | (package-with-python2 python-fuzzywuzzy)) |