gnu: python2-netcdf4: Remove package.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
60 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
61 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
62 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
64 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
65 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
66 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
71 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
73 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
74 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
75 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
76 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
77 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
78 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
79 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
80 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
81 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
82 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
83 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
84 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
85 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
86 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
87 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
88 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
89 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
90 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
91 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
92 ;;;
93 ;;; This file is part of GNU Guix.
94 ;;;
95 ;;; GNU Guix is free software; you can redistribute it and/or modify it
96 ;;; under the terms of the GNU General Public License as published by
97 ;;; the Free Software Foundation; either version 3 of the License, or (at
98 ;;; your option) any later version.
99 ;;;
100 ;;; GNU Guix is distributed in the hope that it will be useful, but
101 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
102 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
103 ;;; GNU General Public License for more details.
104 ;;;
105 ;;; You should have received a copy of the GNU General Public License
106 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
107
108 (define-module (gnu packages python-xyz)
109 #:use-module ((guix licenses) #:prefix license:)
110 #:use-module (gnu packages)
111 #:use-module (gnu packages algebra)
112 #:use-module (gnu packages adns)
113 #:use-module (gnu packages aidc)
114 #:use-module (gnu packages attr)
115 #:use-module (gnu packages backup)
116 #:use-module (gnu packages bash)
117 #:use-module (gnu packages check)
118 #:use-module (gnu packages cmake)
119 #:use-module (gnu packages compression)
120 #:use-module (gnu packages crypto)
121 #:use-module (gnu packages databases)
122 #:use-module (gnu packages dbm)
123 #:use-module (gnu packages enchant)
124 #:use-module (gnu packages file)
125 #:use-module (gnu packages fontutils)
126 #:use-module (gnu packages gcc)
127 #:use-module (gnu packages geo)
128 #:use-module (gnu packages ghostscript)
129 #:use-module (gnu packages gl)
130 #:use-module (gnu packages glib)
131 #:use-module (gnu packages gnome)
132 #:use-module (gnu packages gnupg)
133 #:use-module (gnu packages graphviz)
134 #:use-module (gnu packages graphics)
135 #:use-module (gnu packages gsasl)
136 #:use-module (gnu packages gstreamer)
137 #:use-module (gnu packages gtk)
138 #:use-module (gnu packages haskell-xyz)
139 #:use-module (gnu packages icu4c)
140 #:use-module (gnu packages image)
141 #:use-module (gnu packages imagemagick)
142 #:use-module (gnu packages kerberos)
143 #:use-module (gnu packages libevent)
144 #:use-module (gnu packages libffi)
145 #:use-module (gnu packages libidn)
146 #:use-module (gnu packages linux)
147 #:use-module (gnu packages llvm)
148 #:use-module (gnu packages man)
149 #:use-module (gnu packages maths)
150 #:use-module (gnu packages monitoring)
151 #:use-module (gnu packages multiprecision)
152 #:use-module (gnu packages networking)
153 #:use-module (gnu packages ncurses)
154 #:use-module (gnu packages openstack)
155 #:use-module (gnu packages pcre)
156 #:use-module (gnu packages perl)
157 #:use-module (gnu packages photo)
158 #:use-module (gnu packages pkg-config)
159 #:use-module (gnu packages python)
160 #:use-module (gnu packages python-check)
161 #:use-module (gnu packages python-compression)
162 #:use-module (gnu packages python-crypto)
163 #:use-module (gnu packages python-science)
164 #:use-module (gnu packages python-web)
165 #:use-module (gnu packages qt)
166 #:use-module (gnu packages readline)
167 #:use-module (gnu packages sdl)
168 #:use-module (gnu packages search)
169 #:use-module (gnu packages shells)
170 #:use-module (gnu packages sphinx)
171 #:use-module (gnu packages ssh)
172 #:use-module (gnu packages terminals)
173 #:use-module (gnu packages tex)
174 #:use-module (gnu packages texinfo)
175 #:use-module (gnu packages textutils)
176 #:use-module (gnu packages time)
177 #:use-module (gnu packages tls)
178 #:use-module (gnu packages version-control)
179 #:use-module (gnu packages video)
180 #:use-module (gnu packages web)
181 #:use-module (gnu packages base)
182 #:use-module (gnu packages xml)
183 #:use-module (gnu packages xorg)
184 #:use-module (gnu packages xdisorg)
185 #:use-module (gnu packages tcl)
186 #:use-module (gnu packages bdw-gc)
187 #:use-module (gnu packages serialization)
188 #:use-module (guix packages)
189 #:use-module (guix download)
190 #:use-module (guix git-download)
191 #:use-module (guix hg-download)
192 #:use-module (guix utils)
193 #:use-module (guix build-system gnu)
194 #:use-module (guix build-system cmake)
195 #:use-module (guix build-system python)
196 #:use-module (guix build-system trivial)
197 #:use-module (srfi srfi-1)
198 #:use-module (srfi srfi-26))
199
200 (define-public python-slixmpp
201 (package
202 (name "python-slixmpp")
203 (version "1.5.2")
204 (source
205 (origin
206 (method git-fetch)
207 (uri
208 (git-reference
209 (url "https://lab.louiz.org/poezio/slixmpp.git")
210 (commit
211 (string-append "slix-" version))))
212 (file-name
213 (git-file-name name version))
214 (sha256
215 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
216 (build-system python-build-system)
217 (arguments
218 `(#:phases
219 (modify-phases %standard-phases
220 (add-after 'unpack 'patch
221 (lambda _
222 (substitute* "setup.py"
223 (("'CC', 'cc'")
224 "'CC', 'gcc'"))
225 #t)))))
226 (native-inputs
227 `(("cython" ,python-cython)
228 ("gnupg" ,gnupg)
229 ("pkg-config" ,pkg-config)))
230 (propagated-inputs
231 `(("python-aiodns" ,python-aiodns)
232 ("python-aiohttp" ,python-aiohttp)
233 ("python-pyasn1" ,python-pyasn1)
234 ("python-pyasn1-modules" ,python-pyasn1-modules)))
235 (inputs
236 `(("libidn" ,libidn)
237 ("python" ,python))) ; We are building a Python extension.
238 (synopsis "XMPP library without threads")
239 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
240 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
241 socket handling, the timers, the events dispatching) in order to remove all
242 threads.")
243 (home-page "https://lab.louiz.org/poezio/slixmpp")
244 (license license:expat)))
245
246 (define-public python-tenacity
247 (package
248 (name "python-tenacity")
249 (version "6.1.0")
250 (source (origin
251 (method url-fetch)
252 (uri (pypi-uri "tenacity" version))
253 (sha256
254 (base32
255 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
256 (build-system python-build-system)
257 (native-inputs
258 `(("python-setuptools-scm" ,python-setuptools-scm)
259 ("python-sphinx" ,python-sphinx)
260 ("python-tornado" ,python-tornado)
261 ("python-pytest" ,python-pytest)))
262 (propagated-inputs
263 `(("python-six" ,python-six)))
264 (arguments
265 `(#:phases (modify-phases %standard-phases
266 (replace 'check
267 (lambda _
268 (invoke "pytest")
269 #t)))))
270 (home-page "https://github.com/jd/tenacity")
271 (synopsis "Retrying library for python")
272 (description "Tenacity is a general-purpose python library to simplify the
273 task of adding retry behavior to just about anything.")
274 (license license:asl2.0)))
275
276 (define-public python-colorlog
277 (package
278 (name "python-colorlog")
279 (version "4.1.0")
280 (source (origin
281 (method url-fetch)
282 (uri (pypi-uri "colorlog" version))
283 (sha256
284 (base32
285 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
286 (build-system python-build-system)
287 (native-inputs
288 `(("python-pytest" ,python-pytest)))
289 (arguments
290 `(#:phases (modify-phases %standard-phases
291 (replace 'check
292 (lambda _
293 ;; Extend PYTHONPATH so the built package will be found.
294 (setenv "PYTHONPATH"
295 (string-append (getcwd) "/build/lib:"
296 (getenv "PYTHONPATH")))
297 (invoke "pytest" "-p" "no:logging")
298 #t)))))
299 (home-page "https://github.com/borntyping/python-colorlog")
300 (synopsis "Log formatting with colors for python")
301 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
302 with Python's logging module that outputs records using terminal colors.")
303 (license license:expat)))
304
305 (define-public python-pyprind
306 (package
307 (name "python-pyprind")
308 (version "2.11.2")
309 (source (origin
310 (method url-fetch)
311 (uri (pypi-uri "PyPrind" version))
312 (sha256
313 (base32
314 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
315 (build-system python-build-system)
316 (propagated-inputs
317 `(("python-psutil" ,python-psutil)))
318 (home-page "https://github.com/rasbt/pyprind")
319 (synopsis "Python Progress Bar and Percent Indicator Utility")
320 (description "The PyPrind (Python Progress Indicator) module provides a
321 progress bar and a percentage indicator object that let you track the progress
322 of a loop structure or other iterative computation.")
323 (license license:bsd-3)))
324
325 (define-public python-gphoto2
326 (package
327 (name "python-gphoto2")
328 (version "2.2.1")
329 (source (origin
330 (method url-fetch)
331 (uri (pypi-uri "gphoto2" version))
332 (sha256
333 (base32
334 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
335 (build-system python-build-system)
336 (native-inputs
337 `(("pkg-config" ,pkg-config)))
338 (inputs
339 `(("libgphoto2" ,libgphoto2)))
340 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
341 (synopsis "Python interface to libgphoto2")
342 (description "@code{python-gphoto2} is a comprehensive Python interface
343 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
344 automatically generate the interface code.")
345 (license license:gpl3+)))
346
347 (define-public python-colour
348 (package
349 (name "python-colour")
350 (version "0.1.5")
351 (source (origin
352 (method url-fetch)
353 (uri (pypi-uri "colour" version))
354 (sha256
355 (base32
356 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
357 (build-system python-build-system)
358 (native-inputs
359 `(("python-d2to1" ,python-d2to1)))
360 (home-page "https://github.com/vaab/colour")
361 (synopsis "Convert and manipulate various color representations")
362 (description "Pythonic way to manipulate color representations (HSL, RVB,
363 web, X11, ...).")
364 (license license:expat)))
365
366 (define-public python-d2to1
367 (package
368 (name "python-d2to1")
369 (version "0.2.12.post1")
370 (source (origin
371 (method url-fetch)
372 (uri (pypi-uri "d2to1" version))
373 (sha256
374 (base32
375 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
376 (build-system python-build-system)
377 (native-inputs
378 `(("python-nose" ,python-nose)))
379 (home-page "https://github.com/embray/d2to1")
380 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
381 in python")
382 (description "The python package d2to1 (the d is for distutils) allows
383 using distutils2-like setup.cfg files for a package's metadata with a
384 distribute/setuptools setup.py script.")
385 (license license:bsd-2)))
386
387 (define-public python-rawkit
388 (package
389 (name "python-rawkit")
390 (version "0.6.0")
391 (source (origin
392 (method url-fetch)
393 (uri (pypi-uri "rawkit" version))
394 (sha256
395 (base32
396 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
397 (build-system python-build-system)
398 (native-inputs
399 `(("python-pytest" ,python-pytest)
400 ("python-mock" ,python-mock)))
401 (inputs
402 `(("libraw" ,libraw)))
403 (home-page "https://rawkit.readthedocs.io")
404 (synopsis "Ctypes-based LibRaw binding for Python")
405 (description "The rawkit package provides two modules: rawkit and libraw.
406 The rawkit module provides a high-level Pythonic interface for developing raw
407 photos, while the libraw module provides a CTypes based interface for
408 interacting with the low-level LibRaw C APIs.")
409 (license license:expat)))
410
411 (define-public python-easygui
412 (package
413 (name "python-easygui")
414 (version "0.98.1")
415 (source (origin
416 (method url-fetch)
417 (uri (pypi-uri "easygui" version))
418 (sha256
419 (base32
420 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
421 (build-system python-build-system)
422 (propagated-inputs
423 `(("python-tkinter" ,python "tk")))
424 (home-page "https://github.com/robertlugg/easygui")
425 (synopsis "GUI programming module for Python")
426 (description "EasyGUI is a module for very simple, very easy GUI
427 programming in Python. EasyGUI is different from other GUI generators in that
428 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
429 simple function calls.")
430 (license license:bsd-3)))
431
432 (define-public python-pymediainfo
433 (package
434 (name "python-pymediainfo")
435 (version "4.1")
436 (source
437 (origin
438 (method url-fetch)
439 (uri (pypi-uri "pymediainfo" version))
440 (sha256
441 (base32
442 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
443 (build-system python-build-system)
444 (native-inputs
445 `(("python-setuptools-scm" ,python-setuptools-scm)
446 ("python-pytest" ,python-pytest)))
447 (inputs
448 `(("libmediainfo" ,libmediainfo)))
449 (arguments
450 `(#:phases
451 (modify-phases %standard-phases
452 (add-after 'unpack 'patch-libmediainfo
453 (lambda _
454 (substitute* "pymediainfo/__init__.py"
455 (("libmediainfo.so.0")
456 (string-append (assoc-ref %build-inputs "libmediainfo")
457 "/lib/libmediainfo.so.0")))
458 #t))
459 (replace 'check
460 (lambda _
461 ;; Extend PYTHONPATH so the built package will be found.
462 (setenv "PYTHONPATH"
463 (string-append (getcwd) "/build/lib:"
464 (getenv "PYTHONPATH")))
465 ;; Skip the only failing test "test_parse_url"
466 (invoke "pytest" "-vv" "-k" "not test_parse_url")
467 #t)))))
468 (home-page
469 "https://github.com/sbraz/pymediainfo")
470 (synopsis
471 "Python wrapper for the mediainfo library")
472 (description
473 "Python wrapper for the mediainfo library to access the technical and tag
474 data for video and audio files.")
475 (license license:expat)))
476
477 (define-public python-psutil
478 (package
479 (name "python-psutil")
480 (version "5.7.2")
481 (source
482 (origin
483 (method url-fetch)
484 (uri (pypi-uri "psutil" version))
485 (sha256
486 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
487 (build-system python-build-system)
488 (arguments
489 ;; FIXME: some tests do not return and time out. Some tests fail because
490 ;; some processes survive kill().
491 '(#:tests? #f))
492 (home-page "https://www.github.com/giampaolo/psutil")
493 (synopsis "Library for retrieving information on running processes")
494 (description
495 "psutil (Python system and process utilities) is a library for retrieving
496 information on running processes and system utilization (CPU, memory, disks,
497 network) in Python. It is useful mainly for system monitoring, profiling and
498 limiting process resources and management of running processes. It implements
499 many functionalities offered by command line tools such as: ps, top, lsof,
500 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
501 pidof, tty, taskset, pmap.")
502 (properties `((python2-variant . ,(delay python2-psutil))))
503 (license license:bsd-3)))
504
505 (define-public python2-psutil
506 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
507 (package
508 (inherit base)
509 (propagated-inputs
510 `(("python2-enum34" ,python2-enum34) ;optional
511 ,@(package-propagated-inputs base))))))
512
513 (define-public python-shapely
514 (package
515 (name "python-shapely")
516 (version "1.7.1")
517 (source
518 (origin
519 (method url-fetch)
520 (uri (pypi-uri "Shapely" version))
521 (sha256
522 (base32
523 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
524 (modules '((guix build utils)))
525 (snippet
526 '(begin
527 (delete-file "shapely/speedups/_speedups.c")
528 (delete-file "shapely/vectorized/_vectorized.c")
529 #t))))
530 (build-system python-build-system)
531 (native-inputs
532 `(("python-cython" ,python-cython)
533 ("python-matplotlib" ,python-matplotlib)
534 ("python-pytest" ,python-pytest)
535 ("python-pytest-cov" ,python-pytest-cov)))
536 (inputs
537 `(("geos" ,geos)))
538 (propagated-inputs
539 `(("python-numpy" ,python-numpy)))
540 (arguments
541 `(#:phases
542 (modify-phases %standard-phases
543 (add-after 'unpack 'patch-geos-path
544 (lambda* (#:key inputs #:allow-other-keys)
545 (let ((geos (assoc-ref inputs "geos"))
546 (glibc (assoc-ref inputs ,(if (%current-target-system)
547 "cross-libc" "libc"))))
548 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
549 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
550 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
551 geos "/lib/libgeos_c.so'])"))
552 (("free = load_dll\\('c'\\)\\.free")
553 (string-append "free = load_dll('c', fallbacks=['"
554 glibc "/lib/libc.so.6']).free"))
555 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
556 (string-append "free = load_dll('c', fallbacks=['"
557 glibc "/lib/libc.so.6']).free"))))
558 #t)))))
559 (home-page "https://github.com/Toblerity/Shapely")
560 (synopsis "Library for the manipulation and analysis of geometric objects")
561 (description "Shapely is a Python package for manipulation and analysis of
562 planar geometric objects. It is based on the @code{GEOS} library.")
563 (license license:bsd-3)))
564
565 (define-public python-shortuuid
566 (package
567 (name "python-shortuuid")
568 (version "0.5.0")
569 (source
570 (origin
571 (method url-fetch)
572 (uri (pypi-uri "shortuuid" version))
573 (sha256
574 (base32
575 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
576 (build-system python-build-system)
577 (native-inputs
578 `(("python-pep8" ,python-pep8)))
579 (home-page "https://github.com/skorokithakis/shortuuid")
580 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
581 (description
582 "@code{shortuuid} is a Python library for generating concise, unambiguous
583 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
584 module and then similar looking characters are removed.")
585 (license license:bsd-3)))
586
587 (define-public python-logwrap
588 (package
589 (name "python-logwrap")
590 (version "3.2.1")
591 (source
592 (origin
593 (method url-fetch)
594 (uri (pypi-uri "logwrap" version ".zip"))
595 (sha256
596 (base32
597 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
598 (build-system python-build-system)
599 (propagated-inputs
600 `(("python-six" ,python-six)
601 ("python-typing" ,python-typing)))
602 (native-inputs
603 `(("unzip" ,unzip)
604 ("python-cython" ,python-cython)
605 ("python-pytest" ,python-pytest)
606 ("python-pytest-cov" ,python-pytest-cov)
607 ("python-pytest-runner" ,python-pytest-runner)))
608 (home-page "https://github.com/penguinolog/logwrap")
609 (synopsis "Decorator for logging function arguments")
610 (description "This package provides a decorator to log function arguments
611 and function call return values in a human-readable way.")
612 (license license:asl2.0)))
613
614 (define-public python2-shapely
615 (package-with-python2 python-shapely))
616
617 (define-public python-clyent
618 (package
619 (name "python-clyent")
620 (version "1.2.1")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "clyent" version))
625 (sha256
626 (base32
627 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
628 (build-system python-build-system)
629 (native-inputs
630 `(("python-mock" ,python-mock)))
631 (home-page "https://github.com/Anaconda-Platform/clyent")
632 (synopsis "Command line client library")
633 (description "Clyent is a Python command line utility library. It is used
634 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
635 (license license:bsd-3)))
636
637 (define-public python2-clyent
638 (package-with-python2 python-clyent))
639
640 (define-public python-babel
641 (package
642 (name "python-babel")
643 (version "2.8.0")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (pypi-uri "Babel" version))
648 (sha256
649 (base32
650 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-freezegun" ,python-freezegun)
654 ("python-pytest" ,python-pytest)))
655 (propagated-inputs
656 `(("python-pytz" ,python-pytz)))
657 (arguments
658 `(#:phases (modify-phases %standard-phases
659 (replace 'check
660 (lambda _
661 (invoke "pytest" "-vv" "-k"
662 (string-append
663 ;; XXX: These tests fail when using Pytest 4.x and
664 ;; Babel 2.6.0. Try removing this for later versions.
665 "not test_no_inherit_metazone_marker_never_in_output"
666 " and not test_smoke_dates"
667 " and not test_smoke_numbers")))))))
668 (home-page "http://babel.pocoo.org/")
669 (synopsis
670 "Tools for internationalizing Python applications")
671 (description
672 "Babel is composed of two major parts:
673 - tools to build and work with gettext message catalogs
674 - a Python interface to the CLDR (Common Locale Data Repository), providing
675 access to various locale display names, localized number and date formatting,
676 etc. ")
677 (license license:bsd-3)))
678
679 (define-public python2-babel
680 (package-with-python2 python-babel))
681
682 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
683 (define-public python2-babel-2.6
684 (package
685 (inherit python2-babel)
686 (version "2.6.0")
687 (source (origin
688 (method url-fetch)
689 (uri (pypi-uri "Babel" version))
690 (sha256
691 (base32
692 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
693
694 (define-public python2-backport-ssl-match-hostname
695 (package
696 (name "python2-backport-ssl-match-hostname")
697 (version "3.5.0.1")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "backports.ssl_match_hostname" version))
702 (sha256
703 (base32
704 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
705 (build-system python-build-system)
706 (arguments
707 `(#:python ,python-2
708 #:tests? #f)) ; no test target
709 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
710 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
711 (description
712 "This backport brings the ssl.match_hostname() function to users of
713 earlier versions of Python. The function checks the hostname in the
714 certificate returned by the server to which a connection has been established,
715 and verifies that it matches the intended target hostname.")
716 (license license:psfl)))
717
718 (define-public python-bitarray
719 (package
720 (name "python-bitarray")
721 (version "1.4.0")
722 (source (origin
723 (method url-fetch)
724 (uri (pypi-uri "bitarray" version))
725 (sha256
726 (base32
727 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
728 (build-system python-build-system)
729 (home-page "https://github.com/ilanschnell/bitarray")
730 (synopsis "Efficient arrays of booleans")
731 (description "This package provides an object type which efficiently
732 represents an array of booleans. Bitarrays are sequence types and behave very
733 much like usual lists. Eight bits are represented by one byte in a contiguous
734 block of memory. The user can select between two representations:
735 little-endian and big-endian. All of the functionality is implemented in C.
736 Methods for accessing the machine representation are provided. This can be
737 useful when bit level access to binary files is required, such as portable
738 bitmap image files. Also, when dealing with compressed data which uses
739 variable bit length encoding, you may find this module useful.")
740 (license license:psfl)))
741
742 (define-public python-boolean.py
743 (package
744 (name "python-boolean.py")
745 (version "3.6")
746 (source
747 (origin
748 ;; There's no source tarball on PyPI.
749 (method git-fetch)
750 (uri (git-reference
751 (url "https://github.com/bastikr/boolean.py")
752 (commit (string-append "v" version))))
753 (file-name (git-file-name name version))
754 (sha256
755 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
756 (build-system python-build-system)
757 (home-page "https://github.com/bastikr/boolean.py")
758 (synopsis "Boolean algebra in one Python module")
759 (description
760 "This is a small Python library that implements boolean algebra.
761 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
762 @code{Symbol} class that can take on one of these two values. Calculations
763 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
764 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
765 Expressions are constructed from parsed strings or directly in Python.")
766 (license license:bsd-2)))
767
768 (define-public python-hdf4
769 (package
770 (name "python-hdf4")
771 (version "0.9")
772 (source
773 (origin
774 (method url-fetch)
775 (uri (pypi-uri name version))
776 (sha256
777 (base32
778 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
779 (build-system python-build-system)
780 (native-inputs `(("nose" ,python-nose)))
781 (propagated-inputs `(("numpy" ,python-numpy)))
782 (inputs
783 `(("hdf4" ,hdf4)
784 ("libjpeg" ,libjpeg-turbo)
785 ("zlib" ,zlib)))
786 (arguments
787 `(#:phases
788 (modify-phases %standard-phases
789 (replace 'check
790 (lambda _
791 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
792 ;; on to import numpy. Somehow this works on their CI system.
793 ;; Let's just manage PYTHONPATH here instead.
794 (substitute* "runexamples.sh"
795 (("export PYTHONPATH=.*") ""))
796 (setenv "PYTHONPATH"
797 (string-append (getcwd) ":"
798 (getenv "PYTHONPATH")))
799 (invoke "./runexamples.sh")
800 (invoke "nosetests" "-v"))))))
801 (home-page "https://github.com/fhs/python-hdf4")
802 (synopsis "Python interface to the NCSA HDF4 library")
803 (description
804 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
805 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
806 NetCDF files can also be read and modified. Python-HDF4 is a fork of
807 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
808 (license license:expat)))
809
810 (define-public python2-hdf4
811 (package-with-python2 python-hdf4))
812
813 (define-public python-h5py
814 (package
815 (name "python-h5py")
816 (version "2.10.0")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (pypi-uri "h5py" version))
821 (sha256
822 (base32
823 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
824 (build-system python-build-system)
825 (arguments
826 `(#:tests? #f ; no test target
827 #:phases
828 (modify-phases %standard-phases
829 (add-after 'unpack 'fix-hdf5-paths
830 (lambda* (#:key inputs #:allow-other-keys)
831 (let ((prefix (assoc-ref inputs "hdf5")))
832 (substitute* "setup_build.py"
833 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
834 (string-append "['" prefix "/lib" "']"))
835 (("'/opt/local/include', '/usr/local/include'")
836 (string-append "'" prefix "/include" "'")))
837 (substitute* "setup_configure.py"
838 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
839 (string-append "['" prefix "/lib" "']")))
840 #t))))))
841 (propagated-inputs
842 `(("python-six" ,python-six)
843 ("python-numpy" ,python-numpy)))
844 (inputs
845 `(("hdf5" ,hdf5-1.10)))
846 (native-inputs
847 `(("python-cython" ,python-cython)
848 ("python-pkgconfig" ,python-pkgconfig)
849 ("pkg-config" ,pkg-config)))
850 (home-page "https://www.h5py.org/")
851 (synopsis "Read and write HDF5 files from Python")
852 (description
853 "The h5py package provides both a high- and low-level interface to the
854 HDF5 library from Python. The low-level interface is intended to be a
855 complete wrapping of the HDF5 API, while the high-level component supports
856 access to HDF5 files, datasets and groups using established Python and NumPy
857 concepts.")
858 (license license:bsd-3)))
859
860 (define-public python2-h5py
861 (package-with-python2 python-h5py))
862
863 (define-public python-sh
864 (package
865 (name "python-sh")
866 (version "1.12.14")
867 (source
868 (origin
869 (method url-fetch)
870 (uri (pypi-uri "sh" version))
871 (sha256
872 (base32
873 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
874 (build-system python-build-system)
875 (arguments
876 '(#:phases
877 (modify-phases %standard-phases
878 (replace 'check
879 (lambda _
880 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
881 (setenv "HOME" "/tmp")
882 (invoke "python" "sh.py" "test"))))))
883 (native-inputs
884 `(("python-coverage" ,python-coverage)))
885 (home-page "https://github.com/amoffat/sh")
886 (synopsis "Python subprocess replacement")
887 (description "This package provides a replacement for Python's
888 @code{subprocess} feature.")
889 (license license:expat)))
890
891 (define-public python2-sh
892 (package-with-python2 python-sh))
893
894 (define-public python-cftime
895 (package
896 (name "python-cftime")
897 (version "1.0.4.2")
898 (source
899 (origin
900 (method url-fetch)
901 (uri (pypi-uri "cftime" version))
902 (sha256
903 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
904 (build-system python-build-system)
905 (propagated-inputs
906 `(("python-numpy" ,python-numpy)))
907 (native-inputs
908 `(("python-coveralls" ,python-coveralls)
909 ("python-cython" ,python-cython)
910 ("python-pytest-cov" ,python-pytest-cov)))
911 (home-page "https://github.com/Unidata/cftime")
912 (synopsis "Library for time handling")
913 (description
914 "This package provides time-handling functionality that used to be part
915 of the netcdf4 package before.")
916 ;; This package claims to include code under the GPLv3 but is released
917 ;; under ISC.
918 (license (list license:isc license:gpl3+))))
919
920 (define-public python-netcdf4
921 (package
922 (name "python-netcdf4")
923 (version "1.5.3")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (pypi-uri "netCDF4" version))
928 (sha256
929 (base32
930 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
931 (build-system python-build-system)
932 (arguments
933 '(#:phases
934 (modify-phases %standard-phases
935 (add-after 'unpack 'configure-locations
936 (lambda* (#:key inputs #:allow-other-keys)
937 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
938 #t)))))
939 (native-inputs
940 `(("python-cython" ,python-cython)))
941 (propagated-inputs
942 `(("python-numpy" ,python-numpy)
943 ("python-cftime" ,python-cftime)))
944 (inputs
945 `(("netcdf" ,netcdf)
946 ("hdf4" ,hdf4)
947 ("hdf5" ,hdf5)))
948 (home-page "https://github.com/Unidata/netcdf4-python")
949 (synopsis "Python/numpy interface to the netCDF library")
950 (description "Netcdf4-python is a Python interface to the netCDF C
951 library. netCDF version 4 has many features not found in earlier
952 versions of the library and is implemented on top of HDF5. This module
953 can read and write files in both the new netCDF 4 and the old netCDF 3
954 format, and can create files that are readable by HDF5 clients. The
955 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
956 to users of that module.")
957 ;; The software is mainly ISC, but includes some files covered
958 ;; by the Expat license.
959 (license (list license:isc license:expat))))
960
961 (define-public python-license-expression
962 (package
963 (name "python-license-expression")
964 (version "0.999")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "license-expression" version))
969 (sha256
970 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
971 (build-system python-build-system)
972 (propagated-inputs
973 `(("python-boolean.py" ,python-boolean.py)))
974 (home-page "https://github.com/nexB/license-expression")
975 (synopsis "Apply boolean logic to license expressions")
976 (description
977 "This Python module defines a tiny language to evaluate and compare
978 license expressions using boolean logic. Logical combinations of licenses can
979 be tested for equality, containment, and equivalence. They can be normalised
980 and simplified. It supports SPDX license expressions as well as other naming
981 conventions and aliases in the same expression.")
982 (license license:gpl2+)))
983
984 (define-public python-lockfile
985 (package
986 (name "python-lockfile")
987 (version "0.12.2")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (pypi-uri "lockfile" version))
992 (sha256
993 (base32
994 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
995 (build-system python-build-system)
996 (arguments '(#:test-target "check"))
997 (native-inputs
998 `(("python-pbr" ,python-pbr)))
999 (home-page "https://launchpad.net/pylockfile")
1000 (synopsis "Platform-independent file locking module")
1001 (description
1002 "The lockfile package exports a LockFile class which provides a simple
1003 API for locking files.")
1004 (license license:expat)))
1005
1006 (define-public python2-lockfile
1007 (package-with-python2 python-lockfile))
1008
1009 (define-public python-filelock
1010 (package
1011 (name "python-filelock")
1012 (version "3.0.12")
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri (pypi-uri "filelock" version))
1017 (sha256
1018 (base32
1019 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1020 (build-system python-build-system)
1021 (home-page
1022 "https://github.com/benediktschmitt/py-filelock")
1023 (synopsis "Platform independent file lock")
1024 (description "@code{filelock} contains a single module implementing
1025 a platform independent file lock in Python, which provides a simple way of
1026 inter-process communication.")
1027 (license license:unlicense)))
1028
1029 (define-public python-semantic-version
1030 (package
1031 (name "python-semantic-version")
1032 (version "2.6.0")
1033 (source
1034 (origin
1035 (method url-fetch)
1036 (uri (pypi-uri "semantic_version" version))
1037 (sha256
1038 (base32
1039 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1040 (build-system python-build-system)
1041 (arguments
1042 `(#:tests? #f)) ; PyPI tarball lacks tests
1043 (home-page "https://github.com/rbarrois/python-semanticversion")
1044 (synopsis "Semantic versioning module for Python")
1045 (description
1046 "The @code{semantic_version} class is a small library for handling
1047 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1048
1049 It can compare versions, generate a new version that represents a bump in one of
1050 the version levels, and check whether any given string is a proper semantic
1051 version identifier.")
1052 (license license:bsd-3)))
1053
1054 (define-public python2-semantic-version
1055 (package-with-python2 python-semantic-version))
1056
1057 (define-public python-serpent
1058 (package
1059 (name "python-serpent")
1060 (version "1.28")
1061 (source
1062 (origin
1063 (method url-fetch)
1064 (uri (pypi-uri "serpent" version))
1065 (sha256
1066 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1067 (build-system python-build-system)
1068 (native-inputs
1069 `(("python-attrs" ,python-attrs)
1070 ("python-pytz" ,python-pytz)))
1071 (home-page "https://github.com/irmen/Serpent")
1072 (synopsis "Serializer for literal Python expressions")
1073 (description
1074 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1075 serialization. It serializes an object tree into bytes (an utf-8 encoded
1076 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1077 to rebuild the original object tree.
1078
1079 Because only safe literals are encoded, it is safe to send serpent data to
1080 other machines, such as over the network.")
1081 (properties `((python2-variant . ,(delay python2-serpent))))
1082 (license license:expat)))
1083
1084 (define-public python2-serpent
1085 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1086 (package
1087 (inherit base)
1088 (propagated-inputs
1089 `(("python-enum34" ,python2-enum34)
1090 ,@(package-propagated-inputs base))))))
1091
1092 (define-public python-setuptools
1093 (package
1094 (name "python-setuptools")
1095 (version "41.0.1")
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (pypi-uri "setuptools" version ".zip"))
1100 (sha256
1101 (base32
1102 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1103 (modules '((guix build utils)))
1104 (snippet
1105 '(begin
1106 ;; Remove included binaries which are used to build self-extracting
1107 ;; installers for Windows.
1108 ;; TODO: Find some way to build them ourself so we can include them.
1109 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1110 #t))))
1111 (build-system python-build-system)
1112 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1113 ;; One could bootstrap with an internal untested setuptools.
1114 (arguments
1115 `(#:tests? #f))
1116 (home-page "https://pypi.org/project/setuptools/")
1117 (synopsis
1118 "Library designed to facilitate packaging Python projects")
1119 (description
1120 "Setuptools is a fully-featured, stable library designed to facilitate
1121 packaging Python projects, where packaging includes:
1122 Python package and module definitions,
1123 distribution package metadata,
1124 test hooks,
1125 project installation,
1126 platform-specific details,
1127 Python 3 support.")
1128 ;; TODO: setuptools now bundles the following libraries:
1129 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1130 (license (list license:psfl ; setuptools itself
1131 license:expat ; six, appdirs, pyparsing
1132 license:asl2.0 ; packaging is dual ASL2/BSD-2
1133 license:bsd-2))))
1134
1135 (define-public python2-setuptools
1136 (package-with-python2 python-setuptools))
1137
1138 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1139 (define-public python-setuptools-for-tensorflow
1140 (hidden-package
1141 (package
1142 (inherit python-setuptools)
1143 (version "39.1.0")
1144 (source (origin
1145 (inherit (package-source python-setuptools))
1146 (uri (pypi-uri "setuptools" version ".zip"))
1147 (sha256
1148 (base32
1149 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1150
1151 (define-public python-uniseg
1152 (package
1153 (name "python-uniseg")
1154 (version "0.7.1")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (pypi-uri "uniseg" version ".zip"))
1159 (sha256
1160 (base32
1161 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1162 (build-system python-build-system)
1163 (arguments
1164 '(#:tests? #f)) ; The test suite requires network access.
1165 (native-inputs
1166 `(("unzip" ,unzip)))
1167 (home-page
1168 "https://bitbucket.org/emptypage/uniseg-python")
1169 (synopsis
1170 "Python library to determine Unicode text segmentations")
1171 (description
1172 "Uniseg is a Python package used to determine Unicode text segmentations.
1173 Supported segmentations include:
1174 @enumerate
1175 @item @dfn{Code point} (any value in the Unicode codespace)
1176 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1177 multiple Unicode code points, e.g. \"G\" + acute-accent)
1178 @item Word break
1179 @item Sentence break
1180 @item Line break
1181 @end enumerate")
1182 (license license:expat)))
1183
1184 (define-public python2-uniseg
1185 (package-with-python2 python-uniseg))
1186
1187 (define-public python-humanfriendly
1188 (package
1189 (name "python-humanfriendly")
1190 (version "8.2")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (pypi-uri "humanfriendly" version))
1195 (sha256
1196 (base32
1197 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1198 (build-system python-build-system)
1199 (arguments
1200 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1201 #:tests? #f))
1202 (home-page "https://humanfriendly.readthedocs.io")
1203 (synopsis "Human-friendly input and output in Python")
1204 (description
1205 "The functions and classes in @code{humanfriendly} can be used to make
1206 text interfaces more user-friendly. It includes tools to parse and format
1207 numbers, file sizes, and timespans, timers for long-running operations, menus
1208 to allow the user to choose from a list of options, and terminal interaction
1209 helpers.")
1210 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1211 (license license:expat)))
1212
1213 (define-public python2-humanfriendly
1214 (let ((base (package-with-python2
1215 (strip-python2-variant python-humanfriendly))))
1216 (package (inherit base)
1217 (propagated-inputs
1218 `(("python2-monotonic" ,python2-monotonic)
1219 ,@(package-propagated-inputs base))))))
1220
1221 (define-public python-textparser
1222 (package
1223 (name "python-textparser")
1224 (version "0.23.0")
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "textparser" version))
1229 (sha256
1230 (base32
1231 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1232 (build-system python-build-system)
1233 (home-page "https://github.com/eerimoq/textparser")
1234 (synopsis "Fast text parser for Python")
1235 (description "This library provides a text parser written in the Python
1236 language. It aims to be fast.")
1237 (license license:expat)))
1238
1239 (define-public python-aenum
1240 (package
1241 (name "python-aenum")
1242 (version "2.2.4")
1243 (source
1244 (origin
1245 (method url-fetch)
1246 (uri (pypi-uri "aenum" version))
1247 (sha256
1248 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1249 (build-system python-build-system)
1250 (arguments
1251 `(#:phases (modify-phases %standard-phases
1252 (replace 'check
1253 (lambda _
1254 (format #t "current working dir ~s~%" (getcwd))
1255 (setenv "PYTHONPATH"
1256 (string-append ".:" (getenv "PYTHONPATH")))
1257 ;; We must run the test suite module directly, as it
1258 ;; fails to define the 'tempdir' variable in scope for
1259 ;; the tests otherwise
1260 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1261 ;; issues/32/running-tests-with-python-setuppy-test).
1262 (invoke "python3" "aenum/test.py")
1263 ;; This one fails with "NameError: name
1264 ;; 'test_pickle_dump_load' is not defined" (see:
1265 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1266 ;; /error-running-the-test_v3py-test-suite).
1267 ;; (invoke "python3" "aenum/test_v3.py")
1268 #t)))))
1269 (home-page "https://bitbucket.org/stoneleaf/aenum")
1270 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1271 (description "The aenum library includes an @code{Enum} base class, a
1272 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1273 class.")
1274 (license license:bsd-3)))
1275
1276 (define-public python-can
1277 (package
1278 (name "python-can")
1279 (version "3.3.3")
1280 (source
1281 (origin
1282 (method url-fetch)
1283 (uri (pypi-uri "python-can" version))
1284 (sha256
1285 (base32
1286 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:phases (modify-phases %standard-phases
1290 (add-after 'unpack 'relax-version-requirements
1291 (lambda _
1292 (substitute* "setup.py"
1293 (("mock~=2\\.0") "mock")
1294 (("coverage<5") "coverage")
1295 (("pytest~=4\\.3") "pytest")
1296 (("hypothesis~=4\\.56") "hypothesis"))
1297 #t))
1298 (add-after 'unpack 'fix-broken-tests
1299 ;; The tests try to run two scripts it expects should be
1300 ;; in PATH, but they aren't at this time (see:
1301 ;; https://github.com/hardbyte/python-can/issues/805).
1302 (lambda _
1303 (substitute* "test/test_scripts.py"
1304 (("\"can_logger\\.py --help\"") "")
1305 (("\"can_player\\.py --help\"") ""))
1306 #t)))))
1307 (propagated-inputs
1308 `(("python-aenum" ,python-aenum)
1309 ("python-wrapt" ,python-wrapt)))
1310 (native-inputs
1311 `(("python-codecov" ,python-codecov)
1312 ("python-coverage" ,python-coverage)
1313 ("python-future" ,python-future)
1314 ("python-hypothesis" ,python-hypothesis)
1315 ("python-mock" ,python-mock)
1316 ("python-pyserial" ,python-pyserial)
1317 ("python-pytest" ,python-pytest)
1318 ("python-pytest-cov" ,python-pytest-cov)
1319 ("python-pytest-runner" ,python-pytest-runner)
1320 ("python-pytest-timeout" ,python-pytest-timeout)))
1321 (home-page "https://github.com/hardbyte/python-can")
1322 (synopsis "Controller Area Network (CAN) interface module for Python")
1323 (description "This package defines the @code{can} module, which provides
1324 controller area network (CAN) support for Python developers; providing common
1325 abstractions to different hardware devices, and a suite of utilities for
1326 sending and receiving messages on a CAN bus.")
1327 (license license:lgpl3+)))
1328
1329 (define-public python-diskcache
1330 (package
1331 (name "python-diskcache")
1332 (version "4.1.0")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (pypi-uri "diskcache" version))
1337 (sha256
1338 (base32
1339 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:tests? #f)) ;test suite not included in the release
1343 (home-page "http://www.grantjenks.com/docs/diskcache/")
1344 (synopsis "Disk and file backed cache library")
1345 (description "DiskCache is a disk and file backed persistent cache.")
1346 (license license:asl2.0)))
1347
1348 (define-public python-bitstruct
1349 (package
1350 (name "python-bitstruct")
1351 (version "8.9.0")
1352 (source
1353 (origin
1354 (method url-fetch)
1355 (uri (pypi-uri "bitstruct" version))
1356 (sha256
1357 (base32
1358 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1359 (build-system python-build-system)
1360 (home-page "https://github.com/eerimoq/bitstruct")
1361 (synopsis "Python values to and C bit field structs converter")
1362 (description "This module performs conversions between Python values and C
1363 bit field structs represented as Python byte strings. It is intended to have
1364 a similar interface as the @code{struct} module from Python, but working on
1365 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1366 (license license:expat)))
1367
1368 (define-public python-cantools
1369 (package
1370 (name "python-cantools")
1371 (version "33.1.1")
1372 (source
1373 (origin
1374 ;; We take the sources from the Git repository as the documentation is
1375 ;; not included with the PyPI archive.
1376 (method git-fetch)
1377 (uri (git-reference
1378 (url "https://github.com/eerimoq/cantools")
1379 (commit version)))
1380 (file-name (git-file-name name version))
1381 (sha256
1382 (base32
1383 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1384 (build-system python-build-system)
1385 (arguments
1386 `(#:phases
1387 (modify-phases %standard-phases
1388 (add-after 'build 'build-doc
1389 (lambda _
1390 ;; See: https://github.com/eerimoq/cantools/issues/190.
1391 (substitute* "README.rst"
1392 (("https://github.com/eerimoq/cantools/raw/master\
1393 /docs/monitor.png")
1394 "monitor.png"))
1395 (with-directory-excursion "docs"
1396 (invoke "make" "man" "info"))))
1397 (add-after 'install 'install-doc
1398 (lambda* (#:key outputs #:allow-other-keys)
1399 (let* ((out (assoc-ref outputs "out"))
1400 (info (string-append out "/share/info"))
1401 (man1 (string-append out "/share/man/man1")))
1402 (format #t "CWD: ~s~%" (getcwd))
1403 (install-file "docs/_build/texinfo/cantools.info" info)
1404 (install-file "docs/_build/man/cantools.1" man1)
1405 #t))))))
1406 (native-inputs
1407 `(("sphinx" ,python-sphinx)
1408 ("texinfo" ,texinfo)))
1409 (propagated-inputs
1410 `(("python-bitstruct" ,python-bitstruct)
1411 ("python-can" ,python-can)
1412 ("python-diskcache" ,python-diskcache)
1413 ("python-textparser" ,python-textparser)))
1414 (home-page "https://github.com/eerimoq/cantools")
1415 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1416 (description "This package includes Controller Area Network (CAN) related
1417 tools that can be used to:
1418 @itemize
1419 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1420 @item encode and decode CAN messages
1421 @item multiplex simple and extended signals
1422 @item diagnose DID encoding and decoding
1423 @item dump the CAN decoder output
1424 @item test CAN nodes
1425 @item generate C source code
1426 @item monitor the CAN bus
1427 @end itemize")
1428 (license license:expat)))
1429
1430 (define-public python-capturer
1431 (package
1432 (name "python-capturer")
1433 (version "2.4")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (pypi-uri "capturer" version))
1438 (sha256
1439 (base32
1440 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1441 (build-system python-build-system)
1442 (arguments
1443 `(#:tests? #f))
1444 (propagated-inputs
1445 `(("python-humanfriendly" ,python-humanfriendly)))
1446 (home-page "https://capturer.readthedocs.io")
1447 (synopsis "Capture stdout and stderr streams of the current process")
1448 (description
1449 "The capturer package makes it easy to capture the stdout and stderr
1450 streams of the current process and subprocesses. Output can be relayed
1451 to the terminal in real time but is also available to the Python program
1452 for additional processing.")
1453 (license license:expat)))
1454
1455 (define-public python2-capturer
1456 (package-with-python2 python-capturer))
1457
1458 (define-public python-case
1459 (package
1460 (name "python-case")
1461 (version "1.5.3")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "case" version))
1466 (sha256
1467 (base32
1468 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1469 (build-system python-build-system)
1470 (propagated-inputs
1471 `(("python-mock" ,python-mock)
1472 ("python-nose" ,python-nose)
1473 ("python-six" ,python-six)
1474 ("python-unittest2" ,python-unittest2)))
1475 (native-inputs
1476 `(("python-coverage" ,python-coverage)))
1477 (home-page "https://github.com/celery/case")
1478 (synopsis "Unittest utilities and convenience methods")
1479 (description
1480 "The @code{case} package provides utilities on top of unittest, including
1481 some helpful Python 2 compatibility convenience methods.")
1482 (license license:bsd-3)))
1483
1484 (define-public python-verboselogs
1485 (package
1486 (name "python-verboselogs")
1487 (version "1.7")
1488 (source
1489 (origin
1490 (method url-fetch)
1491 (uri (pypi-uri "verboselogs" version))
1492 (sha256
1493 (base32
1494 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1495 (build-system python-build-system)
1496 (arguments
1497 `(#:phases
1498 (modify-phases %standard-phases
1499 (replace 'check
1500 (lambda _
1501 ;; Do not run pylint plugin test, as astroid is an old
1502 ;; unsupported version.
1503 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1504 "verboselogs/tests.py"))))))
1505 (native-inputs
1506 `(("python-mock" ,python-mock)
1507 ("python-pytest" ,python-pytest)))
1508 (home-page "https://verboselogs.readthedocs.io")
1509 (synopsis "Verbose logging level for Python's logging module")
1510 (description
1511 "The @code{verboselogs} package extends Python's @code{logging} module to
1512 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1513 (license license:expat)))
1514
1515 (define-public python2-verboselogs
1516 (package-with-python2 python-verboselogs))
1517
1518 (define-public python-coloredlogs
1519 (package
1520 (name "python-coloredlogs")
1521 (version "10.0")
1522 (source
1523 (origin
1524 (method url-fetch)
1525 (uri (pypi-uri "coloredlogs" version))
1526 (sha256
1527 (base32
1528 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1529 (build-system python-build-system)
1530 (arguments
1531 `(;Tests require some updated modules
1532 #:tests? #f))
1533 (propagated-inputs
1534 `(("python-capturer" ,python-capturer)))
1535 (home-page "https://coloredlogs.readthedocs.io")
1536 (synopsis "Colored stream handler for Python's logging module")
1537 (description
1538 "The @code{coloredlogs} package enables colored terminal output for
1539 Python's logging module. The @code{ColoredFormatter} class inherits from
1540 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1541 messages in color.")
1542 (license license:expat)))
1543
1544 (define-public python2-coloredlogs
1545 (package-with-python2 python-coloredlogs))
1546
1547 (define-public python-editorconfig
1548 (package
1549 (name "python-editorconfig")
1550 (version "0.12.2")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "EditorConfig" version))
1555 (sha256
1556 (base32
1557 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1558 (build-system python-build-system)
1559 (home-page "https://editorconfig.org/")
1560 (synopsis "EditorConfig bindings for python")
1561 (description "The EditorConfig project consists of a file format for
1562 defining coding styles and a collection of text editor plugins that enable
1563 editors to read the file format and adhere to defined styles. EditorConfig
1564 files are easily readable and they work nicely with version control systems.")
1565 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1566 (license (list license:bsd-2 license:psfl))))
1567
1568 (define-public dosage
1569 (package
1570 (name "dosage")
1571 (version "2.17")
1572 (source
1573 (origin
1574 (method url-fetch)
1575 (uri (pypi-uri "dosage" version))
1576 (sha256
1577 (base32
1578 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1579 (build-system python-build-system)
1580 (propagated-inputs
1581 `(("python2-backports-functools-lru-cache"
1582 ,python2-backports-functools-lru-cache)
1583 ("python2-backports-shutil-get-terminal-size"
1584 ,python2-backports-shutil-get-terminal-size)
1585 ("python-cached-property" ,python-cached-property)
1586 ("python-colorama" ,python-colorama)
1587 ("python-imagesize" ,python-imagesize)
1588 ("python-importlib-metadata" ,python-importlib-metadata)
1589 ("python-lxml" ,python-lxml)
1590 ("python-requests" ,python-requests)
1591 ("python-six" ,python-six)))
1592 (native-inputs
1593 `(("python-pytest-cov" ,python-pytest-cov)
1594 ("python-pytest-xdist" ,python-pytest-xdist)
1595 ("python-responses" ,python-responses)
1596 ("python-setuptools-scm" ,python-setuptools-scm)))
1597 (home-page "https://github.com/webcomics/dosage")
1598 (synopsis "Comic strip downloader and archiver")
1599 (description "Dosage is designed to keep a local copy of specific webcomics and other
1600 picture-based content such as Picture of the Day sites. With the @command{dosage}
1601 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1602 downloaded, or download a strip for a particular date or index, if possible.")
1603 (license license:expat)))
1604
1605 (define-public python-et-xmlfile
1606 (package
1607 (name "python-et-xmlfile")
1608 (version "1.0.1")
1609 (source
1610 (origin
1611 (method url-fetch)
1612 (uri (pypi-uri "et_xmlfile" version))
1613 (sha256
1614 (base32
1615 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1616 (build-system python-build-system)
1617 (arguments
1618 `(#:phases (modify-phases %standard-phases
1619 (replace 'check
1620 (lambda _
1621 (invoke "pytest"))))))
1622 (native-inputs
1623 `(("python-pytest" ,python-pytest)
1624 ("python-lxml" ,python-lxml))) ;used for the tests
1625 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1626 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1627 (description "This Python library is based upon the @code{xmlfile} module
1628 from @code{lxml}. It aims to provide a low memory, compatible implementation
1629 of @code{xmlfile}.")
1630 (license license:expat)))
1631
1632 (define-public python2-et-xmlfile
1633 (package-with-python2 python-et-xmlfile))
1634
1635 (define-public python-openpyxl
1636 (package
1637 (name "python-openpyxl")
1638 (version "3.0.5")
1639 (source
1640 (origin
1641 ;; We use the upstream repository, as the tests are not included in the
1642 ;; PyPI releases.
1643 (method hg-fetch)
1644 (uri (hg-reference
1645 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1646 (changeset version)))
1647 (file-name (string-append name "-" version "-checkout"))
1648 (sha256
1649 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1650 (build-system python-build-system)
1651 (arguments
1652 `(#:phases (modify-phases %standard-phases
1653 (replace 'check
1654 (lambda _
1655 (invoke "pytest"))))))
1656 (native-inputs
1657 ;; For the test suite.
1658 `(("python-lxml" ,python-lxml)
1659 ("python-pillow" ,python-pillow)
1660 ("python-pytest" ,python-pytest)))
1661 (propagated-inputs
1662 `(("python-et-xmlfile" ,python-et-xmlfile)
1663 ("python-jdcal" ,python-jdcal)))
1664 (home-page "https://openpyxl.readthedocs.io")
1665 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1666 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1667 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1668 standard.")
1669 (properties `((python2-variant . ,(delay python2-openpyxl))))
1670 (license license:expat)))
1671
1672 (define-public python2-openpyxl
1673 (let ((base (package-with-python2
1674 (strip-python2-variant python-openpyxl))))
1675 (package
1676 (inherit base)
1677 ;; This is the latest version that has python2 support
1678 (version "2.6.4")
1679 (source
1680 (origin
1681 (method url-fetch)
1682 (uri (pypi-uri "openpyxl" version))
1683 (sha256
1684 (base32
1685 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1686 (arguments '(#:tests? #f))))) ; No test suite.
1687
1688 (define-public python-eventlet
1689 (package
1690 (name "python-eventlet")
1691 (version "0.25.1")
1692 (source
1693 (origin
1694 (method url-fetch)
1695 (uri (pypi-uri "eventlet" version))
1696 (sha256
1697 (base32
1698 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1699 (build-system python-build-system)
1700 (propagated-inputs
1701 `(("python-greenlet" ,python-greenlet)))
1702 (arguments
1703 ;; TODO: Requires unpackaged 'enum-compat'.
1704 '(#:tests? #f))
1705 (home-page "https://eventlet.net")
1706 (synopsis "Concurrent networking library for Python")
1707 (description
1708 "Eventlet is a concurrent networking library for Python that
1709 allows you to change how you run your code, not how you write it.
1710 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1711 Coroutines ensure that the developer uses a blocking style of programming
1712 that is similar to threading, but provide the benefits of non-blocking I/O.
1713 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1714 from the Python interpreter, or as a small part of a larger application.")
1715 (license license:expat)))
1716
1717 (define-public python2-eventlet
1718 (let ((base (package-with-python2
1719 (strip-python2-variant python-eventlet))))
1720 (package (inherit base)
1721 (propagated-inputs
1722 `(("python2-enum34" ,python2-enum34)
1723 ,@(package-propagated-inputs base))))))
1724
1725 (define-public python-six
1726 (package
1727 (name "python-six")
1728 (version "1.14.0")
1729 (source
1730 (origin
1731 (method url-fetch)
1732 (uri (pypi-uri "six" version))
1733 (sha256
1734 (base32
1735 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1736 (build-system python-build-system)
1737 (arguments
1738 `(#:phases
1739 (modify-phases %standard-phases
1740 (replace 'check
1741 (lambda _
1742 (invoke "py.test" "-v"))))))
1743 (native-inputs
1744 `(("python-pytest" ,python-pytest-bootstrap)))
1745 (home-page "https://pypi.org/project/six/")
1746 (synopsis "Python 2 and 3 compatibility utilities")
1747 (description
1748 "Six is a Python 2 and 3 compatibility library. It provides utility
1749 functions for smoothing over the differences between the Python versions with
1750 the goal of writing Python code that is compatible on both Python versions.
1751 Six supports every Python version since 2.5. It is contained in only one
1752 Python file, so it can be easily copied into your project.")
1753 (license license:x11)))
1754
1755 (define-public python2-six
1756 (package-with-python2 python-six))
1757
1758 (define-public python-six-bootstrap
1759 (package
1760 (inherit python-six)
1761 (name "python-six-bootstrap")
1762 (native-inputs `())
1763 (arguments `(#:tests? #f))))
1764
1765 (define-public python2-six-bootstrap
1766 (package-with-python2 python-six-bootstrap))
1767
1768 (define-public python-schedule
1769 (package
1770 (name "python-schedule")
1771 (version "0.4.3")
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (pypi-uri "schedule" version))
1776 (sha256
1777 (base32
1778 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1779 (build-system python-build-system)
1780 (native-inputs
1781 `(("python-pytest" ,python-pytest)
1782 ("python-mock" ,python-mock)))
1783 (home-page "https://github.com/dbader/schedule")
1784 (synopsis "Schedule periodic function calls in Python")
1785 (description
1786 "Schedule is an in-process scheduler for periodic jobs that uses the
1787 builder pattern for configuration. Schedule lets you run Python functions (or
1788 any other callable) periodically at pre-determined intervals using a simple,
1789 human-friendly syntax.")
1790 (license license:expat)))
1791
1792 (define-public python2-schedule
1793 (package-with-python2 python-schedule))
1794
1795 (define-public python-scour
1796 (package
1797 (name "python-scour")
1798 (version "038.1")
1799 (source
1800 (origin
1801 (method git-fetch)
1802 (uri
1803 (git-reference
1804 (url "https://github.com/scour-project/scour")
1805 (commit
1806 (string-append "v" version))))
1807 (file-name (git-file-name name version))
1808 (sha256
1809 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1810 (propagated-inputs
1811 `(("python-six" ,python-six)))
1812 (build-system python-build-system)
1813 (home-page "https://github.com/scour-project/scour")
1814 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1815 (description "The goal of Scour is to output a file that renderes
1816 identically at a fraction of the size by removing a lot of redundant
1817 information created by most SVG editors. Optimization options are typically
1818 lossless but can be tweaked for more agressive cleaning.")
1819 (license license:asl2.0)))
1820
1821 (define-public python-mechanize
1822 (package
1823 (name "python-mechanize")
1824 (version "0.4.5")
1825 (source
1826 (origin
1827 (method url-fetch)
1828 (uri (pypi-uri "mechanize" version))
1829 (sha256
1830 (base32
1831 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1832 (build-system python-build-system)
1833 (propagated-inputs
1834 `(("python-html5lib" ,python-html5lib)))
1835 (home-page "https://github.com/python-mechanize/mechanize")
1836 (synopsis
1837 "Stateful programmatic web browsing in Python")
1838 (description
1839 "Mechanize implements stateful programmatic web browsing in Python,
1840 after Andy Lester’s Perl module WWW::Mechanize.")
1841 (license license:bsd-3)))
1842
1843 (define-public python2-mechanize
1844 (package-with-python2 python-mechanize))
1845
1846 (define-public python-simplejson
1847 (package
1848 (name "python-simplejson")
1849 (version "3.17.0")
1850 (source
1851 (origin
1852 (method url-fetch)
1853 (uri (pypi-uri "simplejson" version))
1854 (sha256
1855 (base32
1856 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1857 (build-system python-build-system)
1858 (home-page "http://simplejson.readthedocs.org/en/latest/")
1859 (synopsis
1860 "Json library for Python")
1861 (description
1862 "JSON (JavaScript Object Notation) is a subset of JavaScript
1863 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1864 format.
1865
1866 Simplejson exposes an API familiar to users of the standard library marshal
1867 and pickle modules. It is the externally maintained version of the json
1868 library contained in Python 2.6, but maintains compatibility with Python 2.5
1869 and (currently) has significant performance advantages, even without using
1870 the optional C extension for speedups. Simplejson is also supported on
1871 Python 3.3+.")
1872 (license license:x11)))
1873
1874 (define-public python2-simplejson
1875 (package-with-python2 python-simplejson))
1876
1877
1878 (define-public python-pyicu
1879 (package
1880 (name "python-pyicu")
1881 (version "2.4.3")
1882 (source
1883 (origin
1884 (method url-fetch)
1885 (uri (pypi-uri "PyICU" version))
1886 (sha256
1887 (base32
1888 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1889 (build-system python-build-system)
1890 (inputs
1891 `(("icu4c" ,icu4c)))
1892 (native-inputs
1893 `(("python-pytest" ,python-pytest)
1894 ("python-six" ,python-six)))
1895 (home-page "https://github.com/ovalhub/pyicu")
1896 (synopsis "Python extension wrapping the ICU C++ API")
1897 (description
1898 "PyICU is a python extension wrapping the ICU C++ API.")
1899 (license license:x11)))
1900
1901 (define-public python2-pyicu
1902 (package-with-python2 python-pyicu))
1903
1904 (define-public python-dogtail
1905 (package
1906 (name "python-dogtail")
1907 (version "0.9.11")
1908 (source (origin
1909 (method url-fetch)
1910 (uri
1911 (string-append
1912 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1913 "dogtail-" version ".tar.gz"))
1914 (sha256
1915 (base32
1916 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1917 (build-system python-build-system)
1918 (arguments
1919 `(#:tests? #f ; TODO Launching dbus for the tests
1920 ; fails
1921 #:phases
1922 (modify-phases %standard-phases
1923 (replace 'check
1924 (lambda* (#:key tests? #:allow-other-keys)
1925 (when tests?
1926 (system "Xvfb :1 &")
1927 (setenv "DISPLAY" ":1")
1928 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1929 #t)))))
1930 (propagated-inputs
1931 `(("python-pygobject" ,python-pygobject)
1932 ("python-pycairo" ,python-pycairo)
1933 ("python-pyatspi" ,python-pyatspi)))
1934 (native-inputs
1935 `(("python-nose" ,python-nose)
1936 ("gtk+" ,gtk+)
1937 ("xvfb" ,xorg-server)
1938 ("dbus" ,dbus)
1939 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1940 ("gobject-introspection" ,gobject-introspection)))
1941 (home-page "https://gitlab.com/dogtail/dogtail/")
1942 (synopsis "GUI test tool and automation framework written in Python")
1943 (description
1944 "Dogtail is a GUI test tool and automation framework written in Python.
1945 It uses Accessibility (a11y) technologies to communicate with desktop
1946 applications. dogtail scripts are written in Python and executed like any
1947 other Python program.")
1948 (license license:gpl2+)))
1949
1950 (define-public python2-dogtail
1951 (package-with-python2 python-dogtail))
1952
1953 (define-public python-empy
1954 (package
1955 (name "python-empy")
1956 (version "3.3.3")
1957 (source (origin
1958 (method url-fetch)
1959 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1960 version ".tar.gz"))
1961 (sha256
1962 (base32
1963 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1964 (build-system python-build-system)
1965 (arguments
1966 `(#:tests? #f)) ; python2 only
1967 (home-page "http://www.alcyone.com/software/empy/")
1968 (synopsis "Templating system for Python")
1969 (description
1970 "EmPy is a system for embedding Python expressions and statements in
1971 template text; it takes an EmPy source file, processes it, and produces
1972 output. This is accomplished via expansions, which are special signals to the
1973 EmPy system and are set off by a special prefix (by default the at sign, @@).
1974 EmPy can expand arbitrary Python expressions and statements in this way, as
1975 well as a variety of special forms. Textual data not explicitly delimited in
1976 this way is sent unaffected to the output, allowing Python to be used in
1977 effect as a markup language. Also supported are callbacks via hooks,
1978 recording and playback via diversions, and dynamic, chainable filters. The
1979 system is highly configurable via command line options and embedded
1980 commands.")
1981 (license license:lgpl2.1+)))
1982
1983 (define-public python2-empy
1984 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1985 (package
1986 (inherit base)
1987 (arguments `(,@(package-arguments base)
1988 #:tests? #t)))))
1989
1990 (define-public python2-element-tree
1991 (package
1992 (name "python2-element-tree")
1993 (version "1.2.6")
1994 (source (origin
1995 (method url-fetch)
1996 (uri (string-append
1997 "http://effbot.org/media/downloads/elementtree-"
1998 version "-20050316.tar.gz"))
1999 (sha256
2000 (base32
2001 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2002 (build-system python-build-system)
2003 (arguments
2004 `(#:python ,python-2 ; seems to be part of Python 3
2005 #:tests? #f)) ; no 'test' sub-command
2006 (synopsis "Toolkit for XML processing in Python")
2007 (description
2008 "ElementTree is a Python library supporting lightweight XML processing.")
2009 (home-page "https://effbot.org/zone/element-index.htm")
2010 (license (license:x11-style
2011 "http://docs.python.org/2/license.html"
2012 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2013
2014 (define-public python2-pybugz
2015 (package
2016 (name "python2-pybugz")
2017 (version "0.6.11")
2018 (source (origin
2019 (method url-fetch)
2020 (uri (string-append
2021 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2022 version ".tar.gz"))
2023 (sha256
2024 (base32
2025 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2026 (patches (search-patches "pybugz-stty.patch"
2027 "pybugz-encode-error.patch"))))
2028 (build-system python-build-system)
2029 (arguments
2030 `(#:python ,python-2 ; SyntaxError with Python 3
2031 #:tests? #f)) ; no 'test' sub-command
2032 (propagated-inputs
2033 `(("element-tree" ,python2-element-tree)))
2034 (synopsis "Python and command-line interface to Bugzilla")
2035 (description
2036 "PyBugz is a Python library and command-line tool to query the Bugzilla
2037 bug tracking system. It is meant as an aid to speed up interaction with the
2038 bug tracker.")
2039 (home-page "http://www.liquidx.net/pybugz/")
2040 (license license:gpl2)))
2041
2042 (define-public python2-enum
2043 (package
2044 (name "python2-enum")
2045 (version "0.4.6")
2046 (source (origin
2047 (method url-fetch)
2048 (uri (pypi-uri "enum" version))
2049 (sha256
2050 (base32
2051 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2052 (build-system python-build-system)
2053 (arguments
2054 `(#:python ,python-2))
2055 (home-page "https://pypi.org/project/enum/")
2056 (synopsis "Robust enumerated type support in Python")
2057 (description
2058 "This provides a module for robust enumerations in Python. It has
2059 been superseded by the Python standard library and is provided only for
2060 compatibility.")
2061 ;; Choice of either license.
2062 (license (list license:gpl3+ license:psfl))))
2063
2064 (define-public python-enum34
2065 (package
2066 (name "python-enum34")
2067 (version "1.1.6")
2068 (source
2069 (origin
2070 (method url-fetch)
2071 (uri (pypi-uri "enum34" version))
2072 (sha256
2073 (base32
2074 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2075 (build-system python-build-system)
2076 (home-page "https://pypi.org/project/enum34/")
2077 (synopsis "Backported Python 3.4 Enum")
2078 (description
2079 "Enum34 is the new Python stdlib enum module available in Python 3.4
2080 backported for previous versions of Python from 2.4 to 3.3.")
2081 (license license:bsd-3)))
2082
2083 (define-public python2-enum34
2084 (package-with-python2 python-enum34))
2085
2086 (define-public python-parse-type
2087 (package
2088 (name "python-parse-type")
2089 (version "0.4.2")
2090 (source
2091 (origin
2092 (method url-fetch)
2093 (uri (pypi-uri "parse_type" version))
2094 (sha256
2095 (base32
2096 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2097 (build-system python-build-system)
2098 (propagated-inputs
2099 `(("python-six" ,python-six)
2100 ("python-parse" ,python-parse)))
2101 (native-inputs
2102 `(("python-pytest" ,python-pytest)
2103 ("python-pytest-runner" ,python-pytest-runner)))
2104 (home-page "https://github.com/jenisys/parse_type")
2105 (synopsis "Extended parse module")
2106 (description
2107 "Parse_type extends the python parse module.")
2108 (properties
2109 `((python2-variant . ,(delay python2-parse-type))))
2110 (license license:bsd-3)))
2111
2112 (define-public python2-parse-type
2113 (let ((base (package-with-python2
2114 (strip-python2-variant python-parse-type))))
2115 (package (inherit base)
2116 (propagated-inputs
2117 `(("python2-enum34" ,python2-enum34)
2118 ,@(package-propagated-inputs base))))))
2119
2120 (define-public python-parse
2121 (package
2122 (name "python-parse")
2123 (version "1.8.4")
2124 (source
2125 (origin
2126 (method url-fetch)
2127 (uri (pypi-uri "parse" version))
2128 (sha256
2129 (base32
2130 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2131 (build-system python-build-system)
2132 (arguments
2133 `(#:phases
2134 (modify-phases %standard-phases
2135 (replace 'check
2136 (lambda _ (invoke "python" "test_parse.py"))))))
2137 (home-page "https://github.com/r1chardj0n3s/parse")
2138 (synopsis "Parse strings")
2139 (description
2140 "Parse strings using a specification based on the Python @code{format()}
2141 syntax.")
2142 (license license:x11)))
2143
2144 (define-public python-polib
2145 (package
2146 (name "python-polib")
2147 (version "1.0.8")
2148 (source (origin
2149 (method url-fetch)
2150 (uri (pypi-uri "polib" version))
2151 (sha256
2152 (base32
2153 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2154 (build-system python-build-system)
2155 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2156 (synopsis "Manipulate, create and modify gettext files")
2157 (description "Polib can manipulate any gettext format (po, pot and mo)
2158 files. It can be used to create po files from scratch or to modify
2159 existing ones.")
2160 (license license:expat)))
2161
2162 (define-public python2-polib
2163 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2164 (package
2165 (inherit base)
2166 (arguments `(,@(package-arguments base)
2167 ;; Tests don't work with python2.
2168 #:tests? #f)))))
2169
2170 (define-public python-poyo
2171 (package
2172 (name "python-poyo")
2173 (version "0.5.0")
2174 (source
2175 (origin
2176 (method url-fetch)
2177 (uri (pypi-uri "poyo" version))
2178 (sha256
2179 (base32
2180 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2181 (build-system python-build-system)
2182 (home-page "https://github.com/hackebrot/poyo")
2183 (synopsis "Lightweight YAML Parser for Python")
2184 (description
2185 "This package provides a lightweight YAML Parser for Python. It supports
2186 only a chosen subset of the YAML format that is required to parse cookiecutter
2187 user configuration files. It does not have support for serializing into YAML
2188 and is not compatible with JSON.")
2189 (license license:expat)))
2190
2191 (define-public scons
2192 (package
2193 (name "scons")
2194 (version "3.0.4")
2195 (source (origin
2196 (method git-fetch)
2197 (uri (git-reference
2198 (url "https://github.com/SCons/scons")
2199 (commit version)))
2200 (file-name (git-file-name name version))
2201 (sha256
2202 (base32
2203 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2204 (build-system python-build-system)
2205 (arguments
2206 `(#:use-setuptools? #f ; still relies on distutils
2207 #:tests? #f ; no 'python setup.py test' command
2208 #:phases
2209 (modify-phases %standard-phases
2210 (add-before 'build 'bootstrap
2211 (lambda _
2212 (substitute* "src/engine/SCons/compat/__init__.py"
2213 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2214 "sys.modules[new] = __import__(old)"))
2215 (substitute* "src/engine/SCons/Platform/__init__.py"
2216 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2217 "mod = __import__(full_name)"))
2218 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2219 (chdir "build/scons")
2220 #t)))))
2221 (home-page "https://scons.org/")
2222 (synopsis "Software construction tool written in Python")
2223 (description
2224 "SCons is a software construction tool. Think of SCons as an improved,
2225 cross-platform substitute for the classic Make utility with integrated
2226 functionality similar to autoconf/automake and compiler caches such as ccache.
2227 In short, SCons is an easier, more reliable and faster way to build
2228 software.")
2229 (license license:x11)))
2230
2231 (define-public scons-python2
2232 (package
2233 (inherit (package-with-python2 scons))
2234 (name "scons-python2")))
2235
2236 (define-public python-extras
2237 (package
2238 (name "python-extras")
2239 (version "1.0.0")
2240 (source
2241 (origin
2242 (method url-fetch)
2243 (uri (pypi-uri "extras" version))
2244 (sha256
2245 (base32
2246 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2247 (build-system python-build-system)
2248 (arguments
2249 ;; FIXME: Circular dependency on testtools.
2250 '(#:tests? #f))
2251 (home-page "https://github.com/testing-cabal/extras")
2252 (synopsis "Useful extensions to the Python standard library")
2253 (description
2254 "Extras is a set of extensions to the Python standard library.")
2255 (license license:expat)))
2256
2257 (define-public python2-extras
2258 (package-with-python2 python-extras))
2259
2260 (define-public python-mimeparse
2261 (package
2262 (name "python-mimeparse")
2263 (version "1.6.0")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (pypi-uri "python-mimeparse" version))
2268 (sha256
2269 (base32
2270 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2271 (build-system python-build-system)
2272 (arguments
2273 '(#:phases
2274 (modify-phases %standard-phases
2275 (replace 'check
2276 (lambda _
2277 (invoke "./mimeparse_test.py"))))))
2278 (home-page
2279 "https://github.com/dbtsai/python-mimeparse")
2280 (synopsis "Python library for parsing MIME types")
2281 (description
2282 "Mimeparse provides basic functions for parsing MIME type names and
2283 matching them against a list of media-ranges.")
2284 (license license:expat)))
2285
2286 (define-public python2-mimeparse
2287 (package-with-python2 python-mimeparse))
2288
2289 (define-public python-miniboa
2290 (package
2291 (name "python-miniboa")
2292 (version "1.0.7")
2293 (source
2294 (origin
2295 (method url-fetch)
2296 (uri (pypi-uri "miniboa" version))
2297 (sha256
2298 (base32
2299 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2300 (build-system python-build-system)
2301 (home-page "https://github.com/shmup/miniboa")
2302 (synopsis "Simple, single-threaded Telnet server")
2303 (description
2304 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2305 server.")
2306 (license license:asl2.0)))
2307
2308 (define-public python2-miniboa
2309 (package-with-python2 python-miniboa))
2310
2311 (define-public python-pafy
2312 (package
2313 (name "python-pafy")
2314 (version "0.5.3.1")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "pafy" version))
2319 (sha256
2320 (base32
2321 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2322 (build-system python-build-system)
2323 (arguments
2324 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2325 (propagated-inputs
2326 ;; Youtube-dl is a python package which is imported in the file
2327 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2328 `(("youtube-dl" ,youtube-dl)))
2329 (home-page "https://np1.github.io/pafy/")
2330 (synopsis "Retrieve YouTube content and metadata")
2331 (description
2332 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2333 (license license:lgpl3+)))
2334
2335 (define-public python2-funcsigs
2336 (package
2337 (name "python2-funcsigs")
2338 (version "1.0.2")
2339 (source (origin
2340 (method url-fetch)
2341 (uri (pypi-uri "funcsigs" version))
2342 (sha256
2343 (base32
2344 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2345 (build-system python-build-system)
2346 (arguments
2347 `(#:python ,python-2))
2348 (native-inputs
2349 `(("python2-unittest2" ,python2-unittest2)))
2350 (home-page "http://funcsigs.readthedocs.org")
2351 (synopsis "Python function signatures from PEP362")
2352 (description
2353 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2354 (license license:asl2.0)))
2355
2356 (define-public python2-funcsigs-bootstrap
2357 (package
2358 (inherit python2-funcsigs)
2359 (name "python2-funcsigs-bootstrap")
2360 (native-inputs `())
2361 (arguments
2362 `(#:tests? #f
2363 ,@(package-arguments python2-funcsigs)))))
2364
2365 (define-public python-py
2366 (package
2367 (name "python-py")
2368 (version "1.8.1")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (pypi-uri "py" version))
2373 (sha256
2374 (base32
2375 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2376 (build-system python-build-system)
2377 (arguments
2378 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2379 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2380 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2381 ;; Is this module globally installed?"
2382 '(#:tests? #f))
2383 (native-inputs
2384 `(("python-setuptools-scm" ,python-setuptools-scm)))
2385 (home-page "https://github.com/pytest-dev/py")
2386 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2387 (description
2388 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2389 code introspection, and logging.")
2390 (license license:expat)))
2391
2392 (define-public python2-py
2393 (package-with-python2 python-py))
2394
2395 ;; Recent versions of python-fixtures and python-testrepository need
2396 ;; python-pbr for packaging, which itself needs these two packages for
2397 ;; testing.
2398 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2399 ;; same source, just without any test dependencies and with tests disabled.
2400 ;; python-pbr-minmal is then used to package python-fixtures and
2401 ;; python-testrepository.
2402 ;; Strictly speaking we currently could remove the test-requirements from the
2403 ;; normal python-pbr package (and save this package) since test are disabled
2404 ;; there anyway. But this may change in future.
2405 (define-public python-pbr-minimal
2406 (package
2407 (name "python-pbr-minimal")
2408 (version "3.0.1")
2409 (source
2410 (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "pbr" version))
2413 (sha256
2414 (base32
2415 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2416 (build-system python-build-system)
2417 (arguments
2418 `(#:tests? #f))
2419 (home-page "https://docs.openstack.org/pbr/latest/")
2420 (synopsis "Minimal build of python-pbr used for bootstrapping")
2421 (description
2422 "Used only for bootstrapping python2-pbr, you should not need this.")
2423 (license license:asl2.0)))
2424
2425 (define-public python2-pbr-minimal
2426 (package-with-python2 python-pbr-minimal))
2427
2428 (define-public python-pbr
2429 (package
2430 (inherit python-pbr-minimal)
2431 (name "python-pbr")
2432 (arguments
2433 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2434 (propagated-inputs
2435 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2436 (native-inputs
2437 `(("python-fixtures" ,python-fixtures-bootstrap)
2438 ;; discover, coverage, hacking, subunit
2439 ("python-mock" ,python-mock)
2440 ("python-six" ,python-six)
2441 ("python-sphinx" ,python-sphinx)
2442 ("python-testrepository" ,python-testrepository-bootstrap)
2443 ("python-testresources" ,python-testresources-bootstrap)
2444 ("python-testscenarios" ,python-testscenarios-bootstrap)
2445 ("python-testtools" ,python-testtools-bootstrap)
2446 ("python-virtualenv" ,python-virtualenv)))
2447 (synopsis "Enhance the default behavior of Python’s setuptools")
2448 (description
2449 "Python Build Reasonableness (PBR) is a library that injects some useful
2450 and sensible default behaviors into your setuptools run. It will set
2451 versions, process requirements files and generate AUTHORS and ChangeLog file
2452 from git information.
2453 ")))
2454
2455 (define-public python2-pbr
2456 (package-with-python2 python-pbr))
2457
2458 (define-public python-pyrsistent
2459 (package
2460 (name "python-pyrsistent")
2461 (version "0.16.0")
2462 (home-page "https://github.com/tobgu/pyrsistent")
2463 (source (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "pyrsistent" version))
2466 (sha256
2467 (base32
2468 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2469 (build-system python-build-system)
2470 (arguments
2471 '(#:phases (modify-phases %standard-phases
2472 ;; The package works fine with newer Pytest and Hypothesis, but
2473 ;; has pinned older versions to stay compatible with Python 2.
2474 (add-before 'check 'loosen-pytest-requirement
2475 (lambda _
2476 (substitute* "setup.py"
2477 (("pytest<5") "pytest")
2478 (("hypothesis<5") "hypothesis"))
2479 #t)))))
2480 (native-inputs
2481 `(("python-hypothesis" ,python-hypothesis)
2482 ("python-pytest" ,python-pytest)
2483 ("python-pytest-runner" ,python-pytest-runner)))
2484 (propagated-inputs
2485 `(("python-six" ,python-six)))
2486 (synopsis "Persistent data structures for Python")
2487 (description
2488 "Pyrsistent is a number of persistent collections (by some referred to as
2489 functional data structures). Persistent in the sense that they are immutable.
2490
2491 All methods on a data structure that would normally mutate it instead return a
2492 new copy of the structure containing the requested updates. The original
2493 structure is left untouched.")
2494 (license license:expat)))
2495
2496 (define-public python2-pyrsistent
2497 (package-with-python2 python-pyrsistent))
2498
2499 (define-public python-exif-read
2500 (package
2501 (name "python-exif-read")
2502 (version "2.1.2")
2503 (source (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "ExifRead" version))
2506 (sha256
2507 (base32
2508 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2509 (build-system python-build-system)
2510 (arguments `(#:tests? #f)) ; no tests
2511 (home-page "https://github.com/ianare/exif-py")
2512 (synopsis "Python library to extract EXIF data from image files")
2513 (description
2514 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2515 files.")
2516 (license license:bsd-3)))
2517
2518 (define-public python2-exif-read
2519 (package-with-python2 python-exif-read))
2520
2521 (define-public python-pyld
2522 (package
2523 (name "python-pyld")
2524 (version "1.0.5")
2525 (source (origin
2526 (method url-fetch)
2527 (uri (pypi-uri "PyLD" version))
2528 (sha256
2529 (base32
2530 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2531 (build-system python-build-system)
2532 (home-page "https://github.com/digitalbazaar/pyld")
2533 (synopsis "Python implementation of the JSON-LD specification")
2534 (description
2535 "PyLD is an implementation of the JSON-LD specification.")
2536 (license license:bsd-3)))
2537
2538 (define-public python2-pyld
2539 (package-with-python2 python-pyld))
2540
2541 (define-public python-cli-helpers
2542 (package
2543 (name "python-cli-helpers")
2544 (version "2.0.1")
2545 (source
2546 (origin
2547 ;; There's no source tarball on PyPI.
2548 (method git-fetch)
2549 (uri (git-reference
2550 (url "https://github.com/dbcli/cli_helpers")
2551 (commit (string-append "v" version))))
2552 (file-name (git-file-name name version))
2553 (sha256
2554 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2555 (build-system python-build-system)
2556 (native-inputs
2557 `(("python-pytest" ,python-pytest)))
2558 (propagated-inputs
2559 `(("python-wcwidth" ,python-wcwidth)
2560 ("python-configobj" ,python-configobj)
2561 ("python-tabulate" ,python-tabulate)
2562 ("python-terminaltables" ,python-terminaltables)))
2563 (home-page "https://github.com/dbcli/cli_helpers")
2564 (synopsis "Helpers for building command-line apps")
2565 (description
2566 "CLI Helpers is a Python package that makes it easy to perform common
2567 tasks when building command-line apps. It's a helper library for command-line
2568 interfaces.")
2569 (license license:bsd-3)))
2570
2571 (define-public python-click
2572 (package
2573 (name "python-click")
2574 (version "7.1.2")
2575 (source
2576 (origin
2577 (method url-fetch)
2578 (uri (pypi-uri "click" version))
2579 (sha256
2580 (base32
2581 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2582 (build-system python-build-system)
2583 (arguments
2584 `(#:phases
2585 (modify-phases %standard-phases
2586 (add-after 'unpack 'fix-paths
2587 (lambda* (#:key inputs #:allow-other-keys)
2588 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2589 "cross-libc" "libc"))))
2590 (substitute* "src/click/_unicodefun.py"
2591 (("'locale'")
2592 (string-append "'" glibc "/bin/locale'"))))
2593 #t))
2594 (replace 'check
2595 (lambda _
2596 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2597 (invoke "python" "-m" "pytest"))))))
2598 (native-inputs
2599 `(("python-pytest" ,python-pytest)))
2600 (home-page "https://palletsprojects.com/p/click/")
2601 (synopsis "Command line library for Python")
2602 (description
2603 "Click is a Python package for creating command line interfaces in a
2604 composable way with as little code as necessary. Its name stands for
2605 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2606 with sensible defaults out of the box.")
2607 (license license:bsd-3)))
2608
2609 (define-public python2-click
2610 (package-with-python2 python-click))
2611
2612 (define-public python-click-5
2613 (package (inherit python-click)
2614 (name "python-click")
2615 (version "5.1")
2616 (source
2617 (origin
2618 (method url-fetch)
2619 (uri (pypi-uri "click" version))
2620 (sha256
2621 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2622 (arguments `())))
2623
2624 (define-public python-wheel
2625 (package
2626 (name "python-wheel")
2627 (version "0.33.6")
2628 (source
2629 (origin
2630 (method url-fetch)
2631 (uri (pypi-uri "wheel" version))
2632 (sha256
2633 (base32
2634 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2635 (build-system python-build-system)
2636 (arguments
2637 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2638 ;; fails to find the newly-built bdist_wheel library, even though it is
2639 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2640 '(#:tests? #f))
2641 (home-page "https://bitbucket.org/pypa/wheel/")
2642 (synopsis "Format for built Python packages")
2643 (description
2644 "A wheel is a ZIP-format archive with a specially formatted filename and
2645 the @code{.whl} extension. It is designed to contain all the files for a PEP
2646 376 compatible install in a way that is very close to the on-disk format. Many
2647 packages will be properly installed with only the @code{Unpack} step and the
2648 unpacked archive preserves enough information to @code{Spread} (copy data and
2649 scripts to their final locations) at any later time. Wheel files can be
2650 installed with a newer @code{pip} or with wheel's own command line utility.")
2651 (license license:expat)))
2652
2653 (define-public python2-wheel
2654 (package-with-python2 python-wheel))
2655
2656 (define-public python-vcversioner
2657 (package
2658 (name "python-vcversioner")
2659 (version "2.16.0.0")
2660 (source
2661 (origin
2662 (method url-fetch)
2663 (uri (pypi-uri "vcversioner" version))
2664 (sha256
2665 (base32
2666 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2667 (build-system python-build-system)
2668 (synopsis "Python library for version number discovery")
2669 (description "Vcversioner is a Python library that inspects tagging
2670 information in a variety of version control systems in order to discover
2671 version numbers.")
2672 (home-page "https://github.com/habnabit/vcversioner")
2673 (license license:isc)))
2674
2675 (define-public python2-vcversioner
2676 (package-with-python2 python-vcversioner))
2677
2678 (define-public python-jdcal
2679 (package
2680 (name "python-jdcal")
2681 (version "1.4")
2682 (source
2683 (origin
2684 (method url-fetch)
2685 (uri (pypi-uri "jdcal" version))
2686 (sha256
2687 (base32
2688 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2689 (build-system python-build-system)
2690 (arguments
2691 `(#:phases (modify-phases %standard-phases
2692 (replace 'check
2693 (lambda _
2694 (invoke "pytest"))))))
2695 (native-inputs
2696 `(("python-pytest" ,python-pytest)))
2697 (home-page "https://github.com/phn/jdcal")
2698 (synopsis "Functions to convert between Julian dates Gregorian dates")
2699 (description "This Python library provides functions for converting
2700 between Julian dates and Gregorian dates.")
2701 (license license:bsd-2)))
2702
2703 (define-public python2-jdcal
2704 (package-with-python2 python-jdcal))
2705
2706 (define-public python-jsondiff
2707 (package
2708 (name "python-jsondiff")
2709 (version "1.2.0")
2710 (source
2711 (origin
2712 (method url-fetch)
2713 (uri (pypi-uri "jsondiff" version))
2714 (sha256
2715 (base32
2716 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2717 (build-system python-build-system)
2718 (native-inputs
2719 `(("python-nose" ,python-nose)
2720 ("python-nose-random" ,python-nose-random)))
2721 (home-page
2722 "https://github.com/fzumstein/jsondiff")
2723 (synopsis "Compare JSON and JSON-like structures in Python")
2724 (description "@code{jsondiff} is a Python library which lets you
2725 compare, diff, and patch JSON and JSON-like structures in Python.")
2726 (license license:expat)))
2727
2728 (define-public python-jsonschema
2729 (package
2730 (name "python-jsonschema")
2731 (version "3.2.0")
2732 (source (origin
2733 (method url-fetch)
2734 (uri (pypi-uri "jsonschema" version))
2735 (sha256
2736 (base32
2737 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2738 (build-system python-build-system)
2739 (arguments
2740 '(#:phases
2741 (modify-phases %standard-phases
2742 (replace 'check
2743 (lambda* (#:key inputs outputs #:allow-other-keys)
2744 (add-installed-pythonpath inputs outputs)
2745 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2746 (invoke "trial" "jsonschema"))))))
2747 (native-inputs
2748 `(("python-setuptools_scm" ,python-setuptools-scm)
2749 ("python-twisted" ,python-twisted)))
2750 (propagated-inputs
2751 `(("python-attrs" ,python-attrs)
2752 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2753 ("python-pyrsistent" ,python-pyrsistent)
2754 ("python-six" ,python-six)))
2755 (home-page "https://github.com/Julian/jsonschema")
2756 (synopsis "Implementation of JSON Schema for Python")
2757 (description
2758 "Jsonschema is an implementation of JSON Schema for Python.")
2759 (license license:expat)
2760 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2761
2762 (define-public python2-jsonschema
2763 (let ((jsonschema (package-with-python2
2764 (strip-python2-variant python-jsonschema))))
2765 (package (inherit jsonschema)
2766 (propagated-inputs
2767 `(("python2-functools32" ,python2-functools32)
2768 ,@(package-propagated-inputs jsonschema))))))
2769
2770 (define-public python-schema
2771 (package
2772 (name "python-schema")
2773 (version "0.6.6")
2774 (source
2775 (origin
2776 (method url-fetch)
2777 (uri (pypi-uri "schema" version))
2778 (sha256
2779 (base32
2780 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2781 (build-system python-build-system)
2782 (native-inputs
2783 `(("python-pytest" ,python-pytest)))
2784 (home-page "https://github.com/keleshev/schema")
2785 (synopsis "Simple data validation library")
2786 (description
2787 "@code{python-schema} is a library for validating Python data
2788 structures, such as those obtained from config-files, forms, external
2789 services or command-line parsing, converted from JSON/YAML (or
2790 something else) to Python data-types.")
2791 (license license:psfl)))
2792
2793 (define-public python2-schema
2794 (package-with-python2 python-schema))
2795
2796 (define-public python-schema-0.5
2797 (package (inherit python-schema)
2798 (version "0.5.0")
2799 (source
2800 (origin
2801 (method url-fetch)
2802 (uri (pypi-uri "schema" version))
2803 (sha256
2804 (base32
2805 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2806
2807 (define-public python2-schema-0.5
2808 (package-with-python2 python-schema-0.5))
2809
2810 (define-public python-kitchen
2811 (package
2812 (name "python-kitchen")
2813 (version "1.2.5")
2814 (source
2815 (origin
2816 (method url-fetch)
2817 (uri (pypi-uri "kitchen" version))
2818 (sha256
2819 (base32
2820 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2821 (build-system python-build-system)
2822 (propagated-inputs
2823 `(("python-chardet" ,python-chardet)))
2824 (home-page "https://github.com/fedora-infra/kitchen")
2825 (synopsis "Python API for snippets")
2826 (description "@code{kitchen} module provides a python API for all sorts of
2827 little useful snippets of code that everybody ends up writing for their projects
2828 but never seem big enough to build an independent release. Use kitchen and stop
2829 cutting and pasting that code over and over.")
2830 (license (list license:lgpl2.1+
2831 ;; subprocess.py, test_subprocess.py,
2832 ;; kitchen/pycompat25/defaultdict.py:
2833 license:psfl))))
2834
2835 (define-public python2-kitchen
2836 (package-with-python2 python-kitchen))
2837
2838 (define-public python-unidecode
2839 (package
2840 (name "python-unidecode")
2841 (version "1.1.1")
2842 (source (origin
2843 (method url-fetch)
2844 (uri (pypi-uri "Unidecode" version))
2845 (sha256
2846 (base32
2847 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2848 (build-system python-build-system)
2849 (home-page "https://pypi.org/project/Unidecode/")
2850 (synopsis "ASCII transliterations of Unicode text")
2851 (description
2852 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2853 useful when integrating with legacy code that doesn't support Unicode, or for
2854 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2855 machine identifiers from human-readable Unicode strings that should still be
2856 somewhat intelligible.")
2857 (license license:gpl2+)))
2858
2859 (define-public python2-unidecode
2860 (package-with-python2 python-unidecode))
2861
2862 (define-public python-text-unidecode
2863 (package
2864 (name "python-text-unidecode")
2865 (version "1.3")
2866 (source (origin
2867 (method url-fetch)
2868 (uri (pypi-uri "text-unidecode" version))
2869 (sha256
2870 (base32
2871 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2872 (build-system python-build-system)
2873 (arguments
2874 '(#:phases (modify-phases %standard-phases
2875 (replace 'check
2876 (lambda _
2877 (setenv "PYTHONPATH"
2878 (string-append "./build/lib:"
2879 (getenv "PYTHONPATH")))
2880 (invoke "pytest" "-vv"))))))
2881 (native-inputs
2882 `(("python-pytest" ,python-pytest)))
2883 (home-page "https://github.com/kmike/text-unidecode/")
2884 (synopsis "Decode Unicode data")
2885 (description
2886 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2887 Perl library. It can create ASCII representations of Unicode data. In general
2888 users should prefer the @code{python-unidecode} package which offers better
2889 memory usage and transliteration quality.")
2890 ;; The user can choose either license.
2891 (license (list license:clarified-artistic license:gpl2+))))
2892
2893 (define-public python2-text-unidecode
2894 (package-with-python2 python-text-unidecode))
2895
2896 (define-public python-pyjwt
2897 (package
2898 (name "python-pyjwt")
2899 (version "1.7.1")
2900 (source
2901 (origin
2902 (method url-fetch)
2903 (uri (pypi-uri "PyJWT" version))
2904 (sha256
2905 (base32
2906 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2907 (modules '((guix build utils)))
2908 (snippet
2909 '(begin
2910 (for-each delete-file-recursively
2911 (find-files "." "\\.pyc$"))
2912 #t))))
2913 (build-system python-build-system)
2914 (arguments
2915 '(#:phases (modify-phases %standard-phases
2916 (replace 'check
2917 (lambda _
2918 ;; Mimic upstream commit 3a20892442b34c7 to get
2919 ;; rid of dependency on pytest-runner < 5.0.
2920 ;; Remove substitution for PyJWT > 1.7.1.
2921 (substitute* "setup.py"
2922 ((".*pytest-runner.*")
2923 ""))
2924 (invoke "pytest" "-vv"))))))
2925 (native-inputs
2926 `(("python-pytest" ,python-pytest)
2927 ("python-pytest-cov" ,python-pytest-cov)))
2928 (home-page "https://github.com/progrium/pyjwt")
2929 (synopsis "JSON Web Token implementation in Python")
2930 (description
2931 "PyJWT is a JSON Web Token implementation written in Python.")
2932 (license license:expat)))
2933
2934 (define-public python2-pyjwt
2935 (package-with-python2 python-pyjwt))
2936
2937 (define-public python-pykka
2938 (package
2939 (name "python-pykka")
2940 (version "1.2.1")
2941 (source
2942 (origin
2943 (method url-fetch)
2944 (uri (pypi-uri "Pykka" version))
2945 (sha256
2946 (base32
2947 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2948 (build-system python-build-system)
2949 (native-inputs
2950 `(("python-mock" ,python-mock)
2951 ("python-nose" ,python-nose)
2952 ("python-gevent" ,python-gevent)
2953 ("python-eventlet" ,python-eventlet)))
2954 (home-page "https://www.pykka.org/")
2955 (synopsis "Pykka is a Python implementation of the actor model")
2956 (description
2957 "Pykka is a Python implementation of the actor model.
2958 The actor model introduces some simple rules to control the sharing
2959 of state and cooperation between execution units, which makes it
2960 easier to build concurrent applications.")
2961 (license license:asl2.0)))
2962
2963 (define-public python2-pykka
2964 (package-with-python2 python-pykka))
2965
2966 (define-public python-pymsgbox
2967 (package
2968 (name "python-pymsgbox")
2969 (version "1.0.6")
2970 (source
2971 (origin
2972 (method git-fetch)
2973 (uri (git-reference
2974 ;; LICENSE.txt is not present on pypi
2975 (url "https://github.com/asweigart/PyMsgBox")
2976 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2977 (file-name (git-file-name name version))
2978 (sha256
2979 (base32
2980 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2981 (arguments
2982 ;; Circular dependency to run tests:
2983 ;; Tests need pyautogui, which depends on pymsgbox.
2984 '(#:tests? #f))
2985 (build-system python-build-system)
2986 (home-page "https://github.com/asweigart/PyMsgBox")
2987 (synopsis "Python module for JavaScript-like message boxes")
2988 (description
2989 "PyMsgBox is a simple, cross-platform, pure Python module for
2990 JavaScript-like message boxes. Types of dialog boxes include:
2991 @enumerate
2992 @item alert
2993 @item confirm
2994 @item prompt
2995 @item password
2996 @end enumerate
2997 ")
2998 (license license:bsd-3)))
2999
3000 (define-public python-pympler
3001 (package
3002 (name "python-pympler")
3003 (home-page "https://pythonhosted.org/Pympler/")
3004 (version "0.8")
3005 (source (origin
3006 (method url-fetch)
3007 (uri (pypi-uri "Pympler" version))
3008 (sha256
3009 (base32
3010 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3011 (build-system python-build-system)
3012 (arguments
3013 `(#:phases (modify-phases %standard-phases
3014 (delete 'check)
3015 (add-after 'install 'check
3016 (lambda* (#:key inputs outputs #:allow-other-keys)
3017 (add-installed-pythonpath inputs outputs)
3018 (invoke "python" "setup.py" "test"))))))
3019 (synopsis "Measure, monitor and analyze memory behavior")
3020 (description
3021 "Pympler is a development tool to measure, monitor and analyze
3022 the memory behavior of Python objects in a running Python application.
3023
3024 By pympling a Python application, detailed insight in the size and the
3025 lifetime of Python objects can be obtained. Undesirable or unexpected
3026 runtime behavior like memory bloat and other @samp{pymples} can easily
3027 be identified.
3028
3029 A web profiling frontend exposes process statistics, garbage
3030 visualisation and class tracker statistics.")
3031 (license license:asl2.0)))
3032
3033 (define-public python2-pympler
3034 (package-with-python2 python-pympler))
3035
3036 (define-public python-itsdangerous
3037 (package
3038 (name "python-itsdangerous")
3039 (version "1.1.0")
3040 (source
3041 (origin
3042 (method url-fetch)
3043 (uri (pypi-uri "itsdangerous" version))
3044 (sha256
3045 (base32
3046 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3047 (build-system python-build-system)
3048 (home-page "https://palletsprojects.com/p/itsdangerous/")
3049 (synopsis "Python library for passing data to/from untrusted environments")
3050 (description
3051 "Itsdangerous provides various helpers to pass trusted data to untrusted
3052 environments and back.")
3053 (license license:bsd-3)))
3054
3055 (define-public python2-itsdangerous
3056 (package-with-python2 python-itsdangerous))
3057
3058 (define-public python-pyyaml
3059 (package
3060 (name "python-pyyaml")
3061 (version "5.3.1")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (pypi-uri "PyYAML" version))
3066 (sha256
3067 (base32
3068 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3069 (build-system python-build-system)
3070 (inputs
3071 `(("libyaml" ,libyaml)))
3072 (home-page "https://pyyaml.org")
3073 (synopsis "YAML parser and emitter for Python")
3074 (description
3075 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3076 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3077 API, and sensible error messages. PyYAML supports standard YAML tags and
3078 provides Python-specific tags that represent an arbitrary Python object.")
3079 (license license:expat)))
3080
3081 (define-public python2-pyyaml
3082 (package-with-python2 python-pyyaml))
3083
3084 (define-public python-vine
3085 (package
3086 (name "python-vine")
3087 (version "1.1.4")
3088 (source
3089 (origin
3090 (method url-fetch)
3091 (uri (pypi-uri "vine" version))
3092 (sha256
3093 (base32
3094 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3095 (build-system python-build-system)
3096 (native-inputs
3097 `(("python-pytest" ,python-pytest)
3098 ("python-case" ,python-case)))
3099 (home-page "https://github.com/celery/vine")
3100 (synopsis "Promises for Python")
3101 (description
3102 "@code{vine} provides a special implementation of promises in that it can
3103 be used both for \"promise of a value\" and lazy evaluation. The biggest
3104 upside for this is that everything in a promise can also be a promise,
3105 e.g. filters, callbacks and errbacks can all be promises.")
3106 (license license:bsd-3)))
3107
3108 (define-public python-virtualenv
3109 (package
3110 (name "python-virtualenv")
3111 (version "20.0.10")
3112 (source
3113 (origin
3114 (method url-fetch)
3115 (uri (pypi-uri "virtualenv" version))
3116 (sha256
3117 (base32
3118 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3119 (build-system python-build-system)
3120 (native-inputs
3121 `(("python-mock" ,python-mock)
3122 ("python-pytest" ,python-pytest)
3123 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3124 ;; be an input at all". However, removing the input makes the build error:
3125 ;; File "setup.py", line 4, in <module>
3126 ;; raise RuntimeError("setuptools >= 41 required to build")
3127 ("python-setuptools" ,python-setuptools)
3128 ("python-setuptools-scm" ,python-setuptools-scm)))
3129 (propagated-inputs
3130 `(("python-appdirs" ,python-appdirs)
3131 ("python-distlib" ,python-distlib)
3132 ("python-filelock" ,python-filelock)
3133 ("python-six" ,python-six)
3134 ("python-importlib-metadata" ,python-importlib-metadata)))
3135 (home-page "https://virtualenv.pypa.io/")
3136 (synopsis "Virtual Python environment builder")
3137 (description
3138 "Virtualenv is a tool to create isolated Python environments.")
3139 (properties `((python2-variant . ,(delay python2-virtualenv))))
3140 (license license:expat)))
3141
3142 (define-public python2-virtualenv
3143 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3144 (package
3145 (inherit base)
3146 (arguments
3147 `(#:python ,python-2
3148 #:phases
3149 (modify-phases %standard-phases
3150 (add-after 'set-paths 'adjust-PYTHONPATH
3151 (lambda* (#:key inputs #:allow-other-keys)
3152 (let* ((python (assoc-ref inputs "python"))
3153 (python-sitedir (string-append python "/lib/python2.7"
3154 "/site-packages")))
3155 ;; XXX: 'python2' always comes first on PYTHONPATH
3156 ;; and shadows the 'setuptools' input. Move python2
3157 ;; last: this should be fixed in python-build-system
3158 ;; in a future rebuild cycle.
3159 (setenv "PYTHONPATH"
3160 (string-append (string-join (delete python-sitedir
3161 (string-split
3162 (getenv "PYTHONPATH")
3163 #\:))
3164 ":")
3165 ":" python-sitedir))
3166 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3167 (getenv "PYTHONPATH"))
3168 #t))))))
3169 (propagated-inputs
3170 `(("python-contextlib2" ,python2-contextlib2)
3171 ,@(package-propagated-inputs base))))))
3172
3173 (define-public python-markupsafe
3174 (package
3175 (name "python-markupsafe")
3176 (version "1.1.1")
3177 (source
3178 (origin
3179 (method url-fetch)
3180 (uri (pypi-uri "MarkupSafe" version))
3181 (sha256
3182 (base32
3183 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3184 (build-system python-build-system)
3185 (arguments
3186 `(#:modules ((ice-9 ftw)
3187 (srfi srfi-1)
3188 (srfi srfi-26)
3189 (guix build utils)
3190 (guix build python-build-system))
3191 #:phases (modify-phases %standard-phases
3192 (replace 'check
3193 (lambda _
3194 (let ((cwd (getcwd))
3195 (libdir (find (cut string-prefix? "lib." <>)
3196 (scandir "build"))))
3197 (setenv "PYTHONPATH"
3198 (string-append cwd "/build/" libdir ":"
3199 (getenv "PYTHONPATH")))
3200 (invoke "pytest" "-vv")))))))
3201 (native-inputs
3202 `(("python-pytest" ,python-pytest)))
3203 (home-page "https://github.com/mitsuhiko/markupsafe")
3204 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3205 (description
3206 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3207 for Python.")
3208 (license license:bsd-3)))
3209
3210 (define-public python2-markupsafe
3211 (package-with-python2 python-markupsafe))
3212
3213 (define-public python-jinja2
3214 (package
3215 (name "python-jinja2")
3216 (version "2.11.2")
3217 (source
3218 (origin
3219 (method url-fetch)
3220 (uri (pypi-uri "Jinja2" version))
3221 (sha256
3222 (base32
3223 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3224 (build-system python-build-system)
3225 (arguments
3226 '(#:phases (modify-phases %standard-phases
3227 (replace 'check
3228 (lambda* (#:key tests? #:allow-other-keys)
3229 (if tests?
3230 (begin
3231 (setenv "PYTHONPATH"
3232 (string-append "./build/lib:"
3233 (getenv "PYTHONPATH")))
3234 (invoke "pytest" "-vv"))
3235 (format #t "test suite not run~%"))
3236 #t)))))
3237 (native-inputs
3238 `(("python-pytest" ,python-pytest)))
3239 (propagated-inputs
3240 `(("python-markupsafe" ,python-markupsafe)))
3241 (home-page "http://jinja.pocoo.org/")
3242 (synopsis "Python template engine")
3243 (description
3244 "Jinja2 is a small but fast and easy to use stand-alone template engine
3245 written in pure Python.")
3246 (license license:bsd-3)))
3247
3248 (define-public python2-jinja2
3249 (package-with-python2 python-jinja2))
3250
3251 (define-public python-jinja2-time
3252 (package
3253 (name "python-jinja2-time")
3254 (version "0.2.0")
3255 (source
3256 (origin
3257 (method url-fetch)
3258 (uri (pypi-uri "jinja2-time" version))
3259 (sha256
3260 (base32
3261 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3262 (build-system python-build-system)
3263 (propagated-inputs
3264 `(("python-arrow" ,python-arrow)
3265 ("python-jinja2" ,python-jinja2)))
3266 (home-page
3267 "https://github.com/hackebrot/jinja2-time")
3268 (synopsis "Jinja2 Extension for Dates and Times")
3269 (description
3270 "This package provides an extension for the template engine Jinja2. It
3271 adds a 'now' tag providing a convenient access to the arrow.now() API from
3272 templates. A format string can be provided to control the output.")
3273 (license license:expat)))
3274
3275 (define-public python-pystache
3276 (package
3277 (name "python-pystache")
3278 (version "0.5.4")
3279 (source (origin
3280 (method url-fetch)
3281 (uri (pypi-uri "pystache" version))
3282 (sha256
3283 (base32
3284 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3285 (build-system python-build-system)
3286 (arguments
3287 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3288 (home-page "http://defunkt.io/pystache/")
3289 (synopsis "Python logic-less template engine")
3290 (description
3291 "Pystache is a Python implementation of the framework agnostic,
3292 logic-free templating system Mustache.")
3293 (license license:expat)
3294 (properties `((python2-variant . ,(delay python2-pystache))))))
3295
3296 (define-public python2-pystache
3297 (package (inherit (package-with-python2
3298 (strip-python2-variant python-pystache)))
3299 (arguments
3300 `(#:python ,python-2
3301 #:phases
3302 (modify-phases %standard-phases
3303 (replace 'check
3304 (lambda _
3305 (invoke "python" "test_pystache.py"))))))))
3306
3307 (define-public python-joblib
3308 (package
3309 (name "python-joblib")
3310 (version "0.14.1")
3311 (source (origin
3312 (method url-fetch)
3313 (uri (pypi-uri "joblib" version))
3314 (sha256
3315 (base32
3316 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3317 (build-system python-build-system)
3318 (arguments
3319 `(#:phases
3320 (modify-phases %standard-phases
3321 (replace 'check
3322 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3323 (native-inputs
3324 `(("python-pytest" ,python-pytest)))
3325 (home-page "https://joblib.readthedocs.io/")
3326 (synopsis "Using Python functions as pipeline jobs")
3327 (description
3328 "Joblib is a set of tools to provide lightweight pipelining in Python.
3329 In particular, joblib offers: transparent disk-caching of the output values
3330 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3331 logging and tracing of the execution.")
3332 (license license:bsd-3)))
3333
3334 (define-public python2-joblib
3335 (package-with-python2 python-joblib))
3336
3337 (define-public python-daemon
3338 (package
3339 (name "python-daemon")
3340 (version "2.2.3")
3341 (source
3342 (origin
3343 (method url-fetch)
3344 (uri (pypi-uri "python-daemon" version))
3345 (sha256
3346 (base32
3347 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3348 (build-system python-build-system)
3349 (arguments
3350 `(#:phases
3351 (modify-phases %standard-phases
3352 (add-before 'check 'disable-tests
3353 (lambda _
3354 ;; FIXME: Determine why test fails
3355 (substitute* "test/test_daemon.py"
3356 (("test_detaches_process_context")
3357 "skip_test_detaches_process_context"))
3358 #t)))))
3359 (propagated-inputs
3360 `(("python-lockfile" ,python-lockfile)))
3361 (native-inputs
3362 `(("python-unittest2" ,python-unittest2)
3363 ("python-testtools" ,python-testtools)
3364 ("python-testscenarios" ,python-testscenarios)
3365 ("python-mock" ,python-mock)
3366 ("python-docutils" ,python-docutils)))
3367 (home-page "https://pagure.io/python-daemon/")
3368 (synopsis "Python library for making a Unix daemon process")
3369 (description "Python-daemon is a library that assists a Python program to
3370 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3371
3372 This library provides a @code{DaemonContext} class that manages the following
3373 important tasks for becoming a daemon process:
3374 @enumerate
3375 @item Detach the process into its own process group.
3376 @item Set process environment appropriate for running inside a chroot.
3377 @item Renounce suid and sgid privileges.
3378 @item Close all open file descriptors.
3379 @item Change the working directory, uid, gid, and umask.
3380 @item Set appropriate signal handlers.
3381 @item Open new file descriptors for stdin, stdout, and stderr.
3382 @item Manage a specified PID lock file.
3383 @item Register cleanup functions for at-exit processing.
3384 @end enumerate")
3385 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3386 (license (list license:asl2.0 license:gpl3+))))
3387
3388 (define-public python-anytree
3389 (package
3390 (name "python-anytree")
3391 (version "2.8.0")
3392 (source (origin
3393 (method url-fetch)
3394 (uri (pypi-uri "anytree" version))
3395 (sha256
3396 (base32
3397 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3398 (build-system python-build-system)
3399 (propagated-inputs
3400 `(("python-six" ,python-six)))
3401 (native-inputs
3402 `(;; For tests.
3403 ("graphviz" ,graphviz) ;for 'dot'
3404 ("python-nose" ,python-nose)))
3405 (home-page "https://github.com/c0fec0de/anytree")
3406 (synopsis "Lightweight tree data library")
3407 (description
3408 "@code{anytree} is a simple, lightweight, and extensible tree data
3409 structure for Python.")
3410 (license license:asl2.0)))
3411
3412 (define-public python-docutils
3413 (package
3414 (name "python-docutils")
3415 (version "0.16")
3416 (source
3417 (origin
3418 (method url-fetch)
3419 (uri (pypi-uri "docutils" version))
3420 (sha256
3421 (base32
3422 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3423 (build-system python-build-system)
3424 (arguments
3425 '(#:phases (modify-phases %standard-phases
3426 (replace 'check
3427 (lambda* (#:key tests? #:allow-other-keys)
3428 (if tests?
3429 (invoke "python" "test/alltests.py")
3430 (format #t "test suite not run~%"))
3431 #t)))))
3432 (home-page "http://docutils.sourceforge.net/")
3433 (synopsis "Python Documentation Utilities")
3434 (description
3435 "Docutils is a modular system for processing documentation into useful
3436 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3437 reStructuredText.")
3438 ;; Most of the source code is public domain, but some source files are
3439 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3440 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3441
3442 (define-public python2-docutils
3443 (package-with-python2 python-docutils))
3444
3445 ;; python2-sphinx fails its test suite with newer versions.
3446 (define-public python2-docutils-0.14
3447 (package
3448 (inherit python2-docutils)
3449 (version "0.14")
3450 (source (origin
3451 (method url-fetch)
3452 (uri (pypi-uri "docutils" version))
3453 (sha256
3454 (base32
3455 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3456
3457 (define-public python-restructuredtext-lint
3458 (package
3459 (name "python-restructuredtext-lint")
3460 (version "1.3.0")
3461 (source
3462 (origin
3463 (method url-fetch)
3464 (uri (pypi-uri "restructuredtext-lint" version))
3465 (sha256
3466 (base32
3467 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3468 (build-system python-build-system)
3469 (arguments
3470 `(#:phases
3471 (modify-phases %standard-phases
3472 (delete 'check)
3473 (add-after 'install 'check
3474 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3475 (when tests?
3476 (add-installed-pythonpath inputs outputs)
3477 (invoke "nosetests" "-v"))
3478 #t)))))
3479 (propagated-inputs
3480 `(("python-docutils" ,python-docutils)))
3481 (native-inputs
3482 `(("python-nose" ,python-nose)))
3483 (home-page "https://github.com/twolfson/restructuredtext-lint")
3484 (synopsis "reStructuredText linter")
3485 (description "This package provides a linter for the reStructuredText
3486 format.")
3487 (license license:unlicense)))
3488
3489 (define-public python-doc8
3490 (package
3491 (name "python-doc8")
3492 (version "0.8.0")
3493 (source
3494 (origin
3495 (method url-fetch)
3496 (uri (pypi-uri "doc8" version))
3497 (sha256
3498 (base32
3499 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3500 (build-system python-build-system)
3501 (arguments
3502 `(#:phases
3503 (modify-phases %standard-phases
3504 (delete 'check)
3505 (add-after 'install 'check
3506 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3507 (when tests?
3508 (add-installed-pythonpath inputs outputs)
3509 (invoke "pytest" "-v"))
3510 #t)))))
3511 (propagated-inputs
3512 `(("python-chardet" ,python-chardet)
3513 ("python-docutils" ,python-docutils)
3514 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3515 ("python-six" ,python-six)
3516 ("python-stevedore" ,python-stevedore)))
3517 (native-inputs
3518 `(("python-testtools" ,python-testtools)
3519 ("python-pytest" ,python-pytest)))
3520 (home-page "https://launchpad.net/doc8")
3521 (synopsis
3522 "Style checker for Sphinx (or other) RST documentation")
3523 (description
3524 "Doc8 is an opinionated style checker for reStructured Text and plain
3525 text styles of documentation.")
3526 (license license:asl2.0)))
3527
3528 (define-public python-pygments
3529 (package
3530 (name "python-pygments")
3531 (version "2.5.2")
3532 (source
3533 (origin
3534 (method url-fetch)
3535 (uri (pypi-uri "Pygments" version))
3536 (sha256
3537 (base32
3538 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
3539 (build-system python-build-system)
3540 (arguments
3541 ;; FIXME: Tests require sphinx, which depends on this.
3542 '(#:tests? #f))
3543 (home-page "https://pygments.org/")
3544 (synopsis "Syntax highlighting")
3545 (description
3546 "Pygments is a syntax highlighting package written in Python.")
3547 (license license:bsd-2)))
3548
3549 (define-public python2-pygments
3550 (package-with-python2 python-pygments))
3551
3552 (define-public python-bumpversion
3553 (package
3554 (name "python-bumpversion")
3555 (version "0.5.3")
3556 (source
3557 (origin
3558 (method url-fetch)
3559 (uri (pypi-uri "bumpversion" version))
3560 (sha256
3561 (base32
3562 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3563 (build-system python-build-system)
3564 (home-page "https://github.com/peritus/bumpversion")
3565 (synopsis "Tool to bump software version")
3566 (description "This tool provides a command-line interface (CLI) to bump a
3567 software version simply.")
3568 (license license:expat)))
3569
3570 (define-public python-deprecated
3571 (package
3572 (name "python-deprecated")
3573 (version "1.2.5")
3574 (source
3575 (origin
3576 (method git-fetch)
3577 (uri (git-reference
3578 (url "https://github.com/tantale/deprecated")
3579 (commit (string-append "v" version))))
3580 (file-name (git-file-name name version))
3581 (sha256
3582 (base32
3583 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3584 (build-system python-build-system)
3585 (arguments
3586 `(#:phases (modify-phases %standard-phases
3587 (replace 'check
3588 (lambda _
3589 (invoke "pytest"))))))
3590 (propagated-inputs
3591 `(("python-wrapt" ,python-wrapt)))
3592 (native-inputs
3593 `(("python-bumpversion" ,python-bumpversion)
3594 ("python-pytest" ,python-pytest)
3595 ("python-pytest-cov" ,python-pytest-cov)
3596 ("python-sphinx" ,python-sphinx)
3597 ("python-tox" ,python-tox)))
3598 (home-page "https://github.com/tantale/deprecated")
3599 (synopsis "Python decorator to deprecate classes, functions or methods")
3600 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3601 to deprecate classes, functions or methods.")
3602 (license license:expat)))
3603
3604 (define-public python-pygithub
3605 (package
3606 (name "python-pygithub")
3607 (version "1.43.8")
3608 (source
3609 ;; We fetch from the Git repo because there are no tests in the PyPI
3610 ;; archive.
3611 (origin
3612 (method git-fetch)
3613 (uri (git-reference
3614 (url "https://github.com/PyGithub/PyGithub")
3615 (commit (string-append "v" version))))
3616 (file-name (git-file-name name version))
3617 (sha256
3618 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3619 (build-system python-build-system)
3620 (arguments
3621 `(#:phases (modify-phases %standard-phases
3622 ;; Some tests rely on the network.
3623 (add-after 'unpack 'disable-failing-tests
3624 (lambda _
3625 (substitute* "tests/Issue142.py"
3626 (("testDecodeJson") "disabled_testDecodeJson"))
3627 #t))
3628 (add-before 'check 'prepare-for-tests
3629 (lambda _
3630 (for-each (lambda (f)
3631 (chmod f #o666))
3632 (find-files "./tests"))
3633 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3634 (setenv "PYTHONPATH"
3635 (string-append "./tests:" (getenv "PYTHONPATH")))
3636 #t)))))
3637 (propagated-inputs
3638 `(("python-deprecated" ,python-deprecated)
3639 ("python-pyjwt" ,python-pyjwt)
3640 ("python-requests" ,python-requests)))
3641 (native-inputs `(("python-httpretty" ,python-httpretty)))
3642 (home-page "https://pygithub.readthedocs.io/en/latest/")
3643 (synopsis "Python library for the GitHub API")
3644 (description "This library allows managing GitHub resources such as
3645 repositories, user profiles, and organizations in your Python applications,
3646 using version 3 of the GitHub application programming interface (API).")
3647 (license license:lgpl3+)))
3648
3649 (define-public python-rellu
3650 (package
3651 (name "python-rellu")
3652 (version "0.7")
3653 (source
3654 (origin
3655 (method url-fetch)
3656 (uri (pypi-uri "rellu" version))
3657 (sha256
3658 (base32
3659 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3660 (build-system python-build-system)
3661 (propagated-inputs
3662 `(("python-invoke" ,python-invoke)
3663 ("python-pygithub" ,python-pygithub)))
3664 (home-page "https://github.com/robotframework/rellu")
3665 (synopsis "Utilities to create PyPI releases")
3666 (description "This collection of utilities contains tooling and templates
3667 to assist in creating releases on GitHub and publishing them on PyPI. It is
3668 designed to be used by Robot Framework and tools and libraries in its
3669 ecosystem, but can naturally be used also by other projects.")
3670 (license license:asl2.0)))
3671
3672 (define-public python-robotframework
3673 (package
3674 (name "python-robotframework")
3675 (version "3.2.2")
3676 ;; There are no tests in the PyPI archive.
3677 (source
3678 (origin
3679 (method git-fetch)
3680 (uri (git-reference
3681 (url "https://github.com/robotframework/robotframework")
3682 (commit (string-append "v" version))))
3683 (file-name (git-file-name name version))
3684 (sha256
3685 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3686 (patches (search-patches
3687 "python-robotframework-honor-source-date-epoch.patch"))))
3688 (build-system python-build-system)
3689 (arguments
3690 `(#:phases (modify-phases %standard-phases
3691 (add-before 'build 'build-and-install-doc
3692 (lambda* (#:key outputs #:allow-other-keys)
3693 (let* ((doc-output (assoc-ref outputs "doc"))
3694 (doc (string-append doc-output "/share/"
3695 ,name "-" ,version "/")))
3696 (invoke "invoke" "library-docs" "all")
3697 (mkdir-p doc)
3698 (copy-recursively "doc/libraries"
3699 (string-append doc "/libraries"))
3700 #t)))
3701 (replace 'check
3702 (lambda* (#:key inputs #:allow-other-keys)
3703 ;; Some tests require timezone data. Otherwise, they
3704 ;; look up /etc/localtime, which doesn't exist, and fail
3705 ;; with:
3706 ;;
3707 ;; OverflowError: mktime argument out of range
3708 (setenv "TZDIR"
3709 (string-append (assoc-ref inputs "tzdata")
3710 "/share/zoneinfo"))
3711 (setenv "TZ" "Europe/Paris")
3712
3713 (invoke "python" "utest/run.py"))))))
3714 (native-inputs
3715 `(("python-invoke" ,python-invoke)
3716 ("python-rellu" ,python-rellu)
3717 ("python:tk" ,python "tk") ;used when building the HTML doc
3718 ("tzdata" ,tzdata-for-tests)))
3719 (outputs '("out" "doc"))
3720 (home-page "https://robotframework.org")
3721 (synopsis "Generic automation framework")
3722 (description "Robot Framework is a generic automation framework for
3723 acceptance testing, acceptance test driven development (ATDD), and robotic
3724 process automation (RPA).")
3725 (license license:asl2.0)))
3726
3727 (define-public python-robotframework-lint
3728 ;; There is no properly tagged release; the commit below seems to correspond
3729 ;; to the 0.9 stable release available from PyPI. The tests are not
3730 ;; included in the PyPI archive, so we fetch the sources from the upstream
3731 ;; Git repo.
3732 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3733 (revision "0"))
3734 (package
3735 (name "python-robotframework-lint")
3736 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3737 revision commit))
3738 (source
3739 (origin
3740 (method git-fetch)
3741 (uri (git-reference
3742 (url "https://github.com/boakley/robotframework-lint")
3743 (commit commit)))
3744 (file-name (git-file-name name version))
3745 (sha256
3746 (base32
3747 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3748 (build-system python-build-system)
3749 (arguments
3750 `(#:phases
3751 (modify-phases %standard-phases
3752 (replace 'check
3753 (lambda _
3754 (invoke "python" "-m" "robot" "-A"
3755 "tests/conf/default.args" "tests"))))))
3756 (propagated-inputs
3757 `(("python-robotframework" ,python-robotframework)))
3758 (home-page "https://github.com/boakley/robotframework-lint/")
3759 (synopsis "Static analysis tool (linter) for Robot Framework")
3760 (description "This package provides the @code{rflint} command-line
3761 utility, a static analysis tool (linter) for Robot Framework source files.")
3762 (license license:asl2.0))))
3763
3764 (define-public python-robotframework-sshlibrary
3765 (package
3766 (name "python-robotframework-sshlibrary")
3767 (version "3.3.0")
3768 ;; There are no tests in the PyPI archive.
3769 (source
3770 (origin
3771 (method git-fetch)
3772 (uri (git-reference
3773 (url "https://github.com/robotframework/SSHLibrary")
3774 (commit (string-append "v" version))))
3775 (file-name (git-file-name name version))
3776 (sha256
3777 (base32
3778 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3779 (build-system python-build-system)
3780 (arguments
3781 `(#:phases
3782 (modify-phases %standard-phases
3783 (add-before 'build 'build-and-install-doc
3784 (lambda* (#:key outputs #:allow-other-keys)
3785 (let* ((doc-output (assoc-ref outputs "doc"))
3786 (doc (string-append doc-output "/share/"
3787 ,name "-" ,version "/")))
3788 (invoke "chmod" "-R" "+w" "docs")
3789 (invoke "invoke" "kw-docs" "project-docs")
3790 (mkdir-p doc)
3791 (for-each delete-file (find-files "docs" "\\.rst"))
3792 (copy-recursively "docs" doc)
3793 #t)))
3794 (replace 'check
3795 (lambda _
3796 ;; Some tests require an SSH server; we remove them.
3797 (delete-file "utest/test_client_api.py")
3798 (delete-file "utest/test_scp.py")
3799 (invoke "python" "utest/run.py"))))))
3800 (propagated-inputs
3801 `(("python-robotframework" ,python-robotframework)
3802 ("python-paramiko" ,python-paramiko)
3803 ("python-scp" ,python-scp)))
3804 (native-inputs
3805 `(("openssh" ,openssh)
3806 ("which" ,which)
3807 ;; To generate the documentation
3808 ("python-docutils" ,python-docutils)
3809 ("python-invoke" ,python-invoke)
3810 ("python-pygments" ,python-pygments)
3811 ("python-rellu" ,python-rellu)))
3812 (outputs '("out" "doc"))
3813 (home-page "https://github.com/robotframework/SSHLibrary")
3814 (synopsis "Robot Framework library for SSH and SFTP")
3815 (description "SSHLibrary is a Robot Framework library providing support
3816 for SSH and SFTP. It has the following main usages:
3817 @itemize @bullet
3818 @item Executing commands on the remote machine, either blocking or non-blocking.
3819 @item Writing and reading in an interactive shell.
3820 @item Transferring files and directories over SFTP.
3821 @item Ensuring that files and directories exist on the remote machine.
3822 @end itemize")
3823 (license license:asl2.0)))
3824
3825 (define-public python-rstr
3826 (package
3827 (name "python-rstr")
3828 (version "2.2.6")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (pypi-uri "rstr" version))
3833 (sha256
3834 (base32
3835 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3836 (build-system python-build-system)
3837 (home-page
3838 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3839 (synopsis "Generate random strings in Python")
3840 (description "This package provides a python module for generating
3841 random strings of various types. It could be useful for fuzz testing,
3842 generating dummy data, or other applications. It has no dependencies
3843 outside the standard library.")
3844 (license license:bsd-3)))
3845
3846 (define-public python-scp
3847 (package
3848 (name "python-scp")
3849 (version "0.13.2")
3850 (source
3851 (origin
3852 (method url-fetch)
3853 (uri (pypi-uri "scp" version))
3854 (sha256
3855 (base32
3856 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3857 (build-system python-build-system)
3858 (arguments
3859 '(#:tests? #f)) ;tests require an SSH server
3860 (propagated-inputs
3861 `(("python-paramiko" ,python-paramiko)))
3862 (home-page "https://github.com/jbardin/scp.py")
3863 (synopsis "SCP protocol module for Python and Paramiko")
3864 (description "The scp module extends the Paramiko library to send and
3865 receive files via the SCP1 protocol, as implemented by the OpenSSH
3866 @command{scp} program.")
3867 (license license:gpl2+)))
3868
3869 (define-public python-rst.linker
3870 (package
3871 (name "python-rst.linker")
3872 (version "1.11")
3873 (source
3874 (origin
3875 (method url-fetch)
3876 (uri (pypi-uri "rst.linker" version))
3877 (sha256
3878 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3879 (build-system python-build-system)
3880 (propagated-inputs
3881 `(("python-dateutil" ,python-dateutil)
3882 ("python-six" ,python-six)))
3883 (native-inputs
3884 `(("python-setuptools-scm" ,python-setuptools-scm)))
3885 ;; Test would require path.py, which would introduce a cyclic dependence.
3886 (arguments `(#:tests? #f))
3887 ;; Note: As of version 1.7 the documentation is not worth building.
3888 (home-page "https://github.com/jaraco/rst.linker")
3889 (synopsis "Sphinx plugin to add links and timestamps")
3890 (description "rst.linker automatically replaces text by a
3891 reStructuredText external reference or timestamps. It's primary purpose is to
3892 augment the changelog, but it can be used for other documents, too.")
3893 (license license:expat)))
3894
3895 (define-public python2-rst.linker
3896 (package-with-python2 python-rst.linker))
3897
3898 (define-public python-feedgenerator
3899 (package
3900 (name "python-feedgenerator")
3901 (version "1.9")
3902 (source
3903 (origin
3904 (method url-fetch)
3905 (uri (pypi-uri "feedgenerator" version))
3906 (sha256
3907 (base32
3908 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3909 (modules '((guix build utils)))
3910 (snippet
3911 '(begin
3912 ;; Remove pre-compiled .pyc files from source.
3913 (for-each delete-file-recursively
3914 (find-files "." "__pycache__" #:directories? #t))
3915 (for-each delete-file (find-files "." "\\.pyc$"))
3916 #t))))
3917 (build-system python-build-system)
3918 (propagated-inputs
3919 `(("python-pytz" ,python-pytz)
3920 ("python-six" ,python-six)))
3921 (home-page "https://github.com/getpelican/feedgenerator")
3922 (synopsis
3923 "Standalone version of Django's Atom/RSS feed generator")
3924 (description
3925 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3926 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3927 (license license:bsd-3)))
3928
3929 (define-public python2-feedgenerator
3930 (package-with-python2 python-feedgenerator))
3931
3932 (define-public python-toml
3933 (package
3934 (name "python-toml")
3935 (version "0.10.1")
3936 (source
3937 (origin
3938 (method url-fetch)
3939 (uri (pypi-uri "toml" version))
3940 (sha256
3941 (base32
3942 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3943 (build-system python-build-system)
3944 (arguments
3945 `(#:tests? #f)) ;no tests suite in release
3946 (home-page "https://github.com/uiri/toml")
3947 (synopsis "Library for TOML")
3948 (description
3949 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3950 Language (TOML) configuration files.")
3951 (license license:expat)))
3952
3953 (define-public python-jsonrpc-server
3954 (package
3955 (name "python-jsonrpc-server")
3956 (version "0.3.4")
3957 (source
3958 (origin
3959 (method url-fetch)
3960 (uri (pypi-uri "python-jsonrpc-server" version))
3961 (sha256
3962 (base32
3963 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3964 (build-system python-build-system)
3965 (propagated-inputs
3966 `(("python-mock" ,python-mock)
3967 ("python-pytest" ,python-pytest)
3968 ("python-ujson" ,python-ujson-1)))
3969 (home-page
3970 "https://github.com/palantir/python-jsonrpc-server")
3971 (synopsis "JSON RPC 2.0 server library")
3972 (description
3973 "This package provides a JSON RPC 2.0 server library for Python.")
3974 (license license:expat)))
3975
3976 (define-public python-pydantic
3977 (package
3978 (name "python-pydantic")
3979 (version "1.6.1")
3980 (source
3981 (origin
3982 (method git-fetch)
3983 (uri (git-reference
3984 (url "https://github.com/samuelcolvin/pydantic")
3985 (commit (string-append "v" version))))
3986 (file-name (git-file-name name version))
3987 (sha256
3988 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
3989 (build-system python-build-system)
3990 (arguments
3991 '(#:phases
3992 (modify-phases %standard-phases
3993 ;; Reported upstream:
3994 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
3995 ;; Disable the faulty test as the fix is unclear.
3996 (add-before 'check 'disable-test
3997 (lambda _
3998 (substitute* "tests/test_validators.py"
3999 (("test_assert_raises_validation_error")
4000 "_test_assert_raises_validation_error"))
4001 #t))
4002 (replace 'check
4003 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4004 (native-inputs
4005 `(("python-pytest" ,python-pytest)))
4006 (home-page "https://github.com/samuelcolvin/pydantic")
4007 (synopsis "Python data validation and settings management")
4008 (description
4009 "Pydantic enforces type hints at runtime, and provides user friendly
4010 errors when data is invalid.")
4011 (license license:expat)))
4012
4013 (define-public python-pydocstyle
4014 (package
4015 (name "python-pydocstyle")
4016 (version "3.0.0")
4017 (source
4018 (origin
4019 (method url-fetch)
4020 (uri (pypi-uri "pydocstyle" version))
4021 (sha256
4022 (base32
4023 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4024 (build-system python-build-system)
4025 (propagated-inputs
4026 `(("python-six" ,python-six)
4027 ("python-snowballstemmer" ,python-snowballstemmer)))
4028 (home-page
4029 "https://github.com/PyCQA/pydocstyle/")
4030 (synopsis "Python docstring style checker")
4031 (description
4032 "This package provides a style checker for the Python Language
4033 Server (PLS).")
4034 (license license:expat)))
4035
4036 (define-public python-language-server
4037 (package
4038 (name "python-language-server")
4039 (version "0.34.1")
4040 (source
4041 (origin
4042 (method url-fetch)
4043 (uri (pypi-uri "python-language-server" version))
4044 (sha256
4045 (base32
4046 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
4047 (build-system python-build-system)
4048 (propagated-inputs
4049 `(("python-pluggy" ,python-pluggy)
4050 ("python-jsonrpc-server" ,python-jsonrpc-server)
4051 ("python-jedi" ,python-jedi)
4052 ("python-yapf" ,python-yapf)
4053 ("python-pyflakes" ,python-pyflakes)
4054 ("python-pydocstyle" ,python-pydocstyle)
4055 ("python-pycodestyle" ,python-pycodestyle)
4056 ("python-mccabe" ,python-mccabe)
4057 ("python-rope" ,python-rope)
4058 ("python-autopep8" ,python-autopep8)
4059 ("python-flake8" ,python-flake8)
4060 ("python-pylint" ,python-pylint)))
4061 (home-page "https://github.com/palantir/python-language-server")
4062 (synopsis "Python implementation of the Language Server Protocol")
4063 (description
4064 "The Python Language Server (pyls) is an implementation of the Python 3
4065 language specification for the Language Server Protocol (LSP). This tool is
4066 used in text editing environments to provide a complete and integrated
4067 feature-set for programming Python effectively.")
4068 (license license:expat)))
4069
4070 (define-public python-pathspec
4071 (package
4072 (name "python-pathspec")
4073 (version "0.7.0")
4074 (source
4075 (origin
4076 (method url-fetch)
4077 (uri (pypi-uri "pathspec" version))
4078 (sha256
4079 (base32
4080 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4081 (build-system python-build-system)
4082 (home-page "https://github.com/cpburnz/python-path-specification")
4083 (synopsis "Utility library for gitignore style pattern matching of file paths")
4084 (description
4085 "This package provides a utility library for gitignore style pattern
4086 matching of file paths.")
4087 (license license:mpl2.0)))
4088
4089 (define-public python-black
4090 (package
4091 (name "python-black")
4092 (version "20.8b1")
4093 (source
4094 (origin
4095 (method url-fetch)
4096 (uri (pypi-uri "black" version))
4097 (sha256
4098 (base32
4099 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4100 (build-system python-build-system)
4101 (arguments
4102 `(#:phases
4103 (modify-phases %standard-phases
4104 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4105 (lambda _
4106 (let ((python3 (which "python3")))
4107 (substitute* '("tests/data/fmtonoff.py"
4108 "tests/data/string_prefixes.py"
4109 "tests/data/function.py"
4110 "tests/data/python37.py")
4111 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4112 (string-append "#!" python3 (if (string? minor-version)
4113 minor-version
4114 "")))))
4115 #t))
4116 (add-after 'unpack 'disable-broken-tests
4117 (lambda* (#:key outputs inputs #:allow-other-keys)
4118 ;; Make installed package available for running the tests
4119 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4120 ":" (getenv "PATH")))
4121
4122 ;; These tests are supposed to be skipped when the blackd
4123 ;; dependencies are missing, but this doesn't quite work.
4124 (substitute* "tests/test_black.py"
4125 (("( *)class BlackDTestCase.*" match indent)
4126 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4127 indent "class BlackDTestCase(unittest.TestCase):\n"))
4128 (("web.Application") "False")
4129 (("@unittest_run_loop") ""))
4130
4131 ;; Patching the above file breaks the self test
4132 (substitute* "tests/test_black.py"
4133 (("( *)def test_self" match indent)
4134 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4135
4136 (substitute* "tests/test_black.py"
4137 (("( *)def test_python38" match indent)
4138 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4139 #t)))))
4140 (propagated-inputs
4141 `(("python-click" ,python-click)
4142 ("python-attrs" ,python-attrs)
4143 ("python-appdirs" ,python-appdirs)
4144 ("python-pathspec" ,python-pathspec)
4145 ("python-mypy-extensions" ,python-mypy-extensions)
4146 ("python-regex" ,python-regex)
4147 ("python-toml" ,python-toml)
4148 ("python-typed-ast" ,python-typed-ast)
4149 ("python-typing-extensions" ,python-typing-extensions)))
4150 (native-inputs
4151 `(("python-setuptools-scm" ,python-setuptools-scm)))
4152 (home-page "https://github.com/ambv/black")
4153 (synopsis "The uncompromising code formatter")
4154 (description "Black is the uncompromising Python code formatter.")
4155 (license license:expat)))
4156
4157 (define-public python-black-macchiato
4158 (package
4159 (name "python-black-macchiato")
4160 (version "1.3.0")
4161 (source
4162 (origin
4163 (method url-fetch)
4164 (uri (pypi-uri "black-macchiato" version))
4165 (sha256
4166 (base32
4167 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4168 (build-system python-build-system)
4169 (propagated-inputs
4170 `(("python-black" ,python-black)))
4171 (home-page "https://github.com/wbolster/black-macchiato")
4172 (synopsis "Partial @code{python-black} formatting")
4173 (description
4174 "This package is built on top the @{python-black} code formatter to
4175 enable formatting of partial files.")
4176 (license license:bsd-3)))
4177
4178 (define-public python-blinker
4179 (package
4180 (name "python-blinker")
4181 (version "1.4")
4182 (source
4183 (origin
4184 (method url-fetch)
4185 (uri (pypi-uri "blinker" version))
4186 (sha256
4187 (base32
4188 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4189 (build-system python-build-system)
4190 (home-page "https://pythonhosted.org/blinker/")
4191 (synopsis "Fast, simple object-to-object and broadcast signaling")
4192 (description
4193 "Blinker provides a fast dispatching system that allows any number of
4194 interested parties to subscribe to events, or \"signals\".")
4195 (license license:expat)))
4196
4197 (define-public python2-blinker
4198 (package-with-python2 python-blinker))
4199
4200 (define-public pelican
4201 (package
4202 (name "pelican")
4203 (version "4.2.0")
4204 (source
4205 (origin
4206 (method url-fetch)
4207 (uri (pypi-uri "pelican" version))
4208 (sha256
4209 (base32
4210 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4211 (build-system python-build-system)
4212 (propagated-inputs
4213 `(("python-blinker" ,python-blinker)
4214 ("python-dateutil" ,python-dateutil)
4215 ("python-docutils" ,python-docutils)
4216 ("python-feedgenerator" ,python-feedgenerator)
4217 ("python-jinja2" ,python-jinja2)
4218 ("python-markdown" ,python-markdown)
4219 ("python-pygments" ,python-pygments)
4220 ("python-pytz" ,python-pytz)
4221 ("python-six" ,python-six)
4222 ("python-unidecode" ,python-unidecode)))
4223 (home-page "https://getpelican.com/")
4224 (arguments
4225 `(;; XXX Requires a lot more packages to do unit tests :P
4226 #:tests? #f))
4227 (synopsis "Python-based static site publishing system")
4228 (description
4229 "Pelican is a tool to generate a static blog from reStructuredText,
4230 Markdown input files, and more. Pelican uses Jinja2 for templating
4231 and is very extensible.")
4232 (license license:agpl3+)))
4233
4234 (define-public mallard-ducktype
4235 (package
4236 (name "mallard-ducktype")
4237 (version "1.0.2")
4238 (source
4239 (origin
4240 (method git-fetch)
4241 ;; git-reference because tests are not included in pypi source tarball
4242 ;; https://issues.guix.gnu.org/issue/36755#2
4243 (uri (git-reference
4244 (url "https://github.com/projectmallard/mallard-ducktype")
4245 (commit version)))
4246 (file-name (git-file-name name version))
4247 (sha256
4248 (base32
4249 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4250 (build-system python-build-system)
4251 (arguments
4252 '(#:phases
4253 (modify-phases %standard-phases
4254 (replace 'check
4255 (lambda _
4256 (with-directory-excursion "tests"
4257 (invoke "sh" "runtests")))))))
4258 (home-page "http://projectmallard.org")
4259 (synopsis "Convert Ducktype to Mallard documentation markup")
4260 (description
4261 "Ducktype is a lightweight syntax that can represent all the semantics
4262 of the Mallard XML documentation system. Ducktype files can be converted to
4263 Mallard using the @command{ducktype} tool. The yelp-tools package
4264 provides additional functionality on the produced Mallard documents.")
4265 (license license:expat)))
4266
4267 (define-public python-cython
4268 (package
4269 (name "python-cython")
4270 (version "0.29.17")
4271 (source
4272 (origin
4273 (method url-fetch)
4274 (uri (pypi-uri "Cython" version))
4275 (sha256
4276 (base32
4277 "1wnaz40hdw4mg5acz5gqb6bhjhn4cvfxg0xdzfy7aa6qn665hqb3"))))
4278 (build-system python-build-system)
4279 ;; we need the full python package and not just the python-wrapper
4280 ;; because we need libpython3.3m.so
4281 (inputs
4282 `(("python" ,python)))
4283 (arguments
4284 `(#:phases
4285 (modify-phases %standard-phases
4286 (add-before 'check 'set-HOME
4287 ;; some tests require access to "$HOME/.cython"
4288 (lambda _ (setenv "HOME" "/tmp") #t))
4289 (replace 'check
4290 (lambda _
4291 ;; Disable compiler optimizations to greatly reduce the running
4292 ;; time of the test suite.
4293 (setenv "CFLAGS" "-O0")
4294
4295 (invoke "python" "runtests.py" "-vv"
4296 "-j" (number->string (parallel-job-count))
4297 ;; XXX: On 32-bit architectures, running the parallel tests
4298 ;; fails on many-core systems, see
4299 ;; <https://github.com/cython/cython/issues/2807>.
4300 ,@(if (not (target-64bit?))
4301 '("-x" "run.parallel")
4302 '())))))))
4303 (home-page "https://cython.org/")
4304 (synopsis "C extensions for Python")
4305 (description "Cython is an optimising static compiler for both the Python
4306 programming language and the extended Cython programming language. It makes
4307 writing C extensions for Python as easy as Python itself.")
4308 (license license:asl2.0)
4309 (properties `((python2-variant . ,(delay python2-cython))))))
4310
4311 (define-public python2-cython
4312 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4313 (package
4314 (inherit base)
4315 (name "python2-cython")
4316 (inputs
4317 `(("python-2" ,python-2))) ;this is not automatically changed
4318 (arguments
4319 (substitute-keyword-arguments (package-arguments base)
4320 ((#:phases phases)
4321 `(modify-phases ,phases
4322 (add-before 'check 'adjust-test_embed
4323 (lambda _
4324 (substitute* "runtests.py"
4325 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4326 ;; so it can give the right -L flag to GCC when embedding static
4327 ;; builds of Python. It is unaware that the Python "config"
4328 ;; directory (where the static library lives) was renamed in
4329 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4330 ;; which works fine, because that is where the shared library is.
4331 ;;
4332 ;; It also appears to be unaware that the Makefile in Demos/embed
4333 ;; already unconditionally pass the static library location to GCC,
4334 ;; after checking sysconfig.get_config_var('LIBPL).
4335 ;;
4336 ;; The effect is that the linker is unable to resolve libexpat
4337 ;; symbols when building for Python 2, because neither the Python 2
4338 ;; shared library nor Expat is available. To fix it, we can either
4339 ;; add Expat as an input and make it visible to the linker, or just
4340 ;; prevent it from overriding the Python shared library location.
4341 ;; The end result is identical, so we take the easy route.
4342 ((" or libname not in os\\.listdir\\(libdir\\)")
4343 ""))
4344 #t)))))))))
4345
4346 ;; The RPython toolchain currently does not support Python 3.
4347 (define-public python2-rpython
4348 (package
4349 (name "python2-rpython")
4350 (version "0.2.1")
4351 (source
4352 (origin
4353 (method url-fetch)
4354 (uri (pypi-uri "rpython" version))
4355 (sha256
4356 (base32
4357 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4358 (build-system python-build-system)
4359 (arguments `(#:python ,python-2))
4360 (native-inputs
4361 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4362 (home-page "https://rpython.readthedocs.org")
4363 (synopsis "Framework for implementing interpreters and virtual machines")
4364 (description "RPython is a translation and support framework for
4365 producing implementations of dynamic languages, emphasizing a clean separation
4366 between language specification and implementation aspects.")
4367 (license license:expat)))
4368
4369 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4370 ;; python-scipy still build, as these three packages are often used together.
4371 (define-public python-numpy
4372 (package
4373 (name "python-numpy")
4374 (version "1.17.3")
4375 (source
4376 (origin
4377 (method url-fetch)
4378 (uri (string-append
4379 "https://github.com/numpy/numpy/releases/download/v"
4380 version "/numpy-" version ".tar.gz"))
4381 (sha256
4382 (base32
4383 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4384 (build-system python-build-system)
4385 (inputs
4386 `(("openblas" ,openblas)
4387 ("lapack" ,lapack)))
4388 (native-inputs
4389 `(("python-cython" ,python-cython)
4390 ("python-pytest" ,python-pytest)
4391 ("gfortran" ,gfortran)))
4392 (arguments
4393 `(#:phases
4394 (modify-phases %standard-phases
4395 (add-before 'build 'configure-blas-lapack
4396 (lambda* (#:key inputs #:allow-other-keys)
4397 (call-with-output-file "site.cfg"
4398 (lambda (port)
4399 (format port
4400 "[openblas]
4401 libraries = openblas
4402 library_dirs = ~a/lib
4403 include_dirs = ~a/include
4404
4405 # backslash-n to make emacs happy
4406 \n[lapack]
4407 lapack_libs = lapack
4408 library_dirs = ~a/lib
4409 include_dirs = ~a/include
4410 "
4411 (assoc-ref inputs "openblas")
4412 (assoc-ref inputs "openblas")
4413 (assoc-ref inputs "lapack")
4414 (assoc-ref inputs "lapack"))))
4415 #t))
4416 (add-before 'build 'fix-executable-paths
4417 (lambda* (#:key inputs #:allow-other-keys)
4418 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4419 ;; instead of /bin/sh.
4420 (substitute* "numpy/distutils/exec_command.py"
4421 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4422 (string-append match-start (assoc-ref inputs "bash") match-end)))
4423 ;; Use "gcc" executable, not "cc".
4424 (substitute* "numpy/distutils/system_info.py"
4425 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4426 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4427 #t))
4428 ;; Tests can only be run after the library has been installed and not
4429 ;; within the source directory.
4430 (delete 'check)
4431 (add-after 'install 'check
4432 (lambda* (#:key outputs inputs #:allow-other-keys)
4433 ;; Make installed package available for running the tests
4434 (add-installed-pythonpath inputs outputs)
4435 ;; Make sure "f2py" etc is found.
4436 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4437 ":" (getenv "PATH")))
4438 (with-directory-excursion "/tmp"
4439 (invoke "python" "-c"
4440 "import numpy; numpy.test(verbose=2)")))))))
4441 (home-page "https://numpy.org")
4442 (synopsis "Fundamental package for scientific computing with Python")
4443 (description "NumPy is the fundamental package for scientific computing
4444 with Python. It contains among other things: a powerful N-dimensional array
4445 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4446 and Fortran code, useful linear algebra, Fourier transform, and random number
4447 capabilities.")
4448 (properties `((python2-variant . ,(delay python2-numpy))))
4449 (license license:bsd-3)))
4450
4451 ;; Numpy 1.16.x are the last versions that support Python 2.
4452 (define-public python2-numpy
4453 (let ((numpy (package-with-python2
4454 (strip-python2-variant python-numpy))))
4455 (package/inherit
4456 numpy
4457 (version "1.16.5")
4458 (source (origin
4459 (method url-fetch)
4460 (uri (string-append
4461 "https://github.com/numpy/numpy/releases/download/v"
4462 version "/numpy-" version ".tar.gz"))
4463 (sha256
4464 (base32
4465 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4466
4467 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4468 ;; interest only for legacy code going back to NumPy's predecessor
4469 ;; Numeric.
4470 (define-public python2-numpy-1.8
4471 (package (inherit python2-numpy)
4472 (version "1.8.2")
4473 (source
4474 (origin
4475 (method git-fetch)
4476 (uri (git-reference
4477 (url "https://github.com/numpy/numpy")
4478 (commit (string-append "v" version))))
4479 (file-name (git-file-name "numpy" version))
4480 (sha256
4481 (base32
4482 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4483 (arguments
4484 (substitute-keyword-arguments (package-arguments python2-numpy)
4485 ((#:phases phases)
4486 `(modify-phases ,phases
4487 (replace 'configure-blas-lapack
4488 (lambda* (#:key inputs #:allow-other-keys)
4489 (call-with-output-file "site.cfg"
4490 (lambda (port)
4491 (format port
4492 "[openblas]
4493 libraries = openblas,lapack
4494 library_dirs = ~a/lib:~a/lib
4495 include_dirs = ~a/include:~a/include
4496 "
4497 (assoc-ref inputs "openblas")
4498 (assoc-ref inputs "lapack")
4499 (assoc-ref inputs "openblas")
4500 (assoc-ref inputs "lapack"))))
4501 #t))))))
4502 (native-inputs
4503 `(("python2-nose" ,python2-nose)))
4504 (description "NumPy is the fundamental package for scientific computing
4505 with Python. It contains among other things: a powerful N-dimensional array
4506 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4507 and Fortran code, useful linear algebra, Fourier transform, and random number
4508 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4509 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4510 Numeric.")
4511 (license license:bsd-3)))
4512
4513 (define-public python-munch
4514 (package
4515 (name "python-munch")
4516 (version "2.0.4")
4517 (source
4518 (origin
4519 (method url-fetch)
4520 (uri (pypi-uri "munch" version))
4521 (sha256
4522 (base32
4523 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4524 (build-system python-build-system)
4525 (home-page "https://github.com/Infinidat/munch")
4526 (synopsis "Dot-accessible dictionary")
4527 (description "Munch is a dot-accessible dictionary similar to JavaScript
4528 objects.")
4529 (license license:expat)))
4530
4531 (define-public python2-munch
4532 (package-with-python2 python-munch))
4533
4534 (define-public python-colormath
4535 (package
4536 (name "python-colormath")
4537 (version "3.0.0")
4538 (source
4539 (origin
4540 (method url-fetch)
4541 (uri (pypi-uri "colormath" version))
4542 (sha256
4543 (base32
4544 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4545 (build-system python-build-system)
4546 (propagated-inputs
4547 `(("python-networkx" ,python-networkx)
4548 ("python-numpy" ,python-numpy)))
4549 (home-page "https://github.com/gtaylor/python-colormath")
4550 (synopsis "Color math and conversion library")
4551 (description
4552 "This is a Python library for color math and conversions.")
4553 (license license:bsd-3)))
4554
4555 (define-public python2-colormath
4556 (package-with-python2 python-colormath))
4557
4558 (define-public python-spectra
4559 (package
4560 (name "python-spectra")
4561 (version "0.0.11")
4562 (source
4563 (origin
4564 (method url-fetch)
4565 (uri (pypi-uri "spectra" version))
4566 (sha256
4567 (base32
4568 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4569 (build-system python-build-system)
4570 (arguments
4571 `(#:phases
4572 (modify-phases %standard-phases
4573 (replace 'check
4574 (lambda _ (invoke "nosetests" "-v"))))))
4575 (propagated-inputs
4576 `(("python-colormath" ,python-colormath)))
4577 (native-inputs
4578 `(("python-nose" ,python-nose)))
4579 (home-page "https://github.com/jsvine/spectra")
4580 (synopsis "Color scales and color conversion")
4581 (description
4582 "This package provides a Python library intended to make color math,
4583 color scales, and color space conversion easy. It has support for:
4584
4585 @enumerate
4586 @item Color scales
4587 @item Color ranges
4588 @item Color blending
4589 @item Brightening/darkening colors
4590 @item Saturating/desaturating colors
4591 @item Conversion to/from multiple color spaces.
4592 @end enumerate\n")
4593 (license license:expat)))
4594
4595 (define-public python2-spectra
4596 (package-with-python2 python-spectra))
4597
4598 (define-public python-numpy-documentation
4599 (package
4600 (name "python-numpy-documentation")
4601 (version (package-version python-numpy))
4602 (source (package-source python-numpy))
4603 (build-system python-build-system)
4604 (native-inputs
4605 `(("python-matplotlib" ,python-matplotlib)
4606 ("python-numpy" ,python-numpy)
4607 ("pkg-config" ,pkg-config)
4608 ("python-sphinx" ,python-sphinx)
4609 ("python-numpydoc" ,python-numpydoc)
4610 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4611 texlive-fonts-ec
4612 texlive-generic-ifxetex
4613 texlive-generic-pdftex
4614 texlive-amsfonts
4615 texlive-latex-capt-of
4616 texlive-latex-cmap
4617 texlive-latex-environ
4618 texlive-latex-eqparbox
4619 texlive-latex-etoolbox
4620 texlive-latex-expdlist
4621 texlive-latex-fancyhdr
4622 texlive-latex-fancyvrb
4623 texlive-latex-fncychap
4624 texlive-latex-float
4625 texlive-latex-framed
4626 texlive-latex-geometry
4627 texlive-latex-graphics
4628 texlive-latex-hyperref
4629 texlive-latex-mdwtools
4630 texlive-latex-multirow
4631 texlive-latex-needspace
4632 texlive-latex-oberdiek
4633 texlive-latex-parskip
4634 texlive-latex-preview
4635 texlive-latex-tabulary
4636 texlive-latex-threeparttable
4637 texlive-latex-titlesec
4638 texlive-latex-trimspaces
4639 texlive-latex-ucs
4640 texlive-latex-upquote
4641 texlive-latex-url
4642 texlive-latex-varwidth
4643 texlive-latex-wrapfig)))
4644 ("texinfo" ,texinfo)
4645 ("perl" ,perl)
4646 ("scipy-sphinx-theme"
4647 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4648 (method git-fetch)
4649 (uri (git-reference
4650 (url "https://github.com/scipy/scipy-sphinx-theme")
4651 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4652 (sha256
4653 (base32
4654 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4655 ,@(package-native-inputs python-numpy)))
4656 (arguments
4657 `(#:tests? #f ; we're only generating the documentation
4658 #:phases
4659 (modify-phases %standard-phases
4660 (delete 'build)
4661 (replace 'install
4662 (lambda* (#:key inputs outputs #:allow-other-keys)
4663 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4664 (doc (string-append
4665 data "/doc/" ,name "-"
4666 ,(package-version python-numpy)))
4667 (info-reader (string-append data "/info"))
4668 (html (string-append doc "/html"))
4669 (scipy-sphinx-theme "scipy-sphinx-theme")
4670 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4671 (pyver ,(string-append "PYVER=")))
4672
4673 ;; FIXME: this is needed to for texlive-union to generate
4674 ;; fonts, which are not found.
4675 (setenv "HOME" "/tmp")
4676
4677 (with-directory-excursion "doc"
4678 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4679 (mkdir-p html)
4680 (invoke "make" "html" pyver)
4681 (invoke "make" "latex" "PAPER=a4" pyver)
4682 (invoke "make" "-C" "build/latex"
4683 "all-pdf" "PAPER=a4" pyver)
4684 ;; FIXME: Generation of the info file fails.
4685 ;; (invoke "make" "info" pyver)
4686 ;; (mkdir-p info)
4687 ;; (copy-file "build/texinfo/numpy.info"
4688 ;; (string-append info "/numpy.info"))
4689 (for-each (lambda (file)
4690 (copy-file (string-append "build/latex" file)
4691 (string-append doc file)))
4692 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4693 (with-directory-excursion "build/html"
4694 (for-each (lambda (file)
4695 (let* ((dir (dirname file))
4696 (tgt-dir (string-append html "/" dir)))
4697 (unless (equal? "." dir)
4698 (mkdir-p tgt-dir))
4699 (install-file file html)))
4700 (find-files "." ".*")))))
4701 #t)))))
4702 (home-page (package-home-page python-numpy))
4703 (synopsis "Documentation for the python-numpy package")
4704 (description (package-description python-numpy))
4705 (license (package-license python-numpy))))
4706
4707 (define-public python2-numpy-documentation
4708 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4709 (package
4710 (inherit numpy-documentation)
4711 (native-inputs `(("python2-functools32" ,python2-functools32)
4712 ,@(package-native-inputs numpy-documentation))))))
4713
4714 (define-public python-pygit2
4715 (package
4716 (name "python-pygit2")
4717 (version "1.1.0")
4718 (source
4719 (origin
4720 (method url-fetch)
4721 (uri (pypi-uri "pygit2" version))
4722 (sha256
4723 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4724 (build-system python-build-system)
4725 (arguments
4726 '(#:tests? #f)) ; tests don't run correctly in our environment
4727 (propagated-inputs
4728 `(("python-cached-property" ,python-cached-property)
4729 ("python-cffi" ,python-cffi)
4730 ("libgit2" ,libgit2)))
4731 (native-inputs
4732 `(("python-pytest" ,python-pytest)))
4733 (home-page "https://github.com/libgit2/pygit2")
4734 (synopsis "Python bindings for libgit2")
4735 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4736 library, libgit2 implements Git plumbing.")
4737 ;; GPL2.0 only, with linking exception.
4738 (license license:gpl2)))
4739
4740 (define-public python-patiencediff
4741 (package
4742 (name "python-patiencediff")
4743 (version "0.2.0")
4744 (source
4745 (origin
4746 (method url-fetch)
4747 (uri (pypi-uri "patiencediff" version))
4748 (sha256
4749 (base32
4750 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4751 (build-system python-build-system)
4752 (home-page "https://www.breezy-vcs.org/")
4753 (synopsis "Python implementation of the patiencediff algorithm")
4754 (description
4755 "This package contains a Python implementation of the @code{patiencediff}
4756 algorithm. Patiencediff provides a good balance of performance, nice output for
4757 humans, and implementation simplicity.")
4758 (license license:gpl2)))
4759
4760 (define-public python-pyparsing
4761 (package
4762 (name "python-pyparsing")
4763 (version "2.4.6")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri (pypi-uri "pyparsing" version))
4768 (sha256
4769 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4770 (build-system python-build-system)
4771 (outputs '("out" "doc"))
4772 (arguments
4773 `(#:tests? #f ; no test target
4774 #:phases
4775 (modify-phases %standard-phases
4776 (add-after 'install 'install-doc
4777 (lambda* (#:key outputs #:allow-other-keys)
4778 (let* ((doc (string-append (assoc-ref outputs "doc")
4779 "/share/doc/" ,name "-" ,version))
4780 (html-doc (string-append doc "/html"))
4781 (examples (string-append doc "/examples")))
4782 (mkdir-p html-doc)
4783 (mkdir-p examples)
4784 (for-each
4785 (lambda (dir tgt)
4786 (map (lambda (file)
4787 (install-file file tgt))
4788 (find-files dir ".*")))
4789 (list "docs" "htmldoc" "examples")
4790 (list doc html-doc examples))
4791 #t))))))
4792 (home-page "https://github.com/pyparsing/pyparsing")
4793 (synopsis "Python parsing class library")
4794 (description
4795 "The pyparsing module is an alternative approach to creating and
4796 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4797 of regular expressions. The pyparsing module provides a library of classes
4798 that client code uses to construct the grammar directly in Python code.")
4799 (license license:expat)))
4800
4801 (define-public python2-pyparsing
4802 (package-with-python2 python-pyparsing))
4803
4804 (define-public python-pyparsing-2.4.7
4805 (package
4806 (inherit python-pyparsing)
4807 (version "2.4.7")
4808 (source
4809 (origin
4810 (method url-fetch)
4811 (uri (pypi-uri "pyparsing" version))
4812 (sha256
4813 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4814
4815 (define-public python-numpydoc
4816 (package
4817 (name "python-numpydoc")
4818 (version "0.8.0")
4819 (source
4820 (origin
4821 (method url-fetch)
4822 (uri (pypi-uri "numpydoc" version))
4823 (sha256
4824 (base32
4825 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4826 (build-system python-build-system)
4827 (propagated-inputs
4828 `(("python-sphinx" ,python-sphinx)))
4829 (native-inputs
4830 `(("python-nose" ,python-nose)))
4831 (home-page "https://pypi.org/project/numpydoc/")
4832 (synopsis
4833 "Numpy's Sphinx extensions")
4834 (description
4835 "Sphinx extension to support docstrings in Numpy format.")
4836 (license license:bsd-2)))
4837
4838 (define-public python2-numpydoc
4839 (package-with-python2 python-numpydoc))
4840
4841 (define-public python-numexpr
4842 (package
4843 (name "python-numexpr")
4844 (version "2.6.5")
4845 (source
4846 (origin
4847 (method url-fetch)
4848 (uri (pypi-uri "numexpr" version))
4849 (sha256
4850 (base32
4851 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4852 (build-system python-build-system)
4853 (arguments `(#:tests? #f)) ; no tests included
4854 (propagated-inputs
4855 `(("python-numpy" ,python-numpy)))
4856 (home-page "https://github.com/pydata/numexpr")
4857 (synopsis "Fast numerical expression evaluator for NumPy")
4858 (description
4859 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4860 expressions that operate on arrays are accelerated and use less memory than
4861 doing the same calculation in Python. In addition, its multi-threaded
4862 capabilities can make use of all your cores, which may accelerate
4863 computations, most specially if they are not memory-bounded (e.g. those using
4864 transcendental functions).")
4865 (license license:expat)))
4866
4867 (define-public python2-numexpr
4868 (package-with-python2 python-numexpr))
4869
4870 (define-public python-cycler
4871 (package
4872 (name "python-cycler")
4873 (version "0.10.0")
4874 (source (origin
4875 (method url-fetch)
4876 (uri (pypi-uri "cycler" version))
4877 (sha256
4878 (base32
4879 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4880 (build-system python-build-system)
4881 (arguments
4882 ;; XXX: The current version requires 'coveralls' which we don't have.
4883 ;; Enable this for the next release which uses 'python-pytest'.
4884 '(#:tests? #f))
4885 (propagated-inputs
4886 `(("python-six" ,python-six)))
4887 (home-page "http://matplotlib.org/cycler/")
4888 (synopsis "Composable keyword argument iterator")
4889 (description
4890 "When using @code{matplotlib} and plotting more than one line, it is
4891 common to want to be able to want to be able to cycle over one or more artist
4892 styles; but the plotting logic can quickly become involved.
4893 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4894 @code{Cycler} class was developed.")
4895 (license license:bsd-3)))
4896
4897 (define-public python2-cycler
4898 (package-with-python2 python-cycler))
4899
4900 (define-public python-colorspacious
4901 (package
4902 (name "python-colorspacious")
4903 (version "1.1.2")
4904 (source
4905 (origin
4906 (method git-fetch)
4907 (uri (git-reference
4908 (url "https://github.com/njsmith/colorspacious")
4909 (commit (string-append "v" version))))
4910 (file-name (git-file-name name version))
4911 (sha256
4912 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4913 (build-system python-build-system)
4914 (propagated-inputs
4915 `(("python-numpy" ,python-numpy)))
4916 (native-inputs
4917 `(("python-nose" ,python-nose)))
4918 (arguments
4919 `(#:phases
4920 (modify-phases %standard-phases
4921 (replace 'check
4922 (lambda _
4923 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4924 (home-page "https://github.com/njsmith/colorspacious")
4925 (synopsis "Python library for colorspace conversions")
4926 (description "@code{colorspacious} is a Python library that lets you
4927 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4928 (license license:expat)))
4929
4930 (define-public python2-colorspacious
4931 (package-with-python2 python-colorspacious))
4932
4933 (define-public python-matplotlib
4934 (package
4935 (name "python-matplotlib")
4936 (version "3.1.2")
4937 (source
4938 (origin
4939 (method url-fetch)
4940 (uri (pypi-uri "matplotlib" version))
4941 (sha256
4942 (base32
4943 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4944 (build-system python-build-system)
4945 (propagated-inputs ; the following packages are all needed at run time
4946 `(("python-cycler" ,python-cycler)
4947 ("python-kiwisolver" ,python-kiwisolver)
4948 ("python-pyparsing" ,python-pyparsing)
4949 ("python-pygobject" ,python-pygobject)
4950 ("gobject-introspection" ,gobject-introspection)
4951 ("python-tkinter" ,python "tk")
4952 ("python-dateutil" ,python-dateutil)
4953 ("python-numpy" ,python-numpy)
4954 ("python-pillow" ,python-pillow)
4955 ("python-pytz" ,python-pytz)
4956 ("python-six" ,python-six)
4957 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4958 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4959 ;; object. For this reason we need to import both libraries.
4960 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4961 ("python-pycairo" ,python-pycairo)
4962 ("python-cairocffi" ,python-cairocffi)))
4963 (inputs
4964 `(("libpng" ,libpng)
4965 ("imagemagick" ,imagemagick)
4966 ("freetype" ,freetype)
4967 ("cairo" ,cairo)
4968 ("glib" ,glib)
4969 ;; FIXME: Add backends when available.
4970 ;("python-wxpython" ,python-wxpython)
4971 ("tcl" ,tcl)
4972 ("tk" ,tk)))
4973 (native-inputs
4974 `(("pkg-config" ,pkg-config)
4975 ("python-pytest" ,python-pytest)
4976 ("python-mock" ,python-mock)
4977 ("unzip" ,unzip)
4978 ("jquery-ui"
4979 ,(origin
4980 (method url-fetch)
4981 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4982 (sha256
4983 (base32
4984 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4985 (arguments
4986 `(#:phases
4987 (modify-phases %standard-phases
4988 ;; XXX We disable all image comparison tests because we're using a
4989 ;; newer version of FreeType than matplotlib expects. This leads to
4990 ;; minor differences throughout the tests.
4991 (add-after 'unpack 'fix-and-disable-failing-tests
4992 (lambda _
4993 (substitute* (append (find-files "lib/matplotlib/tests/"
4994 "test_.*\\.py$")
4995 (find-files "lib/mpl_toolkits/tests"
4996 "test_.*\\.py$"))
4997 (("^from matplotlib" match)
4998 (string-append "import pytest\n" match))
4999 (("( *)@image_comparison" match indent)
5000 (string-append indent
5001 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5002 match)))
5003 (substitute* "lib/matplotlib/tests/test_animation.py"
5004 (("/bin/sh") (which "sh")))
5005 (for-each delete-file
5006 ;; test_normal_axes, test_get_tightbbox_polar
5007 '("lib/matplotlib/tests/test_axes.py"
5008 ;; We don't use the webagg backend and this test forces it.
5009 "lib/matplotlib/tests/test_backend_webagg.py"
5010 ;; test_outward_ticks
5011 "lib/matplotlib/tests/test_tightlayout.py"
5012 ;; test_hidden_axes fails with minor extent
5013 ;; differences, possibly due to the use of a
5014 ;; different version of FreeType.
5015 "lib/matplotlib/tests/test_constrainedlayout.py"
5016 ;; Fontconfig returns no fonts.
5017 "lib/matplotlib/tests/test_font_manager.py"))
5018 #t))
5019 (add-before 'install 'install-jquery-ui
5020 (lambda* (#:key outputs inputs #:allow-other-keys)
5021 (let ((dir (string-append (assoc-ref outputs "out")
5022 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5023 (mkdir-p dir)
5024 (invoke "unzip"
5025 (assoc-ref inputs "jquery-ui")
5026 "-d" dir))
5027 #t))
5028 (replace 'check
5029 (lambda* (#:key outputs inputs #:allow-other-keys)
5030 (add-installed-pythonpath inputs outputs)
5031 (invoke "python" "tests.py" "-v"
5032 "-m" "not network and not webagg")))
5033 (add-before 'build 'configure-environment
5034 (lambda* (#:key outputs inputs #:allow-other-keys)
5035 (let ((cairo (assoc-ref inputs "cairo")))
5036 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5037 ;; has not effect.
5038 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5039 (setenv "HOME" (getcwd))
5040 (call-with-output-file "setup.cfg"
5041 (lambda (port)
5042 (format port "[directories]~%
5043 basedirlist = ~a,~a~%
5044 [packages]~%
5045 tests = True~%"
5046 (assoc-ref inputs "tcl")
5047 (assoc-ref inputs "tk")))))
5048 #t)))))
5049 (home-page "https://matplotlib.org/")
5050 (synopsis "2D plotting library for Python")
5051 (description
5052 "Matplotlib is a Python 2D plotting library which produces publication
5053 quality figures in a variety of hardcopy formats and interactive environments
5054 across platforms. Matplotlib can be used in Python scripts, the python and
5055 ipython shell, web application servers, and six graphical user interface
5056 toolkits.")
5057 (license license:psfl)
5058 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5059
5060 (define-public python2-matplotlib
5061 (let ((matplotlib (package-with-python2
5062 (strip-python2-variant python-matplotlib))))
5063 (package (inherit matplotlib)
5064 (version "2.2.4")
5065 (source
5066 (origin
5067 (method url-fetch)
5068 (uri (pypi-uri "matplotlib" version))
5069 (sha256
5070 (base32
5071 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5072 (arguments
5073 (substitute-keyword-arguments (package-arguments matplotlib)
5074 ((#:phases phases)
5075 `(modify-phases ,phases
5076 (replace 'install-jquery-ui
5077 (lambda* (#:key outputs inputs #:allow-other-keys)
5078 (let ((dir (string-append (assoc-ref outputs "out")
5079 "/lib/python2.7/site-packages/"
5080 "matplotlib/backends/web_backend/")))
5081 (mkdir-p dir)
5082 (invoke "unzip"
5083 (assoc-ref inputs "jquery-ui")
5084 "-d" dir))
5085 #t))
5086 (delete 'fix-and-disable-failing-tests)
5087 (delete 'check))))) ; These tests weren't run the the past.
5088 ;; Make sure to use special packages for Python 2 instead
5089 ;; of those automatically rewritten by package-with-python2.
5090 (propagated-inputs
5091 `(("python2-pycairo" ,python2-pycairo)
5092 ("python2-backports-functools-lru-cache"
5093 ,python2-backports-functools-lru-cache)
5094 ("python2-functools32" ,python2-functools32)
5095 ("python2-pygobject-2" ,python2-pygobject-2)
5096 ("python2-subprocess32" ,python2-subprocess32)
5097 ("python2-tkinter" ,python-2 "tk")
5098 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5099 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5100
5101 (define-public python-matplotlib-documentation
5102 (package
5103 (name "python-matplotlib-documentation")
5104 (version (package-version python-matplotlib))
5105 (source (package-source python-matplotlib))
5106 (build-system python-build-system)
5107 (native-inputs
5108 `(("python-matplotlib" ,python-matplotlib)
5109 ("python-colorspacious" ,python-colorspacious)
5110 ("python-sphinx" ,python-sphinx)
5111 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5112 ("python-sphinx-gallery" ,python-sphinx-gallery)
5113 ("python-numpydoc" ,python-numpydoc)
5114 ("python-ipython" ,python-ipython)
5115 ("python-ipykernel" ,python-ipykernel)
5116 ("python-mock" ,python-mock)
5117 ("graphviz" ,graphviz)
5118 ("texlive" ,(texlive-union (list texlive-amsfonts
5119 texlive-latex-amsmath
5120 texlive-latex-enumitem
5121 texlive-latex-expdlist
5122 texlive-latex-geometry
5123 texlive-latex-preview
5124 texlive-latex-type1cm
5125 texlive-latex-ucs
5126
5127 texlive-generic-pdftex
5128
5129 texlive-fonts-ec
5130 texlive-fonts-adobe-times
5131 texlive-fonts-txfonts)))
5132 ("texinfo" ,texinfo)
5133 ,@(package-native-inputs python-matplotlib)))
5134 (arguments
5135 `(#:tests? #f ; we're only generating documentation
5136 #:phases
5137 (modify-phases %standard-phases
5138 ;; The tests in python-matplotlib are run after the install phase, so
5139 ;; we need to delete the extra phase here.
5140 (delete 'check)
5141 (replace 'build
5142 (lambda _
5143 (chdir "doc")
5144 (setenv "PYTHONPATH"
5145 (string-append (getenv "PYTHONPATH")
5146 ":" (getcwd) "/../examples/units"))
5147 (substitute* "conf.py"
5148 ;; Don't use git.
5149 (("^SHA = check_output.*")
5150 (string-append "SHA = \"" ,version "\"\n"))
5151 ;; Don't fetch intersphinx files from the Internet
5152 (("^explicit_order_folders" m)
5153 (string-append "intersphinx_mapping = {}\n" m))
5154 (("'sphinx.ext.intersphinx',") "")
5155 ;; Disable URL embedding which requires internet access.
5156 (("'https://docs.scipy.org/doc/numpy'") "None")
5157 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5158 (invoke "make"
5159 "SPHINXBUILD=sphinx-build"
5160 "SPHINXOPTS=" ; don't abort on warnings
5161 "html" "texinfo")))
5162 (replace 'install
5163 (lambda* (#:key inputs outputs #:allow-other-keys)
5164 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5165 (doc (string-append data "/doc/python-matplotlib-" ,version))
5166 (info (string-append data "/info"))
5167 (html (string-append doc "/html")))
5168 (mkdir-p html)
5169 (mkdir-p info)
5170 (copy-recursively "build/html" html)
5171 (symlink (string-append html "/_images")
5172 (string-append info "/matplotlib-figures"))
5173 (with-directory-excursion "build/texinfo"
5174 (substitute* "matplotlib.texi"
5175 (("@image\\{([^,]*)" all file)
5176 (string-append "@image{matplotlib-figures/" file)))
5177 (symlink (string-append html "/_images")
5178 "./matplotlib-figures")
5179 (invoke "makeinfo" "--no-split"
5180 "-o" "matplotlib.info" "matplotlib.texi"))
5181 (install-file "build/texinfo/matplotlib.info" info))
5182 #t)))))
5183 (home-page (package-home-page python-matplotlib))
5184 (synopsis "Documentation for the python-matplotlib package")
5185 (description (package-description python-matplotlib))
5186 (license (package-license python-matplotlib))))
5187
5188 (define-public python2-matplotlib-documentation
5189 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5190 (package
5191 (inherit parent)
5192 (native-inputs
5193 (alist-delete "python-sphinx-copybutton"
5194 (package-native-inputs parent))))))
5195
5196 (define-public python-matplotlib-venn
5197 (package
5198 (name "python-matplotlib-venn")
5199 (version "0.11.5")
5200 (source
5201 (origin
5202 (method url-fetch)
5203 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5204 (sha256
5205 (base32
5206 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5207 (build-system python-build-system)
5208 (arguments '(#:tests? #f)) ; tests are not included
5209 (propagated-inputs
5210 `(("python-matplotlib" ,python-matplotlib)
5211 ("python-numpy" ,python-numpy)
5212 ("python-scipy" ,python-scipy)))
5213 (native-inputs
5214 `(("unzip" ,unzip)))
5215 (home-page "https://github.com/konstantint/matplotlib-venn")
5216 (synopsis "Plot area-proportional Venn diagrams")
5217 (description
5218 "This package provides tools for plotting area-proportional two- and
5219 three-way Venn diagrams in @code{matplotlib}.")
5220 (license license:expat)))
5221
5222 (define-public python-pysnptools
5223 (package
5224 (name "python-pysnptools")
5225 (version "0.4.11")
5226 (source
5227 (origin
5228 (method url-fetch)
5229 (uri (pypi-uri "pysnptools" version))
5230 (sha256
5231 (base32
5232 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5233 (build-system python-build-system)
5234 (arguments
5235 `(#:tests? #f ; no test data are included
5236 #:phases
5237 (modify-phases %standard-phases
5238 (replace 'check
5239 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5240 (if tests?
5241 (begin
5242 (add-installed-pythonpath inputs outputs)
5243 (invoke "python3" "pysnptools/test.py"))
5244 #t))))))
5245 (propagated-inputs
5246 `(("python-dill" ,python-dill)
5247 ("python-h5py" ,python-h5py)
5248 ("python-numpy" ,python-numpy)
5249 ("python-pandas" ,python-pandas)
5250 ("python-psutil" ,python-psutil)
5251 ("python-scipy" ,python-scipy)))
5252 (native-inputs
5253 `(("python-cython" ,python-cython)))
5254 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5255 (synopsis "Library for reading and manipulating genetic data")
5256 (description
5257 "PySnpTools is a library for reading and manipulating genetic data. It
5258 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5259 those files. It can also efficiently manipulate ranges of integers using set
5260 operators such as union, intersection, and difference.")
5261 (license license:asl2.0)))
5262
5263 (define-public python2-pysnptools
5264 (package-with-python2 python-pysnptools))
5265
5266 (define-public python-wurlitzer
5267 (package
5268 (name "python-wurlitzer")
5269 (version "2.0.1")
5270 (source
5271 (origin
5272 (method url-fetch)
5273 (uri (pypi-uri "wurlitzer" version))
5274 (sha256
5275 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5276 (build-system python-build-system)
5277 (arguments
5278 '(#:phases
5279 (modify-phases %standard-phases
5280 (replace 'check
5281 (lambda _
5282 (invoke "pytest" "-vv" "test.py"))))))
5283 (native-inputs
5284 `(("python-mock" ,python-mock)
5285 ("python-pytest" ,python-pytest)))
5286 (home-page "https://github.com/minrk/wurlitzer")
5287 (synopsis "Capture C-level output in context managers")
5288 (description
5289 "This library helps to redirect @code{sys.stdout} to a stream or a file
5290 while executing some piece of code, including C code running within a Python
5291 process.")
5292 (license license:expat)))
5293
5294 (define-public python-socksipy-branch
5295 (package
5296 (name "python-socksipy-branch")
5297 (version "1.01")
5298 (source
5299 (origin
5300 (method url-fetch)
5301 (uri (pypi-uri "SocksiPy-branch" version))
5302 (sha256
5303 (base32
5304 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5305 (build-system python-build-system)
5306 (arguments
5307 `(#:tests? #f)) ; There are no tests
5308 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5309 (synopsis "Python SOCKS module")
5310 (description
5311 "SocksiPy - A Python SOCKS client module. It provides a
5312 socket-like interface that supports connections to any TCP
5313 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5314 The original version was developed by Dan Haim, this is a
5315 branch created by Mario Vilas to address some open issues,
5316 as the original project seems to have been abandoned circa 2007.")
5317 (license license:bsd-3)))
5318
5319 (define-public python2-socksipy-branch
5320 (package-with-python2 python-socksipy-branch))
5321
5322 (define-public python-socksipychain
5323 (package
5324 (name "python-socksipychain")
5325 (version "2.1.2")
5326 (source
5327 (origin
5328 (method git-fetch)
5329 (uri (git-reference
5330 (url "https://github.com/pagekite/PySocksipyChain")
5331 (commit (string-append "v" version))))
5332 (file-name (git-file-name name version))
5333 (sha256
5334 (base32
5335 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5336 (build-system python-build-system)
5337 (arguments
5338 `(#:tests? #f)) ; Tests try to access the network.
5339 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5340 (synopsis "Python SOCKS module with chained proxies support")
5341 (description
5342 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5343 adds support for arbitrary chaining of proxy servers and various modes of
5344 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5345 a simple netcat replacement with chaining support.")
5346 (license license:bsd-3)))
5347
5348 (define-public python-pycodestyle
5349 (package
5350 (name "python-pycodestyle")
5351 (version "2.6.0")
5352 (source
5353 (origin
5354 (method url-fetch)
5355 (uri (pypi-uri "pycodestyle" version))
5356 (sha256
5357 (base32
5358 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5359 (build-system python-build-system)
5360 (arguments
5361 `(#:phases
5362 (modify-phases %standard-phases
5363 (replace 'check
5364 (lambda _
5365 (invoke "pytest" "-vv"))))))
5366 (native-inputs
5367 `(("python-pytest" ,python-pytest)))
5368 (home-page "https://pycodestyle.readthedocs.io/")
5369 (synopsis "Python style guide checker")
5370 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5371 Python code against some of the style conventions in
5372 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5373 (license license:expat)))
5374
5375 (define-public python2-pycodestyle
5376 (package-with-python2 python-pycodestyle))
5377
5378 (define-public python-multidict
5379 (package
5380 (name "python-multidict")
5381 (version "4.7.5")
5382 (source
5383 (origin
5384 (method url-fetch)
5385 (uri (pypi-uri "multidict" version))
5386 (sha256
5387 (base32
5388 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5389 (build-system python-build-system)
5390 (arguments
5391 '(#:modules ((ice-9 ftw)
5392 (srfi srfi-1)
5393 (srfi srfi-26)
5394 (guix build utils)
5395 (guix build python-build-system))
5396 #:phases (modify-phases %standard-phases
5397 (replace 'check
5398 (lambda* (#:key tests? #:allow-other-keys)
5399 (if tests?
5400 (begin
5401 (let ((libdir (find (cut string-prefix? "lib." <>)
5402 (scandir "build"))))
5403 (setenv "PYTHONPATH"
5404 (string-append "./build/" libdir ":"
5405 (getenv "PYTHONPATH")))
5406 (invoke "pytest" "-vv")))
5407 (format #t "test suite not run~%"))
5408 #t)))))
5409 (native-inputs
5410 `(("python-pytest" ,python-pytest)
5411 ("python-pytest-cov" ,python-pytest-cov)))
5412 (home-page "https://github.com/aio-libs/multidict/")
5413 (synopsis "Multidict implementation")
5414 (description "Multidict is dict-like collection of key-value pairs
5415 where key might be occurred more than once in the container.")
5416 (license license:asl2.0)))
5417
5418 (define-public python-orderedmultidict
5419 (package
5420 (name "python-orderedmultidict")
5421 (version "1.0")
5422 (source
5423 (origin
5424 (method url-fetch)
5425 (uri (pypi-uri "orderedmultidict" version))
5426 (sha256
5427 (base32
5428 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5429 (build-system python-build-system)
5430 (arguments
5431 `(#:phases
5432 (modify-phases %standard-phases
5433 (add-after 'unpack 'fix-tests
5434 (lambda _
5435 ;; The package uses nosetest for running the tests.
5436 ;; Adding this initfile allows to run the test suite
5437 ;; without requiring nosetest.
5438 (with-output-to-file "tests/__init__.py" newline)
5439 #t)))))
5440 (propagated-inputs
5441 `(("python-six" ,python-six)))
5442 (native-inputs
5443 `(("python-pycodestyle" ,python-pycodestyle)))
5444 (home-page "https://github.com/gruns/orderedmultidict")
5445 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5446 (description "This package contains a library for ordered multivalue
5447 dictionaries. A multivalue dictionary is a dictionary that can store
5448 multiple values for the same key. An ordered multivalue dictionary is a
5449 multivalue dictionary that retains the order of insertions and deletions.")
5450 (license license:unlicense)))
5451
5452 (define-public python2-orderedmultidict
5453 (package-with-python2 python-orderedmultidict))
5454
5455 (define-public python-autopep8
5456 (package
5457 (name "python-autopep8")
5458 (version "1.5.3")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (pypi-uri "autopep8" version))
5463 (sha256
5464 (base32
5465 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5466 (build-system python-build-system)
5467 (propagated-inputs
5468 `(("python-pycodestyle" ,python-pycodestyle)
5469 ("python-toml" ,python-toml)))
5470 (home-page "https://github.com/hhatto/autopep8")
5471 (synopsis "Format Python code according to the PEP 8 style guide")
5472 (description
5473 "@code{autopep8} automatically formats Python code to conform to
5474 the PEP 8 style guide. It uses the pycodestyle utility to determine
5475 what parts of the code needs to be formatted. @code{autopep8} is
5476 capable of fixing most of the formatting issues that can be reported
5477 by pycodestyle.")
5478 (license (license:non-copyleft
5479 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5480
5481 (define-public python2-autopep8
5482 (package-with-python2 python-autopep8))
5483
5484 (define-public python-distlib
5485 (package
5486 (name "python-distlib")
5487 (version "0.3.0")
5488 (source
5489 (origin
5490 (method url-fetch)
5491 (uri (pypi-uri "distlib" version ".zip"))
5492 (sha256
5493 (base32
5494 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5495 (build-system python-build-system)
5496 (arguments
5497 `(#:phases
5498 (modify-phases %standard-phases
5499 (add-before 'build 'no-/bin/sh
5500 (lambda _
5501 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5502 (("/bin/sh") (which "sh")))
5503 #t))
5504 (add-before 'check 'prepare-test-env
5505 (lambda _
5506 (setenv "HOME" "/tmp")
5507 ;; NOTE: Any value works, the variable just has to be present.
5508 (setenv "SKIP_ONLINE" "1")
5509 #t)))))
5510 (native-inputs `(("unzip" ,unzip)))
5511 (home-page "https://bitbucket.org/pypa/distlib")
5512 (synopsis "Distribution utilities")
5513 (description "Distlib is a library which implements low-level functions that
5514 relate to packaging and distribution of Python software. It is intended to be
5515 used as the basis for third-party packaging tools.")
5516 (license license:psfl)))
5517
5518 (define-public python-distutils-extra
5519 (package
5520 (name "python-distutils-extra")
5521 (version "2.38")
5522 (source
5523 (origin
5524 (method url-fetch)
5525 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5526 version "/+download/python-distutils-extra-"
5527 version ".tar.gz"))
5528 (sha256
5529 (base32
5530 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5531 (build-system python-build-system)
5532 (home-page "https://launchpad.net/python-distutils-extra/")
5533 (synopsis "Enhancements to Python's distutils")
5534 (description
5535 "The python-distutils-extra module enables you to easily integrate
5536 gettext support, themed icons, and scrollkeeper-based documentation into
5537 Python's distutils.")
5538 (license license:gpl2)))
5539
5540 (define-public python2-distutils-extra
5541 (package-with-python2 python-distutils-extra))
5542
5543 (define-public python2-elib.intl
5544 (package
5545 (name "python2-elib.intl")
5546 (version "0.0.3")
5547 (source
5548 (origin
5549 ;; This project doesn't tag releases or publish tarballs, so we take
5550 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5551 (method git-fetch)
5552 (uri (git-reference
5553 (url "https://github.com/dieterv/elib.intl")
5554 (commit "d09997cfef")))
5555 (file-name (string-append name "-" version "-checkout"))
5556 (sha256
5557 (base32
5558 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5559 (build-system python-build-system)
5560 (arguments
5561 ;; incompatible with Python 3 (exception syntax)
5562 `(#:python ,python-2
5563 #:tests? #f))
5564 (home-page "https://github.com/dieterv/elib.intl")
5565 (synopsis "Enhanced internationalization for Python")
5566 (description
5567 "The elib.intl module provides enhanced internationalization (I18N)
5568 services for your Python modules and applications.")
5569 (license license:lgpl3+)))
5570
5571 (define-public python-olefile
5572 (package
5573 (name "python-olefile")
5574 (version "0.46")
5575 (source
5576 (origin
5577 (method url-fetch)
5578 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5579 "download/v" version "/olefile-" version ".tar.gz"))
5580 (file-name (string-append name "-" version ".tar.gz"))
5581 (sha256
5582 (base32
5583 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5584 (build-system python-build-system)
5585 (home-page "https://www.decalage.info/python/olefileio")
5586 (synopsis "Read and write Microsoft OLE2 files.")
5587 (description
5588 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5589 Storage or Compound Document, Microsoft Office). It is an improved version of
5590 the OleFileIO module from PIL, the Python Image Library.")
5591 (license license:bsd-3)))
5592
5593 (define-public python2-olefile
5594 (package-with-python2 python-olefile))
5595
5596 (define-public python-pillow
5597 (package
5598 (name "python-pillow")
5599 (version "6.2.1")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "Pillow" version))
5604 (sha256
5605 (base32
5606 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5607 (build-system python-build-system)
5608 (native-inputs
5609 `(("python-pytest" ,python-pytest)))
5610 (inputs
5611 `(("freetype" ,freetype)
5612 ("lcms" ,lcms)
5613 ("libjpeg" ,libjpeg-turbo)
5614 ("libtiff" ,libtiff)
5615 ("libwebp" ,libwebp)
5616 ("openjpeg" ,openjpeg)
5617 ("zlib" ,zlib)))
5618 (propagated-inputs
5619 `(("python-olefile" ,python-olefile)))
5620 (arguments
5621 `(#:phases
5622 (modify-phases %standard-phases
5623 (add-after 'unpack 'patch-ldconfig
5624 (lambda _
5625 (substitute* "setup.py"
5626 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5627 (replace 'check
5628 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5629 (if tests?
5630 (begin
5631 (setenv "HOME" (getcwd))
5632 ;; Make installed package available for running the tests.
5633 (add-installed-pythonpath inputs outputs)
5634 (invoke "python" "selftest.py" "--installed")
5635 (invoke "python" "-m" "pytest" "-vv"))
5636 #t))))))
5637 (home-page "https://python-pillow.org")
5638 (synopsis "Fork of the Python Imaging Library")
5639 (description
5640 "The Python Imaging Library adds image processing capabilities to your
5641 Python interpreter. This library provides extensive file format support, an
5642 efficient internal representation, and fairly powerful image processing
5643 capabilities. The core image library is designed for fast access to data
5644 stored in a few basic pixel formats. It should provide a solid foundation for
5645 a general image processing tool.")
5646 (license (license:x11-style
5647 "http://www.pythonware.com/products/pil/license.htm"
5648 "The PIL Software License"))))
5649
5650 (define-public python2-pillow
5651 (package-with-python2 python-pillow))
5652
5653 (define-public python-pillow-2.9
5654 (package
5655 (inherit python-pillow)
5656 (version "2.9.0")
5657 (source
5658 (origin
5659 (method url-fetch)
5660 (uri (pypi-uri "Pillow" version))
5661 (sha256
5662 (base32
5663 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5664 (arguments
5665 (substitute-keyword-arguments (package-arguments python-pillow)
5666 ((#:tests? _ #f) #f)))
5667 (properties '((hidden? #t)))))
5668
5669 (define-public python-roifile
5670 (package
5671 (name "python-roifile")
5672 (version "2020.5.28")
5673 (source
5674 (origin
5675 (method url-fetch)
5676 (uri (pypi-uri "roifile" version))
5677 (sha256
5678 (base32
5679 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5680 (build-system python-build-system)
5681 (arguments `(#:tests? #f)) ; there are none
5682 (propagated-inputs
5683 `(("python-numpy" ,python-numpy)))
5684 (home-page "https://www.lfd.uci.edu/~gohlke/")
5685 (synopsis "Read and write ImageJ ROI format")
5686 (description "Roifile is a Python library to read, write, create, and plot
5687 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5688 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5689 (license license:bsd-3)))
5690
5691 (define-public python-tifffile
5692 (package
5693 (name "python-tifffile")
5694 (version "2020.6.3")
5695 (source
5696 (origin
5697 (method url-fetch)
5698 (uri (pypi-uri "tifffile" version))
5699 (sha256
5700 (base32
5701 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5702 (build-system python-build-system)
5703 ;; Tests require lfdfiles, which depends on tifffile
5704 (arguments `(#:tests? #f))
5705 (propagated-inputs
5706 `(("python-numpy" ,python-numpy)
5707 ;;("python-lfdfiles" ,python-lfdfiles)
5708 ("python-roifile" ,python-roifile)))
5709 (home-page "https://www.lfd.uci.edu/~gohlke/")
5710 (synopsis "Read and write TIFF(r) files")
5711 (description "This package lets you read image and metadata from many
5712 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5713 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5714 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5715 (license license:bsd-3)))
5716
5717 (define-public python-lfdfiles
5718 (package
5719 (name "python-lfdfiles")
5720 (version "2020.1.1")
5721 (source
5722 (origin
5723 (method url-fetch)
5724 (uri (pypi-uri "lfdfiles" version))
5725 (sha256
5726 (base32
5727 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5728 (build-system python-build-system)
5729 (propagated-inputs
5730 `(("python-click" ,python-click)
5731 ("python-numpy" ,python-numpy)
5732 ("python-tifffile" ,python-tifffile)))
5733 (home-page "https://www.lfd.uci.edu/~gohlke/")
5734 (synopsis "Work with LFD data files")
5735 (description
5736 "Lfdfiles is a Python library and console script for reading, writing,
5737 converting, and viewing many of the proprietary file formats used to store
5738 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5739 (license license:bsd-3)))
5740
5741 (define-public python-imageio
5742 (package
5743 (name "python-imageio")
5744 (version "2.8.0")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "imageio" version))
5749 (sha256
5750 (base32
5751 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5752 (build-system python-build-system)
5753 (arguments
5754 `(#:tests? #f ; many tests require online data
5755 #:phases
5756 (modify-phases %standard-phases
5757 (replace 'check
5758 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5759 (if tests?
5760 (begin
5761 ;; Make installed package available for running the tests.
5762 (add-installed-pythonpath inputs outputs)
5763 (invoke "pytest" "-vv"))
5764 #t))))))
5765 (propagated-inputs
5766 `(("python-numpy" ,python-numpy)
5767 ("python-pillow" ,python-pillow)
5768 ("python-psutil" ,python-psutil)))
5769 (native-inputs
5770 `(("python-pytest" ,python-pytest)))
5771 (home-page "https://imageio.github.io/")
5772 (synopsis "Library for reading and writing a wide range of image data")
5773 (description
5774 "Imageio is a Python library that provides an easy interface to read and
5775 write a wide range of image data, including animated images, video, volumetric
5776 data, and scientific formats.")
5777 (license license:bsd-2)))
5778
5779 (define-public python-pycparser
5780 (package
5781 (name "python-pycparser")
5782 (version "2.20")
5783 (source
5784 (origin
5785 (method url-fetch)
5786 (uri (pypi-uri "pycparser" version))
5787 (sha256
5788 (base32
5789 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5790 (outputs '("out" "doc"))
5791 (build-system python-build-system)
5792 (native-inputs
5793 `(("pkg-config" ,pkg-config)))
5794 (arguments
5795 `(#:phases
5796 (modify-phases %standard-phases
5797 (replace 'check
5798 (lambda _
5799 (with-directory-excursion "tests"
5800 (invoke "python" "all_tests.py"))
5801 #t))
5802 (add-after 'install 'install-doc
5803 (lambda* (#:key outputs #:allow-other-keys)
5804 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5805 (doc (string-append data "/doc/" ,name "-" ,version))
5806 (examples (string-append doc "/examples")))
5807 (mkdir-p examples)
5808 (for-each (lambda (file)
5809 (copy-file (string-append "." file)
5810 (string-append doc file)))
5811 '("/README.rst" "/CHANGES" "/LICENSE"))
5812 (copy-recursively "examples" examples)
5813 #t))))))
5814 (home-page "https://github.com/eliben/pycparser")
5815 (synopsis "C parser in Python")
5816 (description
5817 "Pycparser is a complete parser of the C language, written in pure Python
5818 using the PLY parsing library. It parses C code into an AST and can serve as
5819 a front-end for C compilers or analysis tools.")
5820 (license license:bsd-3)))
5821
5822 (define-public python2-pycparser
5823 (package-with-python2 python-pycparser))
5824
5825 (define-public python-pywavelets
5826 (package
5827 (name "python-pywavelets")
5828 (version "1.1.1")
5829 (home-page "https://github.com/PyWavelets/pywt")
5830 (source (origin
5831 (method url-fetch)
5832 (uri (pypi-uri "PyWavelets" version))
5833 (sha256
5834 (base32
5835 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5836 (build-system python-build-system)
5837 (arguments
5838 '(#:modules ((ice-9 ftw)
5839 (srfi srfi-1)
5840 (srfi srfi-26)
5841 (guix build utils)
5842 (guix build python-build-system))
5843 #:phases
5844 (modify-phases %standard-phases
5845 (replace 'check
5846 (lambda _
5847 (let ((cwd (getcwd))
5848 (libdir (find (cut string-prefix? "lib." <>)
5849 (scandir "build"))))
5850 (with-directory-excursion (string-append cwd "/build/" libdir)
5851 (invoke "pytest" "-vv"))))))))
5852 (native-inputs
5853 `(("python-matplotlib" ,python-matplotlib) ;for tests
5854 ("python-pytest" ,python-pytest)))
5855 (propagated-inputs
5856 `(("python-numpy" ,python-numpy)))
5857 (synopsis "Wavelet transforms in Python")
5858 (description
5859 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5860 mathematical basis functions that are localized in both time and frequency.
5861 Wavelet transforms are time-frequency transforms employing wavelets. They are
5862 similar to Fourier transforms, the difference being that Fourier transforms are
5863 localized only in frequency instead of in time and frequency.")
5864 (license license:expat)))
5865
5866 (define-public python-pywinrm
5867 (package
5868 (name "python-pywinrm")
5869 (version "0.4.1")
5870 (source
5871 (origin
5872 (method url-fetch)
5873 (uri (pypi-uri "pywinrm" version))
5874 (sha256
5875 (base32
5876 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5877 (build-system python-build-system)
5878 (propagated-inputs
5879 `(("python-six" ,python-six)
5880 ("python-requests_ntlm" ,python-requests_ntlm)
5881 ("python-xmltodict" ,python-xmltodict)
5882 ("python-kerberos" ,python-kerberos)))
5883 (native-inputs
5884 `(("python-mock" ,python-mock)
5885 ("python-pytest" ,python-pytest)))
5886 (home-page "https://github.com/diyan/pywinrm/")
5887 (synopsis
5888 "Python library for Windows Remote Management (WinRM)")
5889 (description
5890 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5891 service. It allows you to invoke commands on target Windows machines from
5892 any machine that can run Python.")
5893 (license license:expat)))
5894
5895 (define-public python-xcffib
5896 (package
5897 (name "python-xcffib")
5898 (version "0.6.0")
5899 (source
5900 (origin
5901 (method url-fetch)
5902 (uri (pypi-uri "xcffib" version))
5903 (sha256
5904 (base32
5905 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5906 (build-system python-build-system)
5907 (inputs
5908 `(("libxcb" ,libxcb)))
5909 (propagated-inputs
5910 `(("python-cffi" ,python-cffi) ; used at run time
5911 ("python-six" ,python-six)))
5912 (arguments
5913 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5914 #:tests? #f
5915 #:phases
5916 (modify-phases %standard-phases
5917 (add-after 'unpack 'fix-libxcb-path
5918 (lambda* (#:key inputs #:allow-other-keys)
5919 (let ((libxcb (assoc-ref inputs "libxcb")))
5920 (substitute* '("xcffib/__init__.py")
5921 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5922 #t)))
5923 (add-after 'install 'install-doc
5924 (lambda* (#:key outputs #:allow-other-keys)
5925 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5926 "/doc/" ,name "-" ,version)))
5927 (mkdir-p doc)
5928 (copy-file "README.md"
5929 (string-append doc "/README.md"))
5930 #t))))))
5931 (home-page "https://github.com/tych0/xcffib")
5932 (synopsis "XCB Python bindings")
5933 (description
5934 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5935 support for Python 3 and PyPy. It is based on cffi.")
5936 (license license:expat)))
5937
5938 (define-public python2-xcffib
5939 (package-with-python2 python-xcffib))
5940
5941 (define-public python-cairocffi
5942 (package
5943 (name "python-cairocffi")
5944 (version "0.9.0")
5945 (source
5946 (origin
5947 (method url-fetch)
5948 (uri (pypi-uri "cairocffi" version))
5949 (sha256
5950 (base32
5951 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5952 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5953 (build-system python-build-system)
5954 (outputs '("out" "doc"))
5955 (inputs
5956 `(("glib" ,glib)
5957 ("gtk+" ,gtk+)
5958 ("gdk-pixbuf" ,gdk-pixbuf)
5959 ("cairo" ,cairo)
5960 ("pango" ,pango)))
5961 (native-inputs
5962 `(("pkg-config" ,pkg-config)
5963 ("python-pytest" ,python-pytest)
5964 ("python-pytest-cov" ,python-pytest-cov)
5965 ("python-pytest-runner" ,python-pytest-runner)
5966 ("python-sphinx" ,python-sphinx)
5967 ("python-docutils" ,python-docutils)))
5968 (propagated-inputs
5969 `(("python-xcffib" ,python-xcffib))) ; used at run time
5970 (arguments
5971 `(#:phases
5972 (modify-phases %standard-phases
5973 (add-after 'unpack 'patch-paths
5974 (lambda* (#:key inputs outputs #:allow-other-keys)
5975 (substitute* (find-files "." "\\.py$")
5976 (("dlopen\\(ffi, 'cairo'")
5977 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5978 "/lib/libcairo.so.2'"))
5979 (("dlopen\\(ffi, 'gdk-3'")
5980 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5981 "/lib/libgtk-3.so.0'"))
5982 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5983 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5984 "/lib/libgdk_pixbuf-2.0.so.0'"))
5985 (("dlopen\\(ffi, 'glib-2.0'")
5986 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5987 "/lib/libglib-2.0.so.0'"))
5988 (("dlopen\\(ffi, 'gobject-2.0'")
5989 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5990 "/lib/libgobject-2.0.so.0'"))
5991 (("dlopen\\(ffi, 'pangocairo-1.0'")
5992 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5993 "/lib/libpangocairo-1.0.so.0'"))
5994 (("dlopen\\(ffi, 'pango-1.0'")
5995 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5996 "/lib/libpango-1.0.so.0'")))
5997 #t))
5998 (add-after 'install 'install-doc
5999 (lambda* (#:key inputs outputs #:allow-other-keys)
6000 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6001 (doc (string-append data "/doc/" ,name "-" ,version))
6002 (html (string-append doc "/html")))
6003 (setenv "LD_LIBRARY_PATH"
6004 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6005 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6006 (setenv "LANG" "en_US.UTF-8")
6007 (mkdir-p html)
6008 (for-each (lambda (file)
6009 (copy-file (string-append "." file)
6010 (string-append doc file)))
6011 '("/README.rst" "/CHANGES" "/LICENSE"))
6012 (system* "python" "setup.py" "build_sphinx")
6013 (copy-recursively "docs/_build/html" html)
6014 #t))))))
6015 (home-page "https://github.com/Kozea/cairocffi")
6016 (synopsis "Python bindings and object-oriented API for Cairo")
6017 (description
6018 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6019 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6020 graphics library with support for multiple backends including image buffers,
6021 PNG, PostScript, PDF, and SVG file output.")
6022 (license license:bsd-3)))
6023
6024 (define-public python2-cairocffi
6025 (package-with-python2 python-cairocffi))
6026
6027 (define-public python-decorator
6028 (package
6029 (name "python-decorator")
6030 (version "4.3.0")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (pypi-uri "decorator" version))
6035 (sha256
6036 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6037 (build-system python-build-system)
6038 (home-page "https://pypi.org/project/decorator/")
6039 (synopsis "Python module to simplify usage of decorators")
6040 (description
6041 "The aim of the decorator module is to simplify the usage of decorators
6042 for the average programmer, and to popularize decorators usage giving examples
6043 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6044 etc. The core of this module is a decorator factory.")
6045 (license license:expat)))
6046
6047 (define-public python2-decorator
6048 (package-with-python2 python-decorator))
6049
6050 (define-public python-drmaa
6051 (package
6052 (name "python-drmaa")
6053 (version "0.7.7")
6054 (source
6055 (origin
6056 (method url-fetch)
6057 (uri (pypi-uri "drmaa" version))
6058 (sha256
6059 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6060 (build-system python-build-system)
6061 ;; The test suite requires libdrmaa which is provided by the cluster
6062 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6063 ;; should be set to the path of the libdrmaa library.
6064 (arguments '(#:tests? #f))
6065 (native-inputs
6066 `(("python-nose" ,python-nose)))
6067 (home-page "https://pypi.org/project/drmaa/")
6068 (synopsis "Python bindings for the DRMAA library")
6069 (description
6070 "A Python package for Distributed Resource Management (DRM) job
6071 submission and control. This package is an implementation of the DRMAA 1.0
6072 Python language binding specification.")
6073 (license license:bsd-3)))
6074
6075 (define-public python2-drmaa
6076 (package-with-python2 python-drmaa))
6077
6078 (define-public python-grako
6079 (package
6080 (name "python-grako")
6081 (version "3.99.9")
6082 (source
6083 (origin
6084 (method url-fetch)
6085 (uri
6086 (pypi-uri "grako" version ".zip"))
6087 (sha256
6088 (base32
6089 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6090 (build-system python-build-system)
6091 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6092 (native-inputs
6093 `(("unzip" ,unzip)
6094 ("python-pytest" ,python-pytest)
6095 ("python-pytest-runner" ,python-pytest-runner)))
6096 (home-page "https://bitbucket.org/neogeny/grako")
6097 (synopsis "EBNF parser generator")
6098 (description
6099 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6100 memoizing PEG/Packrat parser in Python.")
6101 (license license:bsd-3)))
6102
6103 (define-public python2-grako
6104 (package-with-python2 python-grako))
6105
6106 (define-public python-grandalf
6107 (package
6108 (name "python-grandalf")
6109 (version "0.7")
6110 (source
6111 (origin
6112 ;; There's no source tarball on PyPI.
6113 (method git-fetch)
6114 (uri (git-reference
6115 (url "https://github.com/bdcht/grandalf")
6116 (commit (string-append "v" version))))
6117 (file-name (git-file-name name version))
6118 (sha256
6119 (base32
6120 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6121 (build-system python-build-system)
6122 (arguments
6123 '(#:phases
6124 (modify-phases %standard-phases
6125 (replace 'check
6126 (lambda _
6127 (invoke "python" "setup.py" "pytest"))))))
6128 (native-inputs
6129 `(("python-pytest" ,python-pytest)
6130 ("python-pytest-runner" ,python-pytest-runner)))
6131 (propagated-inputs
6132 `(("python-numpy" ,python-numpy)
6133 ("python-ply" ,python-ply)))
6134 (home-page "https://github.com/bdcht/grandalf")
6135 (synopsis "Graph and drawing algorithms framework")
6136 (description
6137 "Grandalf is a Python package made for experimentations with graphs
6138 drawing algorithms. It is written in pure Python, and currently implements
6139 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6140 minimization approach. While not as fast or featured as graphviz or other
6141 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6142 than thousands of nodes, while keeping the source code simple enough to tweak
6143 and hack any part of it for experimental purpose. With a total of about 1500
6144 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6145 in less than 600 lines. The energy minimization approach is comprised of only
6146 250 lines!
6147
6148 Grandalf does only 2 not-so-simple things:
6149 @itemize
6150 @item computing the nodes (x,y) coordinates (based on provided nodes
6151 dimensions, and a chosen layout)
6152 @item routing the edges with lines or nurbs
6153 @end itemize
6154
6155 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6156 will help you find where to draw things like nodes and edges, but it’s up to
6157 you to actually draw things with your favorite toolkit.")
6158 ;; The user can choose either license.
6159 (license (list license:gpl2 license:epl1.0))))
6160
6161 (define-public python-gridmap
6162 (package
6163 (name "python-gridmap")
6164 (version "0.14.0")
6165 (source
6166 (origin
6167 (method git-fetch)
6168 (uri (git-reference
6169 (url "https://github.com/pygridtools/gridmap")
6170 (commit (string-append "v" version))))
6171 (file-name (git-file-name name version))
6172 (sha256
6173 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6174 (build-system python-build-system)
6175 (arguments
6176 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6177 (propagated-inputs
6178 `(("python-psutil" ,python-psutil)
6179 ("python-drmaa" ,python-drmaa)
6180 ("python-pyzmq" ,python-pyzmq)))
6181 (home-page "https://github.com/pygridtools/gridmap")
6182 (synopsis "Create jobs on a cluster directly from Python")
6183 (description
6184 "Gridmap is a Python package to allow you to easily create jobs on the
6185 cluster directly from Python. You can directly map Python functions onto the
6186 cluster without needing to write any wrapper code yourself.")
6187 (license license:gpl3+)))
6188
6189 (define-public python2-gridmap
6190 (package-with-python2 python-gridmap))
6191
6192 (define-public python-honcho
6193 (package
6194 (name "python-honcho")
6195 (version "1.0.1")
6196 (source
6197 (origin
6198 (method git-fetch)
6199 (uri (git-reference
6200 (url "https://github.com/nickstenning/honcho")
6201 (commit (string-append "v" version))))
6202 (file-name (git-file-name name version))
6203 (sha256
6204 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6205 (build-system python-build-system)
6206 (native-inputs
6207 `(("python-pytest" ,python-pytest)
6208 ("python-mock" ,python-mock)
6209 ("python-tox" ,python-tox)
6210 ("which" ,which))) ;for tests
6211 (propagated-inputs
6212 `(("python-jinja2" ,python-jinja2)))
6213 (arguments
6214 `(#:phases
6215 (modify-phases %standard-phases
6216 (delete 'check)
6217 (add-after 'install 'check
6218 (lambda* (#:key outputs inputs #:allow-other-keys)
6219 ;; fix honcho path in testsuite
6220 (substitute* "tests/conftest.py"
6221 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6222 "/bin/honcho" "'")))
6223 ;; It's easier to run tests after install.
6224 ;; Make installed package available for running the tests
6225 (add-installed-pythonpath inputs outputs)
6226 (invoke "py.test" "-v"))))))
6227 (home-page "https://github.com/nickstenning/honcho")
6228 (synopsis "Manage Procfile-based applications")
6229 (description
6230 "A Procfile is a file which describes how to run an application
6231 consisting of several processes. honcho starts all listed processes.
6232 The output of all running processes is collected by honcho and
6233 displayed.")
6234 (license license:expat)))
6235
6236 (define-public python2-honcho
6237 (package-with-python2 python-honcho))
6238
6239 (define-public python-pexpect
6240 (package
6241 (name "python-pexpect")
6242 (version "4.8.0")
6243 (source
6244 (origin
6245 (method url-fetch)
6246 (uri (pypi-uri "pexpect" version))
6247 (sha256
6248 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6249 (build-system python-build-system)
6250 (arguments
6251 `(#:phases
6252 (modify-phases %standard-phases
6253 (add-before 'check 'prepare-tests
6254 (lambda _
6255 (substitute* (find-files "tests")
6256 (("/bin/ls") (which "ls"))
6257 (("/bin/echo") (which "echo"))
6258 (("/bin/which") (which "which"))
6259 ;; Many tests try to use the /bin directory which
6260 ;; is not present in the build environment.
6261 ;; Use one that's non-empty and unlikely to change.
6262 (("/bin'") "/dev'")
6263 ;; Disable failing test. See upstream bug report
6264 ;; https://github.com/pexpect/pexpect/issues/568
6265 (("def test_bash") "def _test_bash"))
6266 ;; XXX: Socket connection test gets "Connection reset by peer".
6267 ;; Why does it not work? Delete for now.
6268 (delete-file "tests/test_socket.py")
6269 #t))
6270 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6271 (native-inputs
6272 `(("python-nose" ,python-nose)
6273 ("python-pytest" ,python-pytest)
6274 ("man-db" ,man-db)
6275 ("which" ,which)
6276 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6277 (propagated-inputs
6278 `(("python-ptyprocess" ,python-ptyprocess)))
6279 (home-page "http://pexpect.readthedocs.org/")
6280 (synopsis "Controlling interactive console applications")
6281 (description
6282 "Pexpect is a pure Python module for spawning child applications;
6283 controlling them; and responding to expected patterns in their output.
6284 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6285 child application and control it as if a human were typing commands.")
6286 (license license:isc)))
6287
6288 (define-public python2-pexpect
6289 (package-with-python2 python-pexpect))
6290
6291 (define-public python-setuptools-scm
6292 (package
6293 (name "python-setuptools-scm")
6294 (version "3.4.3")
6295 (source (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "setuptools_scm" version))
6298 (sha256
6299 (base32
6300 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6301 (build-system python-build-system)
6302 (home-page "https://github.com/pypa/setuptools_scm/")
6303 (synopsis "Manage Python package versions in SCM metadata")
6304 (description
6305 "Setuptools_scm handles managing your Python package versions in
6306 @dfn{software configuration management} (SCM) metadata instead of declaring
6307 them as the version argument or in a SCM managed file.")
6308 (license license:expat)))
6309
6310 (define-public python2-setuptools-scm
6311 (package-with-python2 python-setuptools-scm))
6312
6313 (define-public python-sexpdata
6314 (package
6315 (name "python-sexpdata")
6316 (version "0.0.3")
6317 (source
6318 (origin
6319 (method url-fetch)
6320 (uri (pypi-uri "sexpdata" version))
6321 (sha256
6322 (base32
6323 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6324 (build-system python-build-system)
6325 (home-page "https://github.com/jd-boyd/sexpdata")
6326 (synopsis "S-expression parser for Python")
6327 (description
6328 "Sexpdata is an S-expression parser/serializer. It has load and dump
6329 functions like pickle, json or PyYAML module.")
6330 (license license:bsd-3)))
6331
6332 (define-public python-pathlib2
6333 (package
6334 (name "python-pathlib2")
6335 (version "2.3.3")
6336 (source
6337 (origin
6338 (method url-fetch)
6339 (uri (pypi-uri "pathlib2" version))
6340 (sha256
6341 (base32
6342 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6343 (build-system python-build-system)
6344 (propagated-inputs
6345 `(("python-scandir" ,python-scandir)
6346 ("python-six" ,python-six)))
6347 (home-page "https://pypi.org/project/pathlib2/")
6348 (synopsis "Object-oriented file system paths")
6349 (description "The goal of pathlib2 is to provide a backport of the
6350 standard @code{pathlib} module which tracks the standard library module, so
6351 all the newest features of the standard @code{pathlib} can be used also on
6352 older Python versions.")
6353 (license license:expat)))
6354
6355 (define-public python-importlib-resources
6356 (package
6357 (name "python-importlib-resources")
6358 (version "3.0.0")
6359 (source
6360 (origin
6361 (method url-fetch)
6362 (uri (pypi-uri "importlib_resources" version))
6363 (sha256
6364 (base32
6365 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6366 (build-system python-build-system)
6367 (native-inputs
6368 `(("python-setuptools-scm" ,python-setuptools-scm)
6369 ("python-toml" ,python-toml)))
6370 (home-page "http://importlib-resources.readthedocs.io/")
6371 (synopsis "Read resources from Python packages")
6372 (description
6373 "@code{importlib_resources} is a backport of Python 3's standard library
6374 @code{importlib.resources} module for Python 2.7, and Python 3.")
6375 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6376 (license license:asl2.0)))
6377
6378 (define-public python2-importlib-resources
6379 (package
6380 (name "python2-importlib-resources")
6381 (version "1.0.2")
6382 (source (origin
6383 (method url-fetch)
6384 (uri (pypi-uri "importlib_resources" version))
6385 (sha256
6386 (base32
6387 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6388 (build-system python-build-system)
6389 (arguments
6390 `(#:python ,python-2
6391 #:phases (modify-phases %standard-phases
6392 ;; The build system tests for python-wheel, but it is
6393 ;; not required for Guix nor the test suite. Just drop
6394 ;; it to make bootstrapping pytest easier.
6395 (add-after 'unpack 'drop-wheel-dependency
6396 (lambda _
6397 (substitute* "setup.cfg"
6398 (("^[[:blank:]]+wheel")
6399 ""))
6400 #t)))))
6401 (propagated-inputs
6402 `(("python-pathlib2" ,python2-pathlib2)
6403 ("python-typing" ,python2-typing)))
6404 (home-page "https://gitlab.com/python-devs/importlib_resources")
6405 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6406 (description
6407 "This package provides an implementation of @code{importlib.resources}
6408 for older versions of Python.")
6409 (license license:asl2.0)))
6410
6411 ;; For importlib-metadata-bootstrap below.
6412 (define-public python2-importlib-resources-bootstrap
6413 (hidden-package
6414 (package/inherit
6415 python2-importlib-resources
6416 (name "python2-importlib-resources-bootstrap")
6417 (propagated-inputs
6418 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6419 ("python-typing" ,python2-typing))))))
6420
6421 (define-public python-importlib-metadata
6422 (package
6423 (name "python-importlib-metadata")
6424 (version "1.5.0")
6425 (source
6426 (origin
6427 (method url-fetch)
6428 (uri (pypi-uri "importlib_metadata" version))
6429 (sha256
6430 (base32
6431 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6432 (build-system python-build-system)
6433 (propagated-inputs
6434 `(("python-zipp" ,python-zipp)))
6435 (native-inputs
6436 `(("python-setuptools-scm" ,python-setuptools-scm)
6437 ("python-pyfakefs" ,python-pyfakefs)
6438 ("python-packaging" ,python-packaging)))
6439 (home-page "https://importlib-metadata.readthedocs.io/")
6440 (synopsis "Read metadata from Python packages")
6441 (description
6442 "@code{importlib_metadata} is a library which provides an API for
6443 accessing an installed Python package's metadata, such as its entry points or
6444 its top-level name. This functionality intends to replace most uses of
6445 @code{pkg_resources} entry point API and metadata API. Along with
6446 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6447 need to use the older and less efficient @code{pkg_resources} package.")
6448 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6449 (license license:asl2.0)))
6450
6451 (define-public python2-importlib-metadata
6452 (let ((base (package-with-python2 (strip-python2-variant
6453 python-importlib-metadata))))
6454 (package/inherit
6455 base
6456 (name "python2-importlib-metadata")
6457 (native-inputs
6458 `(("python-setuptools-scm" ,python2-setuptools-scm)
6459 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6460 ("python-packaging" ,python2-packaging-bootstrap)))
6461 (propagated-inputs
6462 `(("python-configparser" ,python2-configparser)
6463 ("python-contextlib2" ,python2-contextlib2)
6464 ("python-importlib-resources" ,python2-importlib-resources)
6465 ("python-pathlib2" ,python2-pathlib2)
6466 ,@(package-propagated-inputs base))))))
6467
6468 ;; This package is used by python2-pytest, and thus must not depend on it.
6469 (define-public python2-importlib-metadata-bootstrap
6470 (hidden-package
6471 (package/inherit
6472 python2-importlib-metadata
6473 (name "python2-importlib-metadata-bootstrap")
6474 (arguments
6475 `(#:tests? #f
6476 ,@(package-arguments python2-importlib-metadata)))
6477 (propagated-inputs
6478 `(("python-zipp" ,python2-zipp-bootstrap)
6479 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6480 ("python-configparser" ,python2-configparser)
6481 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6482 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6483
6484 (define-public python-importmagic
6485 (package
6486 (name "python-importmagic")
6487 (version "0.1.7")
6488 (source
6489 (origin
6490 (method url-fetch)
6491 (uri (pypi-uri "importmagic" version))
6492 (sha256
6493 (base32
6494 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6495 (build-system python-build-system)
6496 (home-page "https://github.com/alecthomas/importmagic")
6497 (synopsis "Library for adding, removing and managing Python imports")
6498 (description
6499 "Importmagic is a Python library for automatically managing imports by
6500 finding unresolved symbols in Python code and their corresponding imports.")
6501 (license license:bsd-3)))
6502
6503 (define-public python-jaraco-packaging
6504 (package
6505 (name "python-jaraco-packaging")
6506 (version "6.1")
6507 (source
6508 (origin
6509 (method url-fetch)
6510 (uri (pypi-uri "jaraco.packaging" version))
6511 (sha256
6512 (base32
6513 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6514 (build-system python-build-system)
6515 (propagated-inputs
6516 `(("python-pytest" ,python-pytest)
6517 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6518 ("python-pytest-flake8" ,python-pytest-flake8)
6519 ("python-rst.linker" ,python-rst.linker)
6520 ("python-setuptools" ,python-setuptools)
6521 ("python-setuptools-scm" ,python-setuptools-scm)
6522 ("python-six" ,python-six)
6523 ("python-sphinx" ,python-sphinx)))
6524 (home-page "https://github.com/jaraco/jaraco.packaging")
6525 (synopsis "Tools to supplement packaging Python releases")
6526 (description
6527 "This package provides various tools to supplement packaging Python
6528 releases.")
6529 (license license:expat)))
6530
6531 (define-public python-pathpy
6532 (package
6533 (name "python-pathpy")
6534 (version "11.5.1")
6535 (source
6536 (origin
6537 (method url-fetch)
6538 (uri (pypi-uri "path.py" version))
6539 (sha256
6540 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6541 (outputs '("out" "doc"))
6542 (build-system python-build-system)
6543 (propagated-inputs
6544 `(("python-appdirs" ,python-appdirs)
6545 ("python-importlib-metadata" ,python-importlib-metadata)))
6546 (native-inputs
6547 `(("python-setuptools-scm" ,python-setuptools-scm)
6548 ("python-sphinx" ,python-sphinx)
6549 ("python-rst.linker" ,python-rst.linker)
6550 ("python-pytest" ,python-pytest)
6551 ("python-pytest-runner" ,python-pytest-runner)
6552 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6553 (arguments
6554 `(#:phases
6555 (modify-phases %standard-phases
6556 (add-after 'build 'build-doc
6557 (lambda _
6558 (setenv "LANG" "en_US.UTF-8")
6559 (invoke "python" "setup.py" "build_sphinx")))
6560 (add-after 'install 'install-doc
6561 (lambda* (#:key outputs #:allow-other-keys)
6562 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6563 (doc (string-append data "/doc/" ,name "-" ,version))
6564 (html (string-append doc "/html")))
6565 (mkdir-p html)
6566 (for-each (lambda (file)
6567 (copy-file file (string-append doc "/" file)))
6568 '("README.rst" "CHANGES.rst"))
6569 (copy-recursively "build/sphinx/html" html)
6570 #t)))
6571 (replace 'check
6572 (lambda _
6573 ;; The import time test aborts if an import takes longer than
6574 ;; 100ms. It may very well take a little longer than that.
6575 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6576 (home-page "https://github.com/jaraco/path.py")
6577 (synopsis "Python module wrapper for built-in os.path")
6578 (description
6579 "@code{path.py} implements path objects as first-class entities, allowing
6580 common operations on files to be invoked on those path objects directly.")
6581 (license license:expat)))
6582
6583 (define-public python2-pathpy
6584 (package-with-python2 python-pathpy))
6585
6586 (define-public python-simplegeneric
6587 (package
6588 (name "python-simplegeneric")
6589 (version "0.8.1")
6590 (source
6591 (origin
6592 (method url-fetch)
6593 (uri (pypi-uri "simplegeneric" version ".zip"))
6594 (sha256
6595 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6596 (build-system python-build-system)
6597 (native-inputs
6598 `(("unzip" ,unzip)))
6599 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6600 (synopsis "Python module for simple generic functions")
6601 (description
6602 "The simplegeneric module lets you define simple single-dispatch generic
6603 functions, akin to Python’s built-in generic functions like @code{len()},
6604 @code{iter()} and so on. However, instead of using specially-named methods,
6605 these generic functions use simple lookup tables, akin to those used by
6606 e.g. @code{pickle.dump()} and other generic functions found in the Python
6607 standard library.")
6608 (license license:zpl2.1)))
6609
6610 (define-public python2-simplegeneric
6611 (package-with-python2 python-simplegeneric))
6612
6613 (define-public python-ipython-genutils
6614 ;; TODO: This package is retired, check if can be removed, see description.
6615 (package
6616 (name "python-ipython-genutils")
6617 (version "0.1.0")
6618 (source
6619 (origin
6620 (method url-fetch)
6621 (uri (pypi-uri "ipython_genutils" version))
6622 (sha256
6623 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6624 (build-system python-build-system)
6625 (arguments `(#:tests? #f)) ; no tests
6626 (home-page "https://ipython.org")
6627 (synopsis "Vestigial utilities from IPython")
6628 (description
6629 "This package provides retired utilities from IPython. No packages
6630 outside IPython/Jupyter should depend on it.
6631
6632 This package shouldn't exist. It contains some common utilities shared by
6633 Jupyter and IPython projects during The Big Split. As soon as possible, those
6634 packages will remove their dependency on this, and this package will go
6635 away.")
6636 (license license:bsd-3)))
6637
6638 (define-public python2-ipython-genutils
6639 (package-with-python2 python-ipython-genutils))
6640
6641 (define-public python-ipyparallel
6642 (package
6643 (name "python-ipyparallel")
6644 (version "6.2.4")
6645 (source
6646 (origin
6647 (method url-fetch)
6648 (uri (pypi-uri "ipyparallel" version))
6649 (sha256
6650 (base32
6651 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6652 (build-system python-build-system)
6653 (arguments
6654 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6655 #:phases
6656 (modify-phases %standard-phases
6657 (add-before 'check 'prepare-for-tests
6658 (lambda _
6659 (setenv "HOME" (getcwd))
6660 #t)))))
6661 (propagated-inputs
6662 `(("python-dateutil" ,python-dateutil)
6663 ("python-decorator" ,python-decorator)
6664 ("python-ipykernel" ,python-ipykernel)
6665 ("python-ipython" ,python-ipython)
6666 ("python-ipython-genutils" ,python-ipython-genutils)
6667 ("python-jupyter-client" ,python-jupyter-client)
6668 ("python-pyzmq" ,python-pyzmq)
6669 ("python-tornado" ,python-tornado)
6670 ("python-traitlets" ,python-traitlets)))
6671 (native-inputs
6672 `(("python-ipython" ,python-ipython)
6673 ("python-mock" ,python-mock)
6674 ("python-nose" ,python-nose)
6675 ("python-pytest" ,python-pytest)
6676 ("python-pytest-cov" ,python-pytest-cov)
6677 ("python-testpath" ,python-testpath)))
6678 (home-page "https://ipython.org/")
6679 (synopsis "Interactive Parallel Computing with IPython")
6680 (description
6681 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6682 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6683 CLI scripts:
6684 @enumerate
6685 @item ipcluster - start/stop a cluster
6686 @item ipcontroller - start a scheduler
6687 @item ipengine - start an engine
6688 @end enumerate")
6689 (license license:bsd-3)))
6690
6691 (define-public python2-ipyparallel
6692 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6693 (package
6694 (inherit ipyparallel)
6695 (propagated-inputs
6696 `(("python2-futures" ,python2-futures)
6697 ,@(package-propagated-inputs ipyparallel))))))
6698
6699 (define-public python-ipython-cluster-helper
6700 (package
6701 (name "python-ipython-cluster-helper")
6702 (version "0.6.4")
6703 (source
6704 (origin
6705 (method url-fetch)
6706 (uri (pypi-uri "ipython-cluster-helper" version))
6707 (sha256
6708 (base32
6709 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6710 (modules '((guix build utils)))
6711 (snippet
6712 '(begin (substitute* "requirements.txt"
6713 (("ipython.*") "ipython\n"))
6714 #t))))
6715 (build-system python-build-system)
6716 (arguments
6717 `(#:tests? #f ; Test suite can't find IPython.
6718 #:phases
6719 (modify-phases %standard-phases
6720 (replace 'check
6721 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6722 (if tests?
6723 (begin
6724 (setenv "HOME" (getcwd))
6725 (add-installed-pythonpath inputs outputs)
6726 (invoke "python" "example/example.py" "--local"))
6727 #t))))))
6728 (propagated-inputs
6729 `(("python-ipyparallel" ,python-ipyparallel)
6730 ("python-ipython" ,python-ipython)
6731 ("python-netifaces" ,python-netifaces)
6732 ("python-pyzmq" ,python-pyzmq)
6733 ("python-setuptools" ,python-setuptools)
6734 ("python-six" ,python-six)))
6735 (home-page "https://github.com/roryk/ipython-cluster-helper")
6736 (synopsis
6737 "Simplify IPython cluster start up and use for multiple schedulers")
6738 (description
6739 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6740 profile, launches a cluster and returns a view. On program exit it shuts the
6741 cluster down and deletes the throwaway profile.")
6742 (license license:expat)))
6743
6744 (define-public python2-ipython-cluster-helper
6745 (package-with-python2 python-ipython-cluster-helper))
6746
6747 (define-public python-traitlets
6748 (package
6749 (name "python-traitlets")
6750 (version "4.3.3")
6751 (source
6752 (origin
6753 (method url-fetch)
6754 (uri (pypi-uri "traitlets" version))
6755 (sha256
6756 (base32
6757 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6758 (build-system python-build-system)
6759 (arguments
6760 `(#:phases
6761 (modify-phases %standard-phases
6762 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6763 (propagated-inputs
6764 `(("python-ipython-genutils" ,python-ipython-genutils)
6765 ("python-decorator" ,python-decorator)))
6766 (native-inputs
6767 `(("python-pytest" ,python-pytest)))
6768 (properties `((python2-variant . ,(delay python2-traitlets))))
6769 (home-page "https://ipython.org")
6770 (synopsis "Configuration system for Python applications")
6771 (description
6772 "Traitlets is a framework that lets Python classes have attributes with
6773 type checking, dynamically calculated default values, and ‘on change’
6774 callbacks. The package also includes a mechanism to use traitlets for
6775 configuration, loading values from files or from command line arguments. This
6776 is a distinct layer on top of traitlets, so you can use traitlets in your code
6777 without using the configuration machinery.")
6778 (license license:bsd-3)))
6779
6780 (define-public python2-traitlets
6781 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6782 (package
6783 (inherit traitlets)
6784 (propagated-inputs
6785 `(("python2-enum34" ,python2-enum34)
6786 ,@(package-propagated-inputs traitlets))))))
6787
6788 (define-public python-jupyter-core
6789 (package
6790 (name "python-jupyter-core")
6791 (version "4.4.0")
6792 (source
6793 (origin
6794 (method url-fetch)
6795 (uri (string-append (pypi-uri "jupyter_core" version)))
6796 (sha256
6797 (base32
6798 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6799 (build-system python-build-system)
6800 ;; FIXME: not sure how to run the tests
6801 (arguments `(#:tests? #f))
6802 (propagated-inputs
6803 `(("python-traitlets" ,python-traitlets)))
6804 (home-page "http://jupyter.org/")
6805 (synopsis "Jupyter base package")
6806 (description
6807 "Jupyter core is the base package on which Jupyter projects rely.")
6808 (license license:bsd-3)))
6809
6810 (define-public python2-jupyter-core
6811 (package-with-python2 python-jupyter-core))
6812
6813 (define-public python-jupyter-client
6814 (package
6815 (name "python-jupyter-client")
6816 (version "5.2.4")
6817 (source
6818 (origin
6819 (method url-fetch)
6820 (uri (pypi-uri "jupyter_client" version))
6821 (sha256
6822 (base32
6823 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6824 (build-system python-build-system)
6825 ;; Tests fail because of missing native python kernel which I assume is
6826 ;; provided by the ipython package, which we cannot use because it would
6827 ;; cause a dependency cycle.
6828 (arguments
6829 `(#:tests? #f
6830
6831 #:phases (modify-phases %standard-phases
6832 (add-after 'unpack 'set-tool-file-names
6833 (lambda* (#:key inputs #:allow-other-keys)
6834 (let ((iproute (assoc-ref inputs "iproute")))
6835 (substitute* "jupyter_client/localinterfaces.py"
6836 (("'ip'")
6837 (string-append "'" iproute "/sbin/ip'")))
6838 #t))))))
6839 (inputs
6840 `(("iproute" ,iproute)))
6841 (propagated-inputs
6842 `(("python-pyzmq" ,python-pyzmq)
6843 ("python-traitlets" ,python-traitlets)
6844 ("python-jupyter-core" ,python-jupyter-core)))
6845 (home-page "http://jupyter.org/")
6846 (synopsis "Jupyter protocol implementation and client libraries")
6847 (description
6848 "The @code{jupyter_client} package contains the reference implementation
6849 of the Jupyter protocol. It also provides client and kernel management APIs
6850 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6851 installing @code{kernelspec}s for use with Jupyter frontends.")
6852 (license license:bsd-3)))
6853
6854 (define-public python2-jupyter-client
6855 (package-with-python2 python-jupyter-client))
6856
6857 (define-public python-ipykernel
6858 (package
6859 (name "python-ipykernel")
6860 (version "5.1.3")
6861 (source
6862 (origin
6863 (method url-fetch)
6864 (uri (pypi-uri "ipykernel" version))
6865 (sha256
6866 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6867 (build-system python-build-system)
6868 (arguments
6869 `(#:phases
6870 (modify-phases %standard-phases
6871 (replace 'check
6872 (lambda _
6873 (setenv "HOME" "/tmp")
6874 (invoke "pytest" "-v")
6875 #t))
6876 (add-after 'install 'set-python-file-name
6877 (lambda* (#:key outputs #:allow-other-keys)
6878 ;; Record the absolute file name of the 'python' executable in
6879 ;; 'kernel.json'.
6880 (let ((out (assoc-ref outputs "out")))
6881 (substitute* (string-append out "/share/jupyter"
6882 "/kernels/python3/kernel.json")
6883 (("\"python\"")
6884 (string-append "\"" (which "python") "\"")))
6885 #t))))))
6886 (propagated-inputs
6887 `(("python-ipython" ,python-ipython)
6888 ;; imported at runtime during connect
6889 ("python-jupyter-client" ,python-jupyter-client)))
6890 (native-inputs
6891 `(("python-flaky" ,python-flaky)
6892 ("python-nose" ,python-nose)
6893 ("python-pytest" ,python-pytest)))
6894 (home-page "https://ipython.org")
6895 (synopsis "IPython Kernel for Jupyter")
6896 (description
6897 "This package provides the IPython kernel for Jupyter.")
6898 (properties `((python2-variant . ,(delay python2-ipykernel))))
6899 (license license:bsd-3)))
6900
6901 ;; Version 5.x and above no longer support Python 2.
6902 (define-public python2-ipykernel
6903 (package
6904 (name "python2-ipykernel")
6905 (version "4.10.1")
6906 (source
6907 (origin
6908 (method url-fetch)
6909 (uri (pypi-uri "ipykernel" version))
6910 (sha256
6911 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6912 (build-system python-build-system)
6913 (arguments
6914 `(#:python ,python-2))
6915 (propagated-inputs
6916 `(("python2-ipython" ,python2-ipython)
6917 ;; imported at runtime during connect
6918 ("python2-jupyter-client" ,python2-jupyter-client)
6919 ("python2-tornado" ,python2-tornado)
6920 ("python2-traitlets" ,python2-traitlets)))
6921 (native-inputs
6922 `(("python2-mock" ,python2-mock)
6923 ("python2-nose" ,python2-nose)
6924 ("python2-pytest" ,python2-pytest)
6925 ("python2-pytest-cov" ,python2-pytest-cov)))
6926 (home-page "https://ipython.org")
6927 (synopsis "IPython Kernel for Jupyter")
6928 (description
6929 "This package provides the IPython kernel for Jupyter.")
6930 (license license:bsd-3)))
6931
6932 (define-public python-pari-jupyter
6933 (package
6934 (name "python-pari-jupyter")
6935 (version "1.3.2")
6936 (source
6937 (origin
6938 (method url-fetch)
6939 (uri (pypi-uri "pari_jupyter" version))
6940 (sha256
6941 (base32
6942 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6943 (build-system python-build-system)
6944 (propagated-inputs
6945 `(("python-ipykernel" ,python-ipykernel)))
6946 (inputs
6947 `(("pari-gp" ,pari-gp)
6948 ("readline" ,readline)))
6949 (arguments
6950 `(#:tests? #f)) ; no test suite
6951 (home-page
6952 "https://github.com/jdemeyer/pari_jupyter")
6953 (synopsis "A Jupyter kernel for PARI/GP")
6954 (description "The package provides a PARI/GP kernel for Jupyter.")
6955 (license license:gpl3+)))
6956
6957 (define-public python-backcall
6958 (package
6959 (name "python-backcall")
6960 (version "0.1.0")
6961 (source
6962 (origin
6963 (method url-fetch)
6964 (uri (pypi-uri "backcall" version))
6965 (sha256
6966 (base32
6967 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
6968 (build-system python-build-system)
6969 (home-page "https://github.com/takluyver/backcall/")
6970 (synopsis "Specifications for callback functions passed in to an API")
6971 (description
6972 "If your code lets other people supply callback functions, it's important
6973 to specify the function signature you expect, and check that functions support
6974 that. Adding extra parameters later would break other peoples code unless
6975 you're careful. The @code{backcall} package provides a way of specifying the
6976 callback signature using a prototype function.")
6977 (license license:bsd-3)))
6978
6979 (define-public python-ipython
6980 (package
6981 (name "python-ipython")
6982 (version "7.9.0")
6983 (source
6984 (origin
6985 (method url-fetch)
6986 (uri (pypi-uri "ipython" version ".tar.gz"))
6987 (sha256
6988 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
6989 (build-system python-build-system)
6990 (propagated-inputs
6991 `(("python-backcall" ,python-backcall)
6992 ("python-pyzmq" ,python-pyzmq)
6993 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
6994 ("python-terminado" ,python-terminado)
6995 ("python-matplotlib" ,python-matplotlib)
6996 ("python-numpy" ,python-numpy)
6997 ("python-numpydoc" ,python-numpydoc)
6998 ("python-jedi" ,python-jedi)
6999 ("python-jinja2" ,python-jinja2)
7000 ("python-mistune" ,python-mistune)
7001 ("python-pexpect" ,python-pexpect)
7002 ("python-pickleshare" ,python-pickleshare)
7003 ("python-simplegeneric" ,python-simplegeneric)
7004 ("python-jsonschema" ,python-jsonschema)
7005 ("python-traitlets" ,python-traitlets)
7006 ("python-nbformat" ,python-nbformat)
7007 ("python-pygments" ,python-pygments)))
7008 (inputs
7009 `(("readline" ,readline)
7010 ("which" ,which)))
7011 (native-inputs
7012 `(("graphviz" ,graphviz)
7013 ("pkg-config" ,pkg-config)
7014 ("python-requests" ,python-requests) ;; for tests
7015 ("python-testpath" ,python-testpath)
7016 ("python-nose" ,python-nose)))
7017 (arguments
7018 `(#:phases
7019 (modify-phases %standard-phases
7020 (add-after 'unpack 'make-docs-reproducible
7021 (lambda _
7022 (substitute* "IPython/sphinxext/ipython_directive.py"
7023 ((".*import datetime") "")
7024 ((".*datetime.datetime.now\\(\\)") "")
7025 (("%timeit") "# %timeit"))
7026 #t))
7027 ;; Tests can only be run after the library has been installed and not
7028 ;; within the source directory.
7029 (delete 'check)
7030 (add-after 'install 'check
7031 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7032 (if tests?
7033 (begin
7034 ;; Make installed package available for running the tests
7035 (add-installed-pythonpath inputs outputs)
7036 (setenv "HOME" "/tmp/") ;; required by a test
7037 ;; We only test the core because one of the other tests
7038 ;; tries to import ipykernel.
7039 (invoke "python" "IPython/testing/iptest.py"
7040 "-v" "IPython/core/tests"))
7041 #t)))
7042 (add-before 'check 'fix-tests
7043 (lambda* (#:key inputs #:allow-other-keys)
7044 (substitute* "./IPython/utils/_process_posix.py"
7045 (("/usr/bin/env', 'which") (which "which")))
7046 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7047 (("#!/usr/bin/env python")
7048 (string-append "#!" (which "python"))))
7049 ;; This test introduces a circular dependency on ipykernel
7050 ;; (which depends on ipython).
7051 (delete-file "IPython/core/tests/test_display.py")
7052 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7053 (delete-file "IPython/core/tests/test_interactiveshell.py")
7054 #t)))))
7055 (home-page "https://ipython.org")
7056 (synopsis "IPython is a tool for interactive computing in Python")
7057 (description
7058 "IPython provides a rich architecture for interactive computing with:
7059 Powerful interactive shells, a browser-based notebook, support for interactive
7060 data visualization, embeddable interpreters and tools for parallel
7061 computing.")
7062 (properties `((python2-variant . ,(delay python2-ipython))))
7063 (license license:bsd-3)))
7064
7065 ;; This is the latest release of the LTS version of ipython with support for
7066 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7067 ;; dropped support for Python 2.7.
7068 (define-public python2-ipython
7069 (package
7070 (name "python2-ipython")
7071 (version "5.8.0")
7072 (source
7073 (origin
7074 (method url-fetch)
7075 (uri (pypi-uri "ipython" version ".tar.gz"))
7076 (sha256
7077 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7078 (build-system python-build-system)
7079 (propagated-inputs
7080 `(("python2-backports-shutil-get-terminal-size"
7081 ,python2-backports-shutil-get-terminal-size)
7082 ("python2-pathlib2" ,python2-pathlib2)
7083 ("python2-pyzmq" ,python2-pyzmq)
7084 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7085 ("python2-terminado" ,python2-terminado)
7086 ("python2-matplotlib" ,python2-matplotlib)
7087 ("python2-numpy" ,python2-numpy)
7088 ("python2-numpydoc" ,python2-numpydoc)
7089 ("python2-jinja2" ,python2-jinja2)
7090 ("python2-mistune" ,python2-mistune)
7091 ("python2-pexpect" ,python2-pexpect)
7092 ("python2-pickleshare" ,python2-pickleshare)
7093 ("python2-simplegeneric" ,python2-simplegeneric)
7094 ("python2-jsonschema" ,python2-jsonschema)
7095 ("python2-traitlets" ,python2-traitlets)
7096 ("python2-nbformat" ,python2-nbformat)
7097 ("python2-pygments" ,python2-pygments)))
7098 (inputs
7099 `(("readline" ,readline)
7100 ("which" ,which)))
7101 (native-inputs
7102 `(("graphviz" ,graphviz)
7103 ("pkg-config" ,pkg-config)
7104 ("python2-requests" ,python2-requests) ;; for tests
7105 ("python2-testpath" ,python2-testpath)
7106 ("python2-mock" ,python2-mock)
7107 ("python2-nose" ,python2-nose)))
7108 (arguments
7109 `(#:python ,python-2
7110 #:phases
7111 (modify-phases %standard-phases
7112 (add-before 'check 'delete-broken-tests
7113 (lambda* (#:key inputs #:allow-other-keys)
7114 ;; These tests throw errors for unknown reasons.
7115 (delete-file "IPython/core/tests/test_displayhook.py")
7116 (delete-file "IPython/core/tests/test_magic_terminal.py")
7117 (delete-file "IPython/core/tests/test_profile.py")
7118 #t)))))
7119 (home-page "https://ipython.org")
7120 (synopsis "IPython is a tool for interactive computing in Python")
7121 (description
7122 "IPython provides a rich architecture for interactive computing with:
7123 Powerful interactive shells, a browser-based notebook, support for interactive
7124 data visualization, embeddable interpreters and tools for parallel
7125 computing.")
7126 (license license:bsd-3)))
7127
7128 (define-public python-ipython-documentation
7129 (package
7130 (inherit python-ipython)
7131 (name "python-ipython-documentation")
7132 (version (package-version python-ipython))
7133 (arguments
7134 `(#:phases
7135 (modify-phases %standard-phases
7136 (delete 'build)
7137 (delete 'check)
7138 (replace 'install
7139 (lambda* (#:key outputs #:allow-other-keys)
7140 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7141 (doc (string-append data "/doc/" ,name "-" ,version))
7142 (html (string-append doc "/html"))
7143 (man1 (string-append data "/man/man1"))
7144 (info (string-append data "/info"))
7145 (examples (string-append doc "/examples"))
7146 (python-arg (string-append "PYTHON=" (which "python"))))
7147 (setenv "LANG" "en_US.utf8")
7148 (with-directory-excursion "docs"
7149 ;; FIXME: pdf fails to build
7150 ;;(system* "make" "pdf" "PAPER=a4")
7151 (system* "make" python-arg "html")
7152 ;; FIXME: the generated texi file contains ^@^@, which trips
7153 ;; up the parser.
7154 ;; (system* "make" python-arg "info")
7155 )
7156 (copy-recursively "docs/man" man1)
7157 (copy-recursively "examples" examples)
7158 (copy-recursively "docs/build/html" html)
7159 ;; (copy-file "docs/build/latex/ipython.pdf"
7160 ;; (string-append doc "/ipython.pdf"))
7161 (mkdir-p info)
7162 ;; (copy-file "docs/build/texinfo/ipython.info"
7163 ;; (string-append info "/ipython.info"))
7164 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7165 #t)))))
7166 (inputs
7167 `(("python-ipython" ,python-ipython)
7168 ("python-ipykernel" ,python-ipykernel)))
7169 (native-inputs
7170 `(("python-sphinx" ,python-sphinx)
7171 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7172 ;; FIXME: It's possible that a smaller union would work just as well.
7173 ("texlive" ,(texlive-union (list texlive-amsfonts
7174 texlive-fonts-ec
7175 texlive-generic-ifxetex
7176 texlive-generic-pdftex
7177 texlive-latex-capt-of
7178 texlive-latex-cmap
7179 texlive-latex-environ
7180 texlive-latex-eqparbox
7181 texlive-latex-etoolbox
7182 texlive-latex-expdlist
7183 texlive-latex-fancyhdr
7184 texlive-latex-fancyvrb
7185 texlive-latex-fncychap
7186 texlive-latex-float
7187 texlive-latex-framed
7188 texlive-latex-geometry
7189 texlive-latex-graphics
7190 texlive-latex-hyperref
7191 texlive-latex-mdwtools
7192 texlive-latex-multirow
7193 texlive-latex-needspace
7194 texlive-latex-oberdiek
7195 texlive-latex-parskip
7196 texlive-latex-preview
7197 texlive-latex-tabulary
7198 texlive-latex-threeparttable
7199 texlive-latex-titlesec
7200 texlive-latex-trimspaces
7201 texlive-latex-ucs
7202 texlive-latex-upquote
7203 texlive-latex-url
7204 texlive-latex-varwidth
7205 texlive-latex-wrapfig)))
7206 ("texinfo" ,texinfo)))))
7207
7208 (define-public python-urwid
7209 (package
7210 (name "python-urwid")
7211 (version "2.1.0")
7212 (source
7213 (origin
7214 (method url-fetch)
7215 (uri (pypi-uri "urwid" version))
7216 (sha256
7217 (base32
7218 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7219 (build-system python-build-system)
7220 (home-page "http://urwid.org")
7221 (synopsis "Console user interface library for Python")
7222 (description
7223 "Urwid is a curses-based UI/widget library for Python. It includes many
7224 features useful for text console applications.")
7225 (license license:lgpl2.1+)))
7226
7227 (define-public python2-urwid
7228 (package-with-python2 python-urwid))
7229
7230 (define-public python-urwidtrees
7231 (package
7232 (name "python-urwidtrees")
7233 (version "1.0.2")
7234 (source
7235 (origin
7236 (method git-fetch)
7237 ;; package author intends on distributing via github rather than pypi:
7238 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7239 (uri (git-reference
7240 (url "https://github.com/pazz/urwidtrees")
7241 (commit version)))
7242 (file-name (git-file-name name version))
7243 (sha256
7244 (base32
7245 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7246 (build-system python-build-system)
7247 (arguments
7248 '(#:use-setuptools? #f
7249 #:tests? #f)) ; no tests
7250 (propagated-inputs `(("python-urwid" ,python-urwid)))
7251 (home-page "https://github.com/pazz/urwidtrees")
7252 (synopsis "Tree widgets for urwid")
7253 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7254 toolkit. Use it to build trees of widgets.")
7255 (license license:gpl3+)))
7256
7257 (define-public python2-urwidtrees
7258 (package-with-python2 python-urwidtrees))
7259
7260 (define-public python-ua-parser
7261 (package
7262 (name "python-ua-parser")
7263 (version "0.8.0")
7264 (source
7265 (origin
7266 (method url-fetch)
7267 (uri (pypi-uri "ua-parser" version))
7268 (sha256
7269 (base32
7270 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7271 (build-system python-build-system)
7272 (arguments
7273 `(#:tests? #f)) ;no test suite in release
7274 (native-inputs
7275 `(("python-pyyaml" ,python-pyyaml)))
7276 (home-page "https://github.com/ua-parser/uap-python")
7277 (synopsis "User agent parser")
7278 (description
7279 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7280 (license license:asl2.0)))
7281
7282 (define-public python2-ua-parser
7283 (package-with-python2 python-ua-parser))
7284
7285 (define-public python-user-agents
7286 (package
7287 (name "python-user-agents")
7288 (version "1.1.0")
7289 (source
7290 (origin
7291 (method url-fetch)
7292 (uri (pypi-uri "user-agents" version))
7293 (sha256
7294 (base32
7295 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7296 (build-system python-build-system)
7297 (arguments
7298 `(#:tests? #f)) ;missing devices.json test file in release
7299 (propagated-inputs
7300 `(("python-ua-parser" ,python-ua-parser)))
7301 (home-page "https://github.com/selwin/python-user-agents")
7302 (synopsis "User Agent strings parsing library")
7303 (description
7304 "A library to identify devices (phones, tablets) and their capabilities by
7305 parsing (browser/HTTP) user agent strings.")
7306 (license license:expat)))
7307
7308 (define-public python2-user-agents
7309 (package-with-python2 python-user-agents))
7310
7311 (define-public python-dbus
7312 (package
7313 (name "python-dbus")
7314 (version "1.2.16")
7315 (source
7316 (origin
7317 (method url-fetch)
7318 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7319 "dbus-python-" version ".tar.gz"))
7320 (sha256
7321 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7322 (build-system gnu-build-system)
7323 (native-inputs
7324 `(("pkg-config" ,pkg-config)))
7325 (inputs
7326 `(("python" ,python-wrapper)
7327 ("dbus-glib" ,dbus-glib)))
7328 (synopsis "Python bindings for D-bus")
7329 (description "python-dbus provides bindings for libdbus, the reference
7330 implementation of D-Bus.")
7331 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7332 (license license:expat)))
7333
7334 (define-public python2-dbus
7335 (package (inherit python-dbus)
7336 (name "python2-dbus")
7337 (inputs `(("python" ,python-2)
7338 ,@(alist-delete "python"
7339 (package-inputs python-dbus)
7340 equal?)))))
7341
7342 (define-public python-notify2
7343 (package
7344 (name "python-notify2")
7345 (version "0.3.1")
7346 (source
7347 (origin
7348 (method url-fetch)
7349 (uri (pypi-uri "notify2" version))
7350 (sha256
7351 (base32
7352 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7353 (build-system python-build-system)
7354 (arguments `(#:tests? #f)) ; tests depend on system state
7355 (native-inputs
7356 `(("python-dbus" ,python-dbus)))
7357 (home-page "https://bitbucket.org/takluyver/pynotify2")
7358 (synopsis "Python interface to D-Bus notifications")
7359 (description
7360 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7361 It is a reimplementation of pynotify in pure Python, and an alternative to
7362 the GObject Introspection bindings to libnotify for non-GTK applications.")
7363 (license (list license:bsd-2
7364 license:lgpl2.1+))))
7365
7366 (define-public python2-notify2
7367 (package-with-python2 python-notify2))
7368
7369 ;; beautifulsoup4 has a totally different namespace than 3.x,
7370 ;; and pypi seems to put it under its own name, so I guess we should too
7371 (define-public python-beautifulsoup4
7372 (package
7373 (name "python-beautifulsoup4")
7374 (version "4.9.1")
7375 (source
7376 (origin
7377 (method url-fetch)
7378 (uri (pypi-uri "beautifulsoup4" version))
7379 (sha256
7380 (base32
7381 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7382 (build-system python-build-system)
7383 (arguments
7384 `(#:phases
7385 (modify-phases %standard-phases
7386 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7387 ;; must use this conversion script when building with Python 3. The
7388 ;; conversion script also runs the tests.
7389 ;; For more information, see the file 'convert-py3k' in the source
7390 ;; distribution.
7391 (replace 'check
7392 (lambda _ (invoke "./convert-py3k"))))))
7393 (propagated-inputs
7394 `(("python-soupsieve" ,python-soupsieve)))
7395 (home-page
7396 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7397 (synopsis
7398 "Python screen-scraping library")
7399 (description
7400 "Beautiful Soup is a Python library designed for rapidly setting up
7401 screen-scraping projects. It offers Pythonic idioms for navigating,
7402 searching, and modifying a parse tree, providing a toolkit for
7403 dissecting a document and extracting what you need. It automatically
7404 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7405 (license license:expat)
7406 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7407
7408 (define-public python2-beautifulsoup4
7409 (package
7410 (inherit (package-with-python2
7411 (strip-python2-variant python-beautifulsoup4)))
7412 (arguments `(#:python ,python-2))))
7413
7414 (define-public python-soupsieve
7415 (package
7416 (name "python-soupsieve")
7417 (version "2.0.1")
7418 (source
7419 (origin
7420 (method url-fetch)
7421 (uri (pypi-uri "soupsieve" version))
7422 (sha256
7423 (base32
7424 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7425 (build-system python-build-system)
7426 (arguments `(#:tests? #f))
7427 ;;XXX: 2 tests fail currently despite claming they were to be
7428 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7429 ;;don't want to create a circular dependency.
7430 (home-page "https://github.com/facelessuser/soupsieve")
7431 (synopsis "CSS selector library")
7432 (description
7433 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7434 Soup 4. It aims to provide selecting, matching, and filtering using modern
7435 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7436 specifications up through the latest CSS level 4 drafts and beyond (though
7437 some are not yet implemented).")
7438 (properties `((python2-variant . ,(delay python2-soupsieve))))
7439 (license license:expat)))
7440
7441 ;; This is the last version that supports python-2
7442 (define-public python2-soupsieve
7443 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7444 (package
7445 (inherit base)
7446 (version "1.9.6")
7447 (source
7448 (origin
7449 (method url-fetch)
7450 (uri (pypi-uri "soupsieve" version))
7451 (sha256
7452 (base32
7453 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7454 (propagated-inputs
7455 `(("python2-backports-functools-lru-cache"
7456 ,python2-backports-functools-lru-cache)
7457 ,@(package-propagated-inputs base))))))
7458
7459 (define-public python-netifaces
7460 (package
7461 (name "python-netifaces")
7462 (version "0.10.9")
7463 (source
7464 (origin
7465 (method url-fetch)
7466 (uri (pypi-uri "netifaces" version))
7467 (sha256
7468 (base32
7469 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7470 (build-system python-build-system)
7471 (home-page "https://github.com/al45tair/netifaces")
7472 (synopsis
7473 "Python module for portable network interface information")
7474 (description
7475 "Netifaces is a Python module providing information on network
7476 interfaces in an easy and portable manner.")
7477 (license license:expat)))
7478
7479 (define-public python2-netifaces
7480 (package-with-python2 python-netifaces))
7481
7482 (define-public python-networkx
7483 (package
7484 (name "python-networkx")
7485 (version "2.5")
7486 (source
7487 (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "networkx" version))
7490 (sha256
7491 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7492 (build-system python-build-system)
7493 (arguments
7494 '(#:phases (modify-phases %standard-phases
7495 (replace 'check
7496 (lambda* (#:key tests? #:allow-other-keys)
7497 (if tests?
7498 (invoke "pytest" "-vv" "--pyargs" "networkx")
7499 (format #t "test suite not run~%"))
7500 #t)))))
7501 ;; python-decorator is needed at runtime.
7502 (propagated-inputs
7503 `(("python-decorator" ,python-decorator)))
7504 (native-inputs
7505 `(("python-pytest" ,python-pytest)))
7506 (home-page "https://networkx.github.io/")
7507 (synopsis "Python module for creating and manipulating graphs and networks")
7508 (description
7509 "NetworkX is a Python package for the creation, manipulation, and study
7510 of the structure, dynamics, and functions of complex networks.")
7511 (properties `((python2-variant . ,(delay python2-networkx))))
7512 (license license:bsd-3)))
7513
7514 ;; NetworkX 2.2 is the last version with support for Python 2.
7515 (define-public python2-networkx
7516 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7517 (package
7518 (inherit base)
7519 (version "2.2")
7520 (source (origin
7521 (method url-fetch)
7522 (uri (pypi-uri "networkx" version ".zip"))
7523 (sha256
7524 (base32
7525 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7526 (arguments
7527 `(#:python ,python-2))
7528 (native-inputs
7529 `(("python-nose" ,python2-nose)
7530 ("unzip" ,unzip))))))
7531
7532 (define-public python-datrie
7533 (package
7534 (name "python-datrie")
7535 (version "0.8.2")
7536 (source
7537 (origin
7538 (method url-fetch)
7539 (uri (pypi-uri "datrie" version))
7540 (sha256
7541 (base32
7542 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7543 (build-system python-build-system)
7544 (native-inputs
7545 `(("python-cython" ,python-cython)
7546 ("python-hypothesis" ,python-hypothesis)
7547 ("python-pytest" ,python-pytest)
7548 ("python-pytest-runner" ,python-pytest-runner)))
7549 (home-page "https://github.com/kmike/datrie")
7550 (synopsis "Fast, efficiently stored trie for Python")
7551 (description
7552 "This package provides a fast, efficiently stored trie implementation for
7553 Python.")
7554 (license license:lgpl2.1+)))
7555
7556 (define-public snakemake
7557 (package
7558 (name "snakemake")
7559 (version "5.7.1")
7560 (source
7561 (origin
7562 (method url-fetch)
7563 (uri (pypi-uri "snakemake" version))
7564 (sha256
7565 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7566 (build-system python-build-system)
7567 (arguments
7568 ;; TODO: Package missing test dependencies.
7569 '(#:tests? #f
7570 #:phases
7571 (modify-phases %standard-phases
7572 ;; For cluster execution Snakemake will call Python. Since there is
7573 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7574 ;; this by calling the snakemake wrapper instead.
7575 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7576 (lambda* (#:key outputs #:allow-other-keys)
7577 (substitute* "snakemake/executors.py"
7578 (("\\{sys.executable\\} -m snakemake")
7579 (string-append (assoc-ref outputs "out")
7580 "/bin/snakemake")))
7581 #t)))))
7582 (propagated-inputs
7583 `(("python-appdirs" ,python-appdirs)
7584 ("python-configargparse" ,python-configargparse)
7585 ("python-datrie" ,python-datrie)
7586 ("python-docutils" ,python-docutils)
7587 ("python-gitpython" ,python-gitpython)
7588 ("python-jinja2" ,python-jinja2)
7589 ("python-jsonschema" ,python-jsonschema)
7590 ("python-networkx" ,python-networkx)
7591 ("python-psutil" ,python-psutil)
7592 ("python-pyyaml" ,python-pyyaml)
7593 ("python-ratelimiter" ,python-ratelimiter)
7594 ("python-requests" ,python-requests)
7595 ("python-wrapt" ,python-wrapt)))
7596 (home-page "https://snakemake.readthedocs.io")
7597 (synopsis "Python-based execution environment for make-like workflows")
7598 (description
7599 "Snakemake aims to reduce the complexity of creating workflows by
7600 providing a clean and modern domain specific specification language (DSL) in
7601 Python style, together with a fast and comfortable execution environment.")
7602 (license license:expat)))
7603
7604 (define-public python-pyqrcode
7605 (package
7606 (name "python-pyqrcode")
7607 (version "1.2.1")
7608 (source
7609 (origin
7610 (method url-fetch)
7611 (uri (pypi-uri "PyQRCode" version))
7612 (sha256
7613 (base32
7614 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7615 (build-system python-build-system)
7616 (home-page
7617 "https://github.com/mnooner256/pyqrcode")
7618 (synopsis "QR code generator")
7619 (description
7620 "Pyqrcode is a QR code generator written purely in Python with
7621 SVG, EPS, PNG and terminal output.")
7622 (license license:bsd-3)))
7623
7624 (define-public python-seaborn
7625 (package
7626 (name "python-seaborn")
7627 (version "0.10.0")
7628 (source
7629 (origin
7630 (method url-fetch)
7631 (uri (pypi-uri "seaborn" version))
7632 (sha256
7633 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7634 (build-system python-build-system)
7635 (arguments
7636 `(#:phases
7637 (modify-phases %standard-phases
7638 (add-before 'check 'start-xserver
7639 (lambda* (#:key inputs #:allow-other-keys)
7640 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7641 ;; There must be a running X server and make check doesn't
7642 ;; start one. Therefore we must do it.
7643 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7644 (setenv "DISPLAY" ":1")
7645 #t)))
7646 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7647 (propagated-inputs
7648 `(("python-pandas" ,python-pandas)
7649 ("python-matplotlib" ,python-matplotlib)
7650 ("python-numpy" ,python-numpy)
7651 ("python-scipy" ,python-scipy)))
7652 (native-inputs
7653 `(("python-pytest" ,python-pytest)
7654 ("xorg-server" ,xorg-server-for-tests)))
7655 (home-page "https://seaborn.pydata.org/")
7656 (synopsis "Statistical data visualization")
7657 (description
7658 "Seaborn is a library for making attractive and informative statistical
7659 graphics in Python. It is built on top of matplotlib and tightly integrated
7660 with the PyData stack, including support for numpy and pandas data structures
7661 and statistical routines from scipy and statsmodels.")
7662 (properties `((python2-variant . ,(delay python2-seaborn))))
7663 (license license:bsd-3)))
7664
7665 ;; 0.9.1 is the last release with support for Python 2.
7666 (define-public python2-seaborn
7667 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7668 (package
7669 (inherit base)
7670 (version "0.9.1")
7671 (source (origin
7672 (method url-fetch)
7673 (uri (pypi-uri "seaborn" version))
7674 (sha256
7675 (base32
7676 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7677
7678 (define-public python-mpmath
7679 (package
7680 (name "python-mpmath")
7681 (version "1.1.0")
7682 (source (origin
7683 (method url-fetch)
7684 (uri (pypi-uri "mpmath" version))
7685 (file-name (git-file-name name version))
7686 (sha256
7687 (base32
7688 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7689 (build-system python-build-system)
7690 (native-inputs
7691 `(("python-pytest" ,python-pytest)))
7692 (arguments
7693 '(#:phases
7694 (modify-phases %standard-phases
7695 (replace 'check
7696 (lambda _
7697 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7698 (home-page "http://mpmath.org")
7699 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7700 (description
7701 "@code{mpmath} can be used as an arbitrary-precision substitute for
7702 Python's float/complex types and math/cmath modules, but also does much
7703 more advanced mathematics.")
7704 (license license:bsd-3)))
7705
7706 (define-public python2-mpmath
7707 (package-with-python2 python-mpmath))
7708
7709 (define-public python-bigfloat
7710 (package
7711 (name "python-bigfloat")
7712 (version "0.3.0")
7713 (source
7714 (origin
7715 (method url-fetch)
7716 (uri (pypi-uri "bigfloat" version))
7717 (sha256
7718 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7719 (build-system python-build-system)
7720 (inputs
7721 `(("mpfr" ,mpfr)))
7722 (home-page "https://github.com/mdickinson/bigfloat")
7723 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7724 (description
7725 "This package provides a Python interface to the MPFR library for
7726 multiprecision arithmetic.")
7727 (license license:lgpl3+)))
7728
7729 (define-public python2-bigfloat
7730 (package-with-python2 python-bigfloat))
7731
7732 (define-public python-sympy
7733 (package
7734 (name "python-sympy")
7735 (version "1.6.2")
7736 (source
7737 (origin
7738 (method url-fetch)
7739 (uri (pypi-uri "sympy" version))
7740 (sha256
7741 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7742 (build-system python-build-system)
7743 (arguments
7744 `(#:phases
7745 (modify-phases %standard-phases
7746 (replace 'check
7747 (lambda* (#:key outputs #:allow-other-keys)
7748 (invoke
7749 (or (which "python3") (which "python"))
7750 "-c" "import sympy; sympy.test(\"/core\")"))))))
7751 (propagated-inputs
7752 `(("python-mpmath" ,python-mpmath)))
7753 (home-page "https://www.sympy.org/")
7754 (synopsis "Python library for symbolic mathematics")
7755 (description
7756 "SymPy is a Python library for symbolic mathematics. It aims to become a
7757 full-featured computer algebra system (CAS) while keeping the code as simple
7758 as possible in order to be comprehensible and easily extensible.")
7759 (license license:bsd-3)))
7760
7761 (define-public python2-sympy
7762 (package
7763 (inherit (package-with-python2 python-sympy))
7764 (version "1.5.1") ; last release for python2
7765 (source
7766 (origin
7767 (method url-fetch)
7768 (uri (pypi-uri "sympy" version))
7769 (sha256
7770 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7771
7772 (define-public python-q
7773 (package
7774 (name "python-q")
7775 (version "2.6")
7776 (source
7777 (origin
7778 (method url-fetch)
7779 (uri (pypi-uri "q" version))
7780 (sha256
7781 (base32
7782 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7783 (build-system python-build-system)
7784 (home-page "https://github.com/zestyping/q")
7785 (synopsis "Quick-and-dirty debugging output for tired programmers")
7786 (description
7787 "q is a Python module for \"print\" style of debugging Python code. It
7788 provides convenient short API for print out of values, tracebacks, and
7789 falling into the Python interpreter.")
7790 (license license:asl2.0)))
7791
7792 (define-public python2-q
7793 (package-with-python2 python-q))
7794
7795 (define-public python-xlib
7796 (package
7797 (name "python-xlib")
7798 (version "0.27")
7799 (source
7800 (origin
7801 (method git-fetch)
7802 (uri (git-reference
7803 (url "https://github.com/python-xlib/python-xlib")
7804 (commit version)))
7805 (file-name (git-file-name name version))
7806 (sha256
7807 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7808 (build-system python-build-system)
7809 (arguments
7810 `(#:phases
7811 (modify-phases %standard-phases
7812 (add-before 'check 'start-xserver
7813 (lambda* (#:key inputs #:allow-other-keys)
7814 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7815 ;; There must be a running X server and make check doesn't
7816 ;; start one. Therefore we must do it.
7817 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7818 (setenv "DISPLAY" ":1")
7819 #t))))))
7820 (native-inputs
7821 `(("python-mock" ,python-mock)
7822 ("python-setuptools-scm" ,python-setuptools-scm)
7823 ("python-six" ,python-six)
7824 ("xorg-server" ,xorg-server)))
7825 (home-page "https://github.com/python-xlib/python-xlib")
7826 (synopsis "Python X11 client library")
7827 (description
7828 "The Python X Library is intended to be a fully functional
7829 X client library for Python programs. It is useful to implement
7830 low-level X clients. It is written entirely in Python.")
7831 (license license:gpl2+)))
7832
7833 (define-public python2-xlib
7834 (package-with-python2 python-xlib))
7835
7836 (define-public python-singledispatch
7837 (package
7838 (name "python-singledispatch")
7839 (version "3.4.0.3")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "singledispatch" version))
7844 (sha256
7845 (base32
7846 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7847 (build-system python-build-system)
7848 (native-inputs
7849 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7850 (home-page
7851 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7852 (synopsis "Backport of singledispatch feature from Python 3.4")
7853 (description
7854 "This library brings functools.singledispatch from Python 3.4 to Python
7855 2.6-3.3.")
7856 (license license:expat)))
7857
7858 (define-public python2-singledispatch
7859 (package-with-python2 python-singledispatch))
7860
7861 ;; the python- version can be removed with python-3.5
7862 (define-public python-backports-abc
7863 (package
7864 (name "python-backports-abc")
7865 (version "0.5")
7866 (source
7867 (origin
7868 (method url-fetch)
7869 (uri (pypi-uri "backports_abc" version))
7870 (sha256
7871 (base32
7872 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7873 (build-system python-build-system)
7874 (home-page "https://github.com/cython/backports_abc")
7875 (synopsis "Backport of additions to the 'collections.abc' module")
7876 (description
7877 "Python-backports-abc provides a backport of additions to the
7878 @code{collections.abc} module in Python-3.5.")
7879 (license license:psfl)))
7880
7881 (define-public python2-backports-abc
7882 (package-with-python2 python-backports-abc))
7883
7884 (define-public python-backports-csv
7885 (package
7886 (name "python-backports-csv")
7887 (version "1.0.7")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "backports.csv" version))
7892 (sha256
7893 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7894 (build-system python-build-system)
7895 (home-page "https://github.com/ryanhiebert/backports.csv")
7896 (synopsis "Backport of Python 3's csv module for Python 2")
7897 (description
7898 "Provides a backport of Python 3's @code{csv} module for parsing
7899 comma separated values. The API of the @code{csv} module in Python 2
7900 is drastically different from the @code{csv} module in Python 3.
7901 This is due, for the most part, to the difference between str in
7902 Python 2 and Python 3.")
7903 (license license:psfl)))
7904
7905 (define-public python2-backports-csv
7906 (package-with-python2 python-backports-csv))
7907
7908 (define-public python2-backports-shutil-get-terminal-size
7909 (package
7910 (name "python2-backports-shutil-get-terminal-size")
7911 (version "1.0.0")
7912 (source
7913 (origin
7914 (method url-fetch)
7915 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7916 (sha256
7917 (base32
7918 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7919 (build-system python-build-system)
7920 (arguments
7921 `(#:python ,python-2
7922 #:phases
7923 (modify-phases %standard-phases
7924 (replace 'check
7925 (lambda _
7926 (setenv "PYTHONPATH" (string-append "./build/lib:"
7927 (getenv "PYTHONPATH")))
7928 (invoke "py.test" "-v"))))))
7929 (native-inputs
7930 `(("python2-pytest" ,python2-pytest)))
7931 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7932 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7933 (description
7934 "This package provides a backport of the @code{get_terminal_size
7935 function} from Python 3.3's @code{shutil}.
7936 Unlike the original version it is written in pure Python rather than C,
7937 so it might be a tiny bit slower.")
7938 (license license:expat)))
7939
7940 (define-public python-waf
7941 (package
7942 (name "python-waf")
7943 (version "2.0.19")
7944 (source (origin
7945 (method url-fetch)
7946 (uri (string-append "https://waf.io/"
7947 "waf-" version ".tar.bz2"))
7948 (sha256
7949 (base32
7950 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7951 (build-system python-build-system)
7952 (arguments
7953 '(#:phases
7954 (modify-phases %standard-phases
7955 (replace 'build
7956 (lambda _
7957 ;; XXX: Find a way to add all extra tools.
7958 (let ((tools '("gccdeps"
7959 "clang_compilation_database")))
7960 (invoke "python" "waf-light" "configure" "build"
7961 (string-append "--tools="
7962 (string-join tools ","))))))
7963 (replace 'check
7964 (lambda _
7965 (invoke "python" "waf" "--version")))
7966 (replace 'install
7967 (lambda* (#:key outputs #:allow-other-keys)
7968 (let ((out (assoc-ref outputs "out")))
7969 (install-file "waf" (string-append out "/bin")))
7970 #t))
7971 ;; waf breaks when it is wrapped.
7972 (delete 'wrap))))
7973 (home-page "https://waf.io/")
7974 (synopsis "Python-based build system")
7975 (description
7976 "Waf is a Python-based framework for configuring, compiling and installing
7977 applications.")
7978 (license license:bsd-3)))
7979
7980 (define-public python2-waf
7981 (package-with-python2 python-waf))
7982
7983 (define-public python-pyzmq
7984 (package
7985 (name "python-pyzmq")
7986 (version "17.1.2")
7987 (source
7988 (origin
7989 (method url-fetch)
7990 (uri (pypi-uri "pyzmq" version))
7991 (sha256
7992 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
7993 (build-system python-build-system)
7994 (arguments
7995 `(#:configure-flags
7996 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7997 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7998 ;; --inplace' for 'python setup.py test' to work.
7999 #:tests? #f))
8000 (inputs
8001 `(("zeromq" ,zeromq)))
8002 (native-inputs
8003 `(("pkg-config" ,pkg-config)
8004 ("python-nose" ,python-nose)))
8005 (home-page "https://github.com/zeromq/pyzmq")
8006 (synopsis "Python bindings for 0MQ")
8007 (description
8008 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8009 (license license:bsd-4)))
8010
8011 (define-public python2-pyzmq
8012 (package-with-python2 python-pyzmq))
8013
8014 (define-public python-pep8
8015 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8016 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8017 ;; some dependents' test suites, and nothing more.
8018 (package
8019 (name "python-pep8")
8020 (version "1.7.0")
8021 (source
8022 (origin
8023 (method url-fetch)
8024 (uri (pypi-uri "pep8" version))
8025 (sha256
8026 (base32
8027 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8028 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8029 (build-system python-build-system)
8030 (home-page "https://pep8.readthedocs.org/")
8031 (synopsis "Python style guide checker")
8032 (description
8033 "This tools checks Python code against some of the style conventions in
8034 PEP 8.")
8035 (license license:expat)))
8036
8037 (define-public python2-pep8
8038 (package-with-python2 python-pep8))
8039
8040 (define-public python-pep517
8041 (package
8042 (name "python-pep517")
8043 (version "0.8.2")
8044 (source
8045 (origin
8046 (method url-fetch)
8047 (uri (pypi-uri "pep517" version))
8048 (sha256
8049 (base32
8050 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8051 (build-system python-build-system)
8052 (arguments
8053 '(#:phases
8054 (modify-phases %standard-phases
8055 (replace 'check
8056 (lambda* (#:key tests? #:allow-other-keys)
8057 (delete-file "pytest.ini")
8058 ;; This test tries to connect to the internet
8059 (delete-file "tests/test_meta.py")
8060 (if tests?
8061 (invoke "pytest")
8062 #t))))))
8063 (native-inputs
8064 `(("python-mock" ,python-mock)
8065 ("python-pytest" ,python-pytest)
8066 ("python-testpath" ,python-testpath)))
8067 (propagated-inputs
8068 `(("python-toml" ,python-toml)
8069 ("python-wheel" ,python-wheel)))
8070 (home-page "https://github.com/pypa/pep517")
8071 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8072 (description
8073 "Wrappers to build Python packages using PEP 517 hooks.")
8074 (properties `((python2-variant . ,(delay python2-pep517))))
8075 (license license:expat)))
8076
8077 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8078 (define-public python2-pep517
8079 (let ((base (package-with-python2
8080 (strip-python2-variant python-pep517))))
8081 (package
8082 (inherit base)
8083 (name "python2-pep517")
8084 (arguments
8085 `(#:tests? #f
8086 ,@(package-arguments base)))
8087 (native-inputs `()))))
8088
8089 (define-public python-pyflakes
8090 (package
8091 (name "python-pyflakes")
8092 (version "2.2.0")
8093 (source
8094 (origin
8095 (method url-fetch)
8096 (uri (pypi-uri "pyflakes" version))
8097 (sha256
8098 (base32
8099 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8100 (build-system python-build-system)
8101 (home-page
8102 "https://github.com/pyflakes/pyflakes")
8103 (synopsis "Passive checker of Python programs")
8104 (description
8105 "Pyflakes statically checks Python source code for common errors.")
8106 (license license:expat)))
8107
8108 (define-public python2-pyflakes
8109 (package-with-python2 python-pyflakes))
8110
8111 ;; Flake8 2.6 requires an older version of pyflakes.
8112 ;; This should be removed ASAP.
8113 (define-public python-pyflakes-1.2
8114 (package (inherit python-pyflakes)
8115 (version "1.2.3")
8116 (source
8117 (origin
8118 (method url-fetch)
8119 (uri (pypi-uri "pyflakes" version))
8120 (sha256
8121 (base32
8122 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
8123 (arguments
8124 '(#:phases
8125 (modify-phases %standard-phases
8126 ;; This one test fails.
8127 (replace 'check
8128 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
8129 (native-inputs
8130 `(("python-pytest" ,python-pytest)))))
8131
8132 (define-public python-mccabe
8133 (package
8134 (name "python-mccabe")
8135 (version "0.6.1")
8136 (source
8137 (origin
8138 (method url-fetch)
8139 (uri (pypi-uri "mccabe" version))
8140 (sha256
8141 (base32
8142 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8143 (build-system python-build-system)
8144 (native-inputs
8145 `(("python-pytest" ,python-pytest-bootstrap)
8146 ("python-pytest-runner" ,python-pytest-runner)))
8147 (home-page "https://github.com/flintwork/mccabe")
8148 (synopsis "McCabe checker, plugin for flake8")
8149 (description
8150 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8151 complexity of Python source code.")
8152 (license license:expat)))
8153
8154 (define-public python2-mccabe
8155 (package-with-python2 python-mccabe))
8156
8157 (define-public python-mccabe-0.2.1
8158 (package (inherit python-mccabe)
8159 (version "0.2.1")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "mccabe" version))
8164 (sha256
8165 (base32
8166 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
8167
8168 (define-public python2-mccabe-0.2.1
8169 (package-with-python2 python-mccabe-0.2.1))
8170
8171 ;; Flake8 2.4.1 requires an older version of pep8.
8172 ;; This should be removed ASAP.
8173 (define-public python-pep8-1.5.7
8174 (package (inherit python-pep8)
8175 (version "1.5.7")
8176 (source
8177 (origin
8178 (method url-fetch)
8179 (uri (pypi-uri "pep8" version))
8180 (sha256
8181 (base32
8182 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
8183 (arguments
8184 ;; XXX Tests not compatible with Python 3.5.
8185 '(#:tests? #f))))
8186
8187 (define-public python2-pep8-1.5.7
8188 (package-with-python2 python-pep8-1.5.7))
8189
8190 (define-public python-flake8
8191 (package
8192 (name "python-flake8")
8193 (version "3.8.4")
8194 (source (origin
8195 (method url-fetch)
8196 (uri (pypi-uri "flake8" version))
8197 (sha256
8198 (base32
8199 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8200 (build-system python-build-system)
8201 (arguments
8202 `(#:phases
8203 (modify-phases %standard-phases
8204 (delete 'check)
8205 (add-after 'install 'check
8206 (lambda* (#:key inputs outputs #:allow-other-keys)
8207 (add-installed-pythonpath inputs outputs)
8208 (invoke "pytest" "-v")
8209 #t)))))
8210 (propagated-inputs
8211 `(("python-pycodestyle" ,python-pycodestyle)
8212 ("python-entrypoints" ,python-entrypoints)
8213 ("python-pyflakes" ,python-pyflakes)
8214 ("python-mccabe" ,python-mccabe)))
8215 (native-inputs
8216 `(("python-mock" ,python-mock)
8217 ("python-pytest" ,python-pytest-bootstrap)))
8218 (home-page "https://gitlab.com/pycqa/flake8")
8219 (synopsis
8220 "The modular source code checker: pep8, pyflakes and co")
8221 (description
8222 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8223 (properties `((python2-variant . ,(delay python2-flake8))))
8224 (license license:expat)))
8225
8226 (define-public python2-flake8
8227 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8228 (package (inherit base)
8229 (propagated-inputs
8230 `(("python2-configparser" ,python2-configparser)
8231 ("python2-enum34" ,python2-enum34)
8232 ("python2-functools32" ,python2-functools32)
8233 ("python2-typing" ,python2-typing)
8234 ,@(package-propagated-inputs base))))))
8235
8236 ;; python-hacking requires flake8 <2.7.0.
8237 (define-public python-flake8-2.6
8238 (package
8239 (inherit python-flake8)
8240 (version "2.6.2")
8241 (source (origin
8242 (method url-fetch)
8243 (uri (pypi-uri "flake8" version))
8244 (sha256
8245 (base32
8246 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
8247 (arguments
8248 `(#:phases
8249 (modify-phases %standard-phases
8250 (add-after 'unpack 'use-later-pycodestyles
8251 (lambda __
8252 (substitute* '("flake8.egg-info/requires.txt"
8253 "setup.py")
8254 (("pycodestyle >= 2.0, < 2.1")
8255 "pycodestyle >= 2.0"))
8256 #t))
8257 (delete 'check)
8258 (add-after 'install 'check
8259 (lambda* (#:key inputs outputs #:allow-other-keys)
8260 (add-installed-pythonpath inputs outputs)
8261 (invoke "pytest" "-v")
8262 #t)))))
8263 (propagated-inputs
8264 `(("python-pep8" ,python-pep8)
8265 ("python-pycodestyle" ,python-pycodestyle)
8266 ("python-entrypoints" ,python-entrypoints)
8267 ("python-pyflakes" ,python-pyflakes-1.2)
8268 ("python-mccabe" ,python-mccabe)))))
8269
8270 (define-public python-flake8-bugbear
8271 (package
8272 (name "python-flake8-bugbear")
8273 (version "20.1.4")
8274 (source
8275 (origin
8276 (method url-fetch)
8277 (uri (pypi-uri "flake8-bugbear" version))
8278 (sha256
8279 (base32
8280 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8281 (build-system python-build-system)
8282 (arguments
8283 '(#:phases
8284 (modify-phases %standard-phases
8285 (add-before 'check 'disable-test
8286 (lambda _
8287 ;; This test fails on slow computers.
8288 (substitute* "tests/test_bugbear.py"
8289 (("def test_does_not_crash_on_any_valid_code")
8290 "def _test_does_not_crash_on_any_valid_code")))))))
8291 (native-inputs
8292 `(("python-hypothesis" ,python-hypothesis)
8293 ("python-hypothesmith" ,python-hypothesmith)))
8294 (propagated-inputs
8295 `(("python-attrs" ,python-attrs)
8296 ("python-flake8" ,python-flake8)))
8297 (home-page "https://github.com/PyCQA/flake8-bugbear")
8298 (synopsis
8299 "Flake8 plugin for finding likely bugs and design problems in your program")
8300 (description
8301 "This package contains a plugin for Flake8 finding likely bugs and
8302 design problems in your program. It contains warnings that don't belong
8303 in pyflakes and pycodestyle.")
8304 (license license:expat)))
8305
8306 (define-public python-flake8-polyfill
8307 (package
8308 (name "python-flake8-polyfill")
8309 (version "1.0.2")
8310 (source
8311 (origin
8312 (method url-fetch)
8313 (uri (pypi-uri "flake8-polyfill" version))
8314 (sha256
8315 (base32
8316 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8317 (build-system python-build-system)
8318 (arguments
8319 '(#:phases
8320 (modify-phases %standard-phases
8321 (replace 'check
8322 (lambda _
8323 ;; Be compatible with Pytest 4:
8324 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8325 (substitute* "setup.cfg"
8326 (("\\[pytest\\]")
8327 "[tool:pytest]"))
8328
8329 (setenv "PYTHONPATH"
8330 (string-append (getcwd) "/build/lib:"
8331 (getenv "PYTHONPATH")))
8332 (invoke "py.test" "-v"))))))
8333 (native-inputs
8334 `(("python-flake8" ,python-flake8)
8335 ("python-mock" ,python-mock)
8336 ("python-pep8" ,python-pep8)
8337 ("python-pycodestyle" ,python-pycodestyle)
8338 ("python-pytest" ,python-pytest)))
8339 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8340 (synopsis "Polyfill package for Flake8 plugins")
8341 (description
8342 "This package that provides some compatibility helpers for Flake8
8343 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8344 (license license:expat)))
8345
8346 (define-public python2-flake8-polyfill
8347 (package-with-python2 python-flake8-polyfill))
8348
8349 (define-public python-flake8-pyi
8350 (package
8351 (name "python-flake8-pyi")
8352 (version "20.5.0")
8353 (source
8354 (origin
8355 (method url-fetch)
8356 (uri (pypi-uri "flake8-pyi" version))
8357 (sha256
8358 (base32
8359 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8360 (build-system python-build-system)
8361 (propagated-inputs
8362 `(("python-attrs" ,python-attrs)
8363 ("python-flake8" ,python-flake8)
8364 ("python-pyflakes" ,python-pyflakes)))
8365 (home-page "https://github.com/ambv/flake8-pyi")
8366 (synopsis
8367 "Flake8 plugin that provides specializations for type hinting stub files")
8368 (description
8369 "This package contains a plugin that provides specializations for
8370 type hinting stub files, especially interesting for linting typeshed. It
8371 adds the @file{.pyi} extension to the default value of the @code{--filename}
8372 command-line argument to Flake8. This means stubs are linted by default with
8373 this plugin enabled, without needing to explicitly list every file. It
8374 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8375 expressions after the entire file has been read. This enables support for
8376 first-class forward references that stub files use.")
8377 (license license:expat)))
8378
8379 (define-public python-flake8-pie
8380 (package
8381 (name "python-flake8-pie")
8382 (version "0.5.0")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "flake8-pie" version))
8387 (sha256
8388 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8389 (build-system python-build-system)
8390 (home-page "https://github.com/sbdchd/flake8-pie")
8391 (synopsis "Flake8 extension that implements lints")
8392 (description
8393 "This package provides a flake8 extension that implements miscellaneous
8394 lints.")
8395 (license license:bsd-2)))
8396
8397 (define-public python-autoflake
8398 (package
8399 (name "python-autoflake")
8400 (version "1.3.1")
8401 (source
8402 (origin
8403 (method url-fetch)
8404 (uri (pypi-uri "autoflake" version))
8405 (sha256
8406 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8407 (build-system python-build-system)
8408 (propagated-inputs
8409 `(("python-pyflakes" ,python-pyflakes)))
8410 (home-page "https://github.com/myint/autoflake")
8411 (synopsis "Removes unused imports and unused variables")
8412 (description
8413 "@code{autoflake} removes unused imports and unused variables from Python
8414 code as reported by @code{pyflakes}.
8415
8416 By default, it only removes unused imports for modules that are part of the
8417 standard library. Removal of unused variables is also disabled by default.
8418 It also removes useless @code{pass} statements.")
8419 (license license:expat)))
8420
8421 (define-public python-mistune
8422 (package
8423 (name "python-mistune")
8424 (version "0.8.4")
8425 (source
8426 (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "mistune" version))
8429 (sha256
8430 (base32
8431 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8432 (build-system python-build-system)
8433 (native-inputs
8434 `(("python-nose" ,python-nose)
8435 ("python-cython" ,python-cython)))
8436 (home-page "https://github.com/lepture/mistune")
8437 (synopsis "Markdown parser in pure Python")
8438 (description "This package provides a fast markdown parser in pure
8439 Python.")
8440 (license license:bsd-3)))
8441
8442 (define-public python2-mistune
8443 (package-with-python2 python-mistune))
8444
8445 (define-public python-markdown
8446 (package
8447 (name "python-markdown")
8448 (version "3.2.1")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "Markdown" version))
8453 (sha256
8454 (base32
8455 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8456 (build-system python-build-system)
8457 (native-inputs
8458 `(("python-nose" ,python-nose)
8459 ("python-pyyaml" ,python-pyyaml)))
8460 (home-page "https://python-markdown.github.io/")
8461 (synopsis "Python implementation of Markdown")
8462 (description
8463 "This package provides a Python implementation of John Gruber's
8464 Markdown. The library features international input, various Markdown
8465 extensions, and several HTML output formats. A command line wrapper
8466 markdown_py is also provided to convert Markdown files to HTML.")
8467 (properties `((python2-variant . ,(delay python2-markdown))))
8468 (license license:bsd-3)))
8469
8470 ;; Markdown 3.2 dropped support for Python 2.
8471 (define-public python2-markdown
8472 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8473 (package/inherit
8474 base
8475 (version "3.1.1")
8476 (source (origin
8477 (method url-fetch)
8478 (uri (pypi-uri "Markdown" version))
8479 (sha256
8480 (base32
8481 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8482
8483 (define-public python-ptyprocess
8484 (package
8485 (name "python-ptyprocess")
8486 (version "0.5.2")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "ptyprocess" version))
8491 (sha256
8492 (base32
8493 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8494 (build-system python-build-system)
8495 (native-inputs
8496 `(("python-nose" ,python-nose)))
8497 (arguments
8498 `(#:phases
8499 (modify-phases %standard-phases
8500 (replace 'check
8501 (lambda _ (invoke "nosetests"))))))
8502 (home-page "https://github.com/pexpect/ptyprocess")
8503 (synopsis "Run a subprocess in a pseudo terminal")
8504 (description
8505 "This package provides a Python library used to launch a subprocess in a
8506 pseudo terminal (pty), and interact with both the process and its pty.")
8507 (license license:isc)))
8508
8509 (define-public python2-ptyprocess
8510 (package-with-python2 python-ptyprocess))
8511
8512 (define-public python-cram
8513 (package
8514 (name "python-cram")
8515 (version "0.7")
8516 (home-page "https://bitheap.org/cram/")
8517 (source (origin
8518 (method url-fetch)
8519 (uri (list (string-append home-page "cram-"
8520 version ".tar.gz")
8521 (pypi-uri "cram" version)))
8522 (sha256
8523 (base32
8524 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8525 (arguments
8526 '(#:phases
8527 (modify-phases %standard-phases
8528 (add-after 'unpack 'patch-source
8529 (lambda _
8530 (substitute* (find-files "cram" ".*\\.py$")
8531 ;; Replace default shell path.
8532 (("/bin/sh") (which "sh")))
8533 (substitute* (find-files "tests" ".*\\.t$")
8534 (("md5") "md5sum")
8535 (("/bin/bash") (which "bash"))
8536 (("/bin/sh") (which "sh")))
8537 (substitute* "cram/_test.py"
8538 ;; This hack works around a bug triggered by substituting
8539 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8540 ;; "cram -h", which breaks the output at 80 characters. This
8541 ;; causes the line showing the default shell to break into two
8542 ;; lines, but the test expects a single line...
8543 (("env\\['COLUMNS'\\] = '80'")
8544 "env['COLUMNS'] = '160'"))
8545
8546 (substitute* "Makefile"
8547 ;; Recent versions of python-coverage have caused the test
8548 ;; coverage to decrease (as of version 0.7). Allow that.
8549 (("--fail-under=100")
8550 "--fail-under=90"))
8551
8552 #t))
8553 (replace 'check
8554 ;; The test phase uses the built library and executable.
8555 (lambda* (#:key inputs outputs #:allow-other-keys)
8556 (add-installed-pythonpath inputs outputs)
8557 (setenv "PATH" (string-append (getenv "PATH") ":"
8558 (assoc-ref outputs "out") "/bin"))
8559 (invoke "make" "test"))))))
8560 (build-system python-build-system)
8561 (native-inputs
8562 `(("python-coverage" ,python-coverage)
8563 ("which" ,which)))
8564 (synopsis "Simple testing framework for command line applications")
8565 (description
8566 "Cram is a functional testing framework for command line applications.
8567 Cram tests look like snippets of interactive shell sessions. Cram runs each
8568 command and compares the command output in the test with the command’s actual
8569 output.")
8570 (license license:gpl2+)))
8571
8572 (define-public python2-cram
8573 (package-with-python2 python-cram))
8574
8575 (define-public python-crashtest
8576 (package
8577 (name "python-crashtest")
8578 (version "0.3.1")
8579 (source
8580 (origin
8581 (method url-fetch)
8582 (uri (pypi-uri "crashtest" version))
8583 (sha256
8584 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8585 (build-system python-build-system)
8586 (home-page "https://github.com/sdispater/crashtest")
8587 (synopsis "Manage Python errors with ease")
8588 (description
8589 "Python library that makes exceptions handling and inspection easier.")
8590 (license license:expat)))
8591
8592 (define-public python-straight-plugin
8593 (package
8594 (name "python-straight-plugin")
8595 (version "1.4.1")
8596 (source
8597 (origin
8598 (method url-fetch)
8599 (uri (pypi-uri "straight.plugin" version))
8600 (sha256
8601 (base32
8602 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8603 (build-system python-build-system)
8604 (home-page "https://github.com/ironfroggy/straight.plugin")
8605 (synopsis "Simple namespaced plugin facility")
8606 (description "Straight Plugin provides a type of plugin you can create from
8607 almost any existing Python modules, and an easy way for outside developers to
8608 add functionality and customization to your projects with their own plugins.")
8609 (license license:expat)))
8610
8611 (define-public python2-straight-plugin
8612 (package-with-python2 python-straight-plugin))
8613
8614 (define-public python-fonttools
8615 (package
8616 (name "python-fonttools")
8617 (version "4.6.0")
8618 (source (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "fonttools" version ".zip"))
8621 (sha256
8622 (base32
8623 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8624 (build-system python-build-system)
8625 (native-inputs
8626 `(("unzip" ,unzip)
8627 ("python-pytest" ,python-pytest)
8628 ("python-pytest-runner" ,python-pytest-runner)))
8629 (home-page "https://github.com/fonttools/fonttools")
8630 (synopsis "Tools to manipulate font files")
8631 (description
8632 "FontTools/TTX is a library to manipulate font files from Python. It
8633 supports reading and writing of TrueType/OpenType fonts, reading and writing
8634 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8635 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8636 from an XML-based format.")
8637 (license license:expat)))
8638
8639 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8640 (define-public python2-fonttools
8641 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8642 (package/inherit
8643 base
8644 (version "3.44.0")
8645 (source (origin
8646 (method url-fetch)
8647 (uri (pypi-uri "fonttools" version ".zip"))
8648 (sha256
8649 (base32
8650 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8651
8652 (define-public python-ly
8653 (package
8654 (name "python-ly")
8655 (version "0.9.5")
8656 (source
8657 (origin
8658 (method url-fetch)
8659 (uri (pypi-uri name version))
8660 (sha256
8661 (base32
8662 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8663 (build-system python-build-system)
8664 (arguments
8665 ;; FIXME: Some tests need network access.
8666 '(#:tests? #f))
8667 (synopsis "Tool and library for manipulating LilyPond files")
8668 (description "This package provides a Python library to parse, manipulate
8669 or create documents in LilyPond format. A command line program ly is also
8670 provided that can be used to do various manipulations with LilyPond files.")
8671 (home-page "https://pypi.org/project/python-ly/")
8672 (license license:gpl2+)))
8673
8674 (define-public python-appdirs
8675 (package
8676 (name "python-appdirs")
8677 (version "1.4.3")
8678 (source
8679 (origin
8680 (method url-fetch)
8681 (uri (pypi-uri "appdirs" version))
8682 (sha256
8683 (base32
8684 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8685 (build-system python-build-system)
8686 (home-page "https://github.com/ActiveState/appdirs")
8687 (synopsis
8688 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8689 (description
8690 "This module provides a portable way of finding out where user data
8691 should be stored on various operating systems.")
8692 (license license:expat)))
8693
8694 (define-public python2-appdirs
8695 (package-with-python2 python-appdirs))
8696
8697 (define-public python-llfuse
8698 (package
8699 (name "python-llfuse")
8700 (version "1.3.6")
8701 (source (origin
8702 (method url-fetch)
8703 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8704 (sha256
8705 (base32
8706 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8707 (build-system python-build-system)
8708 (inputs
8709 `(("fuse" ,fuse)
8710 ("attr" ,attr)))
8711 (native-inputs
8712 `(("pkg-config" ,pkg-config)))
8713 (synopsis "Python bindings for FUSE")
8714 (description
8715 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8716 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8717 (license license:lgpl2.0+)
8718 (properties `((python2-variant . ,(delay python2-llfuse))))))
8719
8720 (define-public python2-llfuse
8721 (package (inherit (package-with-python2
8722 (strip-python2-variant python-llfuse)))
8723 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8724
8725 ;; For attic-0.16
8726 (define-public python-llfuse-0.41
8727 (package (inherit python-llfuse)
8728 (version "0.41.1")
8729 (source (origin
8730 (method url-fetch)
8731 (uri (string-append
8732 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8733 "llfuse-" version ".tar.bz2"))
8734 (sha256
8735 (base32
8736 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8737 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8738 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8739 (license (list license:expat license:lgpl2.0+))))
8740
8741 (define-public python-msgpack
8742 (package
8743 (name "python-msgpack")
8744 (version "1.0.0")
8745 (source (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "msgpack" version))
8748 (sha256
8749 (base32
8750 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8751 (build-system python-build-system)
8752 (arguments
8753 `(#:modules ((guix build utils)
8754 (guix build python-build-system)
8755 (ice-9 ftw)
8756 (srfi srfi-1)
8757 (srfi srfi-26))
8758 #:phases
8759 (modify-phases %standard-phases
8760 (replace 'check
8761 (lambda _
8762 (let ((cwd (getcwd)))
8763 (setenv "PYTHONPATH"
8764 (string-append cwd "/build/"
8765 (find (cut string-prefix? "lib" <>)
8766 (scandir (string-append cwd "/build")))
8767 ":"
8768 (getenv "PYTHONPATH")))
8769 (invoke "pytest" "-v" "test")))))))
8770 (native-inputs
8771 `(("python-pytest" ,python-pytest)))
8772 (synopsis "MessagePack (de)serializer")
8773 (description "MessagePack is a fast, compact binary serialization format,
8774 suitable for similar data to JSON. This package provides CPython bindings for
8775 reading and writing MessagePack data.")
8776 (home-page "https://pypi.org/project/msgpack/")
8777 (license license:asl2.0)))
8778
8779 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8780 ;; release 0.5. Some packages like borg still call it by the old name for now.
8781 ;; <https://bugs.gnu.org/30662>
8782 (define-public python-msgpack-transitional
8783 (package
8784 (inherit python-msgpack)
8785 (name "python-msgpack-transitional")
8786 (version "0.5.6")
8787 (source (origin
8788 (method url-fetch)
8789 (uri (pypi-uri "msgpack" version))
8790 (sha256
8791 (base32
8792 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8793 (arguments
8794 (substitute-keyword-arguments (package-arguments python-msgpack)
8795 ((#:phases phases)
8796 `(modify-phases ,phases
8797 (add-after 'unpack 'configure-transitional
8798 (lambda _
8799 ;; Keep using the old name.
8800 (substitute* "setup.py"
8801 (("TRANSITIONAL = False")
8802 "TRANSITIONAL = 1"))
8803 #t))))))))
8804
8805 (define-public python2-msgpack
8806 (package-with-python2 python-msgpack))
8807
8808 (define-public python-netaddr
8809 (package
8810 (name "python-netaddr")
8811 (version "0.7.19")
8812 (source
8813 (origin
8814 (method url-fetch)
8815 (uri (pypi-uri "netaddr" version))
8816 (sha256
8817 (base32
8818 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8819 (build-system python-build-system)
8820 (arguments `(#:tests? #f)) ;; No tests.
8821 (home-page "https://github.com/drkjam/netaddr/")
8822 (synopsis "Pythonic manipulation of network addresses")
8823 (description
8824 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8825 and MAC network addresses.")
8826 (license license:bsd-3)))
8827
8828 (define-public python2-netaddr
8829 (package-with-python2 python-netaddr))
8830
8831 (define-public python2-pyroute2
8832 (package
8833 (name "python2-pyroute2")
8834 (version "0.5.6")
8835 (source
8836 (origin
8837 (method url-fetch)
8838 (uri (pypi-uri "pyroute2" version))
8839 (sha256
8840 (base32
8841 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8842 (build-system python-build-system)
8843 (arguments
8844 `(#:python ,python-2)) ;Python 3.x is not supported
8845 (home-page "https://github.com/svinota/pyroute2")
8846 (synopsis "Python netlink library")
8847 (description
8848 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8849 Supported netlink families and protocols include:
8850 @itemize
8851 @item rtnl, network settings - addresses, routes, traffic controls
8852 @item nfnetlink - netfilter API: ipset, nftables, ...
8853 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8854 @item devlink - manage and monitor devlink-enabled hardware
8855 @item generic - generic netlink families
8856 @itemize
8857 @item nl80211 - wireless functions API (basic support)
8858 @item taskstats - extended process statistics
8859 @item acpi_events - ACPI events monitoring
8860 @item thermal_events - thermal events monitoring
8861 @item VFS_DQUOT - disk quota events monitoring
8862 @end itemize
8863 @end itemize")
8864 (license license:gpl2+)))
8865
8866 (define-public python-wrapt
8867 (package
8868 (name "python-wrapt")
8869 (version "1.11.2")
8870 (source
8871 (origin
8872 (method url-fetch)
8873 (uri (pypi-uri "wrapt" version))
8874 (sha256
8875 (base32
8876 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8877 (build-system python-build-system)
8878 (arguments
8879 ;; Tests are not included in the tarball, they are only available in the
8880 ;; git repository.
8881 `(#:tests? #f))
8882 (home-page "https://github.com/GrahamDumpleton/wrapt")
8883 (synopsis "Module for decorators, wrappers and monkey patching")
8884 (description
8885 "The aim of the wrapt module is to provide a transparent object proxy for
8886 Python, which can be used as the basis for the construction of function
8887 wrappers and decorator functions.")
8888 (license license:bsd-2)))
8889
8890 (define-public python2-wrapt
8891 (package-with-python2 python-wrapt))
8892
8893 (define-public python-xlrd
8894 (package
8895 (name "python-xlrd")
8896 (version "1.2.0")
8897 (source (origin
8898 (method url-fetch)
8899 (uri (pypi-uri "xlrd" version))
8900 (sha256
8901 (base32
8902 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8903 (build-system python-build-system)
8904 (arguments
8905 `(#:phases
8906 (modify-phases %standard-phases
8907 ;; Some tests depend on writing a temporary file to the user's home
8908 ;; directory.
8909 (add-after 'unpack 'fix-tests
8910 (lambda _
8911 (delete-file "tests/test_open_workbook.py")
8912 #t)))))
8913 (home-page "http://www.python-excel.org/")
8914 (synopsis "Library for extracting data from Excel files")
8915 (description "This package provides a library to extract data from
8916 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8917 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8918 Unicode-aware. It is not intended as an end-user tool.")
8919 (license license:bsd-3)))
8920
8921 (define-public python2-xlrd
8922 (package-with-python2 python-xlrd))
8923
8924 (define-public python-immutables
8925 (package
8926 (name "python-immutables")
8927 (version "0.14")
8928 (source
8929 (origin
8930 (method url-fetch)
8931 (uri (pypi-uri "immutables" version))
8932 (sha256
8933 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8934 (build-system python-build-system)
8935 (home-page "https://github.com/MagicStack/immutables")
8936 (synopsis "High-performance immutable mapping type for Python")
8937 (description
8938 "An immutable mapping type for Python. The underlying datastructure is a
8939 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8940 functional languages.")
8941 (license license:asl2.0)))
8942
8943 (define-public python-prettytable
8944 (package
8945 (name "python-prettytable")
8946 (version "0.7.2")
8947 (source
8948 (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8951 (sha256
8952 (base32
8953 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8954 (build-system python-build-system)
8955 (home-page "https://code.google.com/archive/p/prettytable/")
8956 (synopsis "Display tabular data in an ASCII table format")
8957 (description
8958 "A library designed to represent tabular data in visually appealing ASCII
8959 tables. PrettyTable allows for selection of which columns are to be printed,
8960 independent alignment of columns (left or right justified or centred) and
8961 printing of sub-tables by specifying a row range.")
8962 (license license:bsd-3)))
8963
8964 (define-public python2-prettytable
8965 (package-with-python2 python-prettytable))
8966
8967 (define-public python-curio
8968 (package
8969 (name "python-curio")
8970 (version "1.2")
8971 (source
8972 (origin
8973 (method url-fetch)
8974 (uri (pypi-uri "curio" version))
8975 (sha256
8976 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
8977 (build-system python-build-system)
8978 (arguments
8979 `(#:phases
8980 (modify-phases %standard-phases
8981 (replace 'check
8982 (lambda* (#:key inputs outputs #:allow-other-keys)
8983 (add-installed-pythonpath inputs outputs)
8984 (invoke "pytest" "-vv" "-k"
8985 ;; Tries to open an outgoing connection.
8986 "not test_ssl_outgoing"))))))
8987 (native-inputs
8988 `(("python-pytest" ,python-pytest)))
8989 (home-page "https://github.com/dabeaz/curio")
8990 (synopsis "Coroutine-based library for concurrent Python")
8991 (description
8992 "Curio is a coroutine-based library for concurrent Python systems
8993 programming. It provides standard programming abstractions such as as
8994 tasks, sockets, files, locks, and queues.")
8995 (license license:bsd-3)))
8996
8997 (define-public python-tables
8998 (package
8999 (name "python-tables")
9000 (version "3.6.1")
9001 (source
9002 (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "tables" version))
9005 (sha256
9006 (base32
9007 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9008 (modules '((guix build utils)))
9009 (snippet
9010 '(begin
9011 ;; Remove pre-compiled .pyc files from source.
9012 (for-each delete-file-recursively
9013 (find-files "." "__pycache__" #:directories? #t))
9014 (for-each delete-file (find-files "." "\\.pyc$"))
9015 #t))))
9016 (build-system python-build-system)
9017 (arguments
9018 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9019 ;; or "check", so we must override the build and check phases.
9020 #:phases
9021 (modify-phases %standard-phases
9022 (add-after 'unpack 'use-gcc
9023 (lambda _
9024 (substitute* "setup.py"
9025 (("^( +)compiler = new_compiler\\(\\)" line indent)
9026 (string-append line
9027 "\n"
9028 indent
9029 "compiler.set_executables(compiler='gcc',"
9030 "compiler_so='gcc',"
9031 "linker_exe='gcc',"
9032 "linker_so='gcc -shared')")))
9033 #t))
9034 (add-after 'unpack 'disable-tuning
9035 (lambda _
9036 (substitute* "setup.py"
9037 (("cpu_flags = .*")
9038 "cpu_flags = ['sse2']\n"))
9039 #t))
9040 (replace 'build
9041 (lambda* (#:key inputs #:allow-other-keys)
9042 (invoke "python" "setup.py" "build"
9043 (string-append "--hdf5="
9044 (assoc-ref inputs "hdf5")))))
9045 (replace 'check
9046 (lambda* (#:key inputs #:allow-other-keys)
9047 (invoke "python" "setup.py" "check"
9048 (string-append "--hdf5="
9049 (assoc-ref inputs "hdf5"))))))))
9050 (propagated-inputs
9051 `(("python-numexpr" ,python-numexpr)
9052 ("python-numpy" ,python-numpy)))
9053 (native-inputs
9054 `(("python-cython" ,python-cython)
9055 ("pkg-config" ,pkg-config)))
9056 (inputs
9057 `(("hdf5" ,hdf5-1.10)
9058 ("bzip2" ,bzip2)
9059 ("zlib" ,zlib)))
9060 (home-page "https://www.pytables.org/")
9061 (synopsis "Hierarchical datasets for Python")
9062 (description "PyTables is a package for managing hierarchical datasets and
9063 designed to efficiently cope with extremely large amounts of data.")
9064 (license license:bsd-3)))
9065
9066 (define-public python2-tables
9067 (package-with-python2 python-tables))
9068
9069 (define-public python-sniffio
9070 (package
9071 (name "python-sniffio")
9072 (version "1.1.0")
9073 (source
9074 (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "sniffio" version))
9077 (sha256
9078 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9079 (build-system python-build-system)
9080 (arguments
9081 `(#:phases
9082 (modify-phases %standard-phases
9083 (replace 'check
9084 (lambda _
9085 (invoke "pytest" "-vv"))))))
9086 (native-inputs
9087 `(("python-curio" ,python-curio)
9088 ("python-pytest" ,python-pytest)
9089 ("python-pytest-cov" ,python-pytest-cov)))
9090 (home-page "https://github.com/python-trio/sniffio")
9091 (synopsis "Detect which async library a program is running under")
9092 (description "This package detects which async library a program is
9093 running under. It supports multiple async I/O packages, like Trio, and
9094 asyncio.")
9095 ;; Either license applies.
9096 (license (list license:expat license:asl2.0))))
9097
9098 (define-public python-pytest-black
9099 (package
9100 (name "python-pytest-black")
9101 (version "0.3.8")
9102 (source
9103 (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "pytest-black" version))
9106 (sha256
9107 (base32
9108 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9109 (build-system python-build-system)
9110 (propagated-inputs
9111 `(("python-pytest" ,python-pytest)
9112 ("python-black" ,python-black)
9113 ("python-toml" ,python-toml)))
9114 (native-inputs
9115 `(("python-setuptools-scm" ,python-setuptools-scm)))
9116 (home-page "https://github.com/shopkeep/pytest-black")
9117 (synopsis "Pytest plugin to enable format checking with black")
9118 (description
9119 "This package provides a pytest plugin to enable format checking with the
9120 Python code formatter \"black\".")
9121 (license license:expat)))
9122
9123 (define-public python-get-version
9124 (package
9125 (name "python-get-version")
9126 (version "2.1")
9127 (source
9128 (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "get_version" version))
9131 (sha256
9132 (base32
9133 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9134 (build-system python-build-system)
9135 (propagated-inputs
9136 `(("python-pygments" ,python-pygments)
9137 ("python-pytest" ,python-pytest)
9138 ("python-pytest-black" ,python-pytest-black)
9139 ("python-pytest-cov" ,python-pytest-cov)
9140 ("python-setuptools" ,python-setuptools)
9141 ("python-testpath" ,python-testpath)))
9142 (home-page "https://github.com/flying-sheep/get_version")
9143 (synopsis "Version helper in the spirit of versioneer")
9144 (description
9145 "This package provides a version helper that lets you automatically use
9146 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9147 also supports getting the version from Python source distributions or, once
9148 your package is installed, via @code{pkg_resources} (part of
9149 @code{setuptools}).")
9150 (license license:gpl3+)))
9151
9152 (define-public python-legacy-api-wrap
9153 (package
9154 (name "python-legacy-api-wrap")
9155 (version "1.2")
9156 (source
9157 (origin
9158 (method url-fetch)
9159 (uri (pypi-uri "legacy-api-wrap" version))
9160 (sha256
9161 (base32
9162 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9163 (build-system python-build-system)
9164 (propagated-inputs
9165 `(("python-get-version" ,python-get-version)
9166 ("python-pytest" ,python-pytest)
9167 ("python-pytest-black" ,python-pytest-black)
9168 ("python-pytest-cov" ,python-pytest-cov)
9169 ("python-setuptools" ,python-setuptools)))
9170 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9171 (synopsis "Legacy API wrapper")
9172 (description "This module defines a decorator to wrap legacy APIs. The
9173 primary use case is APIs defined before keyword-only parameters existed.")
9174 (license license:gpl3+)))
9175
9176 (define-public python-pyasn1
9177 (package
9178 (name "python-pyasn1")
9179 (version "0.4.8")
9180 (source
9181 (origin
9182 (method url-fetch)
9183 (uri (pypi-uri "pyasn1" version))
9184 (sha256
9185 (base32
9186 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9187 (build-system python-build-system)
9188 (home-page "http://pyasn1.sourceforge.net/")
9189 (synopsis "ASN.1 types and codecs")
9190 (description
9191 "This is an implementation of ASN.1 types and codecs in Python. It is
9192 suitable for a wide range of protocols based on the ASN.1 specification.")
9193 (license license:bsd-2)))
9194
9195 (define-public python2-pyasn1
9196 (package-with-python2 python-pyasn1))
9197
9198 (define-public python-pyasn1-modules
9199 (package
9200 (name "python-pyasn1-modules")
9201 (version "0.2.2")
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "pyasn1-modules" version))
9206 (sha256
9207 (base32
9208 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9209 (build-system python-build-system)
9210 (propagated-inputs
9211 `(("python-pyasn1" ,python-pyasn1)))
9212 (home-page "https://sourceforge.net/projects/pyasn1/")
9213 (synopsis "ASN.1 codec implementations")
9214 (description
9215 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9216 implementations of ASN.1-based codecs and protocols.")
9217 (license license:bsd-3)))
9218
9219 (define-public python2-pyasn1-modules
9220 (package-with-python2 python-pyasn1-modules))
9221
9222 (define-public python-ipaddress
9223 (package
9224 (name "python-ipaddress")
9225 (version "1.0.22")
9226 (source (origin
9227 (method url-fetch)
9228 (uri (pypi-uri "ipaddress" version))
9229 (sha256
9230 (base32
9231 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9232 (build-system python-build-system)
9233 (home-page "https://github.com/phihag/ipaddress")
9234 (synopsis "IP address manipulation library")
9235 (description
9236 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9237 in Python. This library is used to create, poke at, and manipulate IPv4 and
9238 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9239 module to older versions of Python.")
9240 (license license:psfl)))
9241
9242 (define-public python2-ipaddress
9243 (package-with-python2 python-ipaddress))
9244
9245 (define-public python2-ipaddr
9246 (package
9247 (name "python2-ipaddr")
9248 (version "2.1.11")
9249 (source
9250 (origin
9251 (method url-fetch)
9252 (uri (pypi-uri "ipaddr" version))
9253 (sha256
9254 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9255 (build-system python-build-system)
9256 (arguments
9257 `(#:python ,python-2 ;version 2 only
9258 #:phases
9259 (modify-phases %standard-phases
9260 (replace 'check
9261 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9262 (home-page "https://github.com/google/ipaddr-py")
9263 (synopsis "IP address manipulation library")
9264 (description
9265 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9266 IPv6 addresses and networks.
9267
9268 For new implementations you may prefer to use the standard module
9269 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9270 versions of Python.")
9271 (license license:asl2.0)))
9272
9273 (define-public python-idna
9274 (package
9275 (name "python-idna")
9276 (version "2.9")
9277 (source
9278 (origin
9279 (method url-fetch)
9280 (uri (pypi-uri "idna" version))
9281 (sha256
9282 (base32
9283 "1jxp2pdi8y4asi7ka1zhx3yx09kv8kzj533f0ds7viz49b0x323m"))))
9284 (build-system python-build-system)
9285 (home-page "https://github.com/kjd/idna")
9286 (synopsis "Internationalized domain names in applications")
9287 (description
9288 "This is a library to support the Internationalised Domain Names in
9289 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9290 protocol is often referred to as “IDNA2008” and can produce different results
9291 from the earlier standard from 2003. The library is also intended to act as a
9292 suitable drop-in replacement for the “encodings.idna” module that comes with
9293 the Python standard library but currently only supports the older 2003
9294 specification.")
9295 (license license:bsd-4)))
9296
9297 (define-public python-idna-2.7
9298 (package (inherit python-idna)
9299 (version "2.7")
9300 (source (origin
9301 (method url-fetch)
9302 (uri (pypi-uri "idna" version))
9303 (sha256
9304 (base32
9305 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9306
9307
9308 (define-public python2-idna
9309 (package-with-python2 python-idna))
9310
9311 (define-public python-libsass
9312 (package
9313 (name "python-libsass")
9314 (version "0.20.1")
9315 (source
9316 (origin
9317 ;; PyPI tarball is missing some test files.
9318 (method git-fetch)
9319 (uri (git-reference
9320 (url "https://github.com/sass/libsass-python")
9321 (commit version)))
9322 (file-name (git-file-name name version))
9323 (sha256
9324 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9325 (build-system python-build-system)
9326 (arguments
9327 `(#:phases
9328 (modify-phases %standard-phases
9329 ;; Use Guix package of libsass instead of compiling from a checkout.
9330 (add-before 'build 'set-libsass
9331 (lambda _
9332 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9333 #t))
9334 (replace 'check
9335 (lambda* (#:key inputs outputs #:allow-other-keys)
9336 (add-installed-pythonpath inputs outputs)
9337 (invoke "pytest" "sasstests.py"))))))
9338 (native-inputs
9339 `(("python-pytest" ,python-pytest)
9340 ("python-werkzeug" ,python-werkzeug)))
9341 (inputs
9342 `(("libsass" ,libsass)))
9343 (propagated-inputs
9344 `(("python-six" ,python-six)))
9345 (home-page "https://sass.github.io/libsass-python/")
9346 (synopsis "Straightforward binding of libsass for Python")
9347 (description
9348 "This package provides a simple Python extension module @code{sass} which
9349 is binding LibSass.")
9350 (license license:expat)))
9351
9352 (define-public python-idna-ssl
9353 (package
9354 (name "python-idna-ssl")
9355 (version "1.0.1")
9356 (source
9357 (origin
9358 (method url-fetch)
9359 (uri (pypi-uri "idna-ssl" version))
9360 (sha256
9361 (base32
9362 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9363 (build-system python-build-system)
9364 (arguments
9365 `(#:tests? #f)) ;circular dependency with python-aiohttp
9366 (home-page "https://github.com/aio-libs/idna-ssl")
9367 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9368 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9369 domains support.")
9370 (license license:expat)))
9371
9372 (define-public python-pretend
9373 (package
9374 (name "python-pretend")
9375 (version "1.0.9")
9376 (source
9377 (origin
9378 (method url-fetch)
9379 (uri (pypi-uri "pretend" version))
9380 (sha256
9381 (base32
9382 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9383 (build-system python-build-system)
9384 (home-page "https://github.com/alex/pretend")
9385 (synopsis "Library for stubbing in Python")
9386 (description
9387 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9388 technique for writing tests. You may hear the term mixed up with mocks,
9389 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9390 responses, rather than doing any computation.")
9391 (license license:bsd-3)))
9392
9393 (define-public python2-pretend
9394 (package-with-python2 python-pretend))
9395
9396 (define-public python-pip
9397 (package
9398 (name "python-pip")
9399 (version "20.0.2")
9400 (source
9401 (origin
9402 (method url-fetch)
9403 (uri (pypi-uri "pip" version))
9404 (sha256
9405 (base32
9406 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9407 (build-system python-build-system)
9408 (arguments
9409 '(#:tests? #f)) ; there are no tests in the pypi archive.
9410 (home-page "https://pip.pypa.io/")
9411 (synopsis "Package manager for Python software")
9412 (description
9413 "Pip is a package manager for Python software, that finds packages on the
9414 Python Package Index (PyPI).")
9415 (license license:expat)))
9416
9417 (define-public python2-pip
9418 (package-with-python2 python-pip))
9419
9420 (define-public python-tlsh
9421 (package
9422 (name "python-tlsh")
9423 (version "3.4.5")
9424 (home-page "https://github.com/trendmicro/tlsh")
9425 (source
9426 (origin
9427 (method git-fetch)
9428 (uri (git-reference
9429 (url "https://github.com/trendmicro/tlsh")
9430 (commit (string-append "v" version))))
9431 (file-name (git-file-name name version))
9432 (sha256
9433 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9434 (build-system cmake-build-system)
9435 (arguments
9436 '(#:out-of-source? #f
9437 #:phases (modify-phases %standard-phases
9438 (replace
9439 'install
9440 (lambda* (#:key outputs #:allow-other-keys)
9441 ;; Build and install the Python bindings. The underlying
9442 ;; C++ library is apparently not meant to be installed.
9443 (let ((out (assoc-ref outputs "out")))
9444 (with-directory-excursion "py_ext"
9445 (and (system* "python" "setup.py" "build")
9446 (system* "python" "setup.py" "install"
9447 (string-append "--prefix=" out))))))))))
9448 (inputs `(("python" ,python-wrapper))) ;for the bindings
9449 (synopsis "Fuzzy matching library for Python")
9450 (description
9451 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9452 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9453 value which can be used for similarity comparisons. Similar objects have
9454 similar hash values, which allows for the detection of similar objects by
9455 comparing their hash values. The byte stream should have a sufficient amount
9456 of complexity; for example, a byte stream of identical bytes will not generate
9457 a hash value.")
9458 (license license:asl2.0)))
9459
9460 (define-public python2-tlsh
9461 (package
9462 (inherit python-tlsh)
9463 (name "python2-tlsh")
9464 (inputs `(("python" ,python-2)))))
9465
9466 (define-public python-termcolor
9467 (package
9468 (name "python-termcolor")
9469 (version "1.1.0")
9470 (source
9471 (origin
9472 (method url-fetch)
9473 (uri (pypi-uri "termcolor" version))
9474 (sha256
9475 (base32
9476 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9477 (build-system python-build-system)
9478 (arguments
9479 ;; There are no tests.
9480 `(#:tests? #f))
9481 (home-page "https://pypi.org/project/termcolor/")
9482 (synopsis "ANSII Color formatting for terminal output")
9483 (description
9484 "This package provides ANSII Color formatting for output in terminals.")
9485 (license license:expat)))
9486
9487 (define-public python2-termcolor
9488 (package-with-python2 python-termcolor))
9489
9490 (define-public python-terminaltables
9491 (package
9492 (name "python-terminaltables")
9493 (version "3.1.0")
9494 (source
9495 (origin
9496 (method url-fetch)
9497 (uri (pypi-uri "terminaltables" version))
9498 (sha256
9499 (base32
9500 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9501 (build-system python-build-system)
9502 (home-page "https://github.com/Robpol86/terminaltables")
9503 (synopsis
9504 "Generate simple tables in terminals from a nested list of strings")
9505 (description
9506 "This package makes it easy to draw tables in terminal/console
9507 applications from a list of lists of strings. It supports multi-line rows.")
9508 (license license:expat)))
9509
9510 (define-public python-libarchive-c
9511 (package
9512 (name "python-libarchive-c")
9513 (version "2.9")
9514 (source (origin
9515 (method url-fetch)
9516 (uri (pypi-uri "libarchive-c" version))
9517 (sha256
9518 (base32
9519 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9520 (build-system python-build-system)
9521 (arguments
9522 '(#:phases (modify-phases %standard-phases
9523 (add-before
9524 'build 'reference-libarchive
9525 (lambda* (#:key inputs #:allow-other-keys)
9526 ;; Retain the absolute file name of libarchive.so.
9527 (let ((libarchive (assoc-ref inputs "libarchive")))
9528 (substitute* "libarchive/ffi.py"
9529 (("find_library\\('archive'\\)")
9530 (string-append "'" libarchive
9531 "/lib/libarchive.so'"))))))
9532 (replace 'check
9533 (lambda _ (invoke "pytest" "-vv"))))))
9534 (native-inputs
9535 `(("python-mock" ,python-mock)
9536 ("python-pytest" ,python-pytest)))
9537 (inputs
9538 `(("libarchive" ,libarchive)))
9539 (home-page "https://github.com/Changaco/python-libarchive-c")
9540 (synopsis "Python interface to libarchive")
9541 (description
9542 "This package provides Python bindings to libarchive, a C library to
9543 access possibly compressed archives in many different formats. It uses
9544 Python's @code{ctypes} foreign function interface (FFI).")
9545 (license license:lgpl2.0+)))
9546
9547 (define-public python2-libarchive-c
9548 (package-with-python2 python-libarchive-c))
9549
9550 (define-public python-file
9551 (package
9552 (inherit file)
9553 (name "python-file")
9554 (build-system python-build-system)
9555 (arguments
9556 '(#:tests? #f ;no tests
9557 #:configure-flags '("--single-version-externally-managed" "--root=/")
9558 #:phases (modify-phases %standard-phases
9559 (add-before 'build 'change-directory
9560 (lambda _
9561 (chdir "python")
9562 #t))
9563 (add-before 'build 'set-library-file-name
9564 (lambda* (#:key inputs #:allow-other-keys)
9565 (let ((file (assoc-ref inputs "file")))
9566 (substitute* "magic.py"
9567 (("find_library\\('magic'\\)")
9568 (string-append "'" file "/lib/libmagic.so'")))
9569 #t))))))
9570 (inputs `(("file" ,file)))
9571 (native-inputs (if (%current-target-system)
9572 `(("self" ,this-package))
9573 '()))
9574 (synopsis "Python bindings to the libmagic file type guesser")
9575 (description "This package provides Python bindings to the libmagic file
9576 type guesser.
9577
9578 Note that this module and the @code{python-magic} module both provide a
9579 @file{magic.py} file; these two modules, which are different and were
9580 developed separately, both serve the same purpose: provide Python bindings for
9581 libmagic.")))
9582
9583 (define-public python2-file
9584 (package-with-python2 python-file))
9585
9586 (define-public python-debian
9587 (package
9588 (name "python-debian")
9589 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9590 (version "0.1.36")
9591 (source
9592 (origin
9593 ;; Use git-fetch, as pypi doesn't include test suite.
9594 (method git-fetch)
9595 (uri (git-reference
9596 (url home-page)
9597 (commit version)))
9598 (file-name (git-file-name name version))
9599 (sha256
9600 (base32
9601 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9602 (build-system python-build-system)
9603 (arguments
9604 `(#:phases (modify-phases %standard-phases
9605 (add-after 'unpack 'remove-debian-specific-tests
9606 ;; python-apt, apt and dpkg are not yet available in guix,
9607 ;; and these tests heavily depend on them.
9608 (lambda _
9609 (delete-file "lib/debian/tests/test_deb822.py")
9610 (delete-file "lib/debian/tests/test_debfile.py")
9611 #t)))))
9612 (propagated-inputs
9613 `(("python-six" ,python-six)
9614 ("python-chardet" ,python-chardet)))
9615 (synopsis "Debian package related modules")
9616 (description
9617 ;; XXX: Use @enumerate instead of @itemize to work around
9618 ;; <http://bugs.gnu.org/21772>.
9619 "This package provides Python modules that abstract many formats of
9620 Debian-related files, such as:
9621
9622 @enumerate
9623 @item Debtags information;
9624 @item @file{debian/changelog} files;
9625 @item packages files, pdiffs;
9626 @item control files of single or multiple RFC822-style paragraphs---e.g.
9627 @file{debian/control}, @file{.changes}, @file{.dsc};
9628 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9629 contained files and meta-information.
9630 @end enumerate\n")
9631
9632 ;; Modules are either GPLv2+ or GPLv3+.
9633 (license license:gpl3+)))
9634
9635 (define-public python-nbformat
9636 (package
9637 (name "python-nbformat")
9638 (version "4.4.0")
9639 (source
9640 (origin
9641 (method url-fetch)
9642 (uri (pypi-uri "nbformat" version))
9643 (sha256
9644 (base32
9645 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9646 (build-system python-build-system)
9647 (arguments `(#:tests? #f)) ; no test target
9648 (propagated-inputs
9649 `(("python-ipython-genutils" ,python-ipython-genutils)
9650 ("python-jsonschema" ,python-jsonschema)
9651 ("python-jupyter-core" ,python-jupyter-core)
9652 ("python-traitlets" ,python-traitlets)))
9653 (home-page "http://jupyter.org")
9654 (synopsis "Jupyter Notebook format")
9655 (description "This package provides the reference implementation of the
9656 Jupyter Notebook format and Python APIs for working with notebooks.")
9657 (license license:bsd-3)))
9658
9659 (define-public python2-nbformat
9660 (package-with-python2 python-nbformat))
9661
9662 (define-public python-bleach
9663 (package
9664 (name "python-bleach")
9665 (version "3.1.5")
9666 (source
9667 (origin
9668 (method url-fetch)
9669 (uri (pypi-uri "bleach" version))
9670 (sha256
9671 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9672 (build-system python-build-system)
9673 (propagated-inputs
9674 `(("python-webencodings" ,python-webencodings)
9675 ("python-six" ,python-six)))
9676 (native-inputs
9677 `(("python-datrie" ,python-datrie)
9678 ("python-genshi" ,python-genshi)
9679 ("python-lxml" ,python-lxml)
9680 ("python-pytest" ,python-pytest)))
9681 (home-page "https://github.com/mozilla/bleach")
9682 (synopsis "Whitelist-based HTML-sanitizing tool")
9683 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9684 (license license:asl2.0)))
9685
9686 (define-public python2-bleach
9687 (package-with-python2 python-bleach))
9688
9689 (define-public python-entrypoints
9690 (package
9691 (name "python-entrypoints")
9692 (version "0.3")
9693 (source
9694 (origin
9695 (method url-fetch)
9696 (uri (pypi-uri "entrypoints" version))
9697 (sha256
9698 (base32
9699 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9700 (build-system python-build-system)
9701 ;; The package does not come with a setup.py file, so we have to generate
9702 ;; one ourselves.
9703 (arguments
9704 `(#:tests? #f
9705 #:phases
9706 (modify-phases %standard-phases
9707 (add-after 'unpack 'create-setup.py
9708 (lambda _
9709 (call-with-output-file "setup.py"
9710 (lambda (port)
9711 (format port "\
9712 from setuptools import setup
9713 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9714 " ,version))))))))
9715 (home-page "https://github.com/takluyver/entrypoints")
9716 (synopsis "Discover and load entry points from installed Python packages")
9717 (description "Entry points are a way for Python packages to advertise
9718 objects with some common interface. The most common examples are
9719 @code{console_scripts} entry points, which define shell commands by
9720 identifying a Python function to run. The @code{entrypoints} module contains
9721 functions to find and load entry points.")
9722 (license license:expat)))
9723
9724 (define-public python2-entrypoints
9725 (package-with-python2 python-entrypoints))
9726
9727 (define-public python-epc
9728 (package
9729 (name "python-epc")
9730 (version "0.0.5")
9731 (source
9732 (origin
9733 (method url-fetch)
9734 (uri (pypi-uri "epc" version))
9735 (sha256
9736 (base32
9737 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9738 (build-system python-build-system)
9739 (propagated-inputs
9740 `(("python-sexpdata" ,python-sexpdata)))
9741 (native-inputs
9742 `(("python-nose" ,python-nose)))
9743 (home-page "https://github.com/tkf/python-epc")
9744 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9745 (description
9746 "Python-EPC can call elisp functions from Python and Python functions
9747 from elisp.")
9748 (license license:gpl3)))
9749
9750 (define-public python-forex-python
9751 (package
9752 (name "python-forex-python")
9753 (version "1.5")
9754 (source
9755 (origin
9756 (method url-fetch)
9757 (uri (pypi-uri "forex-python" version))
9758 (sha256
9759 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9760 (build-system python-build-system)
9761 (arguments
9762 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9763 ;; repository require online data.
9764 `(#:tests? #f))
9765 (propagated-inputs
9766 `(("python-requests" ,python-requests)
9767 ("python-simplejson" ,python-simplejson)))
9768 (home-page "https://github.com/MicroPyramid/forex-python")
9769 (synopsis "Foreign exchange rates and currency conversion")
9770 (description
9771 "@code{python-forex-python} can be used to manipulate foreign
9772 exchange rates and to operate currency conversions.
9773
9774 Features:
9775 @itemize
9776 @item List all currency rates.
9777 @item BitCoin price for all currencies.
9778 @item Converting amount to BitCoins.
9779 @item Get historical rates for any day since 1999.
9780 @item Conversion rate for one currency(ex; USD to INR).
9781 @item Convert amount from one currency to other.('USD 10$' to INR).
9782 @item Currency symbols.
9783 @item Currency names.
9784 @end itemize")
9785 (license license:expat)))
9786
9787 (define-public python-simpleeval
9788 (package
9789 (name "python-simpleeval")
9790 (version "0.9.10")
9791 (source
9792 (origin
9793 (method url-fetch)
9794 (uri (pypi-uri "simpleeval" version))
9795 (sha256
9796 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9797 (build-system python-build-system)
9798 (home-page "https://github.com/danthedeckie/simpleeval")
9799 (synopsis "Simple, safe single expression evaluator library")
9800 (description
9801 "This package provides a quick single file library for easily adding
9802 evaluatable expressions into python projects. Say you want to allow a user
9803 to set an alarm volume, which could depend on the time of day, alarm level,
9804 how many previous alarms had gone off, and if there is music playing at the
9805 time.")
9806 (license license:expat)))
9807
9808 (define-public python-nbconvert
9809 (package
9810 (name "python-nbconvert")
9811 (version "5.0.0b1")
9812 (source
9813 (origin
9814 (method url-fetch)
9815 (uri (pypi-uri "nbconvert" version))
9816 (sha256
9817 (base32
9818 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9819 (build-system python-build-system)
9820 (arguments
9821 `(;; The "bdist_egg" target is disabled by default, causing the installation
9822 ;; to fail.
9823 #:configure-flags (list "bdist_egg")
9824 ;; FIXME: 5 failures, 40 errors.
9825 #:tests? #f))
9826 ;; #:phases
9827 ;; (modify-phases %standard-phases
9828 ;; (replace 'check
9829 ;; (lambda _
9830 ;; (zero? (system* "py.test" "-v")))))
9831 (native-inputs
9832 `(("python-pytest" ,python-pytest)))
9833 (propagated-inputs
9834 `(("python-bleach" ,python-bleach)
9835 ("python-entrypoints" ,python-entrypoints)
9836 ("python-jinja2" ,python-jinja2)
9837 ("python-jupyter-core" ,python-jupyter-core)
9838 ("python-mistune" ,python-mistune)
9839 ("python-nbformat" ,python-nbformat)
9840 ("python-pygments" ,python-pygments)
9841 ("python-traitlets" ,python-traitlets)))
9842 (home-page "http://jupyter.org")
9843 (synopsis "Converting Jupyter Notebooks")
9844 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9845 notebooks to various other formats via Jinja templates. It allows you to
9846 convert an @code{.ipynb} notebook file into various static formats including:
9847
9848 @enumerate
9849 @item HTML
9850 @item LaTeX
9851 @item PDF
9852 @item Reveal JS
9853 @item Markdown (md)
9854 @item ReStructured Text (rst)
9855 @item executable script
9856 @end enumerate\n")
9857 (license license:bsd-3)))
9858
9859 (define-public python2-nbconvert
9860 (package-with-python2 python-nbconvert))
9861
9862 (define-public python-notebook
9863 (package
9864 (name "python-notebook")
9865 (version "5.7.4")
9866 (source (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "notebook" version))
9869 (sha256
9870 (base32
9871 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9872 (build-system python-build-system)
9873 (arguments
9874 `(#:phases
9875 (modify-phases %standard-phases
9876 (replace 'check
9877 (lambda _
9878 ;; These tests require a browser
9879 (delete-file-recursively "notebook/tests/selenium")
9880 ;; Some tests need HOME
9881 (setenv "HOME" "/tmp")
9882 ;; This file contains "warningfilters", which are not supported
9883 ;; by this version of nose.
9884 (delete-file "setup.cfg")
9885 (with-directory-excursion "/tmp"
9886 (invoke "nosetests" "-v"))
9887 #t)))))
9888 (propagated-inputs
9889 `(("python-jupyter-core" ,python-jupyter-core)
9890 ("python-nbformat" ,python-nbformat)
9891 ("python-nbconvert" ,python-nbconvert)
9892 ("python-prometheus-client" ,python-prometheus-client)
9893 ("python-send2trash" ,python-send2trash)
9894 ("python-terminado" ,python-terminado)))
9895 (native-inputs
9896 `(("python-nose" ,python-nose)
9897 ("python-sphinx" ,python-sphinx)
9898 ("python-requests" ,python-requests)))
9899 (home-page "http://jupyter.org/")
9900 (synopsis "Web-based notebook environment for interactive computing")
9901 (description
9902 "The Jupyter HTML notebook is a web-based notebook environment for
9903 interactive computing.")
9904 (properties `((python2-variant . ,(delay python2-notebook))))
9905 (license license:bsd-3)))
9906
9907 (define-public python2-notebook
9908 (let ((base (package-with-python2
9909 (strip-python2-variant python-notebook))))
9910 (package (inherit base)
9911 (native-inputs
9912 `(("python2-mock" ,python2-mock)
9913 ,@(package-native-inputs base)))
9914 (arguments
9915 (substitute-keyword-arguments (package-arguments base)
9916 ((#:phases phases)
9917 `(modify-phases ,phases
9918 (add-before 'check 'disable-test-case
9919 ;; The test requires network access to localhost. Curiously it
9920 ;; fails with Python 2 only. Simply make the test-case return
9921 ;; immediately.
9922 (lambda _
9923 (substitute*
9924 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9925 (("formats = self.nbconvert_api") "return #")))))))))))
9926
9927 (define-public python-widgetsnbextension
9928 (package
9929 (name "python-widgetsnbextension")
9930 (version "3.5.1")
9931 (source
9932 (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "widgetsnbextension" version))
9935 (sha256
9936 (base32
9937 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9938 (build-system python-build-system)
9939 (propagated-inputs
9940 `(("python-ipykernel" ,python-ipykernel)
9941 ("python-notebook" ,python-notebook)))
9942 (native-inputs
9943 `(("python-certifi" ,python-certifi)
9944 ("python-nose" ,python-nose)))
9945 (home-page "https://ipython.org")
9946 (synopsis "IPython HTML widgets for Jupyter")
9947 (description "This package provides interactive HTML widgets for Jupyter
9948 notebooks.")
9949 (license license:bsd-3)))
9950
9951 (define-public python2-widgetsnbextension
9952 (package-with-python2 python-widgetsnbextension))
9953
9954 (define-public python-ipywidgets
9955 (package
9956 (name "python-ipywidgets")
9957 (version "7.5.1")
9958 (source
9959 (origin
9960 (method url-fetch)
9961 (uri (pypi-uri "ipywidgets" version))
9962 (sha256
9963 (base32
9964 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9965 (build-system python-build-system)
9966 (propagated-inputs
9967 `(("python-ipython" ,python-ipython)
9968 ("python-traitlets" ,python-traitlets)
9969 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9970 (native-inputs
9971 `(("python-nose" ,python-nose)
9972 ("python-pytest" ,python-pytest)))
9973 (home-page "https://ipython.org")
9974 (synopsis "IPython HTML widgets for Jupyter")
9975 (description "Ipywidgets are interactive HTML widgets for Jupyter
9976 notebooks and the IPython kernel. Notebooks come alive when interactive
9977 widgets are used. Users gain control of their data and can visualize changes
9978 in the data.")
9979 (license license:bsd-3)))
9980
9981 (define-public python2-ipywidgets
9982 (package-with-python2 python-ipywidgets))
9983
9984 (define-public python-jupyter-console
9985 (package
9986 (name "python-jupyter-console")
9987 (version "6.1.0")
9988 (source
9989 (origin
9990 (method url-fetch)
9991 (uri (pypi-uri "jupyter_console" version))
9992 (sha256
9993 (base32
9994 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
9995 (build-system python-build-system)
9996 (propagated-inputs
9997 `(("python-ipykernel" ,python-ipykernel)
9998 ("python-jupyter-client" ,python-jupyter-client)
9999 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10000 ("python-pygments" ,python-pygments)))
10001 (native-inputs
10002 `(("python-nose" ,python-nose)))
10003 (home-page "https://jupyter.org")
10004 (synopsis "Jupyter terminal console")
10005 (description "This package provides a terminal-based console frontend for
10006 Jupyter kernels. It also allows for console-based interaction with non-Python
10007 Jupyter kernels such as IJulia and IRKernel.")
10008 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10009 (license license:bsd-3)))
10010
10011 (define-public python2-jupyter-console
10012 (package
10013 (name "python2-jupyter-console")
10014 (version "5.2.0")
10015 (source
10016 (origin
10017 (method url-fetch)
10018 (uri (pypi-uri "jupyter_console" version))
10019 (sha256
10020 (base32
10021 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10022 (build-system python-build-system)
10023 (arguments
10024 `(#:python ,python-2
10025 #:tests? #f)) ; Tests only run in a TTY.
10026 (propagated-inputs
10027 `(("python2-ipykernel" ,python2-ipykernel)
10028 ("python2-jupyter-client" ,python2-jupyter-client)
10029 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10030 ("python2-pygments" ,python2-pygments)))
10031 (native-inputs
10032 `(("python2-nose" ,python2-nose)))
10033 (home-page "https://jupyter.org")
10034 (synopsis "Jupyter terminal console")
10035 (description "This package provides a terminal-based console frontend for
10036 Jupyter kernels. It also allows for console-based interaction with non-Python
10037 Jupyter kernels such as IJulia and IRKernel.")
10038 (license license:bsd-3)))
10039
10040 ;; The python-ipython and python-jupyter-console require each other. To get
10041 ;; the functionality in both packages working, strip down the
10042 ;; python-jupyter-console package when using it as an input to python-ipython.
10043 (define python-jupyter-console-minimal
10044 (package
10045 (inherit python-jupyter-console)
10046 (name "python-jupyter-console-minimal")
10047 (arguments
10048 (substitute-keyword-arguments
10049 (package-arguments python-jupyter-console)
10050 ((#:phases phases)
10051 `(modify-phases ,phases
10052 (add-after 'install 'delete-bin
10053 (lambda* (#:key outputs #:allow-other-keys)
10054 ;; Delete the bin files, to avoid conflicts in profiles
10055 ;; where python-ipython and python-jupyter-console are
10056 ;; both present.
10057 (delete-file-recursively
10058 (string-append
10059 (assoc-ref outputs "out") "/bin"))))))))
10060 ;; Remove the python-ipython propagated input, to avoid the cycle
10061 (propagated-inputs
10062 (alist-delete
10063 "python-ipython"
10064 (package-propagated-inputs python-jupyter-console)))))
10065
10066 (define-public python-qtconsole
10067 (package
10068 (name "python-qtconsole")
10069 (version "4.4.3")
10070 (source
10071 (origin
10072 (method url-fetch)
10073 (uri (pypi-uri "qtconsole" version))
10074 (sha256
10075 (base32
10076 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10077 (build-system python-build-system)
10078 (arguments
10079 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10080 ;; but we only have the LTS version 5.x. This means that there might be
10081 ;; runtime errors, but since this is a dependency of the Jupyter package,
10082 ;; and Jupyter can be used without the qtconsole we can overlook this for
10083 ;; now.
10084 `(#:tests? #f
10085 #:phases
10086 (modify-phases %standard-phases
10087 (add-before 'check 'pre-check
10088 (lambda _
10089 (setenv "QT_QPA_PLATFORM" "offscreen")
10090 #t)))))
10091 (propagated-inputs
10092 `(("python-ipykernel" ,python-ipykernel)
10093 ("python-ipython" ,python-ipython)))
10094 (native-inputs
10095 `(("python-pytest" ,python-pytest)))
10096 (home-page "http://jupyter.org")
10097 (synopsis "Jupyter Qt console")
10098 (description "This package provides a Qt-based console for Jupyter with
10099 support for rich media output.")
10100 (license license:bsd-3)))
10101
10102 (define-public python-jsbeautifier
10103 (package
10104 (name "python-jsbeautifier")
10105 (version "1.10.2")
10106 (home-page "https://github.com/beautify-web/js-beautify")
10107 (source (origin
10108 (method git-fetch)
10109 (uri (git-reference
10110 (url home-page)
10111 (commit (string-append "v" version))))
10112 (file-name (git-file-name name version))
10113 (sha256
10114 (base32
10115 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10116 (build-system python-build-system)
10117 (arguments
10118 `(#:phases (modify-phases %standard-phases
10119 (add-after 'unpack 'chdir
10120 (lambda _
10121 ;; The upstream Git repository contains all the code,
10122 ;; but this package only builds the python code.
10123 (chdir "python")
10124 #t))
10125 (add-after 'unpack 'patch-python-six-requirements
10126 (lambda _
10127 (substitute* "python/setup.py"
10128 (("six>=1.12.0")
10129 "six>=1.11.0"))
10130 #t)))))
10131 (propagated-inputs
10132 `(("python-editorconfig" ,python-editorconfig)
10133 ("python-six" ,python-six)))
10134 (native-inputs
10135 `(("python-pytest" ,python-pytest)))
10136 (synopsis "JavaScript unobfuscator and beautifier")
10137 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10138 popular online obfuscators.")
10139 (license license:expat)))
10140
10141 (define-public jupyter
10142 (package
10143 (name "jupyter")
10144 (version "1.0.0")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "jupyter" version))
10149 (sha256
10150 (base32
10151 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10152 (build-system python-build-system)
10153 (arguments '(#:tests? #f)) ; there are none.
10154 (propagated-inputs
10155 `(("python-ipykernel" ,python-ipykernel)
10156 ("python-ipywidgets" ,python-ipywidgets)
10157 ("python-jupyter-console" ,python-jupyter-console)
10158 ("python-nbconvert" ,python-nbconvert)
10159 ("python-notebook" ,python-notebook)
10160 ("python-qtconsole" ,python-qtconsole)))
10161 (native-search-paths
10162 (list (search-path-specification
10163 (variable "JUPYTER_PATH")
10164 (files '("share/jupyter")))))
10165 (home-page "https://jupyter.org")
10166 (synopsis "Web application for interactive documents")
10167 (description
10168 "The Jupyter Notebook is a web application that allows you to create and
10169 share documents that contain live code, equations, visualizations and
10170 explanatory text. Uses include: data cleaning and transformation, numerical
10171 simulation, statistical modeling, machine learning and much more.")
10172 (license license:bsd-3)))
10173
10174 (define-public python-chardet
10175 (package
10176 (name "python-chardet")
10177 (version "3.0.4")
10178 (source
10179 (origin
10180 (method url-fetch)
10181 (uri (pypi-uri "chardet" version))
10182 (sha256
10183 (base32
10184 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10185 (native-inputs
10186 `(("python-hypothesis" ,python-hypothesis)
10187 ("python-pytest" ,python-pytest)
10188 ("python-pytest-runner" ,python-pytest-runner)))
10189 (build-system python-build-system)
10190 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10191 (arguments `(#:tests? #f))
10192 (home-page "https://github.com/chardet/chardet")
10193 (synopsis "Universal encoding detector for Python 2 and 3")
10194 (description
10195 "This package provides @code{chardet}, a Python module that can
10196 automatically detect a wide range of file encodings.")
10197 (license license:lgpl2.1+)))
10198
10199 (define-public python2-chardet
10200 (package-with-python2 python-chardet))
10201
10202 (define-public python-docopt
10203 (package
10204 (name "python-docopt")
10205 (version "0.6.2")
10206 (source
10207 (origin
10208 (method git-fetch)
10209 ;; The release on PyPI does not include tests.
10210 (uri (git-reference
10211 (url "https://github.com/docopt/docopt")
10212 (commit version)))
10213 (file-name (git-file-name name version))
10214 (sha256
10215 (base32
10216 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10217 (build-system python-build-system)
10218 (native-inputs
10219 `(("python-pytest" ,python-pytest)))
10220 (arguments
10221 `(#:phases
10222 (modify-phases %standard-phases
10223 (replace 'check
10224 (lambda _ (invoke "py.test"))))))
10225 (home-page "http://docopt.org")
10226 (synopsis "Command-line interface description language for Python")
10227 (description "This library allows the user to define a command-line
10228 interface from a program's help message rather than specifying it
10229 programmatically with command-line parsers like @code{getopt} and
10230 @code{argparse}.")
10231 (license license:expat)))
10232
10233 (define-public python2-docopt
10234 (package-with-python2 python-docopt))
10235
10236 (define-public python-pythondialog
10237 (package
10238 (name "python-pythondialog")
10239 (version "3.4.0")
10240 (source
10241 (origin
10242 (method url-fetch)
10243 (uri (pypi-uri "pythondialog" version))
10244 (sha256
10245 (base32
10246 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10247 (build-system python-build-system)
10248 (arguments
10249 `(#:phases
10250 (modify-phases %standard-phases
10251 (add-after 'unpack 'patch-path
10252 (lambda* (#:key inputs #:allow-other-keys)
10253 (let* ((dialog (assoc-ref inputs "dialog")))
10254 ;; Since this library really wants to grovel the search path, we
10255 ;; must hardcode dialog's store path into it.
10256 (substitute* "dialog.py"
10257 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10258 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10259 #t))))
10260 #:tests? #f)) ; no test suite
10261 (propagated-inputs
10262 `(("dialog" ,dialog)))
10263 (home-page "http://pythondialog.sourceforge.net/")
10264 (synopsis "Python interface to the UNIX dialog utility")
10265 (description "A Python wrapper for the dialog utility. Its purpose is to
10266 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10267 This allows one to make simple text-mode user interfaces on Unix-like systems")
10268 (license license:lgpl2.1)
10269 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10270
10271 (define-public python2-pythondialog
10272 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10273 (package
10274 (inherit base)
10275 (version (package-version python-pythondialog))
10276 (source (origin
10277 (method url-fetch)
10278 (uri (pypi-uri "python2-pythondialog" version))
10279 (sha256
10280 (base32
10281 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10282
10283 (define-public python-configobj
10284 (package
10285 (name "python-configobj")
10286 (version "5.0.6")
10287 (source (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "configobj" version))
10290 (sha256
10291 (base32
10292 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10293 ;; Patch setup.py so it looks for python-setuptools, which is
10294 ;; required to parse the keyword 'install_requires' in setup.py.
10295 (patches (search-patches "python-configobj-setuptools.patch"))))
10296 (build-system python-build-system)
10297 (propagated-inputs
10298 `(("python-six" ,python-six)))
10299 (synopsis "Config file reading, writing and validation")
10300 (description "ConfigObj is a simple but powerful config file reader and
10301 writer: an ini file round tripper. Its main feature is that it is very easy to
10302 use, with a straightforward programmer’s interface and a simple syntax for
10303 config files.")
10304 (home-page "https://github.com/DiffSK/configobj")
10305 (license license:bsd-3)))
10306
10307 (define-public python2-configobj
10308 (package-with-python2 python-configobj))
10309
10310 (define-public python-configargparse
10311 (package
10312 (name "python-configargparse")
10313 (version "0.14.0")
10314 (source (origin
10315 (method url-fetch)
10316 (uri (pypi-uri "ConfigArgParse" version))
10317 (sha256
10318 (base32
10319 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10320 (build-system python-build-system)
10321 (native-inputs
10322 `(("python-pyyaml" ,python-pyyaml)))
10323 (arguments
10324 `(#:phases
10325 (modify-phases %standard-phases
10326 (replace 'check
10327 (lambda _
10328 ;; Bypass setuptools-shim because one test relies on "setup.py"
10329 ;; being the first argument passed to the python call.
10330 ;;
10331 ;; NOTE: Many tests do not run because they rely on Python's
10332 ;; built-in test.test_argparse, but we remove the unit tests from
10333 ;; our Python installation.
10334 (invoke "python" "setup.py" "test"))))))
10335 (synopsis "Replacement for argparse")
10336 (description "A drop-in replacement for argparse that allows options to also
10337 be set via config files and/or environment variables.")
10338 (home-page "https://github.com/bw2/ConfigArgParse")
10339 (license license:expat)))
10340
10341 (define-public python2-configargparse
10342 (package-with-python2 python-configargparse))
10343
10344 (define-public python-argparse-manpage
10345 (package
10346 (name "python-argparse-manpage")
10347 (version "1.1")
10348 (source
10349 (origin
10350 (method url-fetch)
10351 (uri (pypi-uri "argparse-manpage" version))
10352 (sha256
10353 (base32
10354 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10355 (build-system python-build-system)
10356 (home-page "https://github.com/praiskup/argparse-manpage")
10357 (synopsis "Build manual page from Python's ArgumentParser object")
10358 (description
10359 "This package provides tools to build manual pages from Python's
10360 @code{ArgumentParser} object.")
10361 (license license:asl2.0)))
10362
10363 (define-public python-contextlib2
10364 (package
10365 (name "python-contextlib2")
10366 (version "0.6.0.post1")
10367 (source
10368 (origin
10369 (method url-fetch)
10370 (uri (pypi-uri "contextlib2" version))
10371 (sha256
10372 (base32
10373 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10374 (build-system python-build-system)
10375 (home-page "https://contextlib2.readthedocs.org/")
10376 (synopsis "Tools for decorators and context managers")
10377 (description "This module is primarily a backport of the Python
10378 3.2 contextlib to earlier Python versions. Like contextlib, it
10379 provides utilities for common tasks involving decorators and context
10380 managers. It also contains additional features that are not part of
10381 the standard library.")
10382 (properties `((python2-variant . ,(delay python2-contextlib2))))
10383 (license license:psfl)))
10384
10385 (define-public python2-contextlib2
10386 (let ((base (package-with-python2
10387 (strip-python2-variant python-contextlib2))))
10388 (package
10389 (inherit base)
10390 (arguments
10391 (substitute-keyword-arguments (package-arguments base)
10392 ((#:phases phases)
10393 `(modify-phases ,phases
10394 (replace 'check
10395 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10396 (native-inputs
10397 `(("python2-unittest2" ,python2-unittest2))))))
10398
10399 ;; This package is used by python2-pytest via python2-importlib-metadata,
10400 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10401 (define-public python2-contextlib2-bootstrap
10402 (hidden-package
10403 (package/inherit
10404 python2-contextlib2
10405 (name "python2-contextlib2-bootstrap")
10406 (arguments
10407 `(#:tests? #f
10408 ,@(package-arguments python2-contextlib2)))
10409 (native-inputs '()))))
10410
10411 (define-public python-texttable
10412 (package
10413 (name "python-texttable")
10414 (version "1.6.2")
10415 (source
10416 (origin
10417 (method url-fetch)
10418 (uri (pypi-uri "texttable" version))
10419 (sha256
10420 (base32
10421 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10422 (build-system python-build-system)
10423 (arguments
10424 `(#:phases
10425 (modify-phases %standard-phases
10426 (replace 'check
10427 (lambda _ (invoke "pytest" "tests.py"))))))
10428 (native-inputs
10429 `(("python-pytest" ,python-pytest)))
10430 (home-page "https://github.com/foutaise/texttable/")
10431 (synopsis "Python module for creating simple ASCII tables")
10432 (description "Texttable is a Python module for creating simple ASCII
10433 tables.")
10434 (license license:expat)))
10435
10436 (define-public python2-texttable
10437 (package-with-python2 python-texttable))
10438
10439 (define-public python-atomicwrites
10440 (package
10441 (name "python-atomicwrites")
10442 (version "1.3.0")
10443 (source (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "atomicwrites" version))
10446 (sha256
10447 (base32
10448 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10449 (build-system python-build-system)
10450 (synopsis "Atomic file writes in Python")
10451 (description "Library for atomic file writes using platform dependent tools
10452 for atomic file system operations.")
10453 (home-page "https://github.com/untitaker/python-atomicwrites")
10454 (license license:expat)))
10455
10456 (define-public python2-atomicwrites
10457 (package-with-python2 python-atomicwrites))
10458
10459 (define-public python-click-threading
10460 (package
10461 (name "python-click-threading")
10462 (version "0.4.4")
10463 (source (origin
10464 (method url-fetch)
10465 (uri (pypi-uri "click-threading" version))
10466 (sha256
10467 (base32
10468 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10469 (build-system python-build-system)
10470 (propagated-inputs
10471 `(("python-click" ,python-click)))
10472 (synopsis "Utilities for multithreading in Click")
10473 (description "This package provides utilities for multithreading in Click
10474 applications.")
10475 (home-page "https://github.com/click-contrib/click-threading")
10476 (license license:expat)))
10477
10478 (define-public python-click-log
10479 (package
10480 (name "python-click-log")
10481 (version "0.3.2")
10482 (source (origin
10483 (method url-fetch)
10484 (uri (pypi-uri "click-log" version))
10485 (sha256
10486 (base32
10487 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10488 (build-system python-build-system)
10489 (propagated-inputs
10490 `(("python-click" ,python-click)))
10491 (synopsis "Logging for click applications")
10492 (description "This package provides a Python library for logging Click
10493 applications.")
10494 (home-page "https://github.com/click-contrib/click-log")
10495 (license license:expat)))
10496
10497 (define-public python-apipkg
10498 (package
10499 (name "python-apipkg")
10500 (version "1.5")
10501 (source (origin
10502 (method url-fetch)
10503 (uri (pypi-uri "apipkg" version))
10504 (sha256
10505 (base32
10506 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10507 (build-system python-build-system)
10508 (native-inputs
10509 `(("python-pytest" ,python-pytest)
10510 ("python-setuptools-scm" ,python-setuptools-scm)))
10511 (synopsis "Namespace control and lazy-import mechanism")
10512 (description "With apipkg you can control the exported namespace of a Python
10513 package and greatly reduce the number of imports for your users. It is a small
10514 pure Python module that works on virtually all Python versions.")
10515 (home-page "https://github.com/pytest-dev/apipkg")
10516 (license license:expat)))
10517
10518 (define-public python-execnet
10519 (package
10520 (name "python-execnet")
10521 (version "1.4.1")
10522 (source (origin
10523 (method url-fetch)
10524 (uri (pypi-uri "execnet" version))
10525 (sha256
10526 (base32
10527 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10528 (build-system python-build-system)
10529 (arguments
10530 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10531 ;; The two test failures are caused by the lack of an `ssh` executable.
10532 ;; The test suite can be run with pytest after the 'install' phase.
10533 #:tests? #f))
10534 (native-inputs
10535 `(("python-pytest" ,python-pytest)
10536 ("python-setuptools-scm" ,python-setuptools-scm)))
10537 (propagated-inputs
10538 `(("python-apipkg" ,python-apipkg)))
10539 (synopsis "Rapid multi-Python deployment")
10540 (description "Execnet provides a share-nothing model with
10541 channel-send/receive communication for distributing execution across many
10542 Python interpreters across version, platform and network barriers. It has a
10543 minimal and fast API targeting the following uses:
10544 @enumerate
10545 @item distribute tasks to (many) local or remote CPUs
10546 @item write and deploy hybrid multi-process applications
10547 @item write scripts to administer multiple environments
10548 @end enumerate")
10549 (home-page "https://codespeak.net/execnet/")
10550 (license license:expat)))
10551
10552 (define-public python2-execnet
10553 (package-with-python2 python-execnet))
10554
10555 (define-public python-icalendar
10556 (package
10557 (name "python-icalendar")
10558 (version "4.0.5")
10559 (source (origin
10560 (method url-fetch)
10561 (uri (pypi-uri "icalendar" version))
10562 (sha256
10563 (base32
10564 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10565 (build-system python-build-system)
10566 (propagated-inputs
10567 `(("python-dateutil" ,python-dateutil)
10568 ("python-pytz" ,python-pytz)))
10569 (synopsis "Python library for parsing iCalendar files")
10570 (description "The icalendar package is a parser/generator of iCalendar
10571 files for use with Python.")
10572 (home-page "https://github.com/collective/icalendar")
10573 (license license:bsd-2)))
10574
10575 (define-public python-args
10576 (package
10577 (name "python-args")
10578 (version "0.1.0")
10579 (source (origin
10580 (method url-fetch)
10581 (uri (pypi-uri "args" version))
10582 (sha256
10583 (base32
10584 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10585 (build-system python-build-system)
10586 (home-page "https://github.com/kennethreitz/args")
10587 (synopsis "Command-line argument parser")
10588 (description
10589 "This library provides a Python module to parse command-line arguments.")
10590 (license license:bsd-3)))
10591
10592 (define-public python2-args
10593 (package-with-python2 python-args))
10594
10595 (define-public python-clint
10596 (package
10597 (name "python-clint")
10598 (version "0.5.1")
10599 (source (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "clint" version))
10602 (sha256
10603 (base32
10604 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10605 (build-system python-build-system)
10606 (arguments
10607 '(#:phases
10608 (modify-phases %standard-phases
10609 (replace 'check
10610 (lambda _ (invoke "py.test" "-v"))))))
10611 (native-inputs
10612 `(("python-pytest" ,python-pytest)))
10613 (propagated-inputs
10614 `(("python-args" ,python-args)))
10615 (home-page "https://github.com/kennethreitz/clint")
10616 (synopsis "Command-line interface tools")
10617 (description
10618 "Clint is a Python module filled with a set of tools for developing
10619 command-line applications, including tools for colored and indented
10620 output, progress bar display, and pipes.")
10621 (license license:isc)))
10622
10623 (define-public python2-clint
10624 (package-with-python2 python-clint))
10625
10626 (define-public python-rply
10627 (package
10628 (name "python-rply")
10629 (version "0.7.5")
10630 (source (origin
10631 (method url-fetch)
10632 (uri (pypi-uri "rply" version))
10633 (sha256
10634 (base32
10635 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10636 (build-system python-build-system)
10637 (propagated-inputs
10638 `(("python-appdirs" ,python-appdirs)))
10639 (home-page "https://github.com/alex/rply")
10640 (synopsis "Parser generator for Python")
10641 (description
10642 "This package provides a pure Python based parser generator, that also
10643 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10644 with a new public API, and RPython support.")
10645 (license license:bsd-3)))
10646
10647 (define-public python2-rply
10648 (package-with-python2 python-rply))
10649
10650 (define-public python-hy
10651 (package
10652 (name "python-hy")
10653 (version "0.18.0")
10654 (source (origin
10655 (method url-fetch)
10656 (uri (pypi-uri "hy" version))
10657 (sha256
10658 (base32
10659 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10660 (build-system python-build-system)
10661 (arguments
10662 '(#:phases
10663 (modify-phases %standard-phases
10664 (add-before 'install 'set-HOME
10665 (lambda _
10666 (setenv "HOME" "/tmp") #t))
10667 (replace 'check
10668 (lambda _
10669 ;; Tests require write access to HOME.
10670 (setenv "HOME" "/tmp")
10671 (invoke "nosetests"))))))
10672 (native-inputs
10673 `(("python-coverage" ,python-coverage)
10674 ("python-nose" ,python-nose)))
10675 (propagated-inputs
10676 `(("python-astor" ,python-astor)
10677 ("python-colorama" ,python-colorama)
10678 ("python-rply" ,python-rply)
10679 ("python-funcparserlib"
10680 ,python-funcparserlib)))
10681 (home-page "http://hylang.org/")
10682 (synopsis "Lisp frontend to Python")
10683 (description
10684 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10685 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10686 Python at your fingertips, in Lisp form.")
10687 (license license:expat)))
10688
10689 (define-public python2-functools32
10690 (package
10691 (name "python2-functools32")
10692 (version "3.2.3-2")
10693 (source
10694 (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "functools32" version))
10697 (sha256
10698 (base32
10699 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10700 (build-system python-build-system)
10701 (arguments
10702 `(#:python ,python-2
10703 #:tests? #f)) ; no test target
10704 (home-page "https://github.com/MiCHiLU/python-functools32")
10705 (synopsis
10706 "Backport of the functools module from Python 3.2.3")
10707 (description
10708 "This package is a backport of the @code{functools} module from Python
10709 3.2.3 for use with older versions of Python and PyPy.")
10710 (license license:expat)))
10711
10712 (define-public python2-subprocess32
10713 (package
10714 (name "python2-subprocess32")
10715 (version "3.2.7")
10716 (source (origin
10717 (method url-fetch)
10718 (uri (pypi-uri "subprocess32" version))
10719 (sha256
10720 (base32
10721 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10722 (patches
10723 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10724 (build-system python-build-system)
10725 (arguments
10726 `(#:python ,python-2
10727 ;; The test suite fails with Python > 2.7.13:
10728 ;; import test.support
10729 ;; ImportError: No module named support
10730 #:tests? #f
10731 #:phases
10732 (modify-phases %standard-phases
10733 (add-after 'unpack 'patch-/bin/sh
10734 (lambda _
10735 (substitute* '("subprocess32.py"
10736 "test_subprocess32.py")
10737 (("/bin/sh") (which "sh")))
10738 #t)))))
10739 (home-page "https://github.com/google/python-subprocess32")
10740 (synopsis "Backport of the subprocess module from Python 3.2")
10741 (description
10742 "This is a backport of the @code{subprocess} standard library module
10743 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10744 new features. On POSIX systems it is guaranteed to be reliable when used
10745 in threaded applications. It includes timeout support from Python 3.3 but
10746 otherwise matches 3.2’s API.")
10747 (license license:psfl)))
10748
10749 (define-public python2-futures
10750 (package
10751 (name "python2-futures")
10752 (version "3.2.0")
10753 (source
10754 (origin
10755 (method url-fetch)
10756 (uri (pypi-uri "futures" version))
10757 (sha256
10758 (base32
10759 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10760 (build-system python-build-system)
10761 (arguments
10762 `(#:python ,python-2
10763 #:phases
10764 (modify-phases %standard-phases
10765 (replace 'check
10766 (lambda _
10767 (invoke "python" "test_futures.py")
10768 #t)))))
10769 (home-page "https://github.com/agronholm/pythonfutures")
10770 (synopsis
10771 "Backport of the concurrent.futures package from Python 3.2")
10772 (description
10773 "The concurrent.futures module provides a high-level interface for
10774 asynchronously executing callables. This package backports the
10775 concurrent.futures package from Python 3.2")
10776 (license license:bsd-3)))
10777
10778 (define-public python-promise
10779 (package
10780 (name "python-promise")
10781 (version "0.4.2")
10782 (source
10783 (origin
10784 (method url-fetch)
10785 (uri (pypi-uri "promise" version))
10786 (sha256
10787 (base32
10788 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10789 (build-system python-build-system)
10790 ;; Tests wants python-futures, which is a python2 only program, and
10791 ;; can't be found by python-promise at test time.
10792 (arguments `(#:tests? #f))
10793 (home-page "https://github.com/syrusakbary/promise")
10794 (synopsis "Promises/A+ implementation for Python")
10795 (description
10796 "Promises/A+ implementation for Python")
10797 (properties `((python2-variant . ,(delay python2-promise))))
10798 (license license:expat)))
10799
10800 (define-public python2-promise
10801 (let ((promise (package-with-python2
10802 (strip-python2-variant python-promise))))
10803 (package (inherit promise)
10804 (arguments (substitute-keyword-arguments (package-arguments promise)
10805 ((#:tests? _) #t)))
10806 (native-inputs
10807 `(("python2-futures" ,python2-futures)
10808 ("python2-pytest" ,python2-pytest)
10809 ,@(package-native-inputs promise))))))
10810
10811 (define-public python-progressbar2
10812 (package
10813 (name "python-progressbar2")
10814 (version "3.51.3")
10815 (source
10816 (origin
10817 (method url-fetch)
10818 (uri (pypi-uri "progressbar2" version))
10819 (sha256
10820 (base32
10821 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10822 (build-system python-build-system)
10823 (propagated-inputs
10824 `(("python-six" ,python-six)
10825 ("python-utils" ,python-utils)))
10826 (native-inputs
10827 `(("python-flake8" ,python-flake8)
10828 ("python-freezegun" ,python-freezegun)
10829 ("python-pycodestyle" ,python-pycodestyle)
10830 ("python-pytest" ,python-pytest)
10831 ("python-pytest-cache" ,python-pytest-cache)
10832 ("python-pytest-cov" ,python-pytest-cov)
10833 ("python-pytest-flakes" ,python-pytest-flakes)
10834 ("python-pytest-pep8" ,python-pytest-pep8)
10835 ("python-sphinx" ,python-sphinx)))
10836 (home-page "https://github.com/WoLpH/python-progressbar")
10837 (synopsis "Text progress bar library for Python")
10838 (description
10839 "This package provides a Python progressbar library to provide
10840 visual (yet text based) progress to long running operations.")
10841 (license license:bsd-3)))
10842
10843 (define-public python-progressbar33
10844 (package
10845 (name "python-progressbar33")
10846 (version "2.4")
10847 (source
10848 (origin
10849 (method url-fetch)
10850 (uri (pypi-uri "progressbar33" version))
10851 (sha256
10852 (base32
10853 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10854 (build-system python-build-system)
10855 (home-page "https://github.com/germangh/python-progressbar")
10856 (synopsis "Text progress bar library for Python")
10857 (description
10858 "This package provides a text progress bar library for Python. This
10859 version only differs from the original @code{progressbar} package in that it
10860 uses relative package imports instead of absolute imports, which is necessary
10861 for the module to work under Python 3.3.")
10862 ;; Either or both of these licenses may be selected.
10863 (license (list license:lgpl2.1+ license:bsd-3))))
10864
10865 (define-public python-colorama
10866 (package
10867 (name "python-colorama")
10868 (version "0.4.3")
10869 (source
10870 (origin
10871 (method url-fetch)
10872 (uri (pypi-uri "colorama" version))
10873 (sha256
10874 (base32
10875 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
10876 (build-system python-build-system)
10877 (synopsis "Colored terminal text rendering for Python")
10878 (description "Colorama is a Python library for rendering colored terminal
10879 text.")
10880 (home-page "https://pypi.org/project/colorama/")
10881 (license license:bsd-3)))
10882
10883 (define-public python2-colorama
10884 (package-with-python2 python-colorama))
10885
10886 (define-public python-rsa
10887 (package
10888 (name "python-rsa")
10889 (version "3.4.2")
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "rsa" version))
10894 (sha256
10895 (base32
10896 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10897 (build-system python-build-system)
10898 (propagated-inputs
10899 `(("python-pyasn1" ,python-pyasn1)))
10900 (synopsis "Pure-Python RSA implementation")
10901 (description "Python-RSA is a pure-Python RSA implementation. It supports
10902 encryption and decryption, signing and verifying signatures, and key
10903 generation according to PKCS#1 version 1.5. It can be used as a Python
10904 library as well as on the command line.")
10905 (home-page "https://stuvel.eu/rsa")
10906 (license license:asl2.0)))
10907
10908 (define-public python2-rsa
10909 (package-with-python2 python-rsa))
10910
10911 (define-public python-pluggy
10912 (package
10913 (name "python-pluggy")
10914 (version "0.13.1")
10915 (source
10916 (origin
10917 (method url-fetch)
10918 (uri (pypi-uri "pluggy" version))
10919 (sha256
10920 (base32
10921 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10922 (build-system python-build-system)
10923 (native-inputs
10924 `(("python-setuptools-scm" ,python-setuptools-scm)))
10925 (synopsis "Plugin and hook calling mechanism for Python")
10926 (description "Pluggy is an extraction of the plugin manager as used by
10927 Pytest but stripped of Pytest specific details.")
10928 (home-page "https://pypi.org/project/pluggy/")
10929 (properties `((python2-variant . ,(delay python2-pluggy))))
10930 (license license:expat)))
10931
10932 (define-public python2-pluggy
10933 (let ((base (package-with-python2 (strip-python2-variant
10934 python-pluggy))))
10935 (package/inherit
10936 base
10937 (propagated-inputs
10938 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10939
10940 ;; This package requires python2-importlib-metadata, but that package
10941 ;; ends up needing python2-pluggy via python2-pytest, so we need this
10942 ;; variant to solve the circular dependency.
10943 (define-public python2-pluggy-bootstrap
10944 (hidden-package
10945 (package/inherit
10946 python2-pluggy
10947 (name "python2-pluggy-bootstrap")
10948 (arguments
10949 `(#:tests? #f
10950 ,@(package-arguments python2-pluggy)))
10951 (propagated-inputs
10952 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10953
10954 (define-public python-tox
10955 (package
10956 (name "python-tox")
10957 (version "3.20.0")
10958 (source
10959 (origin
10960 (method url-fetch)
10961 (uri (pypi-uri "tox" version))
10962 (sha256
10963 (base32
10964 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
10965 (build-system python-build-system)
10966 (arguments
10967 ;; FIXME: Tests require pytest-timeout, which itself requires
10968 ;; pytest>=2.8.0 for installation.
10969 '(#:tests? #f))
10970 (propagated-inputs
10971 `(("python-filelock" ,python-filelock)
10972 ("python-packaging" ,python-packaging)
10973 ("python-pluggy" ,python-pluggy)
10974 ("python-py" ,python-py)
10975 ("python-six" ,python-six)
10976 ("python-toml" ,python-toml)
10977 ("python-virtualenv" ,python-virtualenv)))
10978 (native-inputs
10979 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10980 ("python-pytest" ,python-pytest) ; >= 2.3.5
10981 ("python-setuptools-scm" ,python-setuptools-scm)))
10982 (home-page "https://tox.readthedocs.io")
10983 (synopsis "Virtualenv-based automation of test activities")
10984 (description "Tox is a generic virtualenv management and test command line
10985 tool. It can be used to check that a package installs correctly with
10986 different Python versions and interpreters, or run tests in each type of
10987 supported environment, or act as a frontend to continuous integration
10988 servers.")
10989 (license license:expat)))
10990
10991 (define-public python2-tox
10992 (package-with-python2 python-tox))
10993
10994 (define-public python-jmespath
10995 (package
10996 (name "python-jmespath")
10997 (version "0.9.4")
10998 (source
10999 (origin
11000 (method url-fetch)
11001 (uri (pypi-uri "jmespath" version))
11002 (sha256
11003 (base32
11004 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11005 (build-system python-build-system)
11006 (native-inputs
11007 `(("python-nose" ,python-nose)))
11008 (synopsis "JSON Matching Expressions")
11009 (description "JMESPath (pronounced “james path”) is a Python library that
11010 allows one to declaratively specify how to extract elements from a JSON
11011 document.")
11012 (home-page "https://github.com/jmespath/jmespath.py")
11013 (license license:expat)))
11014
11015 (define-public python2-jmespath
11016 (package-with-python2 python-jmespath))
11017
11018 (define-public python-symengine
11019 (package
11020 (name "python-symengine")
11021 (version "0.6.1")
11022 (source
11023 (origin
11024 (method url-fetch)
11025 (uri (pypi-uri "symengine" version))
11026 (sha256
11027 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11028 (build-system python-build-system)
11029 (native-inputs
11030 `(("cmake" ,cmake)
11031 ("python-cython" ,python-cython)))
11032 (inputs
11033 `(("symengine" ,symengine)))
11034 (home-page "https://github.com/symengine/symengine.py")
11035 (synopsis "Python library providing wrappers to SymEngine")
11036 (description
11037 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11038 manipulation library.")
11039 (license license:expat)))
11040
11041 (define-public python-botocore
11042 (package
11043 (name "python-botocore")
11044 (version "1.15.26")
11045 (source
11046 (origin
11047 (method url-fetch)
11048 (uri (pypi-uri "botocore" version))
11049 (sha256
11050 (base32
11051 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
11052 (build-system python-build-system)
11053 (arguments
11054 ;; FIXME: Many tests are failing.
11055 '(#:tests? #f))
11056 (propagated-inputs
11057 `(("python-dateutil" ,python-dateutil)
11058 ("python-docutils" ,python-docutils)
11059 ("python-jmespath" ,python-jmespath)))
11060 (native-inputs
11061 `(("python-mock" ,python-mock)
11062 ("python-nose" ,python-nose)
11063 ("behave" ,behave)
11064 ("python-tox" ,python-tox)
11065 ("python-urllib3" ,python-urllib3)
11066 ("python-wheel" ,python-wheel)))
11067 (home-page "https://github.com/boto/botocore")
11068 (synopsis "Low-level interface to AWS")
11069 (description "Botocore is a Python library that provides a low-level
11070 interface to the Amazon Web Services (AWS) API.")
11071 (license license:asl2.0)))
11072
11073 (define-public python2-botocore
11074 (package-with-python2 python-botocore))
11075
11076 (define-public python-pyfiglet
11077 (package
11078 (name "python-pyfiglet")
11079 (version "0.8.post1")
11080 (source
11081 (origin
11082 (method url-fetch)
11083 (uri (pypi-uri "pyfiglet" version))
11084 (sha256
11085 (base32
11086 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11087 (build-system python-build-system)
11088 (home-page "https://github.com/pwaller/pyfiglet")
11089 (synopsis "Draw ASCII art big letters in Python")
11090 (description "This module lets you draw large letter from ordinary characters
11091 in pure Python.")
11092 (license license:expat)))
11093
11094 (define-public python-xdo
11095 (package
11096 (name "python-xdo")
11097 (version "0.3")
11098 (source (origin
11099 (method url-fetch)
11100 (uri (string-append
11101 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11102 "python-xdo_" version ".orig.tar.gz"))
11103 (sha256
11104 (base32
11105 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11106 (build-system python-build-system)
11107 (arguments
11108 '(#:phases
11109 (modify-phases %standard-phases
11110 (add-before 'install 'patch-libxdo-path
11111 ;; Hardcode the path of dynamically loaded libxdo library.
11112 (lambda* (#:key inputs #:allow-other-keys)
11113 (let ((libxdo (string-append
11114 (assoc-ref inputs "xdotool")
11115 "/lib/libxdo.so")))
11116 (substitute* "xdo/_xdo.py"
11117 (("find_library\\(\"xdo\"\\)")
11118 (simple-format #f "\"~a\"" libxdo)))
11119 #t))))
11120 #:tests? #f)) ; no tests provided
11121 (propagated-inputs
11122 `(("python-six" ,python-six)))
11123 (inputs
11124 `(("xdotool" ,xdotool)
11125 ("libX11" ,libx11)))
11126 (home-page "https://tracker.debian.org/pkg/python-xdo")
11127 (synopsis "Python library for simulating X11 keyboard/mouse input")
11128 (description "Provides bindings to libxdo for manipulating X11 via simulated
11129 input. (Note that this is mostly a legacy library; you may wish to look at
11130 python-xdo for newer bindings.)")
11131 (license license:bsd-3)))
11132
11133 (define-public python2-xdo
11134 (package-with-python2 python-xdo))
11135
11136 (define-public python-mako
11137 (package
11138 (name "python-mako")
11139 (version "1.1.2")
11140 (source
11141 (origin
11142 (method url-fetch)
11143 (uri (pypi-uri "Mako" version))
11144 (sha256
11145 (base32
11146 "17bd6r9ynp4hyfckkia0bb8gpd98f42jfl5rmzdpbld59bbcaf9i"))))
11147 (build-system python-build-system)
11148 (arguments
11149 `(#:phases (modify-phases %standard-phases
11150 (replace 'check
11151 (lambda* (#:key tests? #:allow-other-keys)
11152 (if tests?
11153 (invoke "nosetests" "-v")
11154 (format #t "test suite not run~%"))
11155 #t)))))
11156 (propagated-inputs
11157 `(("python-markupsafe" ,python-markupsafe)))
11158 (native-inputs
11159 `(("python-mock" ,python-mock)
11160 ("python-nose" ,python-nose)))
11161 (home-page "https://www.makotemplates.org/")
11162 (synopsis "Templating language for Python")
11163 (description "Mako is a templating language for Python that compiles
11164 templates into Python modules.")
11165 (license license:expat)))
11166
11167 (define-public python2-mako
11168 (package-with-python2 python-mako))
11169
11170 (define-public python-waitress
11171 (package
11172 (name "python-waitress")
11173 (version "1.1.0")
11174 (source
11175 (origin
11176 (method url-fetch)
11177 (uri (pypi-uri "waitress" version))
11178 (patches (search-patches "python-waitress-fix-tests.patch"))
11179 (sha256
11180 (base32
11181 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11182 (build-system python-build-system)
11183 (home-page "https://github.com/Pylons/waitress")
11184 (synopsis "Waitress WSGI server")
11185 (description "Waitress is meant to be a production-quality pure-Python WSGI
11186 server with very acceptable performance.")
11187 (license license:zpl2.1)))
11188
11189 (define-public python2-waitress
11190 (package-with-python2 python-waitress))
11191
11192 (define-public python-whichcraft
11193 (package
11194 (name "python-whichcraft")
11195 (version "0.6.1")
11196 (source
11197 (origin
11198 (method url-fetch)
11199 (uri (pypi-uri "whichcraft" version))
11200 (sha256
11201 (base32
11202 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11203 (build-system python-build-system)
11204 (native-inputs
11205 `(("python-pytest" ,python-pytest)))
11206 (home-page "https://github.com/pydanny/whichcraft")
11207 (synopsis "Cross-platform cross-python shutil.which functionality")
11208 (description
11209 "This package provides a shim of the shutil.which function that's
11210 designed to work across multiple versions of Python.")
11211 (license license:bsd-3)))
11212
11213 (define-public python-cookiecutter
11214 (package
11215 (name "python-cookiecutter")
11216 (version "1.7.2")
11217 (source
11218 (origin
11219 (method url-fetch)
11220 (uri (pypi-uri "cookiecutter" version))
11221 (sha256
11222 (base32
11223 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11224 (build-system python-build-system)
11225 (native-inputs
11226 `(("python-freezegun" ,python-freezegun)
11227 ("python-pytest" ,python-pytest)
11228 ("python-pytest-catchlog" ,python-pytest-catchlog)
11229 ("python-pytest-cov" ,python-pytest-cov)
11230 ("python-pytest-mock" ,python-pytest-mock)))
11231 (propagated-inputs
11232 `(("python-binaryornot" ,python-binaryornot)
11233 ("python-click" ,python-click)
11234 ("python-future" ,python-future)
11235 ("python-jinja2" ,python-jinja2)
11236 ("python-jinja2-time" ,python-jinja2-time)
11237 ("python-poyo" ,python-poyo)
11238 ("python-requests" ,python-requests)
11239 ("python-slugify" ,python-slugify)
11240 ("python-text-unidecode" ,python-text-unidecode)
11241 ("python-whichcraft" ,python-whichcraft)))
11242 (home-page "https://github.com/cookiecutter/cookiecutter")
11243 (synopsis
11244 "Command-line utility that creates projects from project templates")
11245 (description
11246 "This package provides a command-line utility that creates projects from
11247 project templates, e.g. creating a Python package project from a Python package
11248 project template.")
11249 (license license:bsd-3)))
11250
11251 (define-public python-pyquery
11252 (package
11253 (name "python-pyquery")
11254 (version "1.2.17")
11255 (source
11256 (origin
11257 (method url-fetch)
11258 (uri (pypi-uri "pyquery" version))
11259 (sha256
11260 (base32
11261 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11262 (build-system python-build-system)
11263 (native-inputs
11264 `(("python-webob" ,python-webob)
11265 ("python-webtest" ,python-webtest)))
11266 (propagated-inputs
11267 `(("python-lxml" ,python-lxml)
11268 ("python-cssselect" ,python-cssselect)))
11269 (home-page "https://github.com/gawel/pyquery")
11270 (synopsis "Make jQuery-like queries on xml documents")
11271 (description "pyquery allows you to make jQuery queries on xml documents.
11272 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11273 fast xml and html manipulation.")
11274 (license license:bsd-3)))
11275
11276 (define-public python-anyjson
11277 (package
11278 (name "python-anyjson")
11279 (version "0.3.3")
11280 (source
11281 (origin
11282 (method url-fetch)
11283 (uri (pypi-uri "anyjson" version))
11284 (sha256
11285 (base32
11286 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11287 (build-system python-build-system)
11288 (arguments
11289 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11290 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11291 ;; whatever) so this transformation needs to be done before the tests
11292 ;; can be run. Maybe we could add a build step to transform beforehand
11293 ;; but it could be annoying/difficult.
11294 ;; We can enable tests for the Python 2 version, though, and do below.
11295 #:tests? #f))
11296 (home-page "https://bitbucket.org/runeh/anyjson/")
11297 (synopsis
11298 "Wraps best available JSON implementation in a common interface")
11299 (description
11300 "Anyjson loads whichever is the fastest JSON module installed
11301 and provides a uniform API regardless of which JSON implementation is used.")
11302 (license license:bsd-3)
11303 (properties `((python2-variant . ,(delay python2-anyjson))))))
11304
11305 (define-public python2-anyjson
11306 (let ((anyjson (package-with-python2
11307 (strip-python2-variant python-anyjson))))
11308 (package
11309 (inherit anyjson)
11310 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11311 #:tests? #t
11312 ,@(package-arguments anyjson)))
11313 (native-inputs `(("python2-nose" ,python2-nose))))))
11314
11315 (define-public python-amqp
11316 (package
11317 (name "python-amqp")
11318 (version "2.3.2")
11319 (source
11320 (origin
11321 (method url-fetch)
11322 (uri (pypi-uri "amqp" version))
11323 (sha256
11324 (base32
11325 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11326 (build-system python-build-system)
11327 (native-inputs
11328 `(("python-case" ,python-case)
11329 ("python-pytest-sugar" ,python-pytest-sugar)
11330 ("python-mock" ,python-mock)))
11331 (propagated-inputs
11332 `(("python-vine" ,python-vine)))
11333 (home-page "https://github.com/celery/py-amqp")
11334 (synopsis
11335 "Low-level AMQP client for Python (fork of amqplib)")
11336 (description
11337 "This is a fork of amqplib which was originally written by Barry Pederson.
11338 It is maintained by the Celery project, and used by kombu as a pure python
11339 alternative when librabbitmq is not available.")
11340 (license license:lgpl2.1+)
11341 (properties `((python2-variant . ,(delay python2-amqp))))))
11342
11343 (define-public python2-amqp
11344 (let ((amqp (package-with-python2
11345 (strip-python2-variant python-amqp))))
11346 (package
11347 (inherit amqp)
11348 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11349 ;; unmaintained. Weirdly, does not do this on the python 3
11350 ;; version?
11351 #:tests? #f
11352 ,@(package-arguments amqp))))))
11353
11354 (define-public python-txamqp
11355 (package
11356 (name "python-txamqp")
11357 (version "0.8.2")
11358 (source
11359 (origin
11360 (method url-fetch)
11361 (uri (pypi-uri "txAMQP" version))
11362 (sha256
11363 (base32
11364 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11365 (build-system python-build-system)
11366 (propagated-inputs
11367 `(("python-six" ,python-six)
11368 ("python-twisted" ,python-twisted)))
11369 (home-page "https://github.com/txamqp/txamqp")
11370 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11371 (description
11372 "This package provides a Python library for communicating with AMQP peers
11373 and brokers using the asynchronous networking framework Twisted. It contains
11374 all the necessary code to connect, send and receive messages to/from an
11375 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11376 also includes support for using Thrift RPC over AMQP in Twisted
11377 applications.")
11378 (license license:asl2.0)))
11379
11380 (define-public python2-txamqp
11381 (package-with-python2 python-txamqp))
11382
11383 (define-public python-kombu
11384 (package
11385 (name "python-kombu")
11386 (version "4.2.2")
11387 (source
11388 (origin
11389 (method url-fetch)
11390 (uri (pypi-uri "kombu" version))
11391 (sha256
11392 (base32
11393 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11394 (build-system python-build-system)
11395 (native-inputs
11396 `(("python-mock" ,python-mock)
11397 ("python-case" ,python-case)
11398 ("python-pyro4" ,python-pyro4)
11399 ("python-pytest-sugar" ,python-pytest-sugar)
11400 ("python-pytz" ,python-pytz)))
11401 (propagated-inputs
11402 `(("python-anyjson" ,python-anyjson)
11403 ("python-amqp" ,python-amqp)
11404 ("python-redis" ,python-redis)))
11405 (home-page "https://kombu.readthedocs.io")
11406 (synopsis "Message passing library for Python")
11407 (description "The aim of Kombu is to make messaging in Python as easy as
11408 possible by providing an idiomatic high-level interface for the AMQ protocol,
11409 and also provide proven and tested solutions to common messaging problems.
11410 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11411 message orientation, queuing, routing, reliability and security, for which the
11412 RabbitMQ messaging server is the most popular implementation.")
11413 (license license:bsd-3)
11414 (properties `((python2-variant . ,(delay python2-kombu))))))
11415
11416 (define-public python2-kombu
11417 (let ((kombu (package-with-python2
11418 (strip-python2-variant python-kombu))))
11419 (package
11420 (inherit kombu)
11421 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11422 ;; It works fine on the python3 variant.
11423 #:tests? #f
11424 ,@(package-arguments kombu)))
11425 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11426 ,@(package-native-inputs kombu))))))
11427
11428 (define-public python-billiard
11429 (package
11430 (name "python-billiard")
11431 (version "3.5.0.5")
11432 (source
11433 (origin
11434 (method url-fetch)
11435 (uri (pypi-uri "billiard" version))
11436 (sha256
11437 (base32
11438 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11439 (build-system python-build-system)
11440 (native-inputs
11441 `(("python-case" ,python-case)
11442 ("python-pytest" ,python-pytest)))
11443 (home-page "https://github.com/celery/billiard")
11444 (synopsis
11445 "Python multiprocessing fork with improvements and bugfixes")
11446 (description
11447 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11448 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11449 pyprocessing package. This standalone variant is intended to be compatible with
11450 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11451 (license license:bsd-3)
11452 (properties `((python2-variant . ,(delay python2-billiard))))))
11453
11454 (define-public python2-billiard
11455 (let ((billiard (package-with-python2
11456 (strip-python2-variant python-billiard))))
11457 (package
11458 (inherit billiard)
11459 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11460 ("python2-mock" ,python2-mock)
11461 ,@(package-native-inputs billiard))))))
11462
11463 (define-public python-celery
11464 (package
11465 (name "python-celery")
11466 (version "4.2.1")
11467 (source
11468 (origin
11469 (method url-fetch)
11470 (uri (pypi-uri "celery" version))
11471 (sha256
11472 (base32
11473 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11474 (build-system python-build-system)
11475 (arguments
11476 '(;; TODO The tests fail with Python 3.7
11477 ;; https://github.com/celery/celery/issues/4849
11478 #:tests? #f
11479 #:phases
11480 (modify-phases %standard-phases
11481 (add-after 'unpack 'patch-requirements
11482 (lambda _
11483 (substitute* "requirements/test.txt"
11484 (("pytest>=3\\.0,<3\\.3")
11485 "pytest>=3.0"))
11486 #t)))))
11487 (native-inputs
11488 `(("python-case" ,python-case)
11489 ("python-pytest" ,python-pytest)))
11490 (propagated-inputs
11491 `(("python-pytz" ,python-pytz)
11492 ("python-billiard" ,python-billiard)
11493 ("python-kombu" ,python-kombu)))
11494 (home-page "https://celeryproject.org")
11495 (synopsis "Distributed Task Queue")
11496 (description "Celery is an asynchronous task queue/job queue based on
11497 distributed message passing. It is focused on real-time operation, but
11498 supports scheduling as well. The execution units, called tasks, are executed
11499 concurrently on a single or more worker servers using multiprocessing,
11500 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11501 synchronously (wait until ready).")
11502 (license license:bsd-3)
11503 (properties `((python2-variant . ,(delay python2-celery))))))
11504
11505 (define-public python2-celery
11506 (let ((celery (package-with-python2
11507 (strip-python2-variant python-celery))))
11508 (package
11509 (inherit celery)
11510 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11511 ("python2-mock" ,python2-mock)
11512 ,@(package-native-inputs celery))))))
11513
11514 (define-public python-translitcodec
11515 (package
11516 (name "python-translitcodec")
11517 (version "0.4.0")
11518 (source
11519 (origin
11520 (method url-fetch)
11521 (uri (pypi-uri "translitcodec" version))
11522 (sha256
11523 (base32
11524 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11525 (build-system python-build-system)
11526 (arguments
11527 `(#:tests? #f)) ; no tests provided
11528 (home-page
11529 "https://github.com/claudep/translitcodec")
11530 (synopsis
11531 "Unicode to 8-bit charset transliteration codec")
11532 (description
11533 "This package contains codecs for transliterating ISO 10646 texts into
11534 best-effort representations using smaller coded character sets (ASCII,
11535 ISO 8859, etc.).")
11536 (license license:expat)))
11537
11538 (define-public python2-translitcodec
11539 (package-with-python2 python-translitcodec))
11540
11541 (define-public python-editor
11542 (package
11543 (name "python-editor")
11544 (version "1.0.4")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "python-editor" version))
11549 (sha256
11550 (base32
11551 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11552 (build-system python-build-system)
11553 (arguments
11554 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11555 (home-page "https://github.com/fmoo/python-editor")
11556 (synopsis "Programmatically open an editor, capture the result")
11557 (description
11558 "python-editor is a library that provides the editor module for
11559 programmatically interfacing with your system's $EDITOR.")
11560 (license license:asl2.0)))
11561
11562 (define-public python2-editor
11563 (package-with-python2 python-editor))
11564
11565 (define-public python-vobject
11566 (package
11567 (name "python-vobject")
11568 (version "0.9.6.1")
11569 (source (origin
11570 (method url-fetch)
11571 (uri (pypi-uri "vobject" version))
11572 (sha256
11573 (base32
11574 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11575 (build-system python-build-system)
11576 (arguments
11577 '(;; The test suite relies on some non-portable Windows interfaces.
11578 #:tests? #f))
11579 (propagated-inputs
11580 `(("python-dateutil" ,python-dateutil)
11581 ("python-pyicu" ,python-pyicu)))
11582 (synopsis "Parse and generate vCard and vCalendar files")
11583 (description "Vobject is intended to be a full featured Python package for
11584 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11585 are supported and well tested. vCard 3.0 files are supported, and all data
11586 should be imported, but only a few components are understood in a sophisticated
11587 way.")
11588 (home-page "https://eventable.github.io/vobject/")
11589 (license license:asl2.0)))
11590
11591 (define-public python2-vobject
11592 (package-with-python2 python-vobject))
11593
11594 (define-public python-munkres
11595 (package
11596 (name "python-munkres")
11597 (version "1.0.8")
11598 (source (origin
11599 (method url-fetch)
11600 (uri (pypi-uri "munkres" version))
11601 (sha256
11602 (base32
11603 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11604 (build-system python-build-system)
11605 (arguments
11606 '(#:tests? #f)) ; no test suite
11607 (home-page "https://software.clapper.org/munkres/")
11608 (synopsis "Implementation of the Munkres algorithm")
11609 (description "The Munkres module provides an implementation of the Munkres
11610 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11611 useful for solving the Assignment Problem.")
11612 (license license:bsd-3)))
11613
11614 (define-public python2-munkres
11615 (package-with-python2 python-munkres))
11616
11617 (define-public python-whoosh
11618 (package
11619 (name "python-whoosh")
11620 (version "2.7.4")
11621 (source
11622 (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "Whoosh" version))
11625 (sha256
11626 (base32
11627 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11628 (build-system python-build-system)
11629 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11630 (native-inputs
11631 `(("python-pytest" ,python-pytest)))
11632 (home-page "https://bitbucket.org/mchaput/whoosh")
11633 (synopsis "Full text indexing, search, and spell checking library")
11634 (description
11635 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11636 checking library.")
11637 (license license:bsd-2)))
11638
11639 (define-public python2-whoosh
11640 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11641 (package (inherit whoosh)
11642 (propagated-inputs
11643 `(("python2-backport-ssl-match-hostname"
11644 ,python2-backport-ssl-match-hostname)
11645 ,@(package-propagated-inputs whoosh))))))
11646
11647 (define-public python-pathlib
11648 (package
11649 (name "python-pathlib")
11650 (version "1.0.1")
11651 (source (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "pathlib" version))
11654 (sha256
11655 (base32
11656 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11657 (build-system python-build-system)
11658 ;; The tests depend on the internal "test" module, which does not provide
11659 ;; a stable interface.
11660 (arguments `(#:tests? #f))
11661 (home-page "https://pathlib.readthedocs.org/")
11662 (synopsis "Object-oriented file system paths")
11663 (description "Pathlib offers a set of classes to handle file system paths.
11664 It offers the following advantages over using string objects:
11665
11666 @enumerate
11667 @item No more cumbersome use of os and os.path functions. Everything can
11668 be done easily through operators, attribute accesses, and method calls.
11669 @item Embodies the semantics of different path types. For example,
11670 comparing Windows paths ignores casing.
11671 @item Well-defined semantics, eliminating any inconsistencies or
11672 ambiguities (forward vs. backward slashes, etc.).
11673 @end enumerate
11674
11675 Note: In Python 3.4, pathlib is now part of the standard library. For other
11676 Python versions please consider python-pathlib2 instead, which tracks the
11677 standard library module. This module (python-pathlib) isn't maintained
11678 anymore.")
11679 (license license:expat)))
11680
11681 (define-public python2-pathlib
11682 (package-with-python2 python-pathlib))
11683
11684 (define-public python2-pathlib2
11685 (package
11686 (name "python2-pathlib2")
11687 (version "2.3.5")
11688 (source (origin
11689 (method url-fetch)
11690 (uri (pypi-uri "pathlib2" version))
11691 (sha256
11692 (base32
11693 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11694 (build-system python-build-system)
11695 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11696 ;; version is 3.4 which already includes this package as part of the
11697 ;; standard library.
11698 (arguments
11699 `(#:python ,python-2))
11700 (propagated-inputs
11701 `(("python2-scandir" ,python2-scandir)
11702 ("python2-six" ,python2-six)))
11703 (home-page "https://pypi.org/project/pathlib2/")
11704 (synopsis "Object-oriented file system paths - backport of standard
11705 pathlib module")
11706 (description "The goal of pathlib2 is to provide a backport of standard
11707 pathlib module which tracks the standard library module, so all the newest
11708 features of the standard pathlib can be used also on older Python versions.
11709
11710 Pathlib offers a set of classes to handle file system paths. It offers the
11711 following advantages over using string objects:
11712
11713 @enumerate
11714 @item No more cumbersome use of os and os.path functions. Everything can
11715 be done easily through operators, attribute accesses, and method calls.
11716 @item Embodies the semantics of different path types. For example,
11717 comparing Windows paths ignores casing.
11718 @item Well-defined semantics, eliminating any inconsistencies or
11719 ambiguities (forward vs. backward slashes, etc.).
11720 @end enumerate")
11721 (license license:expat)))
11722
11723 (define-public python2-pathlib2-bootstrap
11724 (hidden-package
11725 (package
11726 (inherit python2-pathlib2)
11727 (name "python2-pathlib2-bootstrap")
11728 (propagated-inputs
11729 `(("python2-scandir" ,python2-scandir)
11730 ("python2-six" ,python2-six-bootstrap))))))
11731
11732 (define-public python-jellyfish
11733 (package
11734 (name "python-jellyfish")
11735 (version "0.5.6")
11736 (source (origin
11737 (method url-fetch)
11738 (uri (pypi-uri "jellyfish" version))
11739 (sha256
11740 (base32
11741 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11742 (build-system python-build-system)
11743 (native-inputs
11744 `(("python-pytest" ,python-pytest)))
11745 (home-page "https://github.com/jamesturk/jellyfish")
11746 (synopsis "Approximate and phonetic matching of strings")
11747 (description "Jellyfish uses a variety of string comparison and phonetic
11748 encoding algorithms to do fuzzy string matching.")
11749 (license license:bsd-2)
11750 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11751
11752 (define-public python2-jellyfish
11753 (let ((jellyfish (package-with-python2
11754 (strip-python2-variant python-jellyfish))))
11755 (package (inherit jellyfish)
11756 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11757 ,@(package-native-inputs jellyfish))))))
11758
11759 (define-public python2-unicodecsv
11760 (package
11761 (name "python2-unicodecsv")
11762 (version "0.14.1")
11763 (source (origin
11764 (method git-fetch)
11765 ;; The test suite is not included in the PyPi release.
11766 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11767 (uri (git-reference
11768 (url "https://github.com/jdunck/python-unicodecsv")
11769 (commit version)))
11770 (file-name (git-file-name name version))
11771 (sha256
11772 (base32
11773 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11774 (build-system python-build-system)
11775 (arguments
11776 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11777 #:python ,python-2))
11778 (native-inputs
11779 `(("python2-unittest2" ,python2-unittest2)))
11780 (home-page "https://github.com/jdunck/python-unicodecsv")
11781 (synopsis "Unicode CSV module for Python 2")
11782 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11783 module, adding support for Unicode strings.")
11784 (license license:bsd-2)))
11785
11786 (define-public python-rarfile
11787 (package
11788 (name "python-rarfile")
11789 (version "2.8")
11790 (source (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "rarfile" version))
11793 (sha256
11794 (base32
11795 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11796 (build-system python-build-system)
11797 (arguments
11798 '(#:phases
11799 (modify-phases %standard-phases
11800 (replace 'check
11801 ;; Many tests fail, but the installation proceeds.
11802 (lambda _ (invoke "make" "-C" "test" "test"))))))
11803 (native-inputs
11804 `(("which" ,which))) ; required for tests
11805 (propagated-inputs
11806 `(("libarchive" ,libarchive)))
11807 (home-page "https://github.com/markokr/rarfile")
11808 (synopsis "RAR archive reader for Python")
11809 (description "This is Python module for RAR archive reading. The interface
11810 is made as zipfile like as possible.")
11811 (license license:isc)))
11812
11813 (define-public python2-rarfile
11814 (package-with-python2 python-rarfile))
11815
11816 (define-public python-magic
11817 (package
11818 (name "python-magic")
11819 (version "0.4.15")
11820 (source
11821 (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "python-magic" version))
11824 (sha256
11825 (base32
11826 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11827 (file-name (string-append name "-" version "-checkout"))))
11828 (build-system python-build-system)
11829 (arguments
11830 ;; The tests are unreliable, so don't run them. The tests fail
11831 ;; under Python3 because they were written for Python2 and
11832 ;; contain import statements that do not work in Python3. One of
11833 ;; the tests fails under Python2 because its assertions are
11834 ;; overly stringent; it relies on comparing output strings which
11835 ;; are brittle and can change depending on the version of
11836 ;; libmagic being used and the system on which the test is
11837 ;; running. In my case, under GuixSD 0.10.0, only one test
11838 ;; failed, and it seems to have failed only because the version
11839 ;; of libmagic that is packaged in Guix outputs a slightly
11840 ;; different (but not wrong) string than the one that the test
11841 ;; expected.
11842 '(#:tests? #f
11843 #:phases (modify-phases %standard-phases
11844 ;; Replace a specific method call with a hard-coded
11845 ;; path to the necessary libmagic.so file in the
11846 ;; store. If we don't do this, then the method call
11847 ;; will fail to find the libmagic.so file, which in
11848 ;; turn will cause any application using
11849 ;; python-magic to fail.
11850 (add-before 'build 'hard-code-path-to-libmagic
11851 (lambda* (#:key inputs #:allow-other-keys)
11852 (let ((file (assoc-ref inputs "file")))
11853 (substitute* "magic.py"
11854 (("ctypes.util.find_library\\('magic'\\)")
11855 (string-append "'" file "/lib/libmagic.so'")))
11856 #t)))
11857 (add-before 'install 'disable-egg-compression
11858 (lambda _
11859 (let ((port (open-file "setup.cfg" "a")))
11860 (display "\n[easy_install]\nzip_ok = 0\n"
11861 port)
11862 (close-port port)
11863 #t))))))
11864 (inputs
11865 ;; python-magic needs to be able to find libmagic.so.
11866 `(("file" ,file)))
11867 (home-page
11868 "https://github.com/ahupp/python-magic")
11869 (synopsis
11870 "File type identification using libmagic")
11871 (description
11872 "This module uses ctypes to access the libmagic file type
11873 identification library. It makes use of the local magic database and
11874 supports both textual and MIME-type output. Note that this module and
11875 the python-file module both provide a \"magic.py\" file; these two
11876 modules, which are different and were developed separately, both serve
11877 the same purpose: to provide Python bindings for libmagic.")
11878 (license license:expat)))
11879
11880 (define-public python2-magic
11881 (package-with-python2 python-magic))
11882
11883 (define-public python2-s3cmd
11884 (package
11885 (name "python2-s3cmd")
11886 (version "1.6.1")
11887 (source
11888 (origin
11889 (method url-fetch)
11890 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11891 "s3cmd-" version ".tar.gz"))
11892 (sha256
11893 (base32
11894 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11895 (build-system python-build-system)
11896 (arguments
11897 ;; s3cmd is written for python2 only and contains no tests.
11898 `(#:python ,python-2
11899 #:tests? #f))
11900 (propagated-inputs
11901 `(("python2-dateutil" ,python2-dateutil)
11902 ;; The python-file package also provides a magic.py module.
11903 ;; This is an unfortunate state of affairs; however, s3cmd
11904 ;; fails to install if it cannot find specifically the
11905 ;; python-magic package. Thus we include it, instead of using
11906 ;; python-file. Ironically, s3cmd sometimes works better
11907 ;; without libmagic bindings at all:
11908 ;; https://github.com/s3tools/s3cmd/issues/198
11909 ("python2-magic" ,python2-magic)))
11910 (home-page "https://s3tools.org/s3cmd")
11911 (synopsis "Command line tool for S3-compatible storage services")
11912 (description
11913 "S3cmd is a command line tool for uploading, retrieving and managing data
11914 in storage services that are compatible with the Amazon Simple Storage
11915 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11916 GnuPG encryption, and more. It also supports management of Amazon's
11917 CloudFront content delivery network.")
11918 (license license:gpl2+)))
11919
11920 (define-public python-pkgconfig
11921 (package
11922 (name "python-pkgconfig")
11923 (version "1.3.1")
11924 (source
11925 (origin
11926 (method url-fetch)
11927 (uri (pypi-uri "pkgconfig" version))
11928 (sha256
11929 (base32
11930 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11931 (build-system python-build-system)
11932 (native-inputs
11933 `(("python-nose" ,python-nose)))
11934 (inputs
11935 `(("pkg-config" ,pkg-config)))
11936 (arguments
11937 `(#:phases
11938 (modify-phases %standard-phases
11939 (add-before 'build 'patch
11940 ;; Hard-code the path to pkg-config.
11941 (lambda _
11942 (substitute* "pkgconfig/pkgconfig.py"
11943 (("cmd = 'pkg-config")
11944 (string-append "cmd = '" (which "pkg-config"))))
11945 #t))
11946 (replace 'check
11947 (lambda _
11948 (invoke "nosetests" "test.py"))))))
11949 (home-page "https://github.com/matze/pkgconfig")
11950 (synopsis "Python interface for pkg-config")
11951 (description "This module provides a Python interface to pkg-config. It
11952 can be used to find all pkg-config packages, check if a package exists,
11953 check if a package meets certain version requirements, query CFLAGS and
11954 LDFLAGS and parse the output to build extensions with setup.py.")
11955 (license license:expat)))
11956
11957 (define-public python2-pkgconfig
11958 (package-with-python2 python-pkgconfig))
11959
11960 (define-public python-bz2file
11961 (package
11962 (name "python-bz2file")
11963 (version "0.98")
11964 (source
11965 (origin
11966 (method url-fetch)
11967 (uri (pypi-uri "bz2file" version))
11968 (sha256
11969 (base32
11970 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11971 (build-system python-build-system)
11972 (arguments
11973 `(#:tests? #f)) ; Tests use deprecated python modules.
11974 (home-page "https://github.com/nvawda/bz2file")
11975 (synopsis "Read and write bzip2-compressed files")
11976 (description
11977 "Bz2file is a Python library for reading and writing bzip2-compressed
11978 files. It contains a drop-in replacement for the I/O interface in the
11979 standard library's @code{bz2} module, including features from the latest
11980 development version of CPython that are not available in older releases.")
11981 (license license:asl2.0)))
11982
11983 (define-public python2-bz2file
11984 (package-with-python2 python-bz2file))
11985
11986 (define-public python-future
11987 (package
11988 (name "python-future")
11989 (version "0.17.1")
11990 (source
11991 (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "future" version))
11994 (sha256
11995 (base32
11996 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
11997 (build-system python-build-system)
11998 ;; Many tests connect to the network or are otherwise flawed.
11999 ;; https://github.com/PythonCharmers/python-future/issues/210
12000 (arguments
12001 `(#:tests? #f))
12002 (home-page "https://python-future.org")
12003 (synopsis "Single-source support for Python 3 and 2")
12004 (description
12005 "@code{python-future} is the missing compatibility layer between Python 2 and
12006 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12007 to support both Python 2 and Python 3 with minimal overhead.")
12008 (license license:expat)))
12009
12010 (define-public python2-future
12011 (package-with-python2 python-future))
12012
12013 (define-public python-cysignals
12014 (package
12015 (name "python-cysignals")
12016 (version "1.9.0")
12017 (source
12018 (origin
12019 (method url-fetch)
12020 (uri (pypi-uri "cysignals" version))
12021 (sha256
12022 (base32
12023 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12024 (build-system python-build-system)
12025 (native-inputs
12026 `(("python-cython" ,python-cython)
12027 ("python-sphinx" ,python-sphinx)))
12028 (inputs
12029 `(("pari-gp" ,pari-gp)))
12030 (arguments
12031 `(#:modules ((guix build python-build-system)
12032 ((guix build gnu-build-system) #:prefix gnu:)
12033 (guix build utils))
12034 ;; FIXME: Tests are executed after installation and currently fail
12035 ;; when not installing into standard locations; the author is working
12036 ;; on a fix.
12037 #:tests? #f
12038 #:phases
12039 (modify-phases %standard-phases
12040 (add-before
12041 'build 'configure
12042 (assoc-ref gnu:%standard-phases 'configure)))))
12043 (home-page
12044 "https://github.com/sagemath/cysignals")
12045 (synopsis
12046 "Handling of interrupts and signals for Cython")
12047 (description
12048 "The cysignals package provides mechanisms to handle interrupts (and
12049 other signals and errors) in Cython code, using two related approaches,
12050 for mixed Cython/Python code or external C libraries and pure Cython code,
12051 respectively.")
12052 (license license:lgpl3+)))
12053
12054 (define-public python2-cysignals
12055 (package-with-python2 python-cysignals))
12056
12057 (define-public python2-shedskin
12058 (package
12059 (name "python2-shedskin")
12060 (version "0.9.4")
12061 (source
12062 (origin
12063 (method url-fetch)
12064 (uri (string-append "https://github.com/shedskin/shedskin/"
12065 "releases/download/v" version
12066 "/shedskin-" version ".tgz"))
12067 (sha256
12068 (base32
12069 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12070 (build-system python-build-system)
12071 (arguments
12072 `(#:python ,python-2
12073 #:phases (modify-phases %standard-phases
12074 (add-after 'unpack 'fix-resulting-include-libs
12075 (lambda* (#:key inputs #:allow-other-keys)
12076 (let ((libgc (assoc-ref inputs "libgc"))
12077 (pcre (assoc-ref inputs "pcre")))
12078 (substitute* "shedskin/makefile.py"
12079 (("variable == 'CCFLAGS':[ ]*")
12080 (string-append "variable == 'CCFLAGS':\n"
12081 " line += ' -I " pcre "/include"
12082 " -I " libgc "/include'"))
12083 (("variable == 'LFLAGS':[ ]*")
12084 (string-append "variable == 'LFLAGS':\n"
12085 " line += ' -L" pcre "/lib"
12086 " -L " libgc "/lib'")))
12087 #t))))))
12088 (inputs `(("pcre" ,pcre)
12089 ("libgc" ,libgc)))
12090 (home-page "https://shedskin.github.io/")
12091 (synopsis "Experimental Python-2 to C++ Compiler")
12092 (description (string-append "This is an experimental compiler for a subset of
12093 Python. It generates C++ code and a Makefile."))
12094 (license (list license:gpl3 license:bsd-3 license:expat))))
12095
12096 (define-public python2-rope
12097 (package
12098 (name "python2-rope")
12099 (version "0.11.0")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "rope" version))
12104 (sha256
12105 (base32
12106 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12107 (arguments
12108 ;; Rope has only partial python3 support, see `python-rope'
12109 `(#:python ,python-2))
12110 (build-system python-build-system)
12111 (native-inputs
12112 `(("python2-unittest2" ,python2-unittest2)))
12113 (home-page "https://github.com/python-rope/rope")
12114 (synopsis "Refactoring library for Python")
12115 (description "Rope is a refactoring library for Python. It facilitates
12116 the renaming, moving and extracting of attributes, functions, modules, fields
12117 and parameters in Python 2 source code. These refactorings can also be applied
12118 to occurrences in strings and comments.")
12119 (license license:gpl2)))
12120
12121 (define-public python-rope
12122 (package
12123 (inherit python2-rope)
12124 (name "python-rope")
12125 (arguments `(#:python ,python-wrapper
12126 ;; XXX: Only partial python3 support, results in some failing
12127 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12128 #:tests? #f))
12129 (properties `((python2-variant . ,(delay python2-rope))))))
12130
12131 (define-public python-py3status
12132 (package
12133 (name "python-py3status")
12134 (version "3.21")
12135 (source
12136 (origin
12137 (method url-fetch)
12138 (uri (pypi-uri "py3status" version))
12139 (sha256
12140 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12141 (build-system python-build-system)
12142 (inputs
12143 `(("file" ,file)))
12144 (arguments
12145 '(#:phases
12146 (modify-phases %standard-phases
12147 ;; 'file' is used for detection of configuration file encoding
12148 ;; let's make link the dependency to particular input
12149 (add-before 'build 'patch-file-path
12150 (lambda* (#:key inputs #:allow-other-keys)
12151 (let ((file-path (assoc-ref inputs "file")))
12152 (substitute* "py3status/parse_config.py"
12153 (("\\[\"file\", \"-b\"")
12154 (string-append "['" file-path "/bin/file', '-b'")))
12155 #t))))
12156 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12157 (home-page "https://github.com/ultrabug/py3status")
12158 (synopsis "Extensible i3status wrapper written in Python")
12159 (description "py3status is an i3status wrapper which extends i3status
12160 functionality in a modular way, allowing you to extend your panel with your
12161 own code, responding to click events and updating clock every second.")
12162 (license license:bsd-3)))
12163
12164 (define-public python2-selectors2
12165 (package
12166 (name "python2-selectors2")
12167 (version "2.0.1")
12168 (source (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "selectors2" version))
12171 (sha256
12172 (base32
12173 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12174 (build-system python-build-system)
12175 (arguments
12176 `(#:python ,python-2))
12177 (native-inputs
12178 `(("python2-mock" ,python2-mock)
12179 ("python2-psutil" ,python2-psutil)))
12180 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12181 (synopsis "Backport of the selectors module from Python 3.5+")
12182 (description
12183 "This package provides a drop-in replacement for the @code{selectors}
12184 module in Python 3.5 and later.")
12185 (license license:expat)))
12186
12187 (define-public python-tblib
12188 (package
12189 (name "python-tblib")
12190 (version "1.6.0")
12191 (source (origin
12192 (method url-fetch)
12193 (uri (pypi-uri "tblib" version))
12194 (sha256
12195 (base32
12196 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12197 (build-system python-build-system)
12198 (arguments
12199 `(#:phases
12200 (modify-phases %standard-phases
12201 (replace 'check
12202 (lambda _
12203 ;; Upstream runs tests after installation and the package itself
12204 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12205 ;; found.
12206 (setenv "PYTHONPATH"
12207 (string-append (getcwd) "/build/lib:"
12208 (getenv "PYTHONPATH")))
12209 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12210 (native-inputs
12211 `(("python-pytest" ,python-pytest)
12212 ("python-six" ,python-six)))
12213 (home-page "https://github.com/ionelmc/python-tblib")
12214 (synopsis "Traceback serialization library")
12215 (description
12216 "Traceback serialization allows you to:
12217
12218 @enumerate
12219 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12220 different processes. This allows better error handling when running code over
12221 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12222
12223 @item Parse traceback strings and raise with the parsed tracebacks.
12224 @end enumerate\n")
12225 (license license:bsd-3)))
12226
12227 (define-public python2-tblib
12228 (package-with-python2 python-tblib))
12229
12230 (define-public python-greenlet
12231 (package
12232 (name "python-greenlet")
12233 (version "0.4.16")
12234 (source (origin
12235 (method url-fetch)
12236 (uri (pypi-uri "greenlet" version))
12237 (sha256
12238 (base32
12239 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12240 (build-system python-build-system)
12241 (home-page "https://greenlet.readthedocs.io/")
12242 (synopsis "Lightweight in-process concurrent programming")
12243 (description
12244 "Greenlet package is a spin-off of Stackless, a version of CPython
12245 that supports micro-threads called \"tasklets\". Tasklets run
12246 pseudo-concurrently (typically in a single or a few OS-level threads) and
12247 are synchronized with data exchanges on \"channels\".")
12248 (license (list license:psfl license:expat))))
12249
12250 (define-public python2-greenlet
12251 (package-with-python2 python-greenlet))
12252
12253 (define-public python-objgraph
12254 (package
12255 (name "python-objgraph")
12256 (version "3.4.1")
12257 (source
12258 (origin
12259 (method url-fetch)
12260 (uri (pypi-uri "objgraph" version))
12261 (sha256
12262 (base32
12263 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12264 (build-system python-build-system)
12265 (propagated-inputs
12266 `(("python-graphviz" ,python-graphviz)))
12267 (native-inputs
12268 `(("python-mock" ,python-mock)
12269 ("graphviz" ,graphviz)))
12270 (home-page "https://mg.pov.lt/objgraph/")
12271 (synopsis "Draw Python object reference graphs with graphviz")
12272 (description
12273 "This package provides tools to draw Python object reference graphs with
12274 graphviz.")
12275 (license license:expat)))
12276
12277 (define-public python2-objgraph
12278 (package-with-python2 python-objgraph))
12279
12280 (define-public python-gevent
12281 (package
12282 (name "python-gevent")
12283 (version "20.6.2")
12284 (source (origin
12285 (method url-fetch)
12286 (uri (pypi-uri "gevent" version))
12287 (sha256
12288 (base32
12289 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12290 (modules '((guix build utils)))
12291 (snippet
12292 '(begin
12293 ;; unbunding libev and c-ares
12294 (delete-file-recursively "deps")
12295 #t))))
12296 (build-system python-build-system)
12297 (arguments
12298 `(#:modules ((ice-9 ftw)
12299 (ice-9 match)
12300 (srfi srfi-26)
12301 (guix build utils)
12302 (guix build python-build-system))
12303 #:phases (modify-phases %standard-phases
12304 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12305 (lambda _
12306 (substitute* "src/gevent/subprocess.py"
12307 (("/bin/sh") (which "sh")))
12308 (for-each (lambda (file)
12309 (substitute* file
12310 (("/bin/sh") (which "sh"))
12311 (("/bin/true") (which "true"))))
12312 (find-files "src/greentest" "\\.py$"))
12313 #t))
12314 (add-before 'build 'do-not-use-bundled-sources
12315 (lambda _
12316 (setenv "GEVENTSETUP_EMBED" "0")
12317
12318 ;; Prevent building bundled libev.
12319 (substitute* "setup.py"
12320 (("run_make=_BUILDING")
12321 "run_make=False"))
12322 #t))
12323 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12324 (lambda* (#:key inputs #:allow-other-keys)
12325 (let ((greenlet (string-append
12326 (assoc-ref inputs "python-greenlet")
12327 "/include")))
12328 (match (scandir greenlet
12329 (lambda (item)
12330 (string-prefix? "python" item)))
12331 ((python)
12332 (setenv "C_INCLUDE_PATH"
12333 (string-append greenlet "/" python ":"
12334 (or (getenv "C_INCLUDE_PATH")
12335 ""))))))
12336 #t))
12337 (add-before 'check 'pretend-to-be-CI
12338 (lambda _
12339 ;; A few tests are skipped due to network constraints or
12340 ;; get longer timeouts when running in a CI environment.
12341 ;; Piggy-back on that, as we need the same adjustments.
12342 (setenv "TRAVIS" "1")
12343 (setenv "APPVEYOR" "1")
12344 #t))
12345 (add-before 'check 'adjust-tests
12346 (lambda _
12347 (let ((disabled-tests
12348 '(;; These tests rely on networking which is not
12349 ;; available in the build container.
12350 "test_urllib2net.py"
12351 "test__server.py"
12352 "test__server_pywsgi.py"
12353 "test_socket.py"
12354 "test__socket.py"
12355 "test__socket_ssl.py"
12356 "test__socket_dns.py"
12357 "test__socket_dns6.py"
12358 "test___example_servers.py"
12359 "test__getaddrinfo_import.py"
12360 "test__examples.py"
12361 "test_httplib.py"
12362 "test_https.py"
12363 "test_urllib2_localnet.py"
12364 "test_ssl.py"
12365 "test__ssl.py"
12366 ;; XXX: These tests borrow functionality from the
12367 ;; Python builtin 'test' module, but it is not
12368 ;; installed with the Guix Python distribution.
12369 "test_smtpd.py"
12370 "test_wsgiref.py"
12371 "test_urllib2.py"
12372 "test_thread.py"
12373 "test_threading.py"
12374 "test__threading_2.py"
12375 ;; These tests rely on KeyboardInterrupts which do not
12376 ;; work inside the build container for some reason
12377 ;; (lack of controlling terminal?).
12378 "test_subprocess.py"
12379 "test__issues461_471.py"
12380 ;; TODO: Patch out the tests that use getprotobyname, etc
12381 ;; instead of disabling all the tests from these files.
12382 "test__resolver_dnspython.py"
12383 "test__doctests.py"
12384 "test__all__.py"
12385 "test___config.py"
12386 "test__execmodules.py")))
12387 (call-with-output-file "skipped_tests.txt"
12388 (lambda (port)
12389 (format port "~a~%"
12390 (string-join disabled-tests "\n"))))
12391 #t)))
12392 (replace 'check
12393 (lambda _
12394 ;; Make sure the build directory is on PYTHONPATH.
12395 (setenv "PYTHONPATH"
12396 (string-append
12397 (getenv "PYTHONPATH") ":"
12398 (getcwd) "/build/"
12399 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12400
12401 ;; Use the build daemons configured number of workers.
12402 (setenv "NWORKERS" (number->string (parallel-job-count)))
12403
12404 (invoke "python" "-m" "gevent.tests" "--config"
12405 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12406 (propagated-inputs
12407 `(("python-greenlet" ,python-greenlet)
12408 ("python-objgraph" ,python-objgraph)
12409 ("python-zope.event" ,python-zope-event)
12410 ("python-zope.interface" ,python-zope-interface)))
12411 (native-inputs
12412 `(("python-six" ,python-six)
12413
12414 ;; For tests.
12415 ("python-dnspython" ,python-dnspython)
12416 ("python-psutil" ,python-psutil)))
12417 (inputs
12418 `(("c-ares" ,c-ares)
12419 ("libev" ,libev)))
12420 (home-page "http://www.gevent.org/")
12421 (synopsis "Coroutine-based network library")
12422 (description
12423 "gevent is a coroutine-based Python networking library that uses greenlet
12424 to provide a high-level synchronous API on top of the libev event loop.")
12425 (license license:expat)
12426 (properties `((python2-variant . ,(delay python2-gevent))))))
12427
12428 (define-public python2-gevent
12429 (let ((base (package-with-python2
12430 (strip-python2-variant python-gevent))))
12431 (package
12432 (inherit base)
12433 (native-inputs `(,@(package-native-inputs base)
12434 ("python-mock" ,python2-mock)
12435 ("python2-selectors2" ,python2-selectors2))))))
12436
12437 (define-public python-fastimport
12438 (package
12439 (name "python-fastimport")
12440 (version "0.9.8")
12441 (source
12442 (origin
12443 (method url-fetch)
12444 (uri (pypi-uri "fastimport" version))
12445 (sha256
12446 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12447 (build-system python-build-system)
12448 (home-page "https://github.com/jelmer/python-fastimport")
12449 (synopsis "VCS fastimport parser and generator in Python")
12450 (description "This package provides a parser for and generator of the Git
12451 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12452 format.")
12453 (license license:gpl2+)))
12454
12455 (define-public python2-fastimport
12456 (package-with-python2 python-fastimport))
12457
12458 (define-public python-twisted
12459 (package
12460 (name "python-twisted")
12461 (version "19.7.0")
12462 (source (origin
12463 (method url-fetch)
12464 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12465 (sha256
12466 (base32
12467 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12468 (build-system python-build-system)
12469 (arguments
12470 '(#:tests? #f)) ; FIXME: some tests fail
12471 (propagated-inputs
12472 `(("python-zope-interface" ,python-zope-interface)
12473 ("python-pyhamcrest" ,python-pyhamcrest)
12474 ("python-incremental" ,python-incremental)
12475 ("python-hyperlink" ,python-hyperlink)
12476 ("python-constantly" ,python-constantly)
12477 ("python-automat" ,python-automat)))
12478 (home-page "https://twistedmatrix.com/")
12479 (synopsis "Asynchronous networking framework written in Python")
12480 (description
12481 "Twisted is an extensible framework for Python programming, with special
12482 focus on event-based network programming and multiprotocol integration.")
12483 (license license:expat)))
12484
12485 (define-public python2-twisted
12486 (package-with-python2 python-twisted))
12487
12488 (define-public python-pika
12489 (package
12490 (name "python-pika")
12491 (version "0.12.0")
12492 (source
12493 (origin
12494 (method url-fetch)
12495 (uri (pypi-uri "pika" version))
12496 (sha256
12497 (base32
12498 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12499 (build-system python-build-system)
12500 (native-inputs
12501 `(("python-pyev" ,python-pyev)
12502 ("python-tornado" ,python-tornado)
12503 ("python-twisted" ,python-twisted)))
12504 (home-page "https://pika.readthedocs.org")
12505 (synopsis "Pure Python AMQP Client Library")
12506 (description
12507 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12508 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12509 network support library.")
12510 (license license:bsd-3)))
12511
12512 (define-public python2-pika
12513 (package-with-python2 python-pika))
12514
12515 (define-public python-ply
12516 (package
12517 (name "python-ply")
12518 (version "3.11")
12519 (source
12520 (origin
12521 (method url-fetch)
12522 (uri (pypi-uri "ply" version))
12523 (sha256
12524 (base32
12525 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12526 (build-system python-build-system)
12527 (home-page "http://www.dabeaz.com/ply/")
12528 (synopsis "Python Lex & Yacc")
12529 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12530 It uses LR parsing and does extensive error checking.")
12531 (license license:bsd-3)))
12532
12533 (define-public python-tabulate
12534 (package
12535 (name "python-tabulate")
12536 (version "0.8.7")
12537 (source (origin
12538 (method url-fetch)
12539 (uri (pypi-uri "tabulate" version))
12540 (sha256
12541 (base32
12542 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12543 (build-system python-build-system)
12544 (arguments
12545 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12546 ;; and the latest release is not tagged in the upstream repository.
12547 '(#:tests? #f))
12548 (home-page "https://bitbucket.org/astanin/python-tabulate")
12549 (synopsis "Pretty-print tabular data")
12550 (description
12551 "Tabulate is a library and command-line utility to pretty-print tabular
12552 data in Python.")
12553 (license license:expat)))
12554
12555 (define-public python2-tabulate
12556 (package-with-python2 python-tabulate))
12557
12558 (define-public python-kazoo
12559 (package
12560 (name "python-kazoo")
12561 (version "2.4.0")
12562 (source
12563 (origin
12564 (method url-fetch)
12565 (uri (pypi-uri "kazoo" version))
12566 (sha256
12567 (base32
12568 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12569 (build-system python-build-system)
12570 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12571 (propagated-inputs
12572 `(("python-six" ,python-six)))
12573 (home-page "https://kazoo.readthedocs.org")
12574 (synopsis "High-level Zookeeper client library")
12575 (description
12576 "Kazoo is a Python client library for the Apache Zookeeper distributed
12577 application service. It is designed to be easy to use and to avoid common
12578 programming errors.")
12579 (license license:asl2.0)))
12580
12581 (define-public python2-kazoo
12582 (package-with-python2 python-kazoo))
12583
12584 (define-public python-pykafka
12585 (package
12586 (name "python-pykafka")
12587 (version "2.4.0")
12588 (source (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "pykafka" version))
12591 (sha256
12592 (base32
12593 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12594 (build-system python-build-system)
12595 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12596 (propagated-inputs
12597 `(("python-gevent" ,python-gevent)
12598 ("python-kazoo" ,python-kazoo)
12599 ("python-tabulate" ,python-tabulate)))
12600 (inputs
12601 `(("librdkafka" ,librdkafka)))
12602 (home-page "https://pykafka.readthedocs.io/")
12603 (synopsis "Apache Kafka client for Python")
12604 (description
12605 "PyKafka is a client for the Apache Kafka distributed messaging system.
12606 It includes Python implementations of Kafka producers and consumers, which
12607 are optionally backed by a C extension built on librdkafka.")
12608 (license license:asl2.0)))
12609
12610 (define-public python2-pykafka
12611 (package-with-python2 python-pykafka))
12612
12613 (define-public python-wcwidth
12614 (package
12615 (name "python-wcwidth")
12616 (version "0.1.8")
12617 (source (origin
12618 (method url-fetch)
12619 (uri (pypi-uri "wcwidth" version))
12620 (sha256
12621 (base32
12622 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12623 (build-system python-build-system)
12624 (home-page "https://github.com/jquast/wcwidth")
12625 (synopsis "Measure number of terminal column cells of wide-character codes")
12626 (description "Wcwidth measures the number of terminal column cells of
12627 wide-character codes. It is useful for those implementing a terminal emulator,
12628 or programs that carefully produce output to be interpreted by one. It is a
12629 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12630 specified in POSIX.1-2001 and POSIX.1-2008.")
12631 (license license:expat)))
12632
12633 (define-public python2-wcwidth
12634 (package-with-python2 python-wcwidth))
12635
12636 (define-public python2-jsonrpclib
12637 (package
12638 (name "python2-jsonrpclib")
12639 (version "0.1.7")
12640 (source (origin
12641 (method url-fetch)
12642 (uri (pypi-uri "jsonrpclib" version))
12643 (sha256
12644 (base32
12645 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12646 (build-system python-build-system)
12647 (arguments
12648 `(#:tests? #f
12649 #:python ,python-2))
12650 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12651 (synopsis "Implementation of JSON-RPC specification for Python")
12652 (description
12653 "This library is an implementation of the JSON-RPC specification.
12654 It supports both the original 1.0 specification, as well as the
12655 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12656 etc.")
12657 (license license:asl2.0)))
12658
12659 (define-public python-chai
12660 (package
12661 (name "python-chai")
12662 (version "1.1.2")
12663 (source (origin
12664 (method url-fetch)
12665 (uri (pypi-uri "chai" version))
12666 (sha256
12667 (base32
12668 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12669 (build-system python-build-system)
12670 (home-page "https://github.com/agoragames/chai")
12671 (synopsis "Mocking framework for Python")
12672 (description
12673 "Chai provides an api for mocking, stubbing and spying your python
12674 objects, patterned after the Mocha library for Ruby.")
12675 (license license:bsd-3)))
12676
12677 (define-public python2-chai
12678 (package-with-python2 python-chai))
12679
12680 (define-public python-inflection
12681 (package
12682 (name "python-inflection")
12683 (version "0.3.1")
12684 (source
12685 (origin (method url-fetch)
12686 (uri (pypi-uri "inflection" version))
12687 (sha256
12688 (base32
12689 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12690 (build-system python-build-system)
12691 (native-inputs
12692 `(("python-pytest" ,python-pytest)))
12693 (home-page "https://github.com/jpvanhal/inflection")
12694 (synopsis "Python string transformation library")
12695 (description
12696 "Inflection is a string transformation library. It singularizes
12697 and pluralizes English words, and transforms strings from CamelCase to
12698 underscored string.")
12699 (license license:expat)))
12700
12701 (define-public python2-inflection
12702 (package-with-python2 python-inflection))
12703
12704 (define-public python-pylev
12705 (package
12706 (name "python-pylev")
12707 (version "1.3.0")
12708 (source (origin
12709 (method url-fetch)
12710 (uri (pypi-uri "pylev" version))
12711 (sha256
12712 (base32
12713 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12714 (build-system python-build-system)
12715 (home-page "https://github.com/toastdriven/pylev")
12716 (synopsis "Levenshtein distance implementation in Python")
12717 (description "Pure Python Levenshtein implementation, based off the
12718 Wikipedia code samples at
12719 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12720 (license license:bsd-3)))
12721
12722 (define-public python2-pylev
12723 (package-with-python2 python-pylev))
12724
12725 (define-public python-cleo
12726 (package
12727 (name "python-cleo")
12728 (version "0.8.1")
12729 (source (origin
12730 (method url-fetch)
12731 (uri (pypi-uri "cleo" version))
12732 (sha256
12733 (base32
12734 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12735 (build-system python-build-system)
12736 (native-inputs
12737 `( ;; For testing
12738 ("python-mock" ,python-mock)
12739 ("python-pytest-mock" ,python-pytest-mock)
12740 ("python-pytest" ,python-pytest)))
12741 (propagated-inputs
12742 `(("python-backpack" ,python-backpack)
12743 ("python-clikit" ,python-clikit)
12744 ("python-pastel" ,python-pastel)
12745 ("python-pylev" ,python-pylev)))
12746 (home-page "https://github.com/sdispater/cleo")
12747 (synopsis "Command-line arguments library for Python")
12748 (description
12749 "Cleo allows you to create command-line commands with signature in
12750 docstring and colored output.")
12751 (license license:expat)))
12752
12753 (define-public python2-cleo
12754 (package-with-python2 python-cleo))
12755
12756 (define-public python-tomlkit
12757 (package
12758 (name "python-tomlkit")
12759 (version "0.6.0")
12760 (source
12761 (origin
12762 (method url-fetch)
12763 (uri (pypi-uri "tomlkit" version))
12764 (sha256
12765 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12766 (build-system python-build-system)
12767 (native-inputs
12768 `(("python-pytest" ,python-pytest)))
12769 (home-page "https://github.com/sdispater/tomlkit")
12770 (synopsis "Style-preserving TOML library")
12771 (description
12772 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12773 preserves all comments, indentations, whitespace and internal element ordering,
12774 and makes them accessible and editable via an intuitive API. It can also
12775 create new TOML documents from scratch using the provided helpers. Part of the
12776 implementation has been adapted, improved, and fixed from Molten.")
12777 (license license:expat)))
12778
12779 (define-public python-shellingham
12780 (package
12781 (name "python-shellingham")
12782 (version "1.3.2")
12783 (source
12784 (origin
12785 (method url-fetch)
12786 (uri (pypi-uri "shellingham" version))
12787 (sha256
12788 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12789 (build-system python-build-system)
12790 (arguments
12791 `(#:phases
12792 (modify-phases %standard-phases
12793 (add-after 'unpack 'restore-setup.py
12794 ;; setup.py will return in the next release.
12795 ;; <https://github.com/sarugaku/shellingham/issues/33>
12796 (lambda _
12797 (with-output-to-file "setup.py"
12798 (lambda _
12799 (display "from setuptools import setup\nsetup()\n")))
12800 #t)))))
12801 (home-page "https://github.com/sarugaku/shellingham")
12802 (synopsis "Tool to detect surrounding shell")
12803 (description
12804 "Shellingham detects what shell the current Python executable is
12805 running in.")
12806 (license license:isc)))
12807
12808 (define-public python-memcached
12809 (package
12810 (name "python-memcached")
12811 (version "1.59")
12812 (source
12813 (origin
12814 (method url-fetch)
12815 (uri (pypi-uri "python-memcached" version))
12816 (sha256
12817 (base32
12818 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12819 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12820 (build-system python-build-system)
12821 (propagated-inputs `(("python-six" ,python-six)))
12822 (home-page
12823 "https://github.com/linsomniac/python-memcached")
12824 (synopsis "Pure python memcached client")
12825 (description
12826 "This software is a pure Python interface to the memcached memory cache
12827 daemon. It is the client side software which allows storing values in one or
12828 more, possibly remote, memcached servers.")
12829 (license license:psfl)))
12830
12831 (define-public python-clikit
12832 (package
12833 (name "python-clikit")
12834 (version "0.6.2")
12835 (source
12836 (origin
12837 (method url-fetch)
12838 (uri (pypi-uri "clikit" version))
12839 (sha256
12840 (base32
12841 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12842 (build-system python-build-system)
12843 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12844 (propagated-inputs
12845 `(("python-crashtest" ,python-crashtest)
12846 ("python-pastel" ,python-pastel)
12847 ("python-pylev" ,python-pylev)))
12848 (home-page "https://github.com/sdispater/clikit")
12849 (synopsis "Group of utilities to build command line interfaces")
12850 (description
12851 "CliKit is a group of utilities to build testable command line
12852 interfaces.")
12853 (properties `((python2-variant . ,(delay python2-clikit))))
12854 (license license:expat)))
12855
12856 (define-public python2-clikit
12857 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12858 (package/inherit
12859 base
12860 (propagated-inputs
12861 `(("python-enum34" ,python2-enum34)
12862 ("python-typing" ,python2-typing)
12863 ,@(package-propagated-inputs base))))))
12864
12865 (define-public python-msgpack-python
12866 (package
12867 (name "python-msgpack-python")
12868 (version "0.5.6")
12869 (source
12870 (origin
12871 (method url-fetch)
12872 (uri (pypi-uri "msgpack-python" version))
12873 (sha256
12874 (base32
12875 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12876 (build-system python-build-system)
12877 (home-page "http://msgpack.org/")
12878 (synopsis "Package to deserialize messages in MessagePack binary format")
12879 (description
12880 "MessagePack is an efficient binary serialization format. It lets you
12881 exchange data among multiple languages like JSON. But it's faster and
12882 smaller. Small integers are encoded into a single byte, and typical short
12883 strings require only one extra byte in addition to the strings themselves.")
12884 (license license:asl2.0)))
12885
12886 (define-public python-cachy
12887 (package
12888 (name "python-cachy")
12889 (version "0.3.0")
12890 (source
12891 (origin
12892 (method url-fetch)
12893 (uri (pypi-uri "cachy" version))
12894 (sha256
12895 (base32
12896 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12897 (build-system python-build-system)
12898 (arguments
12899 '(#:phases
12900 (modify-phases %standard-phases
12901 (replace 'check
12902 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12903 "pytest"))))))
12904 (native-inputs
12905 `(("memcached" ,memcached)
12906 ("python-fakeredis" ,python-fakeredis)
12907 ("python-flexmock" ,python-flexmock)
12908 ("python-pifpaf" ,python-pifpaf)
12909 ("python-pytest" ,python-pytest)))
12910 (propagated-inputs
12911 `(("python-memcached" ,python-memcached)
12912 ("python-msgpack-python" ,python-msgpack-python)
12913 ("python-redis" ,python-redis)))
12914 (home-page "https://github.com/sdispater/cachy")
12915 (synopsis "Simple yet effective caching library")
12916 (description
12917 "Cachy provides a simple yet effective caching library. A simple but
12918 powerful API: thread-safety; decorator syntax; support for memcached, redis,
12919 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
12920 (license license:expat)))
12921
12922 (define-public poetry
12923 (package
12924 (name "poetry")
12925 (version "1.0.10")
12926 ;; Poetry can only be built from source with Poetry.
12927 (source
12928 (origin
12929 (method url-fetch)
12930 (uri (pypi-uri "poetry" version))
12931 (sha256
12932 (base32
12933 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
12934 (build-system python-build-system)
12935 (arguments
12936 `(#:tests? #f ;; Pypi does not have tests.
12937 #:phases
12938 (modify-phases %standard-phases
12939 (add-before 'build 'patch-setup-py
12940 (lambda _
12941 (substitute* "setup.py"
12942 ;; poetry won't update version as 21.0.0 relies on python > 3.6
12943 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
12944 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
12945 ;; Reported upstream:
12946 ;; <https://github.com/python-poetry/poetry/issues/2752>.
12947 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
12948 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
12949 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
12950 #t)))))
12951 (propagated-inputs
12952 `(("python-cachecontrol" ,python-cachecontrol)
12953 ("python-cachy" ,python-cachy)
12954 ("python-cleo" ,python-cleo)
12955 ("python-clikit" ,python-clikit)
12956 ("python-html5lib" ,python-html5lib)
12957 ("python-jsonschema" ,python-jsonschema)
12958 ("python-keyring" ,python-keyring)
12959 ("python-msgpack-transitional" ,python-msgpack-transitional)
12960 ("python-pexpect" ,python-pexpect)
12961 ("python-pkginfo" ,python-pkginfo)
12962 ("python-pyparsing" ,python-pyparsing)
12963 ("python-pyrsistent" ,python-pyrsistent)
12964 ("python-requests" ,python-requests)
12965 ("python-requests-toolbelt" ,python-requests-toolbelt)
12966 ("python-shellingham" ,python-shellingham)
12967 ("python-tomlkit" ,python-tomlkit)
12968 ("python-virtualenv" ,python-virtualenv)))
12969 (home-page "https://python-poetry.org")
12970 (synopsis "Python dependency management and packaging made easy")
12971 (description "Poetry is a tool for dependency management and packaging
12972 in Python. It allows you to declare the libraries your project depends on and
12973 it will manage (install/update) them for you.")
12974 (license license:expat)))
12975
12976 (define-public python-lark-parser
12977 (package
12978 (name "python-lark-parser")
12979 (version "0.9.0")
12980 (source (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "lark-parser" version))
12983 (sha256
12984 (base32
12985 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
12986 (build-system python-build-system)
12987 (home-page "https://github.com/lark-parser/lark")
12988 (synopsis "Multi-language parser for Python")
12989 (description
12990 "Lark is a parser built with a focus on ergonomics, performance and
12991 resilience. Lark can parse all context-free languages. That means it is
12992 capable of parsing almost any programming language out there, and to
12993 some degree most natural languages too.")
12994 (license license:expat)))
12995
12996 (define-public python-libcst
12997 (package
12998 (name "python-libcst")
12999 (version "0.3.8")
13000 (source (origin
13001 (method url-fetch)
13002 (uri (pypi-uri "libcst" version))
13003 (sha256
13004 (base32
13005 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13006 (build-system python-build-system)
13007 (arguments
13008 `(#:phases
13009 (modify-phases %standard-phases
13010 (add-after 'unpack 'remove-failing-tests
13011 (lambda _
13012 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13013 (delete-file "libcst/tests/test_fuzz.py")
13014 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13015 (delete-file "libcst/tests/test_pyre_integration.py")
13016 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13017 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13018 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13019 #t))
13020 (add-before 'check 'generate-test-data
13021 (lambda _
13022 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13023 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13024 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13025 (replace 'check
13026 (lambda _
13027 (invoke "python" "-m" "unittest")
13028 #t)))))
13029 (native-inputs
13030 `(("python-black" ,python-black)
13031 ("python-isort" ,python-isort)))
13032 (propagated-inputs
13033 `(("python-typing-extensions" ,python-typing-extensions)
13034 ("python-typing-inspect" ,python-typing-inspect)
13035 ("python-pyyaml" ,python-pyyaml)))
13036 (home-page "https://github.com/Instagram/LibCST")
13037 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13038 (description
13039 "LibCST parses Python source code as a CST tree that keeps all
13040 formatting details (comments, whitespaces, parentheses, etc). It's useful
13041 for building automated refactoring (codemod) applications and linters.
13042 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13043 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13044 naming node types and fields, LibCST creates a lossless CST that looks and
13045 feels like an AST.")
13046 (license (list license:expat
13047 ;; Some files unde libcst/_parser/ are under Python Software
13048 ;; Foundation license (see LICENSE file for details)
13049 license:psfl
13050 ;; libcst/_add_slots.py
13051 license:asl2.0))))
13052
13053 (define-public python-typing-inspect
13054 (package
13055 (name "python-typing-inspect")
13056 (version "0.6.0")
13057 (source (origin
13058 (method url-fetch)
13059 (uri (pypi-uri "typing_inspect" version))
13060 (sha256
13061 (base32
13062 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13063 (build-system python-build-system)
13064 (propagated-inputs
13065 `(("python-mypy-extensions" ,python-mypy-extensions)
13066 ("python-typing-extensions" ,python-typing-extensions)))
13067 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13068 (synopsis "API for inspection of types in the Python @code{typing} module")
13069 (description
13070 "The @code{typing_inspect} module defines experimental API for runtime
13071 inspection of types defined in the Python standard typing module.")
13072 (license license:expat)))
13073
13074 (define-public python-lazy-object-proxy
13075 (package
13076 (name "python-lazy-object-proxy")
13077 (version "1.5.1")
13078 (source (origin
13079 (method url-fetch)
13080 (uri (pypi-uri "lazy-object-proxy" version))
13081 (sha256
13082 (base32
13083 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13084 (native-inputs
13085 `(("python-setuptools-scm" ,python-setuptools-scm)))
13086 (build-system python-build-system)
13087 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13088 (synopsis "Lazy object proxy for python")
13089 (description
13090 "Lazy object proxy is an object that wraps a callable but defers the call
13091 until the object is actually required, and caches the result of said call.")
13092 (license license:bsd-2)))
13093
13094 (define-public python2-lazy-object-proxy
13095 (package-with-python2 python-lazy-object-proxy))
13096
13097 (define-public python-dnspython
13098 (package
13099 (name "python-dnspython")
13100 (version "1.16.0")
13101 (source (origin
13102 (method url-fetch)
13103 (uri (string-append "http://www.dnspython.org/kits/"
13104 version "/dnspython-" version ".tar.gz"))
13105 (sha256
13106 (base32
13107 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13108 (build-system python-build-system)
13109 (arguments '(#:tests? #f)) ; XXX: requires internet access
13110 (home-page "http://www.dnspython.org")
13111 (synopsis "DNS toolkit for Python")
13112 (description
13113 "dnspython is a DNS toolkit for Python. It supports almost all record
13114 types. It can be used for queries, zone transfers, and dynamic updates.
13115 It supports TSIG authenticated messages and EDNS0.")
13116 (license license:expat)))
13117
13118 (define-public python2-dnspython
13119 (package-with-python2 python-dnspython))
13120
13121 (define-public python-py3dns
13122 (package
13123 (name "python-py3dns")
13124 (version "3.2.1")
13125 (source
13126 (origin
13127 (method url-fetch)
13128 (uri (pypi-uri "py3dns" version))
13129 (sha256
13130 (base32
13131 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13132 (build-system python-build-system)
13133 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13134 ;; removing functionality so we copy from Nix and "just don't build it".
13135 (arguments
13136 `(#:phases
13137 (modify-phases %standard-phases
13138 (add-after 'unpack 'patch-source
13139 (lambda _
13140 (substitute* "setup.py"
13141 (("import DNS") "")
13142 (("DNS.__version__") (string-append "\"" ,version "\"")))
13143 #t)))
13144 #:tests? #f)) ; Also skip the tests.
13145 (home-page "https://launchpad.net/py3dns")
13146 (synopsis "Python 3 DNS library")
13147 (description "This Python 3 module provides a DNS API for looking up DNS
13148 entries from within Python 3 modules and applications. This module is a
13149 simple, lightweight implementation.")
13150 (license license:psfl)))
13151
13152 (define-public python-email-validator
13153 (package
13154 (name "python-email-validator")
13155 (version "1.0.2")
13156 (source
13157 (origin (method url-fetch)
13158 (uri (pypi-uri "email_validator" version))
13159 (sha256
13160 (base32
13161 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13162 (build-system python-build-system)
13163 (arguments
13164 '(#:phases
13165 (modify-phases %standard-phases
13166 (add-before 'build 'use-dnspython
13167 (lambda _
13168 (substitute* "setup.py"
13169 (("dnspython3") "dnspython"))
13170 #t)))))
13171 (propagated-inputs
13172 `(("python-dnspython" ,python-dnspython)
13173 ("python-idna" ,python-idna)))
13174 (home-page "https://github.com/JoshData/python-email-validator")
13175 (synopsis "Email address validation library for Python")
13176 (description
13177 "This library validates email address syntax and deliverability.")
13178 (license license:cc0)))
13179
13180 (define-public python2-email-validator
13181 (package-with-python2 python-email-validator))
13182
13183 (define-public python-ukpostcodeparser
13184 (package
13185 (name "python-ukpostcodeparser")
13186 (version "1.0.3")
13187 (source (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "UkPostcodeParser" version))
13190 (sha256
13191 (base32
13192 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13193 (build-system python-build-system)
13194 (home-page "https://github.com/hamstah/ukpostcodeparser")
13195 (synopsis "UK Postcode parser for Python")
13196 (description
13197 "This library provides the @code{parse_uk_postcode} function for
13198 parsing UK postcodes.")
13199 (license license:expat)))
13200
13201 (define-public python2-ukpostcodeparser
13202 (package-with-python2 python-ukpostcodeparser))
13203
13204 (define-public python-faker
13205 (package
13206 (name "python-faker")
13207 (version "4.0.2")
13208 (source (origin
13209 (method url-fetch)
13210 (uri (pypi-uri "Faker" version))
13211 (sha256
13212 (base32
13213 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13214 (build-system python-build-system)
13215 (arguments
13216 '(#:phases
13217 (modify-phases %standard-phases
13218 (replace 'check
13219 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13220 (native-inputs
13221 `(;; For testing
13222 ("python-freezegun" ,python-freezegun)
13223 ("python-pytest" ,python-pytest)
13224 ("python-random2" ,python-random2)
13225 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13226 ("python-validators" ,python-validators)))
13227 (propagated-inputs
13228 `(("python-dateutil" ,python-dateutil)
13229 ("python-text-unidecode" ,python-text-unidecode)))
13230 (home-page "https://github.com/joke2k/faker")
13231 (synopsis "Python package that generates fake data")
13232 (description
13233 "Faker is a Python package that generates fake data such as names,
13234 addresses, and phone numbers.")
13235 (license license:expat)
13236 (properties `((python2-variant . ,(delay python2-faker))))))
13237
13238 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13239 (define-public python2-faker
13240 (let ((base (package-with-python2 (strip-python2-variant
13241 python-faker))))
13242 (package
13243 (inherit base)
13244 (version "3.0.1")
13245 (source (origin
13246 (method url-fetch)
13247 (uri (pypi-uri "Faker" version))
13248 (sha256
13249 (base32
13250 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13251 (native-inputs
13252 `(("python-mock" ,python2-mock)
13253 ,@(package-native-inputs base)))
13254 (propagated-inputs
13255 `(("python2-ipaddress" ,python2-ipaddress)
13256 ("python2-six" ,python2-six)
13257 ,@(package-propagated-inputs base))))))
13258
13259 (define-public python-pyaml
13260 (package
13261 (name "python-pyaml")
13262 (version "18.11.0")
13263 (source (origin
13264 (method url-fetch)
13265 (uri (pypi-uri "pyaml" version))
13266 (sha256
13267 (base32
13268 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13269 (build-system python-build-system)
13270 (native-inputs
13271 `(("python-unidecode" ,python-unidecode)))
13272 (propagated-inputs
13273 `(("python-pyyaml" ,python-pyyaml)))
13274 (home-page "https://github.com/mk-fg/pretty-yaml")
13275 (synopsis "YAML pretty-print library for Python")
13276 (description
13277 "pyaml is a PyYAML based python module to produce pretty and readable
13278 YAML-serialized data.")
13279 (license license:wtfpl2)))
13280
13281 (define-public python2-pyaml
13282 (package-with-python2 python-pyaml))
13283
13284 (define-public python-backpack
13285 (package
13286 (name "python-backpack")
13287 (version "0.1")
13288 (source
13289 (origin
13290 (method url-fetch)
13291 (uri (pypi-uri "backpack" version))
13292 (sha256
13293 (base32
13294 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13295 (build-system python-build-system)
13296 (native-inputs
13297 `(("python-pytest" ,python-pytest)
13298 ("python-nose" ,python-nose)))
13299 (propagated-inputs
13300 `(("python-simplejson" ,python-simplejson)))
13301 (home-page "https://github.com/sdispater/backpack")
13302 (synopsis "Utilities for working with Python collections")
13303 (description "Backpack provides some useful utilities for working with
13304 collections of data.")
13305 (license license:expat)))
13306
13307 (define-public python2-backpack
13308 (package-with-python2 python-backpack))
13309
13310 (define-public python-prompt-toolkit
13311 (package
13312 (name "python-prompt-toolkit")
13313 (version "3.0.7")
13314 (source
13315 (origin
13316 (method url-fetch)
13317 (uri (pypi-uri "prompt_toolkit" version))
13318 (sha256
13319 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13320 (build-system python-build-system)
13321 (arguments
13322 `(#:phases
13323 (modify-phases %standard-phases
13324 (delete 'check)
13325 (add-after 'install 'post-install-check
13326 (lambda* (#:key inputs outputs #:allow-other-keys)
13327 ;; HOME is needed for the test
13328 ;; "test_pathcompleter_can_expanduser".
13329 (setenv "HOME" "/tmp")
13330 (add-installed-pythonpath inputs outputs)
13331 (invoke "py.test"))))))
13332 (propagated-inputs
13333 `(("python-wcwidth" ,python-wcwidth)))
13334 (native-inputs
13335 `(("python-pytest" ,python-pytest)))
13336 (home-page
13337 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13338 (synopsis "Library for building command line interfaces in Python")
13339 (description
13340 "Prompt-Toolkit is a library for building interactive command line
13341 interfaces in Python. It's like GNU Readline but it also features syntax
13342 highlighting while typing, out-of-the-box multi-line input editing, advanced
13343 code completion, incremental search, support for Chinese double-width
13344 characters, mouse support, and auto suggestions.")
13345 (license license:bsd-3)
13346 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13347
13348 (define-public python-prompt-toolkit-2
13349 (package (inherit python-prompt-toolkit)
13350 (name "python-prompt-toolkit")
13351 (version "2.0.7")
13352 (source
13353 (origin
13354 (method url-fetch)
13355 (uri (pypi-uri "prompt_toolkit" version))
13356 (sha256
13357 (base32
13358 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13359 (propagated-inputs
13360 `(("python-wcwidth" ,python-wcwidth)
13361 ("python-six" ,python-six)
13362 ("python-pygments" ,python-pygments)))
13363 (properties '())))
13364
13365 (define-public python2-prompt-toolkit
13366 (package-with-python2 python-prompt-toolkit-2))
13367
13368 (define-public python-prompt-toolkit-1
13369 (package (inherit python-prompt-toolkit-2)
13370 (version "1.0.15")
13371 (source
13372 (origin
13373 (method url-fetch)
13374 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13375 (sha256
13376 (base32
13377 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13378
13379 (define-public python2-prompt-toolkit-1
13380 (package-with-python2 python-prompt-toolkit-1))
13381
13382 (define-public python-jedi
13383 (package
13384 (name "python-jedi")
13385 (version "0.17.2")
13386 (source
13387 (origin
13388 (method url-fetch)
13389 (uri (pypi-uri "jedi" version))
13390 (sha256
13391 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13392 (build-system python-build-system)
13393 (arguments
13394 `(#:phases
13395 (modify-phases %standard-phases
13396 (replace 'check
13397 (lambda _
13398 (setenv "HOME" "/tmp")
13399 (invoke "python" "-m" "pytest" "-vv"))))))
13400 (native-inputs
13401 `(("python-pytest" ,python-pytest)
13402 ("python-docopt" ,python-docopt)))
13403 (propagated-inputs
13404 `(("python-parso" ,python-parso)))
13405 (home-page "https://github.com/davidhalter/jedi")
13406 (synopsis "Autocompletion and static analysis library for Python")
13407 (description
13408 "Jedi is a static analysis tool for Python that can be used in Integrated
13409 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13410 on a deeper level than many other static analysis frameworks for Python.
13411
13412 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13413 well.")
13414 (license license:expat)))
13415
13416 (define-public python2-jedi
13417 (package-with-python2 python-jedi))
13418
13419 (define-public ptpython
13420 (package
13421 (name "ptpython")
13422 (version "3.0.5")
13423 (source (origin
13424 (method url-fetch)
13425 (uri (pypi-uri "ptpython" version))
13426 (sha256
13427 (base32
13428 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13429 (build-system python-build-system)
13430 (arguments
13431 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13432 (propagated-inputs
13433 `(("python-appdirs" ,python-appdirs)
13434 ("python-jedi" ,python-jedi)
13435 ("python-prompt-toolkit" ,python-prompt-toolkit)
13436 ("python-pygments" ,python-pygments)))
13437 (home-page "https://github.com/jonathanslenders/ptpython")
13438 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13439 (description
13440 "ptpython is a Python read-eval-print loop with IDE-like features.
13441 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13442 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13443 etc.")
13444 (license license:bsd-3)
13445 (properties `((python2-variant . ,(delay ptpython-2))))))
13446
13447 (define-public ptpython-2
13448 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13449 (package
13450 (inherit base)
13451 (name "ptpython2"))))
13452
13453 (define-public python-stem
13454 (package
13455 (name "python-stem")
13456 (version "1.8.0")
13457 (source
13458 (origin
13459 (method url-fetch)
13460 (uri (pypi-uri "stem" version))
13461 (sha256
13462 (base32
13463 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13464 (build-system python-build-system)
13465 (arguments
13466 `(#:phases
13467 (modify-phases %standard-phases
13468 (replace 'check
13469 (lambda _
13470 (invoke "./run_tests.py" "--unit")
13471 #t)))))
13472 (native-inputs
13473 `(("python-mock" ,python-mock)
13474 ("python-pycodestyle" ,python-pycodestyle)
13475 ("python-pyflakes" ,python-pyflakes)))
13476 (home-page "https://stem.torproject.org/")
13477 (synopsis
13478 "Python controller library that allows applications to interact with Tor")
13479 (description
13480 "Stem is a Python controller library for Tor. With it you can use Tor's
13481 control protocol to script against the Tor process and read descriptor data
13482 relays publish about themselves.")
13483 (license license:lgpl3)))
13484
13485 (define-public python2-stem
13486 (package-with-python2 python-stem))
13487
13488 (define-public python-pyserial
13489 (package
13490 (name "python-pyserial")
13491 (version "3.4")
13492 (source
13493 (origin
13494 (method url-fetch)
13495 (uri (pypi-uri "pyserial" version))
13496 (sha256
13497 (base32
13498 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13499 (build-system python-build-system)
13500 (arguments
13501 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13502 ;; #:phases
13503 ;; (modify-phases %standard-phases
13504 ;; (replace 'check
13505 ;; (lambda _
13506 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13507 (home-page
13508 "https://github.com/pyserial/pyserial")
13509 (synopsis "Python Serial Port Bindings")
13510 (description "@code{pyserial} provide serial port bindings for Python. It
13511 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13512 and/or Xon/Xoff. The port is accessed in RAW mode.")
13513 (license license:bsd-3)))
13514
13515 (define-public python2-pyserial
13516 (package-with-python2 python-pyserial))
13517
13518 (define-public python-kivy
13519 (package
13520 (name "python-kivy")
13521 (version "1.10.1")
13522 (source
13523 (origin
13524 (method url-fetch)
13525 (uri (pypi-uri "Kivy" version))
13526 (file-name (string-append name "-" version ".tar.gz"))
13527 (sha256
13528 (base32
13529 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13530 (build-system python-build-system)
13531 (arguments
13532 `(#:tests? #f ; Tests require many optional packages
13533 #:phases
13534 (modify-phases %standard-phases
13535 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13536 (lambda* (#:key inputs #:allow-other-keys)
13537 (setenv "KIVY_SDL2_PATH"
13538 (string-append (assoc-ref inputs "sdl-union")
13539 "/include/SDL2"))
13540 #t)))))
13541 (native-inputs
13542 `(("pkg-config" ,pkg-config)
13543 ("python-cython" ,python-cython)))
13544 (inputs
13545 `(("gstreamer" ,gstreamer)
13546 ("mesa" ,mesa)
13547 ("sdl-union"
13548 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13549 (home-page "https://kivy.org")
13550 (synopsis
13551 "Multitouch application framework")
13552 (description
13553 "A software library for rapid development of
13554 hardware-accelerated multitouch applications.")
13555 (license license:expat)))
13556
13557 (define-public python2-kivy
13558 (package-with-python2 python-kivy))
13559
13560 (define-public python-binaryornot
13561 (package
13562 (name "python-binaryornot")
13563 (version "0.4.4")
13564 (source (origin
13565 (method url-fetch)
13566 (uri (pypi-uri "binaryornot" version))
13567 (sha256
13568 (base32
13569 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13570 (build-system python-build-system)
13571 (arguments
13572 `(#:phases
13573 (modify-phases %standard-phases
13574 (add-after 'unpack 'patch-tests
13575 (lambda _
13576 ;; TypeError: binary() got an unexpected keyword argument
13577 ;; 'average_size'.
13578 (substitute* "tests/test_check.py"
13579 (("average_size=512") ""))
13580 #t)))))
13581 (propagated-inputs
13582 `(("python-chardet" ,python-chardet)
13583 ("python-hypothesis" ,python-hypothesis)))
13584 (home-page "https://github.com/audreyr/binaryornot")
13585 (synopsis "Package to check if a file is binary or text")
13586 (description "Ultra-lightweight pure Python package to check if a file is
13587 binary or text.")
13588 (license license:bsd-3)
13589 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13590
13591 (define-public python2-binaryornot
13592 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13593 (package (inherit base)
13594 (propagated-inputs
13595 `(("python2-enum34" ,python2-enum34)
13596 ,@(package-propagated-inputs base))))))
13597
13598 (define-public python-binwalk
13599 (package
13600 (name "python-binwalk")
13601 (version "2.2.0")
13602 (source
13603 (origin
13604 (method git-fetch)
13605 (uri (git-reference
13606 (url "https://github.com/ReFirmLabs/binwalk")
13607 (commit (string-append "v" version))))
13608 (file-name (git-file-name name version))
13609 (sha256
13610 (base32
13611 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13612 (build-system python-build-system)
13613 (arguments
13614 `(#:phases
13615 (modify-phases %standard-phases
13616 (add-before 'check 'set-pythonpath
13617 (lambda _
13618 (setenv "PYTHONPATH"
13619 (string-append
13620 (getcwd) "/src/"
13621 ":" (getenv "PYTHONPATH")))
13622 (setenv "HOME" "")
13623 #t)))))
13624 (native-inputs
13625 `(("python-coverage" ,python-coverage)
13626 ("python-nose" ,python-nose)))
13627 (home-page "https://github.com/ReFirmLabs/binwalk")
13628 (synopsis "Firmware analysis tool")
13629 (description "Binwalk is a tool for analyzing, reverse engineering, and
13630 extracting firmware images")
13631 (license license:expat)))
13632
13633 (define-public python-nltk
13634 (package
13635 (name "python-nltk")
13636 (version "3.2.1")
13637 (source (origin
13638 (method url-fetch)
13639 (uri (pypi-uri "nltk" version))
13640 (sha256
13641 (base32
13642 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13643 (build-system python-build-system)
13644 (arguments
13645 '(;; The tests require some extra resources to be downloaded.
13646 ;; TODO Try packaging these resources.
13647 #:tests? #f))
13648 (home-page "http://nltk.org/")
13649 (synopsis "Natural Language Toolkit")
13650 (description "It provides interfaces to over 50 corpora and lexical
13651 resources such as WordNet, along with a suite of text processing libraries
13652 for classification, tokenization, stemming, tagging, parsing, and semantic
13653 reasoning, wrappers for natural language processing libraries.")
13654 (license license:asl2.0)))
13655
13656 (define-public python2-nltk
13657 (package-with-python2 python-nltk))
13658
13659 (define-public python-pymongo
13660 (package
13661 (name "python-pymongo")
13662 (version "3.7.2")
13663 (source (origin
13664 (method url-fetch)
13665 (uri (pypi-uri "pymongo" version))
13666 (sha256
13667 (base32
13668 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13669 (build-system python-build-system)
13670 (propagated-inputs
13671 `(("python-certifi" ,python-certifi)))
13672 (home-page "https://github.com/mongodb/mongo-python-driver")
13673 (synopsis "Python driver for MongoDB")
13674 (description "Python driver for MongoDB.")
13675 (license license:asl2.0)))
13676
13677 (define-public python2-pymongo
13678 (package-with-python2 python-pymongo))
13679
13680 (define-public python-consul
13681 (package
13682 (name "python-consul")
13683 (version "0.6.1")
13684 (source
13685 (origin
13686 (method url-fetch)
13687 (uri (pypi-uri "python-consul" version))
13688 (sha256
13689 (base32
13690 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13691 (build-system python-build-system)
13692 (arguments
13693 '(#:tests? #f)) ; The tests are not distributed
13694 (propagated-inputs
13695 `(("python-requests" ,python-requests)
13696 ("python-six" ,python-six)))
13697 (home-page "https://github.com/cablehead/python-consul")
13698 (synopsis "Python client for Consul")
13699 (description
13700 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13701 discovery, monitoring and configuration.")
13702 (license license:expat)))
13703
13704 (define-public python2-consul
13705 (package-with-python2 python-consul))
13706
13707 (define-public python-schematics
13708 (package
13709 (name "python-schematics")
13710 (version "1.1.1")
13711 (source
13712 (origin
13713 (method git-fetch)
13714 (uri (git-reference
13715 (url "https://github.com/schematics/schematics")
13716 (commit (string-append "v" version))))
13717 (file-name (git-file-name name version))
13718 (sha256
13719 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13720 (build-system python-build-system)
13721 (propagated-inputs
13722 `(("python-six" ,python-six)))
13723 (arguments
13724 ;; The tests require a bunch of not very nice packages with fixed
13725 ;; version requirements (e.g. python-coveralls).
13726 `(#:tests? #f))
13727 (home-page "https://github.com/schematics/schematics")
13728 (synopsis "Python Data Structures for Humans")
13729 (description "Python Data Structures for Humans.")
13730 (license license:bsd-3)))
13731
13732 (define-public python2-schematics
13733 (package-with-python2 python-schematics))
13734
13735 (define-public python-odfpy
13736 (package
13737 (name "python-odfpy")
13738 (version "1.4.1")
13739 (source (origin
13740 (method url-fetch)
13741 (uri (pypi-uri "odfpy" version))
13742 (sha256
13743 (base32
13744 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13745 (arguments
13746 `(#:phases
13747 (modify-phases %standard-phases
13748 (replace 'check
13749 (lambda _
13750 (setenv "PYTHONPATH" (string-append "./build/lib:"
13751 (getenv "PYTHONPATH")))
13752 (invoke "pytest" "-vv"))))))
13753 (build-system python-build-system)
13754 (native-inputs
13755 `(("python-pytest" ,python-pytest)))
13756 (propagated-inputs
13757 `(("python-defusedxml" ,python-defusedxml)))
13758 (home-page "https://github.com/eea/odfpy")
13759 (synopsis "Python API and tools to manipulate OpenDocument files")
13760 (description "Collection of libraries and utility programs written in
13761 Python to manipulate OpenDocument 1.2 files.")
13762 (license
13763 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13764 ;; number of files with other licenses.
13765 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13766
13767 (define-public python2-odfpy
13768 (package-with-python2 python-odfpy))
13769
13770 (define-public python-natsort
13771 (package
13772 (name "python-natsort")
13773 (version "7.0.1")
13774 (source (origin
13775 (method url-fetch)
13776 (uri (pypi-uri "natsort" version))
13777 (sha256
13778 (base32
13779 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13780 (build-system python-build-system)
13781 (arguments
13782 `(#:modules ((guix build utils)
13783 (guix build python-build-system)
13784 (srfi srfi-1)
13785 (srfi srfi-26)
13786 (ice-9 ftw))
13787 #:phases
13788 (modify-phases %standard-phases
13789 (add-before 'check 'set-cachedir
13790 ;; Tests require write access to $HOME by default
13791 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13792 (replace 'check
13793 (lambda _
13794 (let ((cwd (getcwd)))
13795 (setenv "PYTHONPATH"
13796 (string-append
13797 cwd "/build/"
13798 (find (cut string-prefix? "lib" <>)
13799 (scandir (string-append cwd "/build")))
13800 ":"
13801 (getenv "PYTHONPATH")))
13802 (invoke "pytest" "-v")))))))
13803 (native-inputs
13804 `(("python-hypothesis" ,python-hypothesis)
13805 ("python-pytest-cov" ,python-pytest-cov)
13806 ("python-pytest-mock" ,python-pytest-mock)
13807 ("python-pytest" ,python-pytest)))
13808 (propagated-inputs ; TODO: Add python-fastnumbers.
13809 `(("python-pyicu" ,python-pyicu)))
13810 (home-page "https://github.com/SethMMorton/natsort")
13811 (synopsis "Natural sorting for python and shell")
13812 (description
13813 "Natsort lets you apply natural sorting on lists instead of
13814 lexicographical. If you use the built-in @code{sorted} method in python
13815 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13816 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13817 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13818 identifies numbers and sorts them separately from strings. It can also sort
13819 version numbers, real numbers, mixed types and more, and comes with a shell
13820 command @command{natsort} that exposes this functionality in the command line.")
13821 (license license:expat)
13822 (properties `((python2-variant . ,(delay python2-natsort))))))
13823
13824 ;; Natsort 6.x are the last versions with support for Python 2.
13825 (define-public python2-natsort
13826 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13827 (package (inherit base)
13828 (version "6.2.1")
13829 (source (origin
13830 (method url-fetch)
13831 (uri (pypi-uri "natsort" version))
13832 (sha256
13833 (base32
13834 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13835 (native-inputs
13836 `(("python2-pathlib" ,python2-pathlib)
13837 ,@(package-native-inputs base))))))
13838
13839 (define-public glances
13840 (package
13841 (name "glances")
13842 (version "3.1.4")
13843 (source
13844 (origin
13845 (method url-fetch)
13846 (uri (pypi-uri "Glances" version))
13847 (sha256
13848 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13849 (modules '((guix build utils)))
13850 (snippet
13851 '(begin
13852 ;; Glances phones PyPI for weekly update checks by default.
13853 ;; Disable these. The user can re-enable them if desired.
13854 (substitute* "glances/outdated.py"
13855 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13856 (string-append indentation
13857 "self.args.disable_check_update = True\n"
13858 line)))
13859 #t))))
13860 (build-system python-build-system)
13861 (propagated-inputs
13862 `(("python-future" ,python-future)
13863 ("python-psutil" ,python-psutil)))
13864 (home-page "https://github.com/nicolargo/glances")
13865 (synopsis "Cross-platform curses-based monitoring tool")
13866 (description
13867 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13868 Glances uses the PsUtil library to get information from your system. It
13869 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13870 (license license:lgpl3+)))
13871
13872 (define-public python-glances
13873 (deprecated-package "python-glances" glances))
13874
13875 (define-public python-graphql-core
13876 (package
13877 (name "python-graphql-core")
13878 (version "0.5.3")
13879 (source
13880 (origin
13881 (method url-fetch)
13882 (uri (pypi-uri "graphql-core" version))
13883 (sha256
13884 (base32
13885 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13886 (build-system python-build-system)
13887 (arguments
13888 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13889 #:phases
13890 (modify-phases %standard-phases
13891 (add-after 'unpack 'patch-hardcoded-version
13892 (lambda _ (substitute*
13893 "setup.py"
13894 (("'gevent==1.1rc1'") "'gevent'"))
13895 #t)))))
13896 (native-inputs
13897 `(("python-gevent" ,python-gevent)
13898 ("python-mock" ,python-mock)
13899 ("python-pytest-mock" ,python-pytest-mock)))
13900 (propagated-inputs
13901 `(("python-promise" ,python-promise)
13902 ("python-six" ,python-six)))
13903 (home-page "https://github.com/graphql-python/graphql-core")
13904 (synopsis "GraphQL implementation for Python")
13905 (description
13906 "GraphQL implementation for Python. GraphQL is a data query language and
13907 runtime designed and used to request and deliver data to mobile and web apps.
13908 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13909 to Python.")
13910 (license license:expat)))
13911
13912 (define-public python2-graphql-core
13913 (package-with-python2 python-graphql-core))
13914
13915 (define-public python-graphql-relay
13916 (package
13917 (name "python-graphql-relay")
13918 (version "0.4.5")
13919 (source
13920 (origin
13921 (method url-fetch)
13922 (uri (pypi-uri "graphql-relay" version))
13923 (sha256
13924 (base32
13925 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13926 (build-system python-build-system)
13927 (arguments
13928 '(#:tests? #f)) ; The tests are not distributed
13929 (propagated-inputs
13930 `(("python-graphql-core" ,python-graphql-core)
13931 ("python-promise" ,python-promise)
13932 ("python-six" ,python-six)))
13933 (home-page "https://github.com/graphql-python/graphql-relay-py")
13934 (synopsis "Relay implementation for Python")
13935 (description
13936 "This is a library to allow the easy creation of Relay-compliant servers
13937 using the GraphQL Python reference implementation of a GraphQL server. It
13938 should be noted that the code is a exact port of the original
13939 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13940 from Facebook.")
13941 (license license:expat)))
13942
13943 (define-public python2-graphql-relay
13944 (package-with-python2 python-graphql-relay))
13945
13946 (define-public python-graphene
13947 (package
13948 (name "python-graphene")
13949 (version "0.10.2")
13950 (source
13951 (origin
13952 (method url-fetch)
13953 (uri (pypi-uri "graphene" version))
13954 (sha256
13955 (base32
13956 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13957 (build-system python-build-system)
13958 (propagated-inputs
13959 `(("python-graphql-core" ,python-graphql-core)
13960 ("python-graphql-relay" ,python-graphql-relay)
13961 ("python-iso8601" ,python-iso8601)
13962 ("python-promise" ,python-promise)
13963 ("python-six" ,python-six)))
13964 (arguments
13965 `(#:tests? #f)) ; no tests/ in the PyPI tarball
13966 (home-page "https://graphene-python.org/")
13967 (synopsis "GraphQL Framework for Python")
13968 (description
13969 "Graphene is a Python library for building GraphQL schemas/types.
13970 A GraphQL schema describes your data model, and provides a GraphQL server
13971 with an associated set of resolve methods that know how to fetch data.")
13972 (properties `((python2-variant . ,(delay python2-graphene))))
13973 (license license:expat)))
13974
13975 (define-public python2-graphene
13976 (let ((base (package-with-python2
13977 (strip-python2-variant python-graphene))))
13978 (package (inherit base)
13979 (native-inputs
13980 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13981 ,@(package-native-inputs base))))))
13982
13983 (define-public python-nautilus
13984 (package
13985 (name "python-nautilus")
13986 (version "0.4.9")
13987 (source
13988 (origin
13989 (method url-fetch)
13990 (uri (pypi-uri "nautilus" version))
13991 (sha256
13992 (base32
13993 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13994 (build-system python-build-system)
13995 (arguments `(#:tests? #f)) ; fails to import test modules
13996 (propagated-inputs
13997 `(("python-bcrypt" ,python-bcrypt)
13998 ("python-click" ,python-click)
13999 ("python-consul" ,python-consul)
14000 ("python-graphene" ,python-graphene)
14001 ("python-jinja2" ,python-jinja2)
14002 ("python-peewee" ,python-peewee)
14003 ("python-pika" ,python-pika)
14004 ("python-tornado" ,python-tornado)
14005 ("python-wtforms" ,python-wtforms)))
14006 (native-inputs
14007 `(("python-nose2" ,python-nose2)))
14008 (home-page "https://github.com/AlecAivazis/nautilus")
14009 (synopsis "Library for creating microservice applications")
14010 (description
14011 "Nautilus is a framework for flux based microservices that looks to
14012 provide extendible implementations of common aspects of a cloud so that you can
14013 focus on building massively scalable web applications.")
14014 (license license:expat)))
14015
14016 (define-public python-random2
14017 (package
14018 (name "python-random2")
14019 (version "1.0.1")
14020 (source (origin
14021 (method url-fetch)
14022 (uri (pypi-uri "random2" version ".zip"))
14023 (sha256
14024 (base32
14025 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14026 (build-system python-build-system)
14027 (native-inputs `(("unzip" ,unzip)))
14028 (home-page "http://pypi.python.org/pypi/random2")
14029 (synopsis "Python 3 version of the Python 2 @code{random} module")
14030 (description
14031 "This package provides a Python 3 ported version of Python 2.7’s
14032 @code{random} module. It has also been back-ported to work in Python 2.6.
14033
14034 In Python 3, the implementation of @code{randrange()} was changed, so that
14035 even with the same seed you get different sequences in Python 2 and 3.
14036
14037 This package closes that gap, allowing stable random number generation
14038 between the different Python versions.")
14039 (license license:psfl)))
14040
14041 (define-public python2-random2
14042 (package-with-python2 python-random2))
14043
14044 (define-public python-snowballstemmer
14045 (package
14046 (name "python-snowballstemmer")
14047 (version "2.0.0")
14048 (source (origin
14049 (method url-fetch)
14050 (uri (pypi-uri "snowballstemmer" version))
14051 (sha256
14052 (base32
14053 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14054 (build-system python-build-system)
14055 (arguments
14056 `(;; No tests exist
14057 #:tests? #f))
14058 (home-page "https://github.com/shibukawa/snowball_py")
14059 (synopsis "Snowball stemming library collection for Python")
14060 (description "This package provides 16 word stemmer algorithms generated
14061 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14062 English stemmer.")
14063 (license license:bsd-3)))
14064
14065 (define-public python2-snowballstemmer
14066 (package-with-python2 python-snowballstemmer))
14067
14068 (define-public python-setproctitle
14069 (package
14070 (name "python-setproctitle")
14071 (version "1.1.10")
14072 (source
14073 (origin
14074 (method url-fetch)
14075 (uri (pypi-uri "setproctitle" version))
14076 (sha256
14077 (base32
14078 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14079 (build-system python-build-system)
14080 (arguments
14081 '(#:phases
14082 (modify-phases %standard-phases
14083 (add-before 'check 'patch-Makefile
14084 ;; Stricly this is only required for the python2 variant.
14085 ;; But adding a phase in an inherited package seems to be
14086 ;; cumbersum. So we patch even for python3.
14087 (lambda _
14088 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14089 (when nose
14090 (substitute* "Makefile"
14091 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14092 (string-append nose "/bin/nosetests "))))
14093 #t)))
14094 (replace 'check
14095 (lambda _
14096 (setenv "PYTHON" (or (which "python3") (which "python")))
14097 (setenv "PYCONFIG" (if (which "python3-config")
14098 "python3-config --embed"
14099 "python-config"))
14100 (setenv "CC" "gcc")
14101 ;; No need to extend PYTHONPATH to find the built package, since
14102 ;; the Makefile will build anyway
14103 (invoke "make" "check"))))))
14104 (native-inputs
14105 `(("procps" ,procps))) ; required for tests
14106 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14107 (synopsis
14108 "Setproctitle implementation for Python to customize the process title")
14109 (description "The library allows a process to change its title (as displayed
14110 by system tools such as ps and top).
14111
14112 Changing the title is mostly useful in multi-process systems, for
14113 example when a master process is forked: changing the children's title
14114 allows identifying the task each process is busy with. The technique
14115 is used by PostgreSQL and the OpenSSH Server for example.")
14116 (license license:bsd-3)
14117 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14118
14119 (define-public python2-setproctitle
14120 (let ((base (package-with-python2
14121 (strip-python2-variant python-setproctitle))))
14122 (package
14123 (inherit base)
14124 (native-inputs `(("python2-nose" ,python2-nose)
14125 ,@(package-native-inputs base))))))
14126
14127 (define-public python-validictory
14128 (package
14129 (name "python-validictory")
14130 (version "1.0.1")
14131 (source
14132 (origin
14133 (method url-fetch)
14134 (uri (pypi-uri "validictory" version))
14135 (sha256
14136 (base32
14137 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14138 (build-system python-build-system)
14139 (arguments
14140 '(#:phases
14141 (modify-phases %standard-phases
14142 (add-after 'unpack 'bootstrap
14143 ;; Move the tests out of the package directory to avoid
14144 ;; packaging them.
14145 (lambda* _
14146 (rename-file "validictory/tests" "tests")
14147 (delete-file "tests/__init__.py")))
14148 (replace 'check
14149 (lambda _
14150 ;; Extend PYTHONPATH so the built package will be found.
14151 (setenv "PYTHONPATH"
14152 (string-append (getcwd) "/build/lib:"
14153 (getenv "PYTHONPATH")))
14154 (invoke "py.test" "-vv" ))))))
14155 (native-inputs
14156 `(("python-pytest" ,python-pytest)))
14157 (home-page
14158 "https://github.com/jamesturk/validictory")
14159 (synopsis "General purpose Python data validator")
14160 (description "It allows validation of arbitrary Python data structures.
14161
14162 The schema format is based on the JSON Schema
14163 proposal (http://json-schema.org), so combined with json the library is also
14164 useful as a validator for JSON data.")
14165 (license license:expat)))
14166
14167 (define-public python2-validictory
14168 (package-with-python2 python-validictory))
14169
14170 (define-public python-pyelftools
14171 (package
14172 (name "python-pyelftools")
14173 (version "0.25")
14174 (source
14175 (origin
14176 (method url-fetch)
14177 (uri (pypi-uri "pyelftools" version))
14178 (sha256
14179 (base32
14180 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14181 (build-system python-build-system)
14182 (arguments
14183 `(#:phases
14184 (modify-phases %standard-phases
14185 (add-before 'check 'set-pythonpath
14186 (lambda _
14187 (setenv "PYTHONPATH"
14188 (string-append
14189 (getcwd) "/test/"
14190 ":" (getenv "PYTHONPATH")))
14191 #t)))))
14192 (home-page
14193 "https://github.com/eliben/pyelftools")
14194 (synopsis
14195 "Analyze binary and library file information")
14196 (description "This Python library provides interfaces for parsing and
14197 analyzing two binary and library file formats; the Executable and Linking
14198 Format (ELF), and debugging information in the Debugging With Attributed
14199 Record Format (DWARF).")
14200 (license license:public-domain)))
14201
14202 (define-public python-pyev
14203 (package
14204 (name "python-pyev")
14205 (version "0.9.0")
14206 (source
14207 (origin
14208 (method url-fetch)
14209 (uri (pypi-uri "pyev" version))
14210 (sha256
14211 (base32
14212 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14213 (build-system python-build-system)
14214 (arguments
14215 `(#:tests? #f ; no test suite
14216 #:phases
14217 (modify-phases %standard-phases
14218 (add-after 'unpack 'patch
14219 (lambda* (#:key inputs #:allow-other-keys)
14220 (let ((libev (string-append (assoc-ref inputs "libev")
14221 "/lib/libev.so.4")))
14222 (substitute* "setup.py"
14223 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14224 (string-append "libev_dll_name = \"" libev "\"")))))))))
14225 (inputs
14226 `(("libev" ,libev)))
14227 (home-page "http://pythonhosted.org/pyev/")
14228 (synopsis "Python libev interface")
14229 (description "Pyev provides a Python interface to libev.")
14230 (license license:gpl3)))
14231
14232 (define-public python2-pyev
14233 (package-with-python2 python-pyev))
14234
14235 (define-public python-imagesize
14236 (package
14237 (name "python-imagesize")
14238 (version "1.2.0")
14239 (source
14240 (origin
14241 (method url-fetch)
14242 (uri (pypi-uri "imagesize" version))
14243 (sha256
14244 (base32
14245 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14246 (build-system python-build-system)
14247 (home-page "https://github.com/shibukawa/imagesize_py")
14248 (synopsis "Gets image size of files in various formats in Python")
14249 (description
14250 "This package allows determination of image size from
14251 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14252 (license license:expat)))
14253
14254 (define-public python2-imagesize
14255 (package-with-python2 python-imagesize))
14256
14257 (define-public python-termstyle
14258 (package
14259 (name "python-termstyle")
14260 (version "0.1.11")
14261 (source
14262 (origin
14263 (method url-fetch)
14264 (uri (pypi-uri "termstyle" version))
14265 (sha256
14266 (base32
14267 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14268 (build-system python-build-system)
14269 (arguments
14270 '(#:phases
14271 (modify-phases %standard-phases
14272 (replace 'check
14273 (lambda _
14274 (invoke "python" "test3.py"))))))
14275 (home-page "https://github.com/gfxmonk/termstyle")
14276 (synopsis "Console text coloring for Python")
14277 (description "This package provides console text coloring for Python.")
14278 (license license:bsd-3)))
14279
14280 (define-public python-argcomplete
14281 (package
14282 (name "python-argcomplete")
14283 (version "1.11.1")
14284 (source
14285 (origin
14286 (method url-fetch)
14287 (uri (pypi-uri "argcomplete" version))
14288 (sha256
14289 (base32
14290 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14291 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14292 (build-system python-build-system)
14293 (native-inputs
14294 `(("python-coverage" ,python-coverage)
14295 ("python-flake8" ,python-flake8)
14296 ("python-pexpect" ,python-pexpect)
14297 ("python-wheel" ,python-wheel)
14298 ("tcsh" ,tcsh)
14299 ("fish" ,fish)
14300 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14301 (home-page "https://github.com/kislyuk/argcomplete")
14302 (synopsis "Shell tab completion for Python argparse")
14303 (description "argcomplete provides extensible command line tab completion
14304 of arguments and options for Python scripts using @code{argparse}. It's
14305 particularly useful for programs with many options or sub-parsers that can
14306 dynamically suggest completions; for example, when browsing resources over the
14307 network.")
14308 (license license:asl2.0)))
14309
14310 (define-public python2-argcomplete
14311 (package-with-python2 python-argcomplete))
14312
14313 (define-public python-csscompressor
14314 (package
14315 (name "python-csscompressor")
14316 (version "0.9.5")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (pypi-uri "csscompressor" version))
14321 (sha256
14322 (base32
14323 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14324 (build-system python-build-system)
14325 (arguments
14326 '(#:phases
14327 (modify-phases %standard-phases
14328 (replace 'check
14329 (lambda _
14330 (invoke "py.test"))))))
14331 (native-inputs
14332 `(("python-pytest" ,python-pytest)))
14333 (home-page "https://github.com/sprymix/csscompressor")
14334 (synopsis "Python port of YUI CSS Compressor")
14335 (description
14336 "This package provides a python port of YUI CSS Compressor.")
14337 (license license:bsd-3)))
14338
14339 (define-public python-rcssmin
14340 (package
14341 (name "python-rcssmin")
14342 (version "1.0.6")
14343 (source
14344 (origin
14345 (method url-fetch)
14346 (uri (pypi-uri "rcssmin" version))
14347 (sha256
14348 (base32
14349 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14350 (build-system python-build-system)
14351 (arguments
14352 '(#:phases
14353 (modify-phases %standard-phases
14354 (replace 'check
14355 (lambda _
14356 (invoke "python" "run_tests.py" "tests"))))))
14357 (home-page "http://opensource.perlig.de/rcssmin/")
14358 (synopsis "CSS Minifier")
14359 (description "The minifier is based on the semantics of the YUI compressor,
14360 which itself is based on the rule list by Isaac Schlueter.")
14361 (license license:asl2.0)))
14362
14363 (define-public python-rjsmin
14364 (package
14365 (name "python-rjsmin")
14366 (version "1.1.0")
14367 (source
14368 (origin
14369 (method url-fetch)
14370 (uri (pypi-uri "rjsmin" version))
14371 (sha256
14372 (base32
14373 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14374 (modules '((guix build utils)))
14375 (snippet
14376 '(begin
14377 (for-each delete-file (find-files "bench" "\\.js$"))
14378 #t))))
14379 (build-system python-build-system)
14380 (arguments
14381 '(#:tests? #f ; Not all test files included.
14382 #:phases
14383 (modify-phases %standard-phases
14384 (replace 'check
14385 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14386 (add-installed-pythonpath inputs outputs)
14387 (if tests?
14388 (invoke "py.test" "-vv" "tests")
14389 #t))))))
14390 (native-inputs
14391 `(("python-pytest" ,python-pytest)))
14392 (home-page "http://opensource.perlig.de/rjsmin/")
14393 (synopsis "Javascript Minifier")
14394 (description "@code{rJSmin} is a javascript minifier written in Python. The
14395 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14396 is a re-implementation aiming for speed, so it can be used at runtime (rather
14397 than during a preprocessing step).")
14398 (license license:asl2.0)))
14399
14400 (define-public python-xopen
14401 (package
14402 (name "python-xopen")
14403 (version "0.5.0")
14404 (source
14405 (origin
14406 (method url-fetch)
14407 (uri (pypi-uri "xopen" version))
14408 (sha256
14409 (base32
14410 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14411 (build-system python-build-system)
14412 (propagated-inputs
14413 `(("python-setuptools-scm" ,python-setuptools-scm)))
14414 (home-page "https://github.com/marcelm/xopen/")
14415 (synopsis "Open compressed files transparently")
14416 (description "This module provides an @code{xopen} function that works like
14417 Python's built-in @code{open} function, but can also deal with compressed files.
14418 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14419 recognized by their file extensions. The focus is on being as efficient as
14420 possible on all supported Python versions.")
14421 (license license:expat)))
14422
14423 (define-public python2-xopen
14424 (let ((base (package-with-python2
14425 (strip-python2-variant python-xopen))))
14426 (package
14427 (inherit base)
14428 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14429 ,@(package-propagated-inputs base))))))
14430
14431 (define-public python-cheetah
14432 (package
14433 (name "python-cheetah")
14434 (version "3.2.4")
14435 (source
14436 (origin
14437 (method url-fetch)
14438 (uri (pypi-uri "Cheetah3" version))
14439 (sha256
14440 (base32
14441 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14442 (build-system python-build-system)
14443 (arguments
14444 `(#:modules ((guix build utils)
14445 (guix build python-build-system)
14446 (ice-9 ftw)
14447 (srfi srfi-1)
14448 (srfi srfi-26))
14449 #:phases (modify-phases %standard-phases
14450 (add-after 'unpack 'use-absolute-python
14451 (lambda _
14452 (substitute* "Cheetah/CheetahWrapper.py"
14453 (("#!/usr/bin/env python")
14454 (string-append "#!" (which "python"))))
14455 #t))
14456 (add-after 'unpack 'fix-tests
14457 (lambda _
14458 (substitute* "Cheetah/Tests/ImportHooks.py"
14459 (("os.path.dirname\\(__file__\\)")
14460 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14461 #t))
14462 (replace 'check
14463 (lambda _
14464 (let ((cwd (getcwd)))
14465 (setenv "PYTHONPATH"
14466 (string-append
14467 cwd "/build/"
14468 (find (cut string-prefix? "lib" <>)
14469 (scandir (string-append cwd "/build")))
14470 ":" (getenv "PYTHONPATH")))
14471 (setenv "PATH"
14472 (string-append (getenv "PATH")
14473 ":" cwd "/bin"))
14474 (setenv "TMPDIR" "/tmp")
14475
14476 (substitute* "Cheetah/Tests/Test.py"
14477 (("unittest.TextTestRunner\\(\\)")
14478 "unittest.TextTestRunner(verbosity=2)"))
14479
14480 (invoke "python" "Cheetah/Tests/Test.py")))))))
14481 (propagated-inputs
14482 `(("python-markdown" ,python-markdown))) ;optional
14483 (home-page "https://cheetahtemplate.org/")
14484 (synopsis "Template engine")
14485 (description "Cheetah is a text-based template engine and Python code
14486 generator.
14487
14488 Cheetah can be used as a standalone templating utility or referenced as
14489 a library from other Python applications. It has many potential uses,
14490 but web developers looking for a viable alternative to ASP, JSP, PHP and
14491 PSP are expected to be its principle user group.
14492
14493 Features:
14494 @enumerate
14495 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14496 text-based format.
14497 @item Cleanly separates content, graphic design, and program code.
14498 @item Blends the power and flexibility of Python with a simple template language
14499 that non-programmers can understand.
14500 @item Gives template writers full access to any Python data structure, module,
14501 function, object, or method in their templates.
14502 @item Makes code reuse easy by providing an object-orientated interface to
14503 templates that is accessible from Python code or other Cheetah templates.
14504 One template can subclass another and selectively reimplement sections of it.
14505 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14506 improve the performance of a dynamic website.
14507 @item Compiles templates into optimized, yet readable, Python code.
14508 @end enumerate")
14509 (license (license:x11-style "file://LICENSE"))))
14510
14511 (define-public python2-cheetah
14512 (package-with-python2 python-cheetah))
14513
14514 (define-public python-dulwich
14515 (package
14516 (name "python-dulwich")
14517 (version "0.19.16")
14518 (source
14519 (origin
14520 (method url-fetch)
14521 (uri (list (string-append "https://www.dulwich.io/releases/"
14522 "dulwich-" version ".tar.gz")
14523 (pypi-uri "dulwich" version)))
14524 (sha256
14525 (base32
14526 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14527 (build-system python-build-system)
14528 (arguments
14529 `(#:phases
14530 (modify-phases %standard-phases
14531 (add-before 'check 'fix-tests
14532 (lambda* (#:key inputs #:allow-other-keys)
14533 ;; The tests use Popen with a custom environment which doesn't
14534 ;; include PATH.
14535 (substitute* "dulwich/tests/compat/utils.py"
14536 (("'git'") (string-append "'"
14537 (which "git")
14538 "'")))
14539 (substitute* '("dulwich/tests/test_repository.py"
14540 "dulwich/tests/test_hooks.py")
14541 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14542 (setenv "TEST_RUNNER" "unittest")
14543 (setenv "PYTHONHASHSEED" "random")
14544 #t)))))
14545 (propagated-inputs
14546 `(("python-fastimport" ,python-fastimport)
14547 ("python-urllib3" ,python-urllib3)))
14548 (native-inputs
14549 `(("python-mock" ,python-mock)
14550 ("python-geventhttpclient" ,python-geventhttpclient)
14551 ("git" ,git)))
14552 (home-page "https://www.dulwich.io/")
14553 (synopsis "Git implementation in Python")
14554 (description "Dulwich is an implementation of the Git file formats and
14555 protocols written in pure Python.")
14556 ;; Can be used with either license.
14557 (license (list license:asl2.0 license:gpl2+))))
14558
14559 (define-public python2-dulwich
14560 (package-with-python2 python-dulwich))
14561
14562 (define-public python-pbkdf2
14563 (package
14564 (name "python-pbkdf2")
14565 (version "1.3")
14566 (source
14567 (origin
14568 (method url-fetch)
14569 (uri (pypi-uri "pbkdf2" version))
14570 (sha256
14571 (base32
14572 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14573 (build-system python-build-system)
14574 (arguments
14575 '(#:phases
14576 (modify-phases %standard-phases
14577 (replace 'check
14578 (lambda _
14579 (setenv "PYTHONPATH"
14580 (string-append (getcwd) "/build/lib:"
14581 (getenv "PYTHONPATH")))
14582 (invoke "python" "test/test_pbkdf2.py"))))))
14583 (propagated-inputs
14584 `(("python-pycrypto" ,python-pycrypto))) ; optional
14585 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14586 (synopsis "Password-based key derivation")
14587 (description "This module implements the password-based key derivation
14588 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14589
14590 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14591 is part of the RSA Public Key Cryptography Standards series. The provided
14592 implementation takes a password or a passphrase and a salt value (and
14593 optionally a iteration count, a digest module, and a MAC module) and provides
14594 a file-like object from which an arbitrarily-sized key can be read.")
14595 (license license:expat)))
14596
14597 (define-public python2-pbkdf2
14598 (package-with-python2 python-pbkdf2))
14599
14600 (define-public python-qrcode
14601 (package
14602 (name "python-qrcode")
14603 (version "6.1")
14604 (source
14605 (origin
14606 (method url-fetch)
14607 (uri (pypi-uri "qrcode" version))
14608 (sha256
14609 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14610 (build-system python-build-system)
14611 (arguments
14612 ;; FIXME: Tests require packaging 'pymaging'.
14613 '(#:tests? #f))
14614 (propagated-inputs
14615 `(("python-lxml" ,python-lxml) ; for SVG output
14616 ("python-pillow" ,python-pillow) ; for PNG output
14617 ("python-six" ,python-six)))
14618 (home-page "https://github.com/lincolnloop/python-qrcode")
14619 (synopsis "QR Code image generator")
14620 (description "This package provides a pure Python QR Code generator
14621 module. It uses the Python Imaging Library (PIL) to allow for the generation
14622 of QR Codes.
14623
14624 In addition this package provides a command line tool to generate QR codes and
14625 either write these QR codes to a file or do the output as ascii art at the
14626 console.")
14627 (license license:bsd-3)))
14628
14629 (define-public python2-qrcode
14630 (package-with-python2 python-qrcode))
14631
14632 (define-public python-rst2ansi
14633 (package
14634 (name "python-rst2ansi")
14635 (version "0.1.5")
14636 (source
14637 (origin
14638 (method url-fetch)
14639 (uri (pypi-uri "rst2ansi" version))
14640 (sha256
14641 (base32
14642 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14643 (build-system python-build-system)
14644 (propagated-inputs
14645 `(("python-docutils" ,python-docutils)))
14646 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14647 (synopsis "Convert RST to ANSI-decorated console output")
14648 (description
14649 "Python module dedicated to rendering RST (reStructuredText) documents
14650 to ansi-escaped strings suitable for display in a terminal.")
14651 (license license:expat)))
14652
14653 (define-public python-ansi2html
14654 (package
14655 (name "python-ansi2html")
14656 (version "1.2.0")
14657 (source
14658 (origin
14659 (method url-fetch)
14660 (uri (pypi-uri "ansi2html" version))
14661 (sha256
14662 (base32
14663 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14664 (build-system python-build-system)
14665 (native-inputs
14666 `(("python-mock" ,python-mock)
14667 ("python-nose" ,python-nose)))
14668 (propagated-inputs
14669 `(("python-six" ,python-six)))
14670 (home-page "https://github.com/ralphbean/ansi2html")
14671 (synopsis "Convert ANSI-decorated console output to HTML")
14672 (description
14673 "@command{ansi2html} is a Python library and command line utility for
14674 converting text with ANSI color codes to HTML or LaTeX.")
14675 (license license:gpl3+)))
14676
14677 (define-public python2-ansi2html
14678 (package-with-python2 python-ansi2html))
14679
14680 (define-public python-ddt
14681 (package
14682 (name "python-ddt")
14683 (version "1.1.3")
14684 (source
14685 (origin
14686 (method url-fetch)
14687 (uri (pypi-uri "ddt" version))
14688 (sha256
14689 (base32
14690 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
14691 (build-system python-build-system)
14692 (native-inputs
14693 `(("python-mock" ,python-mock)
14694 ("python-nose" ,python-nose)))
14695 (propagated-inputs
14696 `(("python-six" ,python-six)
14697 ("python-pyyaml" ,python-pyyaml)))
14698 (home-page "https://github.com/txels/ddt")
14699 (synopsis "Data-Driven Tests")
14700 (description
14701 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14702 running it with different test data, and make it appear as multiple test
14703 cases.")
14704 (license license:expat)))
14705
14706 (define-public python2-ddt
14707 (package-with-python2 python-ddt))
14708
14709 (define-public python-pycountry
14710 (package
14711 (name "python-pycountry")
14712 (version "18.5.26")
14713 (source
14714 (origin
14715 (method url-fetch)
14716 (uri (pypi-uri "pycountry" version))
14717 (sha256
14718 (base32
14719 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14720 (build-system python-build-system)
14721 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14722 (synopsis "ISO databases for languages, countries, currencies, etc.")
14723 (description
14724 "@code{pycountry} provides the ISO databases for the standards:
14725 @enumerate
14726 @item 639-3 (Languages)
14727 @item 3166 (Countries)
14728 @item 3166-3 (Deleted Countries)
14729 @item 3166-2 (Subdivisions of countries)
14730 @item 4217 (Currencies)
14731 @item 15924 (Scripts)
14732 @end enumerate
14733 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14734 through a Python API.")
14735 (license license:lgpl2.1+)))
14736
14737 (define-public python2-pycountry
14738 (package-with-python2 python-pycountry))
14739
14740 (define-public python-pycosat
14741 (package
14742 (name "python-pycosat")
14743 (version "0.6.3")
14744 (source
14745 (origin
14746 (method url-fetch)
14747 (uri (pypi-uri "pycosat" version ".zip"))
14748 (sha256
14749 (base32
14750 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14751 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14752 (build-system python-build-system)
14753 (native-inputs
14754 `(("unzip" ,unzip)))
14755 (home-page "https://github.com/ContinuumIO/pycosat")
14756 (synopsis "Bindings to picosat (a SAT solver)")
14757 (description
14758 "This package provides efficient Python bindings to @code{picosat} on
14759 the C level. When importing pycosat, the @code{picosat} solver becomes part
14760 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14761 Problem} (SAT) solver.")
14762 (license license:expat)))
14763
14764 (define-public python2-pycosat
14765 (package-with-python2 python-pycosat))
14766
14767 (define-public python2-ruamel.ordereddict
14768 (package
14769 (name "python2-ruamel.ordereddict")
14770 (version "0.4.9")
14771 (source
14772 (origin
14773 (method url-fetch)
14774 (uri (pypi-uri "ruamel.ordereddict" version))
14775 (sha256
14776 (base32
14777 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14778 (build-system python-build-system)
14779 (arguments
14780 `(#:python ,python-2
14781 #:phases
14782 (modify-phases %standard-phases
14783 (delete 'check)
14784 (add-after 'install 'check
14785 (lambda* (#:key inputs outputs #:allow-other-keys)
14786 (add-installed-pythonpath inputs outputs)
14787 (invoke "python" "test/testordereddict.py"))))))
14788 (home-page "https://bitbucket.org/ruamel/ordereddict")
14789 (synopsis "Version of dict that keeps keys in insertion order")
14790 (description
14791 "This is an implementation of an ordered dictionary with @dfn{Key
14792 Insertion Order} (KIO: updates of values do not affect the position of the
14793 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14794 removed and put at the back). The standard library module @code{OrderedDict},
14795 implemented later, implements a subset of @code{ordereddict} functionality.
14796 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14797 Order} (KSO, no sorting function can be specified, but a transform can be
14798 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14799 (license license:expat)))
14800
14801 (define-public python-pypeg2
14802 (package
14803 (name "python-pypeg2")
14804 (version "2.15.2")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "pyPEG2" version))
14809 (sha256
14810 (base32
14811 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14812 (build-system python-build-system)
14813 (propagated-inputs `(("python-lxml" ,python-lxml)))
14814 (arguments
14815 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14816 '(#:tests? #f))
14817 (home-page "https://fdik.org/pyPEG/")
14818 (synopsis "Parsering Expression Grammars in Python")
14819 (description "PyPEG is an intrinsic parser interpreter framework for
14820 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14821 parse many formal languages.")
14822 (license license:gpl2)))
14823
14824 (define-public python-incremental
14825 (package
14826 (name "python-incremental")
14827 (version "17.5.0")
14828 (source
14829 (origin
14830 (method url-fetch)
14831 (uri (pypi-uri "incremental" version))
14832 (sha256
14833 (base32
14834 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14835 (build-system python-build-system)
14836 (home-page "https://github.com/hawkowl/incremental")
14837 (synopsis "Library for versioning Python projects")
14838 (description "Incremental is a small library that versions your Python
14839 projects.")
14840 (license license:expat)))
14841
14842 (define-public python2-incremental
14843 (package-with-python2 python-incremental))
14844
14845 (define-public python-invoke
14846 (package
14847 (name "python-invoke")
14848 (home-page "https://www.pyinvoke.org/")
14849 (version "1.4.1")
14850 (source (origin
14851 (method url-fetch)
14852 (uri (pypi-uri "invoke" version))
14853 (sha256
14854 (base32
14855 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
14856 (build-system python-build-system)
14857 (arguments
14858 ;; XXX: Requires many dependencies that are not yet in Guix.
14859 `(#:tests? #f))
14860 (synopsis "Pythonic task execution")
14861 (description
14862 "Invoke is a Python task execution tool and library, drawing inspiration
14863 from various sources to arrive at a powerful and clean feature set. It is
14864 evolved from the Fabric project, but focuses on local and abstract concerns
14865 instead of servers and network commands.")
14866 (license license:bsd-3)))
14867
14868 (define-public python2-invoke
14869 (package-with-python2 python-invoke))
14870
14871 (define-public python-automat
14872 (package
14873 (name "python-automat")
14874 (version "20.2.0")
14875 (source (origin
14876 (method url-fetch)
14877 (uri (pypi-uri "Automat" version))
14878 (sha256
14879 (base32
14880 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
14881 (build-system python-build-system)
14882 ;; We disable the tests because they require python-twisted, while
14883 ;; python-twisted depends on python-automat. Twisted is optional, but the
14884 ;; tests fail if it is not available. Also see
14885 ;; <https://github.com/glyph/automat/issues/71>.
14886 (arguments '(#:tests? #f))
14887 (native-inputs
14888 `(("python-m2r" ,python-m2r)
14889 ("python-setuptools-scm" ,python-setuptools-scm)
14890 ("python-graphviz" ,python-graphviz)))
14891 (propagated-inputs
14892 `(("python-six" ,python-six)
14893 ("python-attrs" ,python-attrs)))
14894 (home-page "https://github.com/glyph/Automat")
14895 (synopsis "Self-service finite-state machines")
14896 (description "Automat is a library for concise, idiomatic Python
14897 expression of finite-state automata (particularly deterministic finite-state
14898 transducers).")
14899 (license license:expat)))
14900
14901 (define-public python2-automat
14902 (package-with-python2 python-automat))
14903
14904 (define-public python-m2r
14905 (package
14906 (name "python-m2r")
14907 (version "0.2.1")
14908 (source (origin
14909 (method url-fetch)
14910 (uri (pypi-uri "m2r" version))
14911 (sha256
14912 (base32
14913 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
14914 (build-system python-build-system)
14915 (propagated-inputs
14916 `(("python-docutils" ,python-docutils)
14917 ("python-mistune" ,python-mistune)))
14918 (native-inputs
14919 `(("python-pygments" ,python-pygments)
14920 ("python-mock" ,python-mock)))
14921 (home-page "https://github.com/miyakogi/m2r")
14922 (synopsis "Markdown to reStructuredText converter")
14923 (description "M2R converts a markdown file including reST markups to valid
14924 reST format.")
14925 (license license:expat)))
14926
14927 (define-public python2-m2r
14928 (package-with-python2 python-m2r))
14929
14930 (define-public python-constantly
14931 (package
14932 (name "python-constantly")
14933 (version "15.1.0")
14934 (source (origin
14935 (method url-fetch)
14936 (uri (pypi-uri "constantly" version))
14937 (sha256
14938 (base32
14939 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14940 (build-system python-build-system)
14941 (home-page "https://github.com/twisted/constantly")
14942 (synopsis "Symbolic constants in Python")
14943 (description "Constantly is a Python library that provides symbolic
14944 constant support. It includes collections and constants with text, numeric,
14945 and bit flag values.")
14946 (license license:expat)))
14947
14948 (define-public python2-constantly
14949 (package-with-python2 python-constantly))
14950
14951 (define-public python-attrs
14952 (package
14953 (name "python-attrs")
14954 (version "19.3.0")
14955 (source (origin
14956 (method url-fetch)
14957 (uri (pypi-uri "attrs" version))
14958 (sha256
14959 (base32
14960 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
14961 (build-system python-build-system)
14962 (arguments
14963 `(#:modules ((guix build utils)
14964 (guix build python-build-system)
14965 (ice-9 ftw)
14966 (srfi srfi-1)
14967 (srfi srfi-26))
14968 #:phases (modify-phases %standard-phases
14969 (replace 'check
14970 (lambda _
14971 (let ((cwd (getcwd)))
14972 (setenv "PYTHONPATH"
14973 (string-append
14974 cwd "/build/"
14975 (find (cut string-prefix? "lib" <>)
14976 (scandir (string-append cwd "/build")))
14977 ":"
14978 (getenv "PYTHONPATH")))
14979 (invoke "python" "-m" "pytest")))))))
14980 (native-inputs
14981 `(("python-coverage" ,python-coverage)
14982 ("python-hypothesis" ,python-hypothesis)
14983 ("python-pympler" ,python-pympler)
14984 ("python-pytest" ,python-pytest)
14985 ("python-six" ,python-six)
14986 ("python-sphinx" ,python-sphinx)
14987 ("python-zope-interface" ,python-zope-interface)))
14988 (home-page "https://github.com/python-attrs/attrs/")
14989 (synopsis "Attributes without boilerplate")
14990 (description "@code{attrs} is a Python package with class decorators that
14991 ease the chores of implementing the most common attribute-related object
14992 protocols.")
14993 (license license:expat)))
14994
14995 (define-public python2-attrs
14996 (package-with-python2 python-attrs))
14997
14998 (define-public python-attrs-bootstrap
14999 (package
15000 (inherit python-attrs)
15001 (name "python-attrs-bootstrap")
15002 (native-inputs `())
15003 (arguments `(#:tests? #f))))
15004
15005 (define-public python2-attrs-bootstrap
15006 (package-with-python2 python-attrs-bootstrap))
15007
15008 (define-public python2-cliapp
15009 (package
15010 (name "python2-cliapp")
15011 (version "1.20180812.1")
15012 (source
15013 (origin
15014 (method url-fetch)
15015 (uri (string-append
15016 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15017 version ".tar.gz"))
15018 (sha256
15019 (base32
15020 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15021 (build-system python-build-system)
15022 (arguments
15023 `(#:python ,python-2
15024 #:phases
15025 (modify-phases %standard-phases
15026 ;; check phase needs to be run before the build phase. If not,
15027 ;; coverage-test-runner looks for tests for the built source files,
15028 ;; and fails.
15029 (delete 'check)
15030 (add-before 'build 'check
15031 (lambda _
15032 ;; Disable python3 tests
15033 (substitute* "check"
15034 (("python3") "# python3"))
15035 (invoke "./check"))))))
15036 (native-inputs
15037 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15038 ("python2-pep8" ,python2-pep8)))
15039 (propagated-inputs
15040 `(("python2-pyaml" ,python2-pyaml)))
15041 (home-page "https://liw.fi/cliapp/")
15042 (synopsis "Python framework for command line programs")
15043 (description "@code{python2-cliapp} is a python framework for
15044 command line programs. It contains the typical stuff such programs
15045 need to do, such as parsing the command line for options, and
15046 iterating over input files.")
15047 (license license:gpl2+)))
15048
15049 (define-public python2-ttystatus
15050 (package
15051 (name "python2-ttystatus")
15052 (version "0.38")
15053 (source
15054 (origin
15055 (method git-fetch)
15056 (uri (git-reference
15057 (url "http://git.liw.fi/ttystatus")
15058 ;; There are no tags after ttystatus-0.36.
15059 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15060 (sha256
15061 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15062 (file-name (git-file-name name version))))
15063 (build-system python-build-system)
15064 (native-inputs
15065 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15066 ("python2-pep8" ,python2-pep8)))
15067 (arguments
15068 `(#:python ,python-2
15069 #:phases
15070 (modify-phases %standard-phases
15071 ;; check phase needs to be run before the build phase. If not,
15072 ;; coverage-test-runner looks for tests for the built source files,
15073 ;; and fails.
15074 (delete 'check)
15075 (add-before 'build 'check
15076 (lambda _ (invoke "make" "check"))))))
15077 (home-page "https://liw.fi/ttystatus/")
15078 (synopsis "Python library for showing progress reporting and
15079 status updates on terminals")
15080 (description "@code{python2-ttystatus} is a python library for
15081 showing progress reporting and status updates on terminals, for
15082 command line programs. Output is automatically adapted to the width
15083 of the terminal: truncated if it does not fit, and resized if the
15084 terminal size changes.")
15085 (license license:gpl3+)))
15086
15087 (define-public python2-tracing
15088 (package
15089 (name "python2-tracing")
15090 (version "0.10")
15091 (source
15092 (origin
15093 (method url-fetch)
15094 (uri (string-append
15095 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15096 version ".tar.gz"))
15097 (sha256
15098 (base32
15099 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15100 (build-system python-build-system)
15101 (arguments
15102 `(#:python ,python-2))
15103 (home-page "https://liw.fi/tracing/")
15104 (synopsis "Python debug logging helper")
15105 (description "@code{python2-tracing} is a python library for
15106 logging debug messages. It provides a way to turn debugging messages
15107 on and off, based on the filename they occur in. It is much faster
15108 than using @code{logging.Filter} to accomplish the same thing, which
15109 matters when code is run in production mode. The actual logging still
15110 happens using the @code{logging} library.")
15111 (license license:gpl3+)))
15112
15113 (define-public python2-larch
15114 (package
15115 (name "python2-larch")
15116 (version "1.20151025")
15117 (source
15118 (origin
15119 (method url-fetch)
15120 (uri (string-append
15121 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15122 version ".tar.gz"))
15123 (patches (search-patches
15124 "python2-larch-coverage-4.0a6-compatibility.patch"))
15125 (sha256
15126 (base32
15127 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15128 (build-system python-build-system)
15129 (arguments
15130 `(#:python ,python-2
15131 #:phases
15132 (modify-phases %standard-phases
15133 ;; check phase needs to be run before the build phase. If not,
15134 ;; coverage-test-runner looks for tests for the built source files,
15135 ;; and fails.
15136 (delete 'check)
15137 (add-before 'build 'check
15138 (lambda _ (invoke "make" "check"))))))
15139 (native-inputs
15140 `(("cmdtest" ,cmdtest)
15141 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15142 (propagated-inputs
15143 `(("python2-tracing" ,python2-tracing)))
15144 (home-page "https://liw.fi/larch/")
15145 (synopsis "Python copy-on-write B-tree library")
15146 (description "@code{python2-larch} is an implementation of
15147 particular kind of B-tree, based on research by Ohad Rodeh. See
15148 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15149 on the data structure.
15150
15151 The distinctive feature of this B-tree is that a node is never
15152 (conceptually) modified. Instead, all updates are done by
15153 copy-on-write. This makes it easy to clone a tree, and modify only the
15154 clone, while other processes access the original tree.")
15155 (license license:gpl3+)))
15156
15157 (define-public python-astroid
15158 (package
15159 (name "python-astroid")
15160 (version "2.4.2")
15161 (source
15162 (origin
15163 (method url-fetch)
15164 (uri (pypi-uri "astroid" version))
15165 (sha256
15166 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15167 (modules '((guix build utils)))
15168 (snippet
15169 '(begin
15170 ;; Check to see if the version pinning has been removed.
15171 (substitute* "astroid/__pkginfo__.py"
15172 (("==1\\.4\\.\\*") ">=1.4.0"))
15173 #t))))
15174 (build-system python-build-system)
15175 (propagated-inputs
15176 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15177 ("python-six" ,python-six)
15178 ("python-wrapt" ,python-wrapt)))
15179 (native-inputs
15180 `(("python-dateutil" ,python-dateutil)
15181 ("python-pytest" ,python-pytest)
15182 ("python-pytest-runner" ,python-pytest-runner)))
15183 (home-page "https://github.com/PyCQA/astroid")
15184 (synopsis "Common base representation of python source code for pylint and
15185 other projects")
15186 (description "@code{python-astroid} provides a common base representation
15187 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15188
15189 It provides a compatible representation which comes from the _ast module. It
15190 rebuilds the tree generated by the builtin _ast module by recursively walking
15191 down the AST and building an extended ast. The new node classes have
15192 additional methods and attributes for different usages. They include some
15193 support for static inference and local name scopes. Furthermore, astroid
15194 builds partial trees by inspecting living objects.")
15195 (license license:lgpl2.1+)
15196 (properties `((python2-variant . ,(delay python2-astroid))))))
15197
15198 (define-public python2-astroid
15199 (let ((base (package-with-python2
15200 (strip-python2-variant python-astroid))))
15201 (package (inherit base)
15202 ;; Version 2.x removes python2 support.
15203 (version "1.6.5")
15204 (source
15205 (origin
15206 (method url-fetch)
15207 (uri (pypi-uri "astroid" version))
15208 (sha256
15209 (base32
15210 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15211 (arguments
15212 (substitute-keyword-arguments (package-arguments base)
15213 ((#:phases phases)
15214 `(modify-phases ,phases
15215 (add-after 'unpack 'remove-spurious-test
15216 (lambda _
15217 ;; https://github.com/PyCQA/astroid/issues/276
15218 (delete-file "astroid/tests/unittest_brain.py")
15219 #t))
15220 (replace 'check
15221 (lambda _
15222 (invoke"python" "-m" "unittest" "discover"
15223 "-p" "unittest*.py")))))))
15224 (native-inputs `())
15225 (propagated-inputs
15226 `(("python2-backports-functools-lru-cache"
15227 ,python2-backports-functools-lru-cache)
15228 ("python2-enum34" ,python2-enum34)
15229 ("python2-singledispatch" ,python2-singledispatch)
15230 ,@(alist-delete "python-typed-ast"
15231 (package-propagated-inputs base)))))))
15232
15233 (define-public python-isbnlib
15234 (package
15235 (name "python-isbnlib")
15236 (version "3.10.3")
15237 (source
15238 (origin
15239 (method url-fetch)
15240 (uri (pypi-uri "isbnlib" version))
15241 (sha256
15242 (base32
15243 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
15244 (build-system python-build-system)
15245 (arguments '(#:tests? #f)) ; No test
15246 (home-page "https://github.com/xlcnd/isbnlib")
15247 (synopsis "Python library to work with ISBN strings")
15248 (description "@code{python-isbnlib} is a (pure) python library that provides
15249 several useful methods and functions to validate, clean, transform, hyphenate and
15250 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15251 version, is suitable to be include as a dependency in other projects.")
15252 (license license:lgpl3+)))
15253
15254 (define-public python-isort
15255 (package
15256 (name "python-isort")
15257 (version "4.3.4")
15258 (source
15259 (origin
15260 (method git-fetch)
15261 (uri (git-reference
15262 ;; Tests pass only from the Github sources
15263 (url "https://github.com/timothycrosley/isort")
15264 (commit version)))
15265 (file-name (git-file-name name version))
15266 (sha256
15267 (base32
15268 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15269 (build-system python-build-system)
15270 (native-inputs
15271 `(("python-mock" ,python-mock)
15272 ("python-pytest" ,python-pytest)))
15273 (home-page "https://github.com/timothycrosley/isort")
15274 (synopsis "Python utility/library to sort python imports")
15275 (description "@code{python-isort} is a python utility/library to sort
15276 imports alphabetically, and automatically separated into sections. It
15277 provides a command line utility, a python library and plugins for various
15278 editors.")
15279 (license license:expat)
15280 (properties `((python2-variant . ,(delay python2-isort))))))
15281
15282 (define-public python2-isort
15283 (let ((base (package-with-python2
15284 (strip-python2-variant python-isort))))
15285 (package (inherit base)
15286 (native-inputs
15287 `(("python2-futures" ,python2-futures)
15288 ,@(package-native-inputs base))))))
15289
15290 (define-public python2-backports-functools-lru-cache
15291 (package
15292 (name "python2-backports-functools-lru-cache")
15293 (version "1.6.1")
15294 (source
15295 (origin
15296 (method url-fetch)
15297 ;; only the pypi tarballs contain the necessary metadata
15298 (uri (pypi-uri "backports.functools_lru_cache" version))
15299 (sha256
15300 (base32
15301 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15302 (build-system python-build-system)
15303 (native-inputs
15304 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15305 (arguments
15306 `(#:python ,python-2))
15307 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15308 (synopsis "Backport of functools.lru_cache from Python 3.3")
15309 (description "@code{python2-backports-functools-lru-cache} is a backport
15310 of @code{functools.lru_cache} from python 3.3.")
15311 (license license:expat)))
15312
15313 (define-public python-configparser
15314 (package
15315 (name "python-configparser")
15316 (version "4.0.2")
15317 (source
15318 (origin
15319 (method url-fetch)
15320 (uri (pypi-uri "configparser" version))
15321 (sha256
15322 (base32
15323 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15324 (native-inputs
15325 `(("python-setuptools_scm" ,python-setuptools-scm)))
15326 (build-system python-build-system)
15327 (home-page "https://github.com/jaraco/configparser/")
15328 (synopsis "Backport of configparser from python 3.5")
15329 (description "@code{python-configparser} is a backport of
15330 @code{configparser} from Python 3.5 so that it can be used directly
15331 in other versions.")
15332 (license license:expat)))
15333
15334 (define-public python2-configparser
15335 (package-with-python2 python-configparser))
15336
15337 (define-public python-mamba
15338 (package
15339 (name "python-mamba")
15340 (version "0.11.1")
15341 (source (origin
15342 (method url-fetch)
15343 (uri (pypi-uri "mamba" version))
15344 (sha256
15345 (base32
15346 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15347 (build-system python-build-system)
15348 (arguments `(#:tests? #f)) ; No test
15349 (propagated-inputs
15350 `(("python-clint" ,python-clint)
15351 ("python-coverage" ,python-coverage)))
15352 (home-page "https://nestorsalceda.com/mamba/")
15353 (synopsis "Test runner for Python")
15354 (description
15355 "Mamba is a Behaviour-Driven Development tool for Python developers.
15356 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15357 (license license:expat)))
15358
15359 (define-public python-mando
15360 (package
15361 (name "python-mando")
15362 (version "0.6.4")
15363 (source (origin
15364 (method url-fetch)
15365 (uri (pypi-uri "mando" version))
15366 (sha256
15367 (base32
15368 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15369 (build-system python-build-system)
15370 (propagated-inputs
15371 `(("python-rst2ansi" ,python-rst2ansi)
15372 ("python-six" ,python-six)))
15373 (native-inputs
15374 `(("python-pytest" ,python-pytest)))
15375 (home-page "https://mando.readthedocs.org/")
15376 (synopsis
15377 "Wrapper around argparse, allowing creation of complete CLI applications")
15378 (description
15379 "This package is a wrapper around argparse, allowing you to write complete CLI
15380 applications in seconds while maintaining all the flexibility.")
15381 (license license:expat)))
15382
15383 (define-public python2-mando
15384 (package-with-python2 python-mando))
15385
15386 (define-public python2-argparse
15387 (package
15388 (name "python2-argparse")
15389 (version "1.4.0")
15390 (source
15391 (origin
15392 (method url-fetch)
15393 (uri (pypi-uri "argparse" version))
15394 (sha256
15395 (base32
15396 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15397 (build-system python-build-system)
15398 (arguments
15399 `(#:python ,python-2))
15400 (home-page "https://github.com/ThomasWaldmann/argparse/")
15401 (synopsis "Python command-line parsing library")
15402 (description
15403 "This package is mostly for people who want to have @code{argparse} on
15404 older Pythons because it was not part of the standard library back then.")
15405 (license license:psfl)))
15406
15407 (define-public python-fudge
15408 (package
15409 (name "python-fudge")
15410 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15411 ;; package, which is currently the only use of this package.
15412 (version "0.9.6")
15413 (source
15414 (origin
15415 (method url-fetch)
15416 (uri (pypi-uri "fudge" version))
15417 (sha256
15418 (base32
15419 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15420 (build-system python-build-system)
15421 (arguments
15422 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15423 (home-page "https://github.com/fudge-py/fudge")
15424 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15425 (description
15426 "Fudge is a Python module for using fake objects (mocks and stubs) to
15427 test real ones.
15428
15429 In readable Python code, you declare the methods available on your fake object
15430 and how they should be called. Then you inject that into your application and
15431 start testing. This declarative approach means you don’t have to record and
15432 playback actions and you don’t have to inspect your fakes after running code.
15433 If the fake object was used incorrectly then you’ll see an informative
15434 exception message with a traceback that points to the culprit.")
15435 (license license:expat)))
15436
15437 (define-public python2-fudge
15438 (package-with-python2 python-fudge))
15439
15440 (define-public python-mwclient
15441 (package
15442 (name "python-mwclient")
15443 (version "0.10.1")
15444 (source
15445 (origin
15446 (method git-fetch)
15447 ;; The PyPI version wouldn't contain tests.
15448 (uri (git-reference
15449 (url "https://github.com/mwclient/mwclient")
15450 (commit (string-append "v" version))))
15451 (file-name (git-file-name name version))
15452 (sha256
15453 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15454 (build-system python-build-system)
15455 (propagated-inputs
15456 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15457 ("python-six" ,python-six)))
15458 (native-inputs
15459 `(("python-mock" ,python-mock)
15460 ("python-pytest" ,python-pytest)
15461 ("python-pytest-cov" ,python-pytest-cov)
15462 ("python-pytest-runner" ,python-pytest-runner)
15463 ("python-responses" ,python-responses)))
15464 (home-page "https://github.com/btongminh/mwclient")
15465 (synopsis "MediaWiki API client")
15466 (description "This package provides a MediaWiki API client.")
15467 (license license:expat)))
15468
15469 (define-public python2-mwclient
15470 (package-with-python2 python-mwclient))
15471
15472 (define-public python-utils
15473 (package
15474 (name "python-utils")
15475 (version "2.4.0")
15476 (source (origin
15477 (method url-fetch)
15478 (uri (pypi-uri "python-utils" version))
15479 (sha256
15480 (base32
15481 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15482 (build-system python-build-system)
15483 (arguments
15484 `(#:phases
15485 (modify-phases %standard-phases
15486 (replace 'check
15487 (lambda* (#:key inputs outputs #:allow-other-keys)
15488 (add-installed-pythonpath inputs outputs)
15489 (delete-file "pytest.ini")
15490 (invoke "pytest" "-vv"))))))
15491 (native-inputs
15492 `(("pytest-runner" ,python-pytest-runner)
15493 ("pytest" ,python-pytest)
15494 ("six" ,python-six)))
15495 (home-page "https://github.com/WoLpH/python-utils")
15496 (synopsis "Convenient utilities not included with the standard Python install")
15497 (description
15498 "Python Utils is a collection of small Python functions and classes which
15499 make common patterns shorter and easier.")
15500 (license license:bsd-2)))
15501
15502 (define-public python2-utils
15503 (package-with-python2 python-utils))
15504
15505 (define-public python-diff-match-patch
15506 (package
15507 (name "python-diff-match-patch")
15508 (version "20121119")
15509 (source
15510 (origin
15511 (method url-fetch)
15512 (uri (pypi-uri "diff-match-patch" version))
15513 (sha256
15514 (base32
15515 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15516 (build-system python-build-system)
15517 (home-page "https://code.google.com/p/google-diff-match-patch")
15518 (synopsis "Synchronize plain text")
15519 (description "Diff Match and Patch libraries offer robust algorithms to
15520 perform the operations required for synchronizing plain text.")
15521 (license license:asl2.0)))
15522
15523 (define-public python2-diff-match-patch
15524 (package-with-python2 python-diff-match-patch))
15525
15526 (define-public python-dirsync
15527 (package
15528 (name "python-dirsync")
15529 (version "2.2.5")
15530 (source
15531 (origin
15532 (method url-fetch)
15533 (uri (pypi-uri "dirsync" version))
15534 (sha256
15535 (base32
15536 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15537 (build-system python-build-system)
15538 (propagated-inputs
15539 `(("six" ,python-six)))
15540 (home-page "https://github.com/tkhyn/dirsync")
15541 (synopsis "Advanced directory tree synchronisation tool")
15542 (description "Advanced directory tree synchronisation tool.")
15543 (license license:expat)))
15544
15545 (define-public python2-dirsync
15546 (package-with-python2 python-dirsync))
15547
15548 (define-public python-levenshtein
15549 (package
15550 (name "python-levenshtein")
15551 (version "0.12.0")
15552 (source
15553 (origin
15554 (method url-fetch)
15555 (uri (pypi-uri "python-Levenshtein" version))
15556 (sha256
15557 (base32
15558 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15559 (build-system python-build-system)
15560 (home-page "https://github.com/ztane/python-Levenshtein")
15561 (synopsis "Fast computation of Levenshtein distance and string similarity")
15562 (description
15563 "The Levenshtein Python C extension module contains functions for fast computation of
15564 @enumerate
15565 @item Levenshtein (edit) distance, and edit operations
15566 @item string similarity
15567 @item approximate median strings, and generally string averaging
15568 @item string sequence and set similarity
15569 @end enumerate
15570 It supports both normal and Unicode strings.")
15571 (license license:gpl2+)))
15572
15573 (define-public python2-levenshtein
15574 (package-with-python2 python-levenshtein))
15575
15576 (define-public python-scandir
15577 (package
15578 (name "python-scandir")
15579 (version "1.10.0")
15580 (source
15581 (origin
15582 (method url-fetch)
15583 (uri (pypi-uri "scandir" version))
15584 (sha256
15585 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15586 (build-system python-build-system)
15587 (arguments
15588 `(#:phases (modify-phases %standard-phases
15589 (replace 'check
15590 (lambda _
15591 (invoke "python" "test/run_tests.py"))))))
15592 (home-page "https://github.com/benhoyt/scandir")
15593 (synopsis "Directory iteration function")
15594 (description
15595 "Directory iteration function like os.listdir(), except that instead of
15596 returning a list of bare filenames, it yields DirEntry objects that include
15597 file type and stat information along with the name. Using scandir() increases
15598 the speed of os.walk() by 2-20 times (depending on the platform and file
15599 system) by avoiding unnecessary calls to os.stat() in most cases.
15600
15601 This package is part of the Python standard library since version 3.5.")
15602 (license license:bsd-3)))
15603
15604 (define-public python2-scandir
15605 (package-with-python2 python-scandir))
15606
15607 (define-public python2-stemming
15608 (package
15609 (name "python2-stemming")
15610 (version "1.0.1")
15611 (source
15612 (origin
15613 (method url-fetch)
15614 (uri (pypi-uri "stemming" version))
15615 (sha256
15616 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15617 (build-system python-build-system)
15618 (arguments
15619 `(#:python ,python-2))
15620 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15621 (synopsis "Python implementations of various stemming algorithms")
15622 (description
15623 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15624 stemming algorithms for English. These implementations are straightforward and
15625 efficient, unlike some Python versions of the same algorithms available on the
15626 Web. This package is an extraction of the stemming code included in the Whoosh
15627 search engine.")
15628 (license license:public-domain)))
15629
15630 (define-public python-factory-boy
15631 (package
15632 (name "python-factory-boy")
15633 (version "2.8.1")
15634 (source
15635 (origin
15636 (method url-fetch)
15637 (uri (pypi-uri "factory_boy" version))
15638 (sha256
15639 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15640 (build-system python-build-system)
15641 (arguments
15642 ;; Tests are not included in the tarball.
15643 `(#:tests? #f))
15644 (propagated-inputs
15645 `(("faker" ,python-faker)))
15646 (home-page "https://github.com/benhoyt/scandir")
15647 (synopsis "Versatile test fixtures replacement")
15648 (description
15649 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15650
15651 As a fixtures replacement tool, it aims to replace static, hard to maintain
15652 fixtures with easy-to-use factories for complex object.
15653
15654 Instead of building an exhaustive test setup with every possible combination
15655 of corner cases, factory_boy allows you to use objects customized for the
15656 current test, while only declaring the test-specific fields")
15657 (license license:expat)))
15658
15659 (define-public python2-factory-boy
15660 (package-with-python2 python-factory-boy))
15661
15662 (define-public python-translate-toolkit
15663 (package
15664 (name "python-translate-toolkit")
15665 (version "2.1.0")
15666 (source
15667 (origin
15668 (method url-fetch)
15669 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15670 (sha256
15671 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15672 (build-system python-build-system)
15673 (native-inputs
15674 `(("python-pytest" ,python-pytest)
15675 ("python-sphinx" ,python-sphinx)))
15676 (propagated-inputs
15677 `(("python-babel" ,python-babel)
15678 ("python-beautifulsoup4" ,python-beautifulsoup4)
15679 ("python-chardet" ,python-chardet)
15680 ("python-diff-match-patch" ,python-diff-match-patch)
15681 ("python-levenshtein" ,python-levenshtein)
15682 ("python-lxml" ,python-lxml)
15683 ("python-six" ,python-six)
15684 ("python-vobject" ,python-vobject)
15685 ("python-pyyaml" ,python-pyyaml)))
15686 (arguments
15687 ;; TODO: tests are not run, because they end with
15688 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15689 ;; 'parse_funcs'
15690 ;; during test setup.
15691 `(#:tests? #f))
15692 (home-page "https://toolkit.translatehouse.org")
15693 (synopsis "Tools and API for translation and localization engineering")
15694 (description
15695 "Tools and API for translation and localization engineering. It contains
15696 several utilities, as well as an API for building localization tools.")
15697 (license license:gpl2+)))
15698
15699 (define-public python2-translate-toolkit
15700 (package-with-python2 python-translate-toolkit))
15701
15702 (define-public python-packaging
15703 (package
15704 (name "python-packaging")
15705 (version "20.0")
15706 (source
15707 (origin
15708 (method url-fetch)
15709 (uri (pypi-uri "packaging" version))
15710 ;; XXX: The URL in the patch file is wrong, it should be
15711 ;; <https://github.com/pypa/packaging/pull/256>.
15712 (patches (search-patches "python-packaging-test-arch.patch"))
15713 (sha256
15714 (base32
15715 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15716 (build-system python-build-system)
15717 (arguments
15718 `(#:phases (modify-phases %standard-phases
15719 (replace 'check
15720 (lambda* (#:key tests? #:allow-other-keys)
15721 (if tests?
15722 (invoke "py.test" "-vv")
15723 (format #t "test suite not run~%"))
15724 #t)))))
15725 (native-inputs
15726 `(("python-pretend" ,python-pretend)
15727 ("python-pytest" ,python-pytest)))
15728 (propagated-inputs
15729 `(("python-pyparsing" ,python-pyparsing)
15730 ("python-six" ,python-six)))
15731 (home-page "https://github.com/pypa/packaging")
15732 (synopsis "Core utilities for Python packages")
15733 (description "Packaging is a Python module for dealing with Python packages.
15734 It offers an interface for working with package versions, names, and dependency
15735 information.")
15736 ;; From 'LICENSE': This software is made available under the terms of
15737 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15738 ;; Contributions to this software is made under the terms of *both* these
15739 ;; licenses.
15740 (license (list license:asl2.0 license:bsd-2))))
15741
15742 (define-public python2-packaging
15743 (package-with-python2 python-packaging))
15744
15745 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15746 (define-public python-packaging-bootstrap
15747 (hidden-package
15748 (package/inherit
15749 python-packaging
15750 (name "python-packaging-bootstrap")
15751 (native-inputs '())
15752 (propagated-inputs
15753 `(("python-pyparsing" ,python-pyparsing)))
15754 (arguments '(#:tests? #f)))))
15755
15756 (define-public python2-packaging-bootstrap
15757 (hidden-package
15758 (package/inherit
15759 python2-packaging
15760 (name "python2-packaging-bootstrap")
15761 (native-inputs '())
15762 (propagated-inputs
15763 `(("python-pyparsing" ,python2-pyparsing)))
15764 (arguments
15765 `(#:tests? #f
15766 ,@(package-arguments python2-packaging))))))
15767
15768 (define-public python-relatorio
15769 (package
15770 (name "python-relatorio")
15771 (version "0.8.0")
15772 (source
15773 (origin
15774 (method url-fetch)
15775 (uri (pypi-uri "relatorio" version))
15776 (sha256
15777 (base32
15778 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15779 (build-system python-build-system)
15780 (propagated-inputs
15781 `(("python-lxml" ,python-lxml)
15782 ("python-genshi" ,python-genshi)))
15783 (native-inputs
15784 `(("python-magic" ,python-magic)))
15785 (home-page "https://relatorio.tryton.org/")
15786 (synopsis "Templating library able to output ODT and PDF files")
15787 (description "Relatorio is a templating library which provides a way to
15788 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15789 for more filetypes can be easily added by creating plugins for them.")
15790 (license license:gpl3+)))
15791
15792 (define-public python2-relatorio
15793 (package-with-python2 python-relatorio))
15794
15795 (define-public python-radon
15796 (package
15797 (name "python-radon")
15798 (version "4.1.0")
15799 (source
15800 (origin
15801 (method url-fetch)
15802 (uri (pypi-uri "radon" version))
15803 (sha256
15804 (base32
15805 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15806 (build-system python-build-system)
15807 (arguments
15808 `(#:phases (modify-phases %standard-phases
15809 (replace 'check
15810 (lambda _
15811 (invoke "python" "radon/tests/run.py"))))))
15812 (propagated-inputs
15813 `(("python-colorama" ,python-colorama)
15814 ("python-flake8-polyfill" ,python-flake8-polyfill)
15815 ("python-mando" ,python-mando)))
15816 (native-inputs
15817 `(("python-pytest" ,python-pytest)
15818 ("python-pytest-mock" ,python-pytest-mock)))
15819 (home-page "https://radon.readthedocs.org/")
15820 (synopsis "Code Metrics in Python")
15821 (description "Radon is a Python tool which computes various code metrics.
15822 Supported metrics are:
15823 @itemize @bullet
15824 @item raw metrics: SLOC, comment lines, blank lines, &c.
15825 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15826 @item Halstead metrics (all of them)
15827 @item the Maintainability Index (a Visual Studio metric)
15828 @end itemize")
15829 (properties `((python2-variant . ,(delay python2-radon))))
15830 (license license:expat)))
15831
15832 (define-public python2-radon
15833 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15834 (package
15835 (inherit base)
15836 (propagated-inputs
15837 `(("python-configparser" ,python2-configparser)
15838 ("python-future" ,python2-future)
15839 ,@(package-propagated-inputs base))))))
15840
15841 (define-public python-sure
15842 (package
15843 (name "python-sure")
15844 (version "1.4.11")
15845 (source
15846 (origin
15847 (method url-fetch)
15848 (uri (pypi-uri "sure" version))
15849 (sha256
15850 (base32
15851 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15852 (build-system python-build-system)
15853 (propagated-inputs
15854 `(("python-mock" ,python-mock)
15855 ("python-six" ,python-six)))
15856 (native-inputs
15857 `(("python-nose" ,python-nose)))
15858 (home-page "https://github.com/gabrielfalcao/sure")
15859 (synopsis "Automated testing library in python for python")
15860 (description
15861 "Sure is a python library that leverages a DSL for writing assertions.
15862 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15863 (license license:gpl3+)))
15864
15865 (define-public python2-sure
15866 (package-with-python2 python-sure))
15867
15868 (define-public python2-couleur
15869 ;; This package does not seem to support python3 at all, hence,
15870 ;; only the python2 variant definition is provided.
15871 (package
15872 (name "python2-couleur")
15873 (version "0.6.2")
15874 (source
15875 (origin
15876 (method url-fetch)
15877 (uri (pypi-uri "couleur" version))
15878 (sha256
15879 (base32
15880 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15881 (build-system python-build-system)
15882 (arguments
15883 `(#:python ,python-2))
15884 (home-page "https://github.com/gabrielfalcao/couleur")
15885 (synopsis
15886 "ANSI terminal tool for python, colored shell and other handy fancy features")
15887 (description
15888 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15889 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15890 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15891 ;; https://github.com/gabrielfalcao/couleur/issues/11
15892 (license license:lgpl3+)))
15893
15894 (define-public python-misaka
15895 (package
15896 (name "python-misaka")
15897 (version "2.1.1")
15898 (source
15899 (origin
15900 (method url-fetch)
15901 (uri (pypi-uri "misaka" version))
15902 (sha256
15903 (base32
15904 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
15905 (build-system python-build-system)
15906 (arguments
15907 `(;; Line 37 of setup.py calls self.run_command('develop')
15908 ;; in the 'check' phase. This command seems to be trying
15909 ;; to write to
15910 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15911 ;; for which it does not have the permission to write.
15912 #:tests? #f))
15913 (propagated-inputs
15914 `(("python-cffi" ,python-cffi)))
15915 (home-page "https://github.com/FSX/misaka")
15916 (synopsis "Python binding for Hoedown")
15917 (description
15918 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15919 library written in C. It features a fast HTML renderer and functionality to make custom
15920 renderers (e.g. man pages or LaTeX).")
15921 (license license:expat)))
15922
15923 (define-public python2-misaka
15924 (package-with-python2 python-misaka))
15925
15926 (define-public python2-steadymark
15927 ;; This is forced into being a python2 only variant
15928 ;; due to its dependence on couleur that has no support
15929 ;; for python3
15930 (package
15931 (name "python2-steadymark")
15932 (version "0.7.3")
15933 (source
15934 (origin
15935 (method url-fetch)
15936 (uri (pypi-uri "steadymark" version))
15937 (sha256
15938 (base32
15939 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15940 (build-system python-build-system)
15941 (native-inputs
15942 `(("python-couleur" ,python2-couleur)
15943 ("python-sure" ,python2-sure)
15944 ("python-misaka" ,python2-misaka)))
15945 (arguments
15946 `(#:python ,python-2
15947 #:phases
15948 (modify-phases %standard-phases
15949 (add-before 'build 'patch-setup-py
15950 (lambda _
15951 ;; Update requirements from dependency==version
15952 ;; to dependency>=version
15953 (substitute* "setup.py"
15954 (("==") ">="))
15955 #t)))))
15956 (home-page "https://github.com/gabrielfalcao/steadymark")
15957 (synopsis "Markdown-based test runner for python")
15958 (description
15959 "@code{Steadymark} allows documentation to be written in github-flavoured
15960 markdown. The documentation may contain snippets of code surrounded by python
15961 code blocks and @code{Steadymark} will find these snippets and run them, making
15962 sure that there are no old malfunctional examples in the documentation examples.")
15963 (license license:expat)))
15964
15965 (define-public python-jsonpointer
15966 (package
15967 (name "python-jsonpointer")
15968 (version "1.10")
15969 (source
15970 (origin
15971 (method url-fetch)
15972 (uri (pypi-uri "jsonpointer" version))
15973 (sha256
15974 (base32
15975 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15976 (build-system python-build-system)
15977 (home-page "https://github.com/stefankoegl/python-json-pointer")
15978 (synopsis "Identify specific nodes in a JSON document")
15979 (description "@code{jsonpointer} allows you to access specific nodes
15980 by path in a JSON document (see RFC 6901).")
15981 (license license:bsd-3)))
15982
15983 (define-public python2-jsonpointer
15984 (package-with-python2 python-jsonpointer))
15985
15986 (define-public python-jsonpatch
15987 (package
15988 (name "python-jsonpatch")
15989 (version "1.16")
15990 (source
15991 (origin
15992 (method git-fetch)
15993 ;; pypi version lacks tests.js
15994 (uri (git-reference
15995 (url "https://github.com/stefankoegl/python-json-patch")
15996 (commit (string-append "v" version))))
15997 (file-name (git-file-name name version))
15998 (sha256
15999 (base32
16000 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16001 (build-system python-build-system)
16002 (native-inputs
16003 `(("python-jsonpointer" ,python-jsonpointer)))
16004 (home-page "https://github.com/stefankoegl/python-json-patch")
16005 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16006 (description "@code{jsonpatch} is a library and program that allows
16007 applying JSON Patches according to RFC 6902.")
16008 (license license:bsd-3)))
16009
16010 (define-public python2-jsonpatch
16011 (package-with-python2 python-jsonpatch))
16012
16013 (define-public python-jsonpatch-0.4
16014 (package (inherit python-jsonpatch)
16015 (name "python-jsonpatch")
16016 (version "0.4")
16017 (source
16018 (origin
16019 (method git-fetch)
16020 (uri (git-reference
16021 (url "https://github.com/stefankoegl/python-json-patch")
16022 (commit (string-append "v" version))))
16023 (file-name (git-file-name name version))
16024 (sha256
16025 (base32
16026 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16027
16028 (define-public python2-jsonpatch-0.4
16029 (package-with-python2 python-jsonpatch-0.4))
16030
16031 (define-public python-rfc3986
16032 (package
16033 (name "python-rfc3986")
16034 (version "1.4.0")
16035 (source (origin
16036 (method url-fetch)
16037 (uri (pypi-uri "rfc3986" version))
16038 (sha256
16039 (base32
16040 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16041 (build-system python-build-system)
16042 (arguments
16043 `(#:modules ((guix build utils)
16044 (guix build python-build-system)
16045 (ice-9 ftw)
16046 (srfi srfi-1)
16047 (srfi srfi-26))
16048 #:phases
16049 (modify-phases %standard-phases
16050 (replace 'check
16051 (lambda _
16052 (let ((cwd (getcwd)))
16053 (setenv "PYTHONPATH"
16054 (string-append cwd "/build/"
16055 (find (cut string-prefix? "lib" <>)
16056 (scandir (string-append cwd "/build")))
16057 ":"
16058 (getenv "PYTHONPATH")))
16059 (invoke "pytest" "-v")))))))
16060 (native-inputs
16061 `(("python-pytest" ,python-pytest)))
16062 (home-page "https://rfc3986.readthedocs.io/")
16063 (synopsis "Parse and validate URI references")
16064 (description
16065 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16066 validation and authority parsing. This module also supports RFC@tie{}6874
16067 which adds support for zone identifiers to IPv6 addresses.")
16068 (license license:asl2.0)))
16069
16070 (define-public python2-rfc3986
16071 (package-with-python2 python-rfc3986))
16072
16073 (define-public python-rfc3987
16074 (package
16075 (name "python-rfc3987")
16076 (version "1.3.7")
16077 (source
16078 (origin
16079 (method url-fetch)
16080 (uri (pypi-uri "rfc3987" version))
16081 (sha256
16082 (base32
16083 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16084 (build-system python-build-system)
16085 (home-page "https://pypi.org/project/rfc3987/")
16086 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16087 (description "@code{rfc3987} provides routines for parsing and
16088 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16089 (license license:gpl3+)))
16090
16091 (define-public python2-rfc3987
16092 (package-with-python2 python-rfc3987))
16093
16094 ;; The latest commit contains fixes for building with both python3 and python2.
16095 (define-public python-rfc6555
16096 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16097 (revision "1"))
16098 (package
16099 (name "python-rfc6555")
16100 (version (git-version "0.0.0" revision commit))
16101 (source (origin
16102 (method git-fetch)
16103 (uri (git-reference
16104 (url "https://github.com/sethmlarson/rfc6555")
16105 (commit commit)))
16106 (file-name (git-file-name name version))
16107 (sha256
16108 (base32
16109 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16110 (build-system python-build-system)
16111 (arguments
16112 '(#:phases
16113 (modify-phases %standard-phases
16114 (replace 'check
16115 (lambda* (#:key tests? #:allow-other-keys)
16116 (if tests?
16117 ;; Other tests require network access.
16118 (invoke "pytest" "tests/test_ipv6.py")
16119 #t))))))
16120 (native-inputs
16121 `(("python-pytest" ,python-pytest)))
16122 (home-page "https://pypi.org/project/rfc6555/")
16123 (synopsis "Python implementation of RFC 6555")
16124 (description
16125 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16126 6555. Provided with a single file and dead-simple API to allow easy vendoring
16127 and integration into other projects.")
16128 (properties `((python2-variant . ,(delay python2-rfc6555))))
16129 (license license:asl2.0))))
16130
16131 (define-public python2-rfc6555
16132 (let ((base (package-with-python2
16133 (strip-python2-variant python-rfc6555))))
16134 (package
16135 (inherit base)
16136 (propagated-inputs
16137 `(("python2-selectors2" ,python2-selectors2))))))
16138
16139 (define-public python-validators
16140 (package
16141 (name "python-validators")
16142 (version "0.14.2")
16143 (source (origin
16144 (method url-fetch)
16145 (uri (pypi-uri "validators" version))
16146 (sha256
16147 (base32
16148 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16149 (build-system python-build-system)
16150 (arguments
16151 '(#:phases (modify-phases %standard-phases
16152 (replace 'check
16153 (lambda _
16154 (invoke "pytest" "-vv"))))))
16155 (propagated-inputs
16156 `(("python-decorator" ,python-decorator)
16157 ("python-six" ,python-six)))
16158 (native-inputs
16159 `(("python-flake8" ,python-flake8)
16160 ("python-isort" ,python-isort)
16161 ("python-pytest" ,python-pytest)))
16162 (home-page "https://github.com/kvesteri/validators")
16163 (synopsis "Data validation library")
16164 (description
16165 "This package contains validators for different things such as email
16166 addresses, IP addresses, URLs, hashes and more. It has been designed to
16167 be easy to use and not require defining a schema or form just to validate
16168 some input.")
16169 (license license:expat)))
16170
16171 (define-public python2-validators
16172 (package-with-python2 python-validators))
16173
16174 (define-public python-validate-email
16175 (package
16176 (name "python-validate-email")
16177 (version "1.3")
16178 (source
16179 (origin
16180 (method url-fetch)
16181 (uri (pypi-uri "validate_email" version))
16182 (sha256
16183 (base32
16184 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16185 (build-system python-build-system)
16186 (home-page "https://github.com/syrusakbary/validate_email")
16187 (synopsis "Verifies if an email address is valid and really exists")
16188 (description "@code{validate_email} can be used to verify if an email
16189 address is valid and really exists.")
16190 (license license:lgpl3+)))
16191
16192 (define-public python2-validate-email
16193 (package-with-python2 python-validate-email))
16194
16195 (define-public python-flex
16196 (package
16197 (name "python-flex")
16198 (version "6.10.0")
16199 (source
16200 (origin
16201 (method url-fetch)
16202 (uri (pypi-uri "flex" version))
16203 (sha256
16204 (base32
16205 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16206 (build-system python-build-system)
16207 (propagated-inputs
16208 `(("python-click" ,python-click)
16209 ("python-iso8601" ,python-iso8601)
16210 ("python-jsonpointer" ,python-jsonpointer)
16211 ("python-pyyaml" ,python-pyyaml)
16212 ("python-requests" ,python-requests)
16213 ("python-rfc3987" ,python-rfc3987)
16214 ("python-six" ,python-six)
16215 ("python-validate-email" ,python-validate-email)))
16216 (home-page "https://github.com/pipermerriam/flex")
16217 (synopsis "Validates Swagger schemata")
16218 (description "@code{flex} can be used to validate Swagger schemata.")
16219 (license license:bsd-3)))
16220
16221 (define-public python2-flex
16222 (package-with-python2 python-flex))
16223
16224 (define-public python-marshmallow
16225 (package
16226 (name "python-marshmallow")
16227 (version "3.0.0b14")
16228 (source
16229 (origin
16230 (method url-fetch)
16231 (uri (pypi-uri "marshmallow" version))
16232 (sha256
16233 (base32
16234 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
16235 (build-system python-build-system)
16236 (propagated-inputs
16237 `(("python-dateutil" ,python-dateutil)
16238 ("python-simplejson" ,python-simplejson)))
16239 (native-inputs
16240 `(("python-pytest" ,python-pytest)
16241 ("python-pytz" ,python-pytz)))
16242 (home-page "https://github.com/marshmallow-code/marshmallow")
16243 (synopsis "Convert complex datatypes to and from native
16244 Python datatypes.")
16245 (description "@code{marshmallow} provides a library for converting
16246 complex datatypes to and from native Python datatypes.")
16247 (license license:expat)))
16248
16249 (define-public python2-marshmallow
16250 (package-with-python2 python-marshmallow))
16251
16252 (define-public python-apispec
16253 (package
16254 (name "python-apispec")
16255 (version "0.25.3")
16256 (source
16257 (origin
16258 (method url-fetch)
16259 (uri (pypi-uri "apispec" version))
16260 (sha256
16261 (base32
16262 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16263 (build-system python-build-system)
16264 (propagated-inputs
16265 `(("python-pyyaml" ,python-pyyaml)))
16266 (native-inputs
16267 `(("python-pytest" ,python-pytest)
16268 ("python-flask" ,python-flask)
16269 ("python-marshmallow" ,python-marshmallow)
16270 ("python-tornado" ,python-tornado)
16271 ("python-bottle" ,python-bottle)
16272 ("python-mock" ,python-mock)))
16273 (home-page "https://github.com/marshmallow-code/apispec")
16274 (synopsis "Swagger 2.0 API specification generator")
16275 (description "@code{python-apispec} is a pluggable API specification
16276 generator. Currently supports the OpenAPI specification (f.k.a.
16277 Swagger 2.0).")
16278 (license license:expat)))
16279
16280 (define-public python2-apispec
16281 (package-with-python2 python-apispec))
16282
16283 (define-public python-flasgger
16284 (package
16285 (name "python-flasgger")
16286 (version "0.6.3")
16287 (source
16288 (origin
16289 (method git-fetch)
16290 (uri (git-reference
16291 (url "https://github.com/rochacbruno/flasgger")
16292 (commit version)))
16293 (file-name (git-file-name name version))
16294 (sha256
16295 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16296 (build-system python-build-system)
16297 (arguments
16298 `(#:phases
16299 (modify-phases %standard-phases
16300 (replace 'check
16301 (lambda* (#:key inputs outputs #:allow-other-keys)
16302 (substitute* "Makefile"
16303 (("flake8 flasgger --ignore=F403")
16304 "flake8 flasgger --ignore=E731,F403"))
16305 (setenv "PYTHONPATH" (string-append (getcwd)
16306 ":"
16307 (getenv "PYTHONPATH")))
16308 (invoke "py.test"))))))
16309 (propagated-inputs
16310 `(("python-flask" ,python-flask)
16311 ("python-pyyaml" ,python-pyyaml)
16312 ("python-jsonschema" ,python-jsonschema)
16313 ("python-mistune" ,python-mistune)
16314 ("python-six" ,python-six)))
16315 (native-inputs
16316 `(("python-decorator" ,python-decorator)
16317 ("python-flake8" ,python-flake8)
16318 ("python-flask-restful" ,python-flask-restful)
16319 ("python-flex" ,python-flex)
16320 ("python-pytest" ,python-pytest)
16321 ("python-pytest-cov" ,python-pytest-cov)
16322 ("python-marshmallow" ,python-marshmallow)
16323 ("python-apispec" ,python-apispec)))
16324 (home-page "https://github.com/rochacbruno/flasgger/")
16325 (synopsis "Extract Swagger specs from your Flask project")
16326 (description "@code{python-flasgger} allows extracting Swagger specs
16327 from your Flask project. It is a fork of Flask-Swagger.")
16328 (license license:expat)))
16329
16330 (define-public python2-flasgger
16331 (package-with-python2 python-flasgger))
16332
16333 (define-public python-swagger-spec-validator
16334 (package
16335 (name "python-swagger-spec-validator")
16336 (version "2.4.3")
16337 (source
16338 (origin
16339 (method url-fetch)
16340 (uri (pypi-uri "swagger-spec-validator" version))
16341 (sha256
16342 (base32
16343 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16344 (build-system python-build-system)
16345 (propagated-inputs
16346 `(("python-jsonschema" ,python-jsonschema)
16347 ("python-pyyaml" ,python-pyyaml)
16348 ("python-six" ,python-six)))
16349 (home-page
16350 "https://github.com/Yelp/swagger_spec_validator")
16351 (synopsis "Validation of Swagger specifications")
16352 (description "@code{swagger_spec_validator} provides a library for
16353 validating Swagger API specifications.")
16354 (license license:asl2.0)))
16355
16356 (define-public python2-swagger-spec-validator
16357 (package-with-python2 python-swagger-spec-validator))
16358
16359 (define-public python-apache-libcloud
16360 (package
16361 (name "python-apache-libcloud")
16362 (version "3.1.0")
16363 (source
16364 (origin
16365 (method url-fetch)
16366 (uri (pypi-uri "apache-libcloud" version))
16367 (sha256
16368 (base32
16369 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16370 (build-system python-build-system)
16371 (arguments
16372 `(#:phases
16373 (modify-phases %standard-phases
16374 (add-after 'unpack 'patch-ssh
16375 (lambda* (#:key inputs #:allow-other-keys)
16376 (substitute* "libcloud/compute/ssh.py"
16377 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16378 "/bin/ssh" "'")))
16379 #t))
16380 (add-after 'unpack 'patch-tests
16381 (lambda _
16382 (substitute* "libcloud/test/compute/test_ssh_client.py"
16383 (("class ShellOutSSHClientTests")
16384 "@unittest.skip(\"Guix container doesn't have ssh service\")
16385 class ShellOutSSHClientTests"))
16386 #t))
16387 (add-before 'check 'copy-secret
16388 (lambda _
16389 (copy-file "libcloud/test/secrets.py-dist"
16390 "libcloud/test/secrets.py")
16391 #t)))))
16392 (inputs
16393 `(("openssh" ,openssh)))
16394 (propagated-inputs
16395 `(("python-paramiko" ,python-paramiko)
16396 ("python-requests" ,python-requests)))
16397 (native-inputs
16398 `(("python-lockfile" ,python-lockfile)
16399 ("python-mock" ,python-mock)
16400 ("python-pytest" ,python-pytest)
16401 ("python-pytest-runner" ,python-pytest-runner)
16402 ("python-requests-mock" ,python-requests-mock)))
16403 (home-page "https://libcloud.apache.org/")
16404 (synopsis "Unified Cloud API")
16405 (description "@code{libcloud} is a Python library for interacting with
16406 many of the popular cloud service providers using a unified API.")
16407 (license license:asl2.0)))
16408
16409 (define-public python2-apache-libcloud
16410 (package-with-python2 python-apache-libcloud))
16411
16412 (define-public python-smmap
16413 (package
16414 (name "python-smmap")
16415 (version "3.0.1")
16416 (source
16417 (origin
16418 (method url-fetch)
16419 (uri (pypi-uri "smmap" version))
16420 (sha256
16421 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16422 (build-system python-build-system)
16423 (native-inputs
16424 `(("python-nosexcover" ,python-nosexcover)))
16425 (home-page "https://github.com/Byron/smmap")
16426 (synopsis "Python sliding window memory map manager")
16427 (description "@code{smmap} is a pure Python implementation of a sliding
16428 window memory map manager.")
16429 (license license:bsd-3)))
16430
16431 (define-public python-smmap2
16432 (deprecated-package "python-smmap2" python-smmap))
16433
16434 (define-public python2-smmap
16435 (package-with-python2 python-smmap))
16436
16437 (define-public python2-smmap2
16438 (deprecated-package "python2-smmap2" python2-smmap))
16439
16440 (define-public python-regex
16441 (package
16442 (name "python-regex")
16443 (version "2020.6.8")
16444 (source (origin
16445 (method url-fetch)
16446 (uri (pypi-uri "regex" version))
16447 (sha256
16448 (base32
16449 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16450 (build-system python-build-system)
16451 (arguments
16452 '(#:phases
16453 (modify-phases %standard-phases
16454 (replace 'check
16455 (lambda* (#:key inputs outputs #:allow-other-keys)
16456 (add-installed-pythonpath inputs outputs)
16457 (invoke "python" "-c"
16458 "from regex.test_regex import test_main; test_main()"))))))
16459 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16460 (synopsis "Alternative regular expression module")
16461 (description "This regular expression implementation is backwards-
16462 compatible with the standard @code{re} module, but offers additional
16463 functionality like full case-folding for case-insensitive matches in Unicode.")
16464 (license license:psfl)))
16465
16466 (define-public python2-regex
16467 (package-with-python2 python-regex))
16468
16469 (define-public python-pyopengl
16470 (package
16471 (name "python-pyopengl")
16472 (version "3.1.5")
16473 (source
16474 (origin
16475 (method url-fetch)
16476 (uri (pypi-uri "PyOpenGL" version))
16477 (sha256
16478 (base32
16479 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16480 (build-system python-build-system)
16481 (inputs
16482 `(("mesa" ,mesa)
16483 ("freeglut" ,freeglut)
16484 ("glu" ,glu)))
16485 (arguments
16486 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16487 ;attribute 'OSMesa'
16488 #:phases
16489 (modify-phases %standard-phases
16490 (add-before 'build 'fix-paths
16491 (lambda* (#:key inputs outputs #:allow-other-keys)
16492 (substitute* '("OpenGL/platform/ctypesloader.py")
16493 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16494 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16495 (("'GL'")
16496 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16497 (("'GLU'")
16498 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16499 (("'glut',")
16500 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16501 (("'GLESv1_CM'")
16502 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16503 (("'GLESv2'")
16504 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16505 ;; Not providing libgle. It seems to be very old.
16506 #t)))))
16507 (home-page "http://pyopengl.sourceforge.net")
16508 (synopsis "Standard OpenGL bindings for Python")
16509 (description
16510 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16511 related APIs. The binding is created using the standard @code{ctypes}
16512 library.")
16513 (license license:bsd-3)))
16514
16515 (define-public python-pyopengl-accelerate
16516 (package
16517 (inherit python-pyopengl)
16518 (name "python-pyopengl-accelerate")
16519 (version "3.1.5")
16520 (source
16521 (origin
16522 (method url-fetch)
16523 (uri (pypi-uri "PyOpenGL-accelerate" version))
16524 (sha256
16525 (base32
16526 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16527 (inputs
16528 `(("mesa" ,mesa)
16529 ("python-numpy" ,python-numpy))) ; for cython module
16530 ; numpy_formathandler, thus not propagated
16531 (arguments
16532 `(#:tests? #f
16533 #:phases
16534 (modify-phases %standard-phases
16535 (delete 'fix-paths))))
16536 (synopsis "Acceleration code for PyOpenGL")
16537 (description
16538 "This is the Cython-coded accelerator module for PyOpenGL.")))
16539
16540 (define-public python-rencode
16541 (package
16542 (name "python-rencode")
16543 (version "1.0.5")
16544 (source
16545 (origin
16546 (method url-fetch)
16547 (uri (pypi-uri "rencode" version))
16548 (sha256
16549 (base32
16550 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16551 (build-system python-build-system)
16552 (arguments
16553 `(#:phases
16554 (modify-phases %standard-phases
16555 (add-before 'check 'delete-bogus-test
16556 ;; This test requires /home/aresch/Downloads, which is not provided by
16557 ;; the build environment.
16558 (lambda _
16559 (delete-file "rencode/t.py")
16560 #t)))))
16561 (native-inputs `(("pkg-config" ,pkg-config)
16562 ("python-cython" ,python-cython)))
16563 (home-page "https://github.com/aresch/rencode")
16564 (synopsis "Serialization of heterogeneous data structures")
16565 (description
16566 "The @code{rencode} module is a data structure serialization library,
16567 similar to @code{bencode} from the BitTorrent project. For complex,
16568 heterogeneous data structures with many small elements, r-encoding stake up
16569 significantly less space than b-encodings. This version of rencode is a
16570 complete rewrite in Cython to attempt to increase the performance over the
16571 pure Python module.")
16572 (license license:bsd-3)))
16573
16574 (define-public python2-rencode
16575 (package-with-python2 python-rencode))
16576
16577 (define-public python-xenon
16578 (package
16579 (name "python-xenon")
16580 (version "0.7.0")
16581 (source
16582 (origin
16583 (method url-fetch)
16584 (uri (pypi-uri "xenon" version))
16585 (sha256
16586 (base32
16587 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16588 (build-system python-build-system)
16589 (native-inputs
16590 `(("python-pyyaml" ,python-pyyaml)
16591 ("python-radon" ,python-radon)
16592 ("python-requests" ,python-requests)
16593 ("python-flake8" ,python-flake8)
16594 ("python-tox" ,python-tox)))
16595 (arguments
16596 `(#:tests? #f ;test suite not shipped with the PyPI archive
16597 #:phases
16598 (modify-phases %standard-phases
16599 (add-before 'build 'patch-test-requirements
16600 (lambda _
16601 ;; Remove httpretty dependency for tests.
16602 (substitute* "setup.py"
16603 (("httpretty") ""))
16604 #t)))))
16605 (home-page "https://xenon.readthedocs.org/")
16606 (synopsis "Monitor code metrics for Python on your CI server")
16607 (description
16608 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16609 Ideally, @code{xenon} is run every time code is committed. Through command
16610 line options, various thresholds can be set for the complexity of code. It
16611 will fail (i.e. it will exit with a non-zero exit code) when any of these
16612 requirements is not met.")
16613 (license license:expat)))
16614
16615 (define-public python2-xenon
16616 (package-with-python2 python-xenon))
16617
16618 (define-public python-pysocks
16619 (package
16620 (name "python-pysocks")
16621 (version "1.7.0")
16622 (source
16623 (origin
16624 (method url-fetch)
16625 (uri (pypi-uri "PySocks" version))
16626 (sha256
16627 (base32
16628 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
16629 (build-system python-build-system)
16630 (arguments `(#:tests? #f))
16631 (home-page "https://github.com/Anorov/PySocks")
16632 (synopsis "SOCKS client module")
16633 (description "@code{pysocks} is an updated and semi-actively maintained
16634 version of @code{SocksiPy} with bug fixes and extra features.")
16635 (license license:bsd-3)))
16636
16637 (define-public python2-pysocks
16638 (package-with-python2 python-pysocks))
16639
16640 (define-public python-pydiff
16641 (package
16642 (name "python-pydiff")
16643 (version "0.2")
16644 (source
16645 (origin
16646 (method url-fetch)
16647 (uri (pypi-uri "pydiff" version))
16648 (sha256
16649 (base32
16650 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16651 (build-system python-build-system)
16652 (home-page "https://github.com/myint/pydiff")
16653 (synopsis "Library to diff two Python files at the bytecode level")
16654 (description
16655 "@code{pydiff} makes it easy to look for actual code changes while
16656 ignoring formatting changes.")
16657 (license license:expat)))
16658
16659 (define-public python2-pydiff
16660 (package-with-python2 python-pydiff))
16661
16662 (define-public python-tqdm
16663 (package
16664 (name "python-tqdm")
16665 (version "4.43.0")
16666 (source
16667 (origin
16668 (method url-fetch)
16669 (uri (pypi-uri "tqdm" version))
16670 (sha256
16671 (base32
16672 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16673 (build-system python-build-system)
16674 (arguments
16675 '(#:phases (modify-phases %standard-phases
16676 (replace 'check
16677 (lambda* (#:key inputs outputs #:allow-other-keys)
16678 (add-installed-pythonpath inputs outputs)
16679 ;; This invokation is taken from tox.ini.
16680 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16681 "-d" "-v" "tqdm/"))))))
16682 (native-inputs
16683 `(("python-nose" ,python-nose)))
16684 (home-page "https://github.com/tqdm/tqdm")
16685 (synopsis "Fast, extensible progress meter")
16686 (description
16687 "Make loops show a progress bar on the console by just wrapping any
16688 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16689 design and layout.")
16690 (license (list license:mpl2.0 license:expat))))
16691
16692 (define-public python2-tqdm
16693 (package-with-python2 python-tqdm))
16694
16695 (define-public python-pkginfo
16696 (package
16697 (name "python-pkginfo")
16698 (version "1.4.2")
16699 (source
16700 (origin
16701 (method url-fetch)
16702 (uri (pypi-uri "pkginfo" version))
16703 (sha256
16704 (base32
16705 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16706 (build-system python-build-system)
16707 (arguments
16708 ;; The tests are broken upstream.
16709 '(#:tests? #f))
16710 (home-page
16711 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16712 (synopsis
16713 "Query metadatdata from sdists, bdists, and installed packages")
16714 (description
16715 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16716 source distriubtion (an sdist) or a binary distribution (e.g., created by
16717 running bdist_egg). It can also query the EGG-INFO directory of an installed
16718 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16719 created by running @code{python setup.py develop}).")
16720 (license license:expat)))
16721
16722 (define-public python2-pkginfo
16723 (package-with-python2 python-pkginfo))
16724
16725 (define-public python-twine
16726 (package
16727 (name "python-twine")
16728 (version "1.15.0")
16729 (source
16730 (origin
16731 (method url-fetch)
16732 (uri (pypi-uri "twine" version))
16733 (sha256
16734 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
16735 (build-system python-build-system)
16736 (propagated-inputs
16737 `(("python-tqdm" ,python-tqdm)
16738 ("python-packaging" ,python-packaging)
16739 ("python-pkginfo" ,python-pkginfo)
16740 ("python-readme-renderer" ,python-readme-renderer)
16741 ("python-requests" ,python-requests)
16742 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16743 (home-page "https://github.com/pypa/twine")
16744 (synopsis "Collection of utilities for interacting with PyPI")
16745 (description
16746 "@code{twine} currently supports registering projects and uploading
16747 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16748 their files and supports any packaging format (including wheels).")
16749 (license license:asl2.0)))
16750
16751 (define-public python2-twine
16752 (package-with-python2 python-twine))
16753
16754 (define-public python-linecache2
16755 (package
16756 (name "python-linecache2")
16757 (version "1.0.0")
16758 (source
16759 (origin
16760 (method url-fetch)
16761 (uri (pypi-uri "linecache2" version))
16762 (sha256
16763 (base32
16764 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16765 (build-system python-build-system)
16766 (arguments
16767 `(;; The tests depend on unittest2, and our version is a bit too old.
16768 #:tests? #f))
16769 (native-inputs
16770 `(("python-pbr" ,python-pbr-minimal)))
16771 (home-page
16772 "https://github.com/testing-cabal/linecache2")
16773 (synopsis "Backports of the linecache module")
16774 (description
16775 "The linecache module allows one to get any line from any file, while
16776 attempting to optimize internally, using a cache, the common case where many
16777 lines are read from a single file.")
16778 (license license:psfl)))
16779
16780 (define-public python2-linecache2
16781 (package-with-python2 python-linecache2))
16782
16783 (define-public python-traceback2
16784 (package
16785 (name "python-traceback2")
16786 (version "1.4.0")
16787 (source
16788 (origin
16789 (method url-fetch)
16790 (uri (pypi-uri "traceback2" version))
16791 (sha256
16792 (base32
16793 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16794 (build-system python-build-system)
16795 (arguments
16796 `(;; python-traceback2 and python-unittest2 depend on one another.
16797 #:tests? #f))
16798 (native-inputs
16799 `(("python-pbr" ,python-pbr-minimal)))
16800 (propagated-inputs
16801 `(("python-linecache2" ,python-linecache2)))
16802 (home-page
16803 "https://github.com/testing-cabal/traceback2")
16804 (synopsis "Backports of the traceback module")
16805 (description
16806 "This module provides a standard interface to extract, format and print
16807 stack traces of Python programs. It exactly mimics the behavior of the Python
16808 interpreter when it prints a stack trace.")
16809 (license license:psfl)))
16810
16811 (define-public python2-traceback2
16812 (package-with-python2 python-traceback2))
16813
16814 (define-public python-ratelimiter
16815 (package
16816 (name "python-ratelimiter")
16817 (version "1.2.0")
16818 (source
16819 (origin
16820 (method url-fetch)
16821 (uri (pypi-uri "ratelimiter" version))
16822 (sha256
16823 (base32
16824 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16825 (build-system python-build-system)
16826 (arguments
16827 '(#:tests? #f)) ; There are no tests in the pypi archive.
16828 (home-page "https://github.com/RazerM/ratelimiter")
16829 (synopsis "Simple rate limiting object")
16830 (description
16831 "The @code{ratelimiter} module ensures that an operation will not be
16832 executed more than a given number of times during a given period.")
16833 (license license:asl2.0)))
16834
16835 (define-public python2-ratelimiter
16836 (package-with-python2 python-ratelimiter))
16837
16838 (define-public python-dukpy
16839 (package
16840 (name "python-dukpy")
16841 (version "0.3")
16842 (source
16843 (origin
16844 (method git-fetch)
16845 (uri (git-reference
16846 (url "https://github.com/kovidgoyal/dukpy")
16847 (commit (string-append "v" version))))
16848 (file-name (git-file-name name version))
16849 (sha256
16850 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
16851 (build-system python-build-system)
16852 (home-page "https://github.com/kovidgoyal/dukpy")
16853 (synopsis "Run JavaScript in python")
16854 (description
16855 "dukpy is a JavaScript runtime environment for Python using the duktape
16856 embeddable JavaScript engine.")
16857 ;; Dukpy is licensed under MIT like the embedded duktape library,
16858 ;; with 'errors.c' as GPL3.
16859 (license (list license:expat license:gpl3))))
16860
16861 (define-public python2-dukpy
16862 (package-with-python2 python-dukpy))
16863
16864 (define-public python-jsonrpclib-pelix
16865 (package
16866 (name "python-jsonrpclib-pelix")
16867 (version "0.3.2")
16868 (source
16869 (origin
16870 (method url-fetch)
16871 (uri (pypi-uri "jsonrpclib-pelix" version))
16872 (sha256
16873 (base32
16874 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
16875 (build-system python-build-system)
16876 (arguments
16877 `(#:tests? #f)) ; no tests in PyPI tarball
16878 (home-page "https://github.com/tcalmant/jsonrpclib/")
16879 (synopsis "JSON-RPC 2.0 client library for Python")
16880 (description
16881 "This library implements the JSON-RPC v2.0
16882 specification (backwards-compatible) as a client library for Python. This
16883 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
16884 services.")
16885 (license license:asl2.0)))
16886
16887 (define-public python2-jsonrpclib-pelix
16888 (package-with-python2 python-jsonrpclib-pelix))
16889
16890 (define-public python-setuptools-scm-git-archive
16891 (package
16892 (name "python-setuptools-scm-git-archive")
16893 (version "1.0")
16894 (source
16895 (origin
16896 (method url-fetch)
16897 (uri (pypi-uri "setuptools_scm_git_archive" version))
16898 (sha256
16899 (base32
16900 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
16901 (build-system python-build-system)
16902 (native-inputs
16903 `(("python-pytest" ,python-pytest)))
16904 (propagated-inputs
16905 `(("python-setuptools-scm" ,python-setuptools-scm)))
16906 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
16907 (synopsis "Setuptools_scm plugin for git archives")
16908 (description
16909 "The setuptools_scm_git_archive package is a plugin to
16910 setuptools_scm, which supports obtaining versions from git archives that
16911 belong to tagged versions.")
16912 (license license:expat)))
16913
16914 (define-public python2-setuptools-scm-git-archive
16915 (package-with-python2 python-setuptools-scm-git-archive))
16916
16917 (define-public python-setuptools-git
16918 (package
16919 (name "python-setuptools-git")
16920 (version "1.2")
16921 (source
16922 (origin
16923 (method url-fetch)
16924 (uri (pypi-uri "setuptools-git" version))
16925 (sha256
16926 (base32
16927 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
16928 (build-system python-build-system)
16929 (arguments
16930 `(#:phases
16931 (modify-phases %standard-phases
16932 ;; This is needed for tests.
16933 (add-after 'unpack 'configure-git
16934 (lambda _
16935 (setenv "HOME" "/tmp")
16936 (invoke "git" "config" "--global" "user.email" "guix")
16937 (invoke "git" "config" "--global" "user.name" "guix")
16938 #t)))))
16939 (native-inputs
16940 `(("git" ,git-minimal)))
16941 (home-page "https://github.com/msabramo/setuptools-git")
16942 (synopsis "Setuptools revision control system plugin for Git")
16943 (description
16944 "This package provides a plugin for Setuptools for revision control with
16945 Git.")
16946 (license license:bsd-3)))
16947
16948 (define-public python-pyclipper
16949 (package
16950 (name "python-pyclipper")
16951 (version "1.1.0.post3")
16952 (source
16953 (origin
16954 (method url-fetch)
16955 (uri (pypi-uri "pyclipper" version ".zip"))
16956 (sha256
16957 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
16958 (modules '((guix build utils)))
16959 (snippet
16960 '(begin
16961 ;; This file is generated by Cython.
16962 (delete-file "pyclipper/pyclipper.cpp") #t))))
16963 (build-system python-build-system)
16964 (arguments
16965 `(#:phases
16966 (modify-phases %standard-phases
16967 (add-before 'build 'cythonize-sources
16968 (lambda _
16969 (with-directory-excursion "pyclipper"
16970 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
16971 (propagated-inputs
16972 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
16973 (native-inputs
16974 `(("python-cython" ,python-cython)
16975 ("python-pytest" ,python-pytest)
16976 ("python-pytest-runner" ,python-pytest-runner)
16977 ("python-unittest2" ,python-unittest2)
16978 ("unzip" ,unzip)))
16979 (home-page "https://github.com/greginvm/pyclipper")
16980 (synopsis "Wrapper for Angus Johnson's Clipper library")
16981 (description
16982 "Pyclipper is a Cython wrapper for the C++ translation of the
16983 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
16984 (license license:expat)))
16985
16986 (define-public python2-pyclipper
16987 (package-with-python2 python-pyclipper))
16988
16989 (define-public python2-booleanoperations
16990 (package
16991 (name "python2-booleanoperations")
16992 (version "0.7.1")
16993 (source
16994 (origin
16995 (method url-fetch)
16996 (uri (pypi-uri "booleanOperations" version ".zip"))
16997 (sha256
16998 (base32
16999 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17000 (build-system python-build-system)
17001 (arguments
17002 `(#:python ,python-2))
17003 (native-inputs
17004 `(("unzip" ,unzip)
17005 ("python2-pytest" ,python2-pytest)
17006 ("python2-pytest-runner" ,python2-pytest-runner)))
17007 (propagated-inputs
17008 `(("python-fonttools" ,python2-fonttools)
17009 ("python-pyclipper" ,python2-pyclipper)
17010 ("python-ufolib" ,python2-ufolib)))
17011 (home-page "https://github.com/typemytype/booleanOperations")
17012 (synopsis "Boolean operations on paths")
17013 (description
17014 "BooleanOperations provides a Python library that enables
17015 boolean operations on paths.")
17016 (license license:expat)))
17017
17018 (define-public python-tempdir
17019 (package
17020 (name "python-tempdir")
17021 (version "0.7.1")
17022 (source
17023 (origin
17024 (method url-fetch)
17025 (uri (pypi-uri "tempdir" version))
17026 (sha256
17027 (base32
17028 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17029 (build-system python-build-system)
17030 (home-page "https://pypi.org/project/tempdir/")
17031 (arguments
17032 ;; the package has no tests
17033 '(#:tests? #f))
17034 (synopsis "Python library for managing temporary directories")
17035 (description
17036 "This library manages temporary directories that are automatically
17037 deleted with all their contents when they are no longer needed. It is
17038 particularly convenient for use in tests.")
17039 (license license:expat)))
17040
17041 (define-public python2-tempdir
17042 (package-with-python2 python-tempdir))
17043
17044 (define-public python-activepapers
17045 (package
17046 (name "python-activepapers")
17047 (version "0.2.2")
17048 (source
17049 (origin
17050 (method url-fetch)
17051 (uri (pypi-uri "ActivePapers.Py" version))
17052 (sha256
17053 (base32
17054 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17055 (build-system python-build-system)
17056 (arguments
17057 `(#:modules ((ice-9 ftw)
17058 (srfi srfi-1)
17059 (guix build utils)
17060 (guix build python-build-system))
17061
17062 #:phases
17063 (modify-phases %standard-phases
17064 (add-after 'unpack 'delete-python2-code
17065 (lambda _
17066 (for-each delete-file
17067 '("lib/activepapers/builtins2.py"
17068 "lib/activepapers/standardlib2.py"
17069 "lib/activepapers/utility2.py"))))
17070 (replace 'check
17071 (lambda _
17072 ;; Deactivate the test cases that download files
17073 (setenv "NO_NETWORK_ACCESS" "1")
17074 ;; For some strange reason, some tests fail if nosetests runs all
17075 ;; test modules in a single execution. They pass if each test
17076 ;; module is run individually.
17077 (for-each (lambda (filename)
17078 (invoke "nosetests"
17079 (string-append "tests/" filename)))
17080 (scandir "tests"
17081 (lambda (filename)
17082 (string-suffix? ".py" filename)))))))))
17083 (native-inputs
17084 `(("python-tempdir" ,python-tempdir)
17085 ("python-nose" ,python-nose)))
17086 (propagated-inputs
17087 `(("python-h5py" ,python-h5py)))
17088 (home-page "https://www.activepapers.org/")
17089 (synopsis "Executable papers for scientific computing")
17090 (description
17091 "ActivePapers is a tool for working with executable papers, which
17092 combine data, code, and documentation in single-file packages,
17093 suitable for publication as supplementary material or on repositories
17094 such as figshare or Zenodo.")
17095 (properties `((python2-variant . ,(delay python2-activepapers))))
17096 (license license:bsd-3)))
17097
17098 (define-public python2-activepapers
17099 (let ((base (package-with-python2
17100 (strip-python2-variant python-activepapers))))
17101 (package
17102 (inherit base)
17103 (arguments
17104 (substitute-keyword-arguments (package-arguments base)
17105 ((#:phases phases)
17106 `(modify-phases ,phases
17107 (delete 'delete-python2-code)
17108 (add-after 'unpack 'delete-python3-code
17109 (lambda _
17110 (for-each delete-file
17111 '("lib/activepapers/builtins3.py"
17112 "lib/activepapers/standardlib3.py"
17113 "lib/activepapers/utility3.py")))))))))))
17114
17115 (define-public python-semver
17116 (package
17117 (name "python-semver")
17118 (version "2.9.0")
17119 (source
17120 (origin
17121 (method url-fetch)
17122 (uri (pypi-uri "semver" version))
17123 (sha256
17124 (base32
17125 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17126 (build-system python-build-system)
17127 (native-inputs
17128 `(("python-appdirs" ,python-appdirs)
17129 ("python-distlib" ,python-distlib)
17130 ("python-importlib-metadata" ,python-importlib-metadata)
17131 ("python-filelock" ,python-filelock)
17132 ("python-six" ,python-six)
17133 ("python-tox" ,python-tox)
17134 ("python-virtualenv" ,python-virtualenv)))
17135 (home-page "https://github.com/k-bx/python-semver")
17136 (synopsis "Python helper for Semantic Versioning")
17137 (description "This package provides a Python library for
17138 @url{Semantic Versioning, http://semver.org/}.")
17139 (license license:bsd-3)))
17140
17141 (define-public python2-semver
17142 (package-with-python2 python-semver))
17143
17144 (define-public python-pyro4
17145 (package
17146 (name "python-pyro4")
17147 (version "4.77")
17148 (source
17149 (origin
17150 (method url-fetch)
17151 (uri (pypi-uri "Pyro4" version))
17152 (sha256
17153 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17154 (build-system python-build-system)
17155 (arguments
17156 '(#:tests? #f)) ;FIXME: Some tests require network access.
17157 (native-inputs
17158 `(("python-cloudpickle" ,python-cloudpickle)
17159 ("python-dill" ,python-dill)
17160 ("python-msgpack" ,python-msgpack)))
17161 (propagated-inputs
17162 `(("python-serpent" ,python-serpent)))
17163 (home-page "https://pyro4.readthedocs.io")
17164 (synopsis "Distributed object middleware for Python")
17165 (description
17166 "Pyro enables you to build applications in which objects can talk to each
17167 other over the network. You can just use normal Python method calls to call
17168 objects on other machines, also known as remote procedure calls (RPC).")
17169 (license license:expat)))
17170
17171 (define-public python2-pyro
17172 (package
17173 (name "python2-pyro")
17174 (version "3.16")
17175 (source
17176 (origin
17177 (method url-fetch)
17178 (uri (pypi-uri "Pyro" version))
17179 (file-name (string-append "Pyro-" version ".tar.gz"))
17180 (sha256
17181 (base32
17182 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17183 (build-system python-build-system)
17184 (arguments
17185 ;; Pyro is not compatible with Python 3
17186 `(#:python ,python-2
17187 ;; Pyro has no test cases for automatic execution
17188 #:tests? #f))
17189 (home-page "https://pythonhosted.org/Pyro/")
17190 (synopsis "Distributed object manager for Python")
17191 (description "Pyro is a Distributed Object Technology system
17192 written in Python that is designed to be easy to use. It resembles
17193 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17194 which is a system and language independent Distributed Object Technology
17195 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17196 longer maintained. New projects should use Pyro4 instead, which
17197 is the new Pyro version that is actively developed.")
17198 (license license:expat)))
17199
17200 (define-public python2-scientific
17201 (package
17202 (name "python2-scientific")
17203 (version "2.9.4")
17204 (source
17205 (origin
17206 (method git-fetch)
17207 (uri (git-reference
17208 (url "https://github.com/khinsen/ScientificPython")
17209 (commit (string-append "rel" version))))
17210 (file-name (git-file-name name version))
17211 (sha256
17212 (base32
17213 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17214 (build-system python-build-system)
17215 (inputs
17216 `(("netcdf" ,netcdf)))
17217 (propagated-inputs
17218 `(("python-numpy" ,python2-numpy-1.8)
17219 ("python-pyro" ,python2-pyro)))
17220 (arguments
17221 ;; ScientificPython is not compatible with Python 3
17222 `(#:python ,python-2
17223 #:tests? #f ; No test suite
17224 #:phases
17225 (modify-phases %standard-phases
17226 (replace 'build
17227 (lambda* (#:key inputs #:allow-other-keys)
17228 (invoke "python" "setup.py" "build"
17229 (string-append "--netcdf_prefix="
17230 (assoc-ref inputs "netcdf"))))))))
17231 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17232 (synopsis "Python modules for scientific computing")
17233 (description "ScientificPython is a collection of Python modules that are
17234 useful for scientific computing. Most modules are rather general (Geometry,
17235 physical units, automatic derivatives, ...) whereas others are more
17236 domain-specific (e.g. netCDF and PDB support). The library is currently
17237 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17238 (license license:cecill-c)))
17239
17240 (define-public python2-mmtk
17241 (package
17242 (name "python2-mmtk")
17243 (version "2.7.12")
17244 (source
17245 (origin
17246 (method git-fetch)
17247 (uri (git-reference
17248 (url "https://github.com/khinsen/MMTK")
17249 (commit (string-append "rel" version))))
17250 (file-name (git-file-name name version))
17251 (sha256
17252 (base32
17253 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17254 (build-system python-build-system)
17255 (native-inputs
17256 `(("netcdf" ,netcdf)))
17257 (propagated-inputs
17258 `(("python-scientific" ,python2-scientific)
17259 ("python-tkinter" ,python-2 "tk")))
17260 (arguments
17261 `(#:python ,python-2
17262 #:tests? #f
17263 #:phases
17264 (modify-phases %standard-phases
17265 (add-before 'build 'includes-from-scientific
17266 (lambda* (#:key inputs #:allow-other-keys)
17267 (mkdir-p "Include/Scientific")
17268 (copy-recursively
17269 (string-append
17270 (assoc-ref inputs "python-scientific")
17271 "/include/python2.7/Scientific")
17272 "Include/Scientific"))))))
17273 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17274 (synopsis "Python library for molecular simulation")
17275 (description "MMTK is a library for molecular simulations with an emphasis
17276 on biomolecules. It provides widely used methods such as Molecular Dynamics
17277 and normal mode analysis, but also basic routines for implementing new methods
17278 for simulation and analysis. The library is currently not actively maintained
17279 and works only with Python 2 and NumPy < 1.9.")
17280 (license license:cecill-c)))
17281
17282 (define-public python-phonenumbers
17283 (package
17284 (name "python-phonenumbers")
17285 (version "8.9.1")
17286 (source
17287 (origin
17288 (method url-fetch)
17289 (uri (pypi-uri "phonenumbers" version))
17290 (sha256
17291 (base32
17292 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17293 (build-system python-build-system)
17294 (home-page
17295 "https://github.com/daviddrysdale/python-phonenumbers")
17296 (synopsis
17297 "Python library for dealing with international phone numbers")
17298 (description
17299 "This package provides a Python port of Google's libphonenumber library.")
17300 (license license:asl2.0)))
17301
17302 (define-public python2-phonenumbers
17303 (package-with-python2 python-phonenumbers))
17304
17305 (define-public python-send2trash
17306 (package
17307 (name "python-send2trash")
17308 (version "1.5.0")
17309 (source
17310 (origin (method git-fetch)
17311 ;; Source tarball on PyPI doesn't include tests.
17312 (uri (git-reference
17313 (url "https://github.com/hsoft/send2trash")
17314 (commit version)))
17315 (file-name (git-file-name name version))
17316 (sha256
17317 (base32
17318 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17319 (build-system python-build-system)
17320 (arguments
17321 '(#:phases
17322 (modify-phases %standard-phases
17323 (add-before 'check 'pre-check
17324 (lambda _
17325 (mkdir-p "/tmp/foo")
17326 (setenv "HOME" "/tmp/foo")
17327 #t)))))
17328 (home-page "https://github.com/hsoft/send2trash")
17329 (synopsis "Send files to the user's @file{~/Trash} directory")
17330 (description "This package provides a Python library to send files to the
17331 user's @file{~/Trash} directory.")
17332 (properties `((python2-variant . ,(delay python2-send2trash))))
17333 (license license:bsd-3)))
17334
17335 (define-public python2-send2trash
17336 (package
17337 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17338 (arguments
17339 (substitute-keyword-arguments (package-arguments python-send2trash)
17340 ((#:phases phases)
17341 `(modify-phases ,phases
17342 (add-before 'check 'setenv
17343 (lambda _
17344 (setenv "PYTHONPATH"
17345 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17346 #t))))))))
17347
17348 (define-public python-pyfavicon
17349 (package
17350 (name "python-pyfavicon")
17351 (version "0.1.1")
17352 (source
17353 (origin
17354 (method url-fetch)
17355 (uri (pypi-uri "pyfavicon" version))
17356 (sha256
17357 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17358 (build-system python-build-system)
17359 (arguments
17360 ;; There are no tests in the PyPI tarball and the tests from the
17361 ;; repository require online data.
17362 '(#:tests? #f))
17363 (propagated-inputs
17364 `(("python-aiohttp" ,python-aiohttp)
17365 ("python-beautifulsoup4" ,python-beautifulsoup4)
17366 ("python-pillow" ,python-pillow)))
17367 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17368 (synopsis "Async favicon fetcher")
17369 (description
17370 "@code{pyfavicon} is an async favicon fetcher.")
17371 (license license:expat)))
17372
17373 (define-public python-yapf
17374 (package
17375 (name "python-yapf")
17376 (version "0.29.0")
17377 (source
17378 (origin
17379 (method url-fetch)
17380 (uri (pypi-uri "yapf" version))
17381 (sha256
17382 (base32
17383 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17384 (build-system python-build-system)
17385 (home-page "https://github.com/google/yapf")
17386 (synopsis "Formatter for Python code")
17387 (description "YAPF is a formatter for Python code. It's based off of
17388 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17389 takes the code and reformats it to the best formatting that conforms to the
17390 style guide, even if the original code didn't violate the style guide.")
17391 (license license:asl2.0)))
17392
17393 (define-public python2-yapf
17394 (package-with-python2 python-yapf))
17395
17396 (define-public python-yq
17397 (package
17398 (name "python-yq")
17399 (version "2.11.1")
17400 (source
17401 (origin
17402 (method url-fetch)
17403 (uri (pypi-uri "yq" version))
17404 (sha256
17405 (base32
17406 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17407 (build-system python-build-system)
17408 (arguments
17409 '(#:phases
17410 (modify-phases %standard-phases
17411 (add-after 'unpack 'patch
17412 (lambda* (#:key inputs #:allow-other-keys)
17413 (substitute* "yq/__init__.py"
17414 (("Popen\\(\\[\"jq")
17415 (string-append
17416 "Popen([\""
17417 (assoc-ref inputs "jq")
17418 "/bin/jq")))
17419 #t)))))
17420 (inputs
17421 `(("python-argcomplete" ,python-argcomplete)
17422 ("python-pyyaml" ,python-pyyaml)
17423 ("python-xmltodict" ,python-xmltodict)
17424 ("jq" ,jq)))
17425 (native-inputs
17426 `(("python-coverage" ,python-coverage)
17427 ("python-flake8" ,python-flake8)
17428 ("python-wheel" ,python-wheel)))
17429 (home-page "https://github.com/kislyuk/yq")
17430 (synopsis "Command-line YAML/XML processor")
17431 (description
17432 "This package provides @command{yq} and @command{xq} for processing YAML
17433 and XML respectively. The processing is done through @{jq}, @command{jq}
17434 filters can be used to process the data as it passes through.")
17435 (license license:asl2.0)))
17436
17437 (define-public python-gyp
17438 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17439 (revision "0"))
17440 (package
17441 (name "python-gyp")
17442 ;; Google does not release versions,
17443 ;; based on second most recent commit date.
17444 (version (git-version "0.0.0" revision commit))
17445 (source
17446 (origin
17447 ;; Google does not release tarballs,
17448 ;; git checkout is needed.
17449 (method git-fetch)
17450 (uri (git-reference
17451 (url "https://chromium.googlesource.com/external/gyp")
17452 (commit commit)))
17453 (file-name (git-file-name name version))
17454 (sha256
17455 (base32
17456 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17457 (build-system python-build-system)
17458 (home-page "https://gyp.gsrc.io/")
17459 (synopsis "GYP is a Meta-Build system")
17460 (description
17461 "GYP builds build systems for large, cross platform applications.
17462 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17463 files, and Makefiles.")
17464 (license license:bsd-3))))
17465
17466 (define-public python2-gyp
17467 (package-with-python2 python-gyp))
17468
17469 (define-public python-whatever
17470 (package
17471 (name "python-whatever")
17472 (version "0.6")
17473 (source
17474 (origin
17475 (method git-fetch)
17476 (uri (git-reference
17477 (url "https://github.com/Suor/whatever")
17478 (commit version)))
17479 (file-name (git-file-name name version))
17480 (sha256
17481 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17482 (build-system python-build-system)
17483 (arguments
17484 `(#:phases
17485 (modify-phases %standard-phases
17486 (replace 'check
17487 (lambda _
17488 (invoke "py.test"))))))
17489 (native-inputs
17490 `(("python-pytest" ,python-pytest)))
17491 (home-page "https://github.com/Suor/whatever")
17492 (synopsis "Make anonymous functions by partial application of operators")
17493 (description "@code{whatever} provides an easy way to make anonymous
17494 functions by partial application of operators.")
17495 (license license:bsd-3)))
17496
17497 (define-public python2-whatever
17498 (package-with-python2 python-whatever))
17499
17500 (define-public python-funcy
17501 (package
17502 (name "python-funcy")
17503 (version "1.11")
17504 (source
17505 (origin
17506 (method git-fetch)
17507 (uri (git-reference
17508 (url "https://github.com/Suor/funcy")
17509 (commit version)))
17510 (sha256
17511 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17512 (file-name (git-file-name name version))))
17513 (build-system python-build-system)
17514 (arguments
17515 `(#:phases
17516 (modify-phases %standard-phases
17517 (replace 'check
17518 (lambda _
17519 (invoke "py.test"))))))
17520 (native-inputs
17521 `(("python-pytest" ,python-pytest)
17522 ("python-whatever" ,python-whatever)))
17523 (home-page "https://github.com/Suor/funcy")
17524 (synopsis "Functional tools")
17525 (description "@code{funcy} is a library that provides functional tools.
17526 Examples are:
17527 @enumerate
17528 @item merge - Merges collections of the same type
17529 @item walk - Type-preserving map
17530 @item select - Selects a part of a collection
17531 @item take - Takes the first n items of a collection
17532 @item first - Takes the first item of a collection
17533 @item remove - Predicated-removes items of a collection
17534 @item concat - Concatenates two collections
17535 @item flatten - Flattens a collection with subcollections
17536 @item distinct - Returns only distinct items
17537 @item split - Predicated-splits a collection
17538 @item split_at - Splits a collection at a given item
17539 @item group_by - Groups items by group
17540 @item pairwise - Pairs off adjacent items
17541 @item partial - Partially-applies a function
17542 @item curry - Curries a function
17543 @item compose - Composes functions
17544 @item complement - Complements a predicate
17545 @item all_fn - \"all\" with predicate
17546 @end enumerate")
17547 (license license:bsd-3)))
17548
17549 (define-public python2-funcy
17550 (package-with-python2 python-funcy))
17551
17552 (define-public python-isoweek
17553 (package
17554 (name "python-isoweek")
17555 (version "1.3.3")
17556 (source
17557 (origin
17558 (method url-fetch)
17559 (uri (pypi-uri "isoweek" version))
17560 (sha256
17561 (base32
17562 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17563 (build-system python-build-system)
17564 (home-page "https://github.com/gisle/isoweek")
17565 (synopsis "Objects representing a week")
17566 (description "The @code{isoweek} module provide the class Week that
17567 implements the week definition of ISO 8601. This standard also defines
17568 a notation for identifying weeks; yyyyWww (where the W is a literal).
17569 Week instances stringify to this form.")
17570 (license license:bsd-3)))
17571
17572 (define-public python2-isoweek
17573 (package-with-python2 python-isoweek))
17574
17575 (define-public python-pyzbar
17576 (package
17577 (name "python-pyzbar")
17578 (version "0.1.8")
17579 (source
17580 (origin
17581 ;; There's no source tarball on PyPI.
17582 (method git-fetch)
17583 (uri (git-reference
17584 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17585 (commit (string-append "v" version))))
17586 (file-name (git-file-name name version))
17587 (sha256
17588 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17589 (build-system python-build-system)
17590 (arguments
17591 `(#:phases
17592 (modify-phases %standard-phases
17593 (add-after 'unpack 'remove-failing-test
17594 (lambda _
17595 ;; This tests if find_library was called once, but we remove
17596 ;; the call in the stage below to make the library find libzbar.
17597 (delete-file "pyzbar/tests/test_zbar_library.py")
17598 #t))
17599 (add-before 'build 'set-library-file-name
17600 (lambda* (#:key inputs #:allow-other-keys)
17601 (let ((libzbar (assoc-ref inputs "zbar")))
17602 (substitute* "pyzbar/zbar_library.py"
17603 (("find_library\\('zbar'\\)")
17604 (string-append "'" libzbar "/lib/libzbar.so.0'")))
17605 #t))))))
17606 (native-inputs
17607 `(("pkg-config" ,pkg-config)
17608 ("python-numpy" ,python-numpy)
17609 ("python-pillow" ,python-pillow)))
17610 (inputs
17611 `(("zbar" ,zbar)))
17612 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17613 (synopsis "Read one-dimensional barcodes and QR codes")
17614 (description
17615 "Read one-dimensional barcodes and QR codes using the zbar library.
17616
17617 Features:
17618
17619 @itemize
17620 @item Pure python
17621 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
17622 @item Decodes locations of barcodes
17623 @item No dependencies, other than the zbar library itself
17624 @end itemize")
17625 (license license:expat)))
17626
17627 (define-public python-tokenize-rt
17628 (package
17629 (name "python-tokenize-rt")
17630 (version "2.0.1")
17631 (source
17632 (origin
17633 (method url-fetch)
17634 (uri (pypi-uri "tokenize-rt" version))
17635 (sha256
17636 (base32
17637 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17638 (build-system python-build-system)
17639 (home-page "https://github.com/asottile/tokenize-rt")
17640 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17641 (description
17642 "This Python library is a wrapper around @code{tokenize} from the Python
17643 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17644 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17645 and @code{tokens_to_src} to roundtrip.")
17646 (license license:expat)))
17647
17648 (define-public python-future-fstrings
17649 (package
17650 (name "python-future-fstrings")
17651 (version "0.4.1")
17652 (source
17653 (origin
17654 (method url-fetch)
17655 (uri (pypi-uri "future_fstrings" version))
17656 (sha256
17657 (base32
17658 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17659 (build-system python-build-system)
17660 (propagated-inputs
17661 `(("python-tokenize-rt" ,python-tokenize-rt)))
17662 (home-page "https://github.com/asottile/future-fstrings")
17663 (synopsis "Backport of fstrings to Python < 3.6")
17664 (description
17665 "This package provides a UTF-8 compatible encoding
17666 @code{future_fstrings}, which performs source manipulation. It decodes the
17667 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17668 @code{f} strings.")
17669 (license license:expat)))
17670
17671 (define-public python-typed-ast
17672 (package
17673 (name "python-typed-ast")
17674 (version "1.4.0")
17675 (source
17676 (origin
17677 (method git-fetch)
17678 (uri (git-reference
17679 (url "https://github.com/python/typed_ast")
17680 (commit version)))
17681 (sha256
17682 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17683 (file-name (git-file-name name version))))
17684 (build-system python-build-system)
17685 (arguments
17686 `(#:modules ((guix build utils)
17687 (guix build python-build-system)
17688 (ice-9 ftw)
17689 (srfi srfi-1)
17690 (srfi srfi-26))
17691 #:phases
17692 (modify-phases %standard-phases
17693 (replace 'check
17694 (lambda _
17695 (let ((cwd (getcwd)))
17696 (setenv "PYTHONPATH"
17697 (string-append cwd "/build/"
17698 (find (cut string-prefix? "lib" <>)
17699 (scandir (string-append cwd "/build")))
17700 ":"
17701 (getenv "PYTHONPATH"))))
17702 (invoke "pytest")
17703 #t)))))
17704 (native-inputs `(("python-pytest" ,python-pytest)))
17705 (home-page "https://github.com/python/typed_ast")
17706 (synopsis "Fork of Python @code{ast} modules with type comment support")
17707 (description "This package provides a parser similar to the standard
17708 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17709 include PEP 484 type comments and are independent of the version of Python
17710 under which they are run. The @code{typed_ast} parsers produce the standard
17711 Python AST (plus type comments), and are both fast and correct, as they are
17712 based on the CPython 2.7 and 3.7 parsers.")
17713 ;; See the file "LICENSE" for the details.
17714 (license (list license:psfl
17715 license:asl2.0
17716 license:expat)))) ;ast27/Parser/spark.py
17717
17718 (define-public python-typing
17719 (package
17720 (name "python-typing")
17721 (version "3.7.4.3")
17722 (source
17723 (origin
17724 (method url-fetch)
17725 (uri (pypi-uri "typing" version))
17726 (sha256
17727 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
17728 (build-system python-build-system)
17729 (home-page "https://docs.python.org/3/library/typing.html")
17730 (synopsis "Type hints for Python")
17731 (description "This is a backport of the standard library @code{typing}
17732 module to Python versions older than 3.5. Typing defines a standard notation
17733 for Python function and variable type annotations. The notation can be used
17734 for documenting code in a concise, standard format, and it has been designed
17735 to also be used by static and runtime type checkers, static analyzers, IDEs
17736 and other tools.")
17737 (license license:psfl)))
17738
17739 (define-public python2-typing
17740 (package-with-python2 python-typing))
17741
17742 (define-public python-typing-extensions
17743 (package
17744 (name "python-typing-extensions")
17745 (version "3.7.4.2")
17746 (source
17747 (origin
17748 (method url-fetch)
17749 (uri (pypi-uri "typing_extensions" version))
17750 (sha256
17751 (base32
17752 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
17753 (build-system python-build-system)
17754 (home-page
17755 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
17756 (synopsis "Experimental type hints for Python")
17757 (description
17758 "The typing_extensions module contains additional @code{typing} hints not
17759 yet present in the of the @code{typing} standard library.
17760 Included are implementations of:
17761 @enumerate
17762 @item ClassVar
17763 @item ContextManager
17764 @item Counter
17765 @item DefaultDict
17766 @item Deque
17767 @item NewType
17768 @item NoReturn
17769 @item overload
17770 @item Protocol
17771 @item runtime
17772 @item Text
17773 @item Type
17774 @item TYPE_CHECKING
17775 @item AsyncGenerator
17776 @end enumerate\n")
17777 (license license:psfl)))
17778
17779 (define-public bpython
17780 (package
17781 (name "bpython")
17782 (version "0.18")
17783 (source
17784 (origin
17785 (method url-fetch)
17786 (uri (pypi-uri "bpython" version))
17787 (sha256
17788 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
17789 (build-system python-build-system)
17790 (arguments
17791 `(#:phases
17792 (modify-phases %standard-phases
17793 (add-after 'unpack 'remove-failing-test
17794 (lambda _
17795 ;; Remove failing test. FIXME: make it pass
17796 (delete-file "bpython/test/test_args.py")
17797 #t))
17798 (add-after 'wrap 'add-aliases
17799 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
17800 (lambda* (#:key outputs #:allow-other-keys)
17801 (let ((out (assoc-ref outputs "out")))
17802 (for-each
17803 (lambda (old new)
17804 (symlink old (string-append out "/bin/" new)))
17805 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
17806 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
17807 #t)))))
17808 (propagated-inputs
17809 `(("python-pygments" ,python-pygments)
17810 ("python-requests" ,python-requests)
17811 ("python-babel" ,python-babel) ; optional, for internationalization
17812 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
17813 ("python-greenlet" ,python-greenlet)
17814 ("python-urwid" ,python-urwid) ; for bpython-urwid only
17815 ("python-six" ,python-six)))
17816 (native-inputs
17817 `(("python-sphinx" ,python-sphinx)
17818 ("python-mock" ,python-mock)))
17819 (home-page "https://bpython-interpreter.org/")
17820 (synopsis "Fancy interface to the Python interpreter")
17821 (description "Bpython is a fancy interface to the Python
17822 interpreter. bpython's main features are
17823
17824 @enumerate
17825 @item in-line syntax highlighting,
17826 @item readline-like autocomplete with suggestions displayed as you type,
17827 @item expected parameter list for any Python function,
17828 @item \"rewind\" function to pop the last line of code from memory and
17829 re-evaluate,
17830 @item send the code you've entered off to a pastebin,
17831 @item save the code you've entered to a file, and
17832 @item auto-indentation.
17833 @end enumerate")
17834 (license license:expat)))
17835
17836 (define-public bpython2
17837 (let ((base (package-with-python2
17838 (strip-python2-variant bpython))))
17839 (package (inherit base)
17840 (name "bpython2")
17841 (arguments
17842 `(#:python ,python-2
17843 #:phases
17844 (modify-phases %standard-phases
17845 (add-after 'unpack 'remove-failing-test
17846 (lambda _
17847 ;; Remove failing test. FIXME: make it pass
17848 (delete-file "bpython/test/test_args.py")
17849 ;; Disable failing test-cases (renaming inhibits they are
17850 ;; discovered)
17851 (substitute* "bpython/test/test_curtsies_repl.py"
17852 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
17853 (string-append a "xxx_off_" b))
17854 (("^(\\s*def )(test_complex\\W)" _ a b)
17855 (string-append a "xxx_off_" b)))
17856 #t))
17857 (add-before 'build 'rename-scripts
17858 ;; rename the scripts to bypthon2, bpdb2, etc.
17859 (lambda _
17860 (substitute* "setup.py"
17861 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
17862 (string-append name "2" rest "\n"))
17863 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
17864 (string-append name "2" (or sub "") rest "\n")))
17865 #t))))))))
17866
17867 (define-public python-pyinotify
17868 (package
17869 (name "python-pyinotify")
17870 (version "0.9.6")
17871 (source (origin
17872 (method url-fetch)
17873 (uri (pypi-uri "pyinotify" version))
17874 (sha256
17875 (base32
17876 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
17877 (build-system python-build-system)
17878 (arguments `(#:tests? #f)) ;no tests
17879 (home-page "https://github.com/seb-m/pyinotify")
17880 (synopsis "Python library for monitoring inotify events")
17881 (description
17882 "@code{pyinotify} provides a Python interface for monitoring
17883 file system events on Linux.")
17884 (license license:expat)))
17885
17886 (define-public python2-pyinotify
17887 (package-with-python2 python-pyinotify))
17888
17889 ;; Ada parser uses this version.
17890 (define-public python2-quex-0.67.3
17891 (package
17892 (name "python2-quex")
17893 (version "0.67.3")
17894 (source
17895 (origin
17896 (method url-fetch)
17897 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
17898 (version-major+minor version)
17899 "/quex-" version ".zip"))
17900 (sha256
17901 (base32
17902 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
17903 (build-system python-build-system)
17904 (native-inputs
17905 `(("unzip" ,unzip)))
17906 (arguments
17907 `(#:python ,python-2
17908 #:tests? #f
17909 #:phases
17910 (modify-phases %standard-phases
17911 (delete 'configure)
17912 (delete 'build)
17913 (replace 'install
17914 (lambda* (#:key outputs #:allow-other-keys)
17915 (let* ((out (assoc-ref outputs "out"))
17916 (share/quex (string-append out "/share/quex"))
17917 (bin (string-append out "/bin")))
17918 (copy-recursively "." share/quex)
17919 (mkdir-p bin)
17920 (symlink (string-append share/quex "/quex-exe.py")
17921 (string-append bin "/quex"))
17922 #t))))))
17923 (native-search-paths
17924 (list (search-path-specification
17925 (variable "QUEX_PATH")
17926 (files '("share/quex")))))
17927 (home-page "http://quex.sourceforge.net/")
17928 (synopsis "Lexical analyzer generator in Python")
17929 (description "@code{quex} is a lexical analyzer generator in Python.")
17930 (license license:lgpl2.1+))) ; Non-military
17931
17932 (define-public python2-quex
17933 (package (inherit python2-quex-0.67.3)
17934 (name "python2-quex")
17935 (version "0.68.1")
17936 (source
17937 (origin
17938 (method url-fetch)
17939 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
17940 (sha256
17941 (base32
17942 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
17943 (file-name (string-append name "-" version ".tar.gz"))))))
17944
17945 (define-public python-more-itertools
17946 (package
17947 (name "python-more-itertools")
17948 (version "8.2.0")
17949 (source
17950 (origin
17951 (method url-fetch)
17952 (uri (pypi-uri "more-itertools" version))
17953 (sha256
17954 (base32
17955 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
17956 (build-system python-build-system)
17957 (home-page "https://github.com/erikrose/more-itertools")
17958 (synopsis "More routines for operating on iterables, beyond itertools")
17959 (description "Python's built-in @code{itertools} module implements a
17960 number of iterator building blocks inspired by constructs from APL, Haskell,
17961 and SML. @code{more-itertools} includes additional building blocks for
17962 working with iterables.")
17963 (properties `((python2-variant . ,(delay python2-more-itertools))))
17964 (license license:expat)))
17965
17966 ;; The 5.x series are the last versions supporting Python 2.7.
17967 (define-public python2-more-itertools
17968 (package
17969 (inherit python-more-itertools)
17970 (name "python2-more-itertools")
17971 (version "5.0.0")
17972 (source (origin
17973 (method url-fetch)
17974 (uri (pypi-uri "more-itertools" version))
17975 (sha256
17976 (base32
17977 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
17978 (arguments
17979 `(#:python ,python-2))
17980 (propagated-inputs
17981 `(("python2-six" ,python2-six-bootstrap)))))
17982
17983 (define-public python-latexcodec
17984 (package
17985 (name "python-latexcodec")
17986 (version "1.0.7")
17987 (source
17988 (origin
17989 (method url-fetch)
17990 (uri (pypi-uri "latexcodec" version))
17991 (sha256
17992 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
17993 (build-system python-build-system)
17994 (inputs
17995 `(("python-six" ,python-six)))
17996 (home-page "https://readthedocs.org/projects/latexcodec/")
17997 (synopsis "Work with LaTeX code in Python")
17998 (description "Lexer and codec to work with LaTeX code in Python.")
17999 (license license:expat)))
18000
18001 (define-public python-pybtex
18002 (package
18003 (name "python-pybtex")
18004 (version "0.22.2")
18005 (source
18006 (origin
18007 (method url-fetch)
18008 (uri (pypi-uri "pybtex" version))
18009 (sha256
18010 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18011 (build-system python-build-system)
18012 (native-inputs
18013 `(("python-nose" ,python-nose)))
18014 (inputs
18015 `(("python-latexcodec" ,python-latexcodec)
18016 ("python-pyyaml" ,python-pyyaml)
18017 ("python-six" ,python-six)))
18018 (arguments
18019 `(#:test-target "nosetests"))
18020 (home-page "https://pybtex.org/")
18021 (synopsis "BibTeX-compatible bibliography processor")
18022 (description "Pybtex is a BibTeX-compatible bibliography processor written
18023 in Python. You can simply type pybtex instead of bibtex.")
18024 (license license:expat)))
18025
18026 (define-public python-onetimepass
18027 (package
18028 (name "python-onetimepass")
18029 (version "1.0.1")
18030 (source
18031 (origin
18032 (method url-fetch)
18033 (uri (pypi-uri "onetimepass" version))
18034 (sha256
18035 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18036 (build-system python-build-system)
18037 (propagated-inputs `(("python-six" ,python-six)))
18038 (home-page "https://github.com/tadeck/onetimepass/")
18039 (synopsis "One-time password library")
18040 (description "Python one-time password library for HMAC-based (HOTP) and
18041 time-based (TOTP) passwords.")
18042 (license license:expat)))
18043
18044 (define-public python-parso
18045 (package
18046 (name "python-parso")
18047 (version "0.7.1")
18048 (source
18049 (origin
18050 (method url-fetch)
18051 (uri (pypi-uri "parso" version))
18052 (sha256
18053 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18054 (native-inputs
18055 `(("python-pytest" ,python-pytest)))
18056 (build-system python-build-system)
18057 (arguments
18058 `(#:phases (modify-phases %standard-phases
18059 (replace 'check
18060 (lambda _ (invoke "pytest" "-vv"))))))
18061 (home-page "https://github.com/davidhalter/parso")
18062 (synopsis "Python Parser")
18063 (description "Parso is a Python parser that supports error recovery and
18064 round-trip parsing for different Python versions (in multiple Python versions).
18065 Parso is also able to list multiple syntax errors in your Python file.")
18066 (license license:expat)))
18067
18068 (define-public python2-parso
18069 (package-with-python2 python-parso))
18070
18071 (define-public python-async-generator
18072 (package
18073 (name "python-async-generator")
18074 (version "1.10")
18075 (source
18076 (origin
18077 (method url-fetch)
18078 (uri (pypi-uri "async_generator" version))
18079 (sha256
18080 (base32
18081 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18082 (build-system python-build-system)
18083 (native-inputs
18084 `(("python-pytest" ,python-pytest)))
18085 (home-page "https://github.com/python-trio/async_generator")
18086 (synopsis "Async generators and context managers for Python 3.5+")
18087 (description "@code{async_generator} back-ports Python 3.6's native async
18088 generators and Python 3.7's context managers into Python 3.5.")
18089 ;; Dual licensed.
18090 (license (list license:expat license:asl2.0))))
18091
18092 (define-public python-async-timeout
18093 (package
18094 (name "python-async-timeout")
18095 (version "3.0.1")
18096 (source
18097 (origin
18098 (method url-fetch)
18099 (uri (pypi-uri "async-timeout" version))
18100 (sha256
18101 (base32
18102 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18103 (build-system python-build-system)
18104 (home-page "https://github.com/aio-libs/async_timeout/")
18105 (synopsis "Timeout context manager for asyncio programs")
18106 (description "@code{async-timeout} provides a timeout timeout context
18107 manager compatible with @code{asyncio}.")
18108 (license license:asl2.0)))
18109
18110 (define-public python-glob2
18111 (package
18112 (name "python-glob2")
18113 (version "0.7")
18114 (source
18115 (origin
18116 (method git-fetch)
18117 (uri (git-reference
18118 (url "https://github.com/miracle2k/python-glob2")
18119 (commit (string-append "v" version))))
18120 (file-name (git-file-name name version))
18121 (sha256
18122 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18123 (build-system python-build-system)
18124 (home-page "https://github.com/miracle2k/python-glob2/")
18125 (synopsis "Extended Version of the python buildin glob module")
18126 (description "This is an extended version of the Python
18127 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18128 adds:
18129
18130 @itemize
18131 @item The ability to capture the text matched by glob patterns, and return
18132 those matches alongside the file names.
18133 @item A recursive @code{**} globbing syntax, akin for example to the
18134 @code{globstar} option of Bash.
18135 @item The ability to replace the file system functions used, in order to glob
18136 on virtual file systems.
18137 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18138 @end itemize
18139
18140 Glob2 currently based on the glob code from Python 3.3.1.")
18141 (license license:bsd-2)))
18142
18143 (define-public python2-glob2
18144 (package-with-python2 python-glob2))
18145
18146 (define-public python-gipc
18147 (package
18148 (name "python-gipc")
18149 (version "0.6.0")
18150 (source
18151 (origin
18152 (method url-fetch)
18153 (uri (pypi-uri "gipc" version ".zip"))
18154 (sha256
18155 (base32
18156 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18157 (build-system python-build-system)
18158 (native-inputs
18159 `(("unzip" ,unzip)))
18160 (propagated-inputs
18161 `(("python-gevent" ,python-gevent)))
18162 (home-page "https://gehrcke.de/gipc/")
18163 (synopsis "Child process management in the context of gevent")
18164 (description "Usage of Python's multiprocessing package in a
18165 gevent-powered application may raise problems. With @code{gipc},
18166 process-based child processes can safely be created anywhere within a
18167 gevent-powered application.")
18168 (license license:expat)))
18169
18170 (define-public python2-gipc
18171 (package-with-python2 python-gipc))
18172
18173 (define-public python-fusepy
18174 (package
18175 (name "python-fusepy")
18176 (version "2.0.4")
18177 (source
18178 (origin
18179 (method url-fetch)
18180 (uri (pypi-uri "fusepy" version))
18181 (sha256
18182 (base32
18183 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18184 (build-system python-build-system)
18185 (arguments
18186 `(#:phases
18187 (modify-phases %standard-phases
18188 (add-before 'build 'set-library-file-name
18189 (lambda* (#:key inputs #:allow-other-keys)
18190 (let ((fuse (assoc-ref inputs "fuse")))
18191 (substitute* "fuse.py"
18192 (("find_library\\('fuse'\\)")
18193 (string-append "'" fuse "/lib/libfuse.so'")))
18194 #t))))))
18195 (propagated-inputs
18196 `(("fuse" ,fuse)))
18197 (home-page "https://github.com/fusepy/fusepy")
18198 (synopsis "Simple ctypes bindings for FUSE")
18199 (description "Python module that provides a simple interface to FUSE and
18200 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18201 (license license:isc)))
18202
18203 (define-public python2-fusepy
18204 (package-with-python2 python-fusepy))
18205
18206 (define-public python-fusepyng
18207 (package
18208 (name "python-fusepyng")
18209 (version "1.0.7")
18210 (source
18211 (origin
18212 (method url-fetch)
18213 (uri (pypi-uri "fusepyng" version))
18214 (sha256
18215 (base32
18216 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18217 (build-system python-build-system)
18218 (arguments
18219 '(#:phases
18220 (modify-phases %standard-phases
18221 (add-after 'unpack 'set-libfuse-path
18222 (lambda* (#:key inputs #:allow-other-keys)
18223 (let ((fuse (assoc-ref inputs "fuse")))
18224 (substitute* "fusepyng.py"
18225 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18226 (string-append "\"" fuse "/lib/libfuse.so\""))))
18227 #t)))))
18228 (inputs
18229 `(("fuse" ,fuse)))
18230 (propagated-inputs
18231 `(("python-paramiko" ,python-paramiko)))
18232 (home-page "https://github.com/rianhunter/fusepyng")
18233 (synopsis "Simple ctypes bindings for FUSE")
18234 (description "@code{fusepyng} is a Python module that provides a simple
18235 interface to FUSE on various operating systems. It's just one file and is
18236 implemented using @code{ctypes}.")
18237 (license license:isc)))
18238
18239 (define-public python2-gdrivefs
18240 (package
18241 (name "python2-gdrivefs")
18242 (version "0.14.9")
18243 (source
18244 (origin
18245 (method url-fetch)
18246 (uri (pypi-uri "gdrivefs" version))
18247 (sha256
18248 (base32
18249 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18250 (build-system python-build-system)
18251 (arguments
18252 `(#:python ,python-2
18253 #:phases
18254 (modify-phases %standard-phases
18255 (add-before 'build 'patch-setup-py
18256 (lambda _
18257 ;; Update requirements from dependency==version
18258 ;; to dependency>=version
18259 (substitute* "gdrivefs/resources/requirements.txt"
18260 (("==") ">="))
18261 #t)))))
18262 (native-inputs
18263 `(("python2-gipc" ,python2-gipc)
18264 ("python2-gevent" ,python2-gevent)
18265 ("python2-greenlet" ,python2-greenlet)
18266 ("python2-httplib2" ,python2-httplib2)
18267 ("python2-uritemplate" ,python2-uritemplate)
18268 ("python2-oauth2client" ,python2-oauth2client)
18269 ("python2-six" ,python2-six)))
18270 (propagated-inputs
18271 `(("python2-dateutil" ,python2-dateutil)
18272 ("python2-fusepy" ,python2-fusepy)
18273 ("python2-google-api-client" ,python2-google-api-client)))
18274 (home-page "https://github.com/dsoprea/GDriveFS")
18275 (synopsis "Mount Google Drive as a local file system")
18276 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18277 under Python 2.7.")
18278 (license license:gpl2)))
18279
18280 (define-public python-userspacefs
18281 (package
18282 (name "python-userspacefs")
18283 (version "1.0.13")
18284 (source
18285 (origin
18286 (method url-fetch)
18287 (uri (pypi-uri "userspacefs" version))
18288 (sha256
18289 (base32
18290 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18291 (build-system python-build-system)
18292 (propagated-inputs
18293 `(("python-fusepyng" ,python-fusepyng)))
18294 (home-page "https://github.com/rianhunter/userspacefs")
18295 (synopsis "User-space file systems for Python")
18296 (description
18297 "@code{userspacefs} is a library that allows you to easily write
18298 user-space file systems in Python.")
18299 (license license:gpl3+)))
18300
18301 (define-public pybind11
18302 (package
18303 (name "pybind11")
18304 (version "2.4.3")
18305 (source (origin
18306 (method git-fetch)
18307 (uri (git-reference
18308 (url "https://github.com/pybind/pybind11")
18309 (commit (string-append "v" version))))
18310 (sha256
18311 (base32
18312 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18313 (file-name (git-file-name name version))))
18314 (build-system cmake-build-system)
18315 (native-inputs
18316 `(("python" ,python-wrapper)
18317
18318 ;; The following dependencies are used for tests.
18319 ("python-pytest" ,python-pytest)
18320 ("catch" ,catch-framework2-1)
18321 ("eigen" ,eigen)))
18322 (arguments
18323 `(#:configure-flags
18324 (list (string-append "-DCATCH_INCLUDE_DIR="
18325 (assoc-ref %build-inputs "catch")
18326 "/include/catch"))
18327
18328 #:phases (modify-phases %standard-phases
18329 (add-after 'install 'install-python
18330 (lambda* (#:key outputs #:allow-other-keys)
18331 (let ((out (assoc-ref outputs "out")))
18332 (with-directory-excursion "../source"
18333 (setenv "PYBIND11_USE_CMAKE" "yes")
18334 (invoke "python" "setup.py" "install"
18335 "--single-version-externally-managed"
18336 "--root=/"
18337 (string-append "--prefix=" out)))))))
18338
18339 #:test-target "check"))
18340 (home-page "https://github.com/pybind/pybind11/")
18341 (synopsis "Seamless operability between C++11 and Python")
18342 (description
18343 "@code{pybind11} is a lightweight header-only library that exposes C++
18344 types in Python and vice versa, mainly to create Python bindings of existing
18345 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18346 library: to minimize boilerplate code in traditional extension modules by
18347 inferring type information using compile-time introspection.")
18348 (license license:bsd-3)))
18349
18350 (define-public python-fasteners
18351 (package
18352 (name "python-fasteners")
18353 (version "0.15")
18354 (source
18355 (origin
18356 (method url-fetch)
18357 (uri (pypi-uri "fasteners" version))
18358 (sha256
18359 (base32
18360 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18361 (build-system python-build-system)
18362 (propagated-inputs
18363 `(("python-monotonic" ,python-monotonic)
18364 ("python-six" ,python-six)))
18365 (native-inputs
18366 `(("python-testtools" ,python-testtools)))
18367 (home-page "https://github.com/harlowja/fasteners")
18368 (synopsis "Python package that provides useful locks")
18369 (description
18370 "This package provides a Python program that provides following locks:
18371
18372 @itemize
18373 @item Locking decorator
18374 @item Reader-writer locks
18375 @item Inter-process locks
18376 @item Generic helpers
18377 @end itemize\n")
18378 (properties `((python2-variant . ,(delay python2-fasteners))))
18379 (license license:asl2.0)))
18380
18381 (define-public python2-fasteners
18382 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18383 (package
18384 (inherit base)
18385 (propagated-inputs
18386 `(("python2-futures" ,python2-futures)
18387 ,@(package-propagated-inputs base))))))
18388
18389 (define-public python-requests-file
18390 (package
18391 (name "python-requests-file")
18392 (version "1.4.3")
18393 (source
18394 (origin
18395 (method url-fetch)
18396 (uri (pypi-uri "requests-file" version))
18397 (sha256
18398 (base32
18399 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18400 (build-system python-build-system)
18401 (propagated-inputs
18402 `(("python-requests" ,python-requests)
18403 ("python-six" ,python-six)))
18404 (home-page
18405 "https://github.com/dashea/requests-file")
18406 (synopsis "File transport adapter for Requests")
18407 (description
18408 "Requests-File is a transport adapter for use with the Requests Python
18409 library to allow local file system access via @code{file://} URLs.")
18410 (license license:asl2.0)))
18411
18412 (define-public python2-requests-file
18413 (package-with-python2 python-requests-file))
18414
18415 (define-public python-identify
18416 (package
18417 (name "python-identify")
18418 (version "1.4.25")
18419 (source
18420 (origin
18421 ;; There are no tests in the PyPI tarball.
18422 (method git-fetch)
18423 (uri (git-reference
18424 (url "https://github.com/chriskuehl/identify")
18425 (commit (string-append "v" version))))
18426 (file-name (git-file-name name version))
18427 (sha256
18428 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18429 (build-system python-build-system)
18430 (arguments
18431 `(#:phases
18432 (modify-phases %standard-phases
18433 (replace 'check
18434 (lambda _
18435 (invoke "pytest" "-vv"))))))
18436 (native-inputs
18437 `(("python-coverage" ,python-coverage)
18438 ("python-pytest" ,python-pytest)))
18439 (propagated-inputs
18440 `(("python-editdistance" ,python-editdistance)))
18441 (home-page "https://github.com/chriskuehl/identify")
18442 (synopsis "File identification library for Python")
18443 (description
18444 "@code{identify} is a file identification library for Python. Given
18445 a file (or some information about a file), return a set of standardized tags
18446 identifying what the file is.")
18447 (license license:expat)))
18448
18449 (define-public python-tldextract
18450 (package
18451 (name "python-tldextract")
18452 (version "2.2.0")
18453 (source
18454 (origin
18455 (method url-fetch)
18456 (uri (pypi-uri "tldextract" version))
18457 (sha256
18458 (base32
18459 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18460 (build-system python-build-system)
18461 (native-inputs
18462 `(("python-pytest" ,python-pytest)
18463 ("python-responses" ,python-responses)))
18464 (propagated-inputs
18465 `(("python-idna" ,python-idna)
18466 ("python-requests" ,python-requests)
18467 ("python-requests-file" ,python-requests-file)))
18468 (home-page
18469 "https://github.com/john-kurkowski/tldextract")
18470 (synopsis
18471 "Separate the TLD from the registered domain and subdomains of a URL")
18472 (description
18473 "TLDExtract accurately separates the TLD from the registered domain and
18474 subdomains of a URL, using the Public Suffix List. By default, this includes
18475 the public ICANN TLDs and their exceptions. It can optionally support the
18476 Public Suffix List's private domains as well.")
18477 (license license:bsd-3)))
18478
18479 (define-public python2-tldextract
18480 (package-with-python2 python-tldextract))
18481
18482 (define-public python-nodeenv
18483 (package
18484 (name "python-nodeenv")
18485 (version "1.4.0")
18486 (source
18487 (origin
18488 ;; There's no tarball in PyPI.
18489 (method git-fetch)
18490 (uri (git-reference
18491 (url "https://github.com/ekalinin/nodeenv")
18492 (commit version)))
18493 (file-name (git-file-name name version))
18494 (sha256
18495 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18496 (build-system python-build-system)
18497 (arguments
18498 `(#:phases
18499 (modify-phases %standard-phases
18500 (replace 'check
18501 (lambda _
18502 ;; This test fails. It tries to open a network socket.
18503 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18504 (native-inputs
18505 `(("python-coverage" ,python-coverage)
18506 ("python-mock" ,python-mock)
18507 ("python-pytest" ,python-pytest)))
18508 (home-page "https://ekalinin.github.io/nodeenv/")
18509 (synopsis "Create isolated node.js environments")
18510 (description
18511 "Nodeenv (node.js virtual environment) is a tool to create isolated
18512 node.js environments. It creates an environment that has its own installation
18513 directories, that doesn't share libraries with other node.js virtual
18514 environments.")
18515 (license license:bsd-3)))
18516
18517 (define-public python-pynamecheap
18518 (package
18519 (name "python-pynamecheap")
18520 (version "0.0.3")
18521 (source
18522 (origin
18523 (method url-fetch)
18524 (uri (pypi-uri "PyNamecheap" version))
18525 (sha256
18526 (base32
18527 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18528 (build-system python-build-system)
18529 (propagated-inputs
18530 `(("python-requests" ,python-requests)))
18531 (home-page
18532 "https://github.com/Bemmu/PyNamecheap")
18533 (synopsis
18534 "Namecheap API client in Python")
18535 (description
18536 "PyNamecheap is a Namecheap API client in Python.")
18537 (license license:expat)))
18538
18539 (define-public python2-pynamecheap
18540 (package-with-python2 python-pynamecheap))
18541
18542 (define-public python-dns-lexicon
18543 (package
18544 (name "python-dns-lexicon")
18545 (version "2.4.0")
18546 (source
18547 (origin
18548 (method url-fetch)
18549 (uri (pypi-uri "dns-lexicon" version))
18550 (sha256
18551 (base32
18552 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18553 (build-system python-build-system)
18554 (arguments
18555 `(#:tests? #f)) ;requires internet access
18556 (propagated-inputs
18557 `(("python-future" ,python-future)
18558 ("python-pynamecheap" ,python-pynamecheap)
18559 ("python-requests" ,python-requests)
18560 ("python-tldextract" ,python-tldextract)
18561 ("python-urllib3" ,python-urllib3)))
18562 (home-page "https://github.com/AnalogJ/lexicon")
18563 (synopsis
18564 "Manipulate DNS records on various DNS providers")
18565 (description
18566 "Lexicon provides a way to manipulate DNS records on multiple DNS
18567 providers in a standardized way. It has a CLI but it can also be used as a
18568 Python library. It was designed to be used in automation, specifically with
18569 Let's Encrypt.")
18570 (license license:expat)))
18571
18572 (define-public python2-dns-lexicon
18573 (package-with-python2 python-dns-lexicon))
18574
18575 (define-public python-cfgv
18576 (package
18577 (name "python-cfgv")
18578 (version "3.1.0")
18579 (source
18580 (origin
18581 ;; There are no tests in the PyPI tarball.
18582 (method git-fetch)
18583 (uri (git-reference
18584 (url "https://github.com/asottile/cfgv")
18585 (commit (string-append "v" version))))
18586 (file-name (git-file-name name version))
18587 (sha256
18588 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18589 (build-system python-build-system)
18590 (arguments
18591 `(#:phases
18592 (modify-phases %standard-phases
18593 (replace 'check
18594 (lambda _
18595 (invoke "pytest" "-vv"))))))
18596 (native-inputs
18597 `(("python-covdefaults" ,python-covdefaults)
18598 ("python-coverage" ,python-coverage)
18599 ("python-pytest" ,python-pytest)))
18600 (home-page "https://github.com/asottile/cfgv")
18601 (synopsis "Configuration validation library")
18602 (description
18603 "This library helps to validate configuration files and produce human
18604 readable error messages.")
18605 (license license:expat)))
18606
18607 (define-public python-commandlines
18608 (package
18609 (name "python-commandlines")
18610 (version "0.4.1")
18611 (source
18612 (origin
18613 (method url-fetch)
18614 (uri (pypi-uri "commandlines" version))
18615 (sha256
18616 (base32
18617 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
18618 (build-system python-build-system)
18619 (home-page "https://github.com/chrissimpkins/commandlines")
18620 (synopsis "Command line argument to object parsing library")
18621 (description
18622 "@code{Commandlines} is a Python library for command line application
18623 development that supports command line argument parsing, command string
18624 validation testing and application logic.")
18625 (license license:expat)))
18626
18627 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
18628 ;; python-numba. They have a very unflexible relationship.
18629 (define-public python-numba
18630 (package
18631 (name "python-numba")
18632 (version "0.46.0")
18633 (source
18634 (origin
18635 (method url-fetch)
18636 (uri (pypi-uri "numba" version))
18637 (sha256
18638 (base32
18639 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
18640 (build-system python-build-system)
18641 (arguments
18642 `(#:modules ((guix build utils)
18643 (guix build python-build-system)
18644 (ice-9 ftw)
18645 (srfi srfi-1)
18646 (srfi srfi-26))
18647 #:phases
18648 (modify-phases %standard-phases
18649 (add-after 'unpack 'disable-proprietary-features
18650 (lambda _
18651 (setenv "NUMBA_DISABLE_HSA" "1")
18652 (setenv "NUMBA_DISABLE_CUDA" "1")
18653 #t))
18654 (add-after 'unpack 'remove-failing-tests
18655 (lambda _
18656 ;; FIXME: These tests fail for unknown reasons:
18657 ;; test_non_writable_pycache, test_non_creatable_pycache, and
18658 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
18659 (substitute* "numba/tests/test_dispatcher.py"
18660 (("def test(_non_writable_pycache)" _ m)
18661 (string-append "def guix_skip" m))
18662 (("def test(_non_creatable_pycache)" _ m)
18663 (string-append "def guix_skip" m))
18664 (("def test(_frozen)" _ m)
18665 (string-append "def guix_skip" m)))
18666
18667 ;; These tests fail because we don't run the tests from the build
18668 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
18669 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
18670 (substitute* "numba/tests/test_pycc.py"
18671 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
18672 (string-append "def guix_skip" m)))
18673
18674 ;; These tests fail because our version of Python does not have
18675 ;; a recognizable front-end for the Numba distribution to use
18676 ;; to check against.
18677 (substitute* "numba/tests/test_entrypoints.py"
18678 (("def test(_init_entrypoint)" _ m)
18679 (string-append "def guix_skip" m)))
18680 (substitute* "numba/tests/test_jitclasses.py"
18681 (("def test(_jitclass_longlabel_not_truncated)" _ m)
18682 (string-append "def guix_skip" m)))
18683 #t))
18684 (replace 'check
18685 (lambda _
18686 (let ((cwd (getcwd)))
18687 (setenv "PYTHONPATH"
18688 (string-append cwd "/build/"
18689 (find (cut string-prefix? "lib" <>)
18690 (scandir (string-append cwd "/build")))
18691 ":"
18692 (getenv "PYTHONPATH")))
18693 ;; Something is wrong with the PYTHONPATH when running the
18694 ;; tests from the build directory, as it complains about not being
18695 ;; able to import certain modules.
18696 (with-directory-excursion "/tmp"
18697 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
18698 #t)))))
18699 (propagated-inputs
18700 `(("python-llvmlite" ,python-llvmlite)
18701 ("python-numpy" ,python-numpy)
18702 ("python-singledispatch" ,python-singledispatch)))
18703 ;; Needed for tests.
18704 (inputs
18705 `(("python-jinja2" ,python-jinja2)
18706 ("python-pygments" ,python-pygments)))
18707 (home-page "https://numba.pydata.org")
18708 (synopsis "Compile Python code using LLVM")
18709 (description "Numba gives you the power to speed up your applications with
18710 high performance functions written directly in Python. With a few
18711 annotations, array-oriented and math-heavy Python code can be just-in-time
18712 compiled to native machine instructions, similar in performance to C, C++ and
18713 Fortran, without having to switch languages or Python interpreters.
18714
18715 Numba works by generating optimized machine code using the LLVM compiler
18716 infrastructure at import time, runtime, or statically (using the included pycc
18717 tool).")
18718 (license license:bsd-3)))
18719
18720 (define-public python-numcodecs
18721 (package
18722 (name "python-numcodecs")
18723 (version "0.6.4")
18724 (source
18725 (origin
18726 (method url-fetch)
18727 (uri (pypi-uri "numcodecs" version))
18728 (sha256
18729 (base32
18730 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
18731 (build-system python-build-system)
18732 (propagated-inputs
18733 `(("python-numpy" ,python-numpy)
18734 ("python-msgpack" ,python-msgpack)))
18735 (native-inputs
18736 `(("python-pytest" ,python-pytest)
18737 ("python-setuptools-scm" ,python-setuptools-scm)))
18738 (home-page "https://github.com/zarr-developers/numcodecs")
18739 (synopsis "Buffer compression and transformation codecs")
18740 (description
18741 "This Python package provides buffer compression and transformation
18742 codecs for use in data storage and communication applications.")
18743 (license license:expat)))
18744
18745 (define-public python-asciitree
18746 (package
18747 (name "python-asciitree")
18748 (version "0.3.3")
18749 (source
18750 (origin
18751 (method url-fetch)
18752 (uri (pypi-uri "asciitree" version))
18753 (sha256
18754 (base32
18755 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
18756 (build-system python-build-system)
18757 (home-page "https://github.com/mbr/asciitree")
18758 (synopsis "Draws ASCII trees")
18759 (description "This package draws tree structures using characters.")
18760 (license license:expat)))
18761
18762 (define-public python-zarr
18763 (package
18764 (name "python-zarr")
18765 (version "2.4.0")
18766 (source
18767 (origin
18768 (method url-fetch)
18769 (uri (pypi-uri "zarr" version))
18770 (sha256
18771 (base32
18772 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
18773 (build-system python-build-system)
18774 (arguments
18775 `(#:phases
18776 (modify-phases %standard-phases
18777 (add-after 'unpack 'disable-service-tests
18778 (lambda _
18779 (setenv "ZARR_TEST_ABS" "0")
18780 (setenv "ZARR_TEST_MONGO" "0")
18781 (setenv "ZARR_TEST_REDIS" "0")
18782 #t))
18783 (replace 'check
18784 (lambda _
18785 (invoke "pytest" "-vv" "-k" "not lmdb")
18786 #t)))))
18787 (propagated-inputs
18788 `(("python-asciitree" ,python-asciitree)
18789 ("python-fasteners" ,python-fasteners)
18790 ("python-numcodecs" ,python-numcodecs)
18791 ("python-numpy" ,python-numpy)))
18792 (native-inputs
18793 `(("python-pytest" ,python-pytest)
18794 ("python-setuptools-scm" ,python-setuptools-scm)))
18795 (home-page "https://github.com/zarr-developers/zarr-python")
18796 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
18797 (description
18798 "This package provides an implementation of chunked, compressed,
18799 N-dimensional arrays for Python.")
18800 (license license:expat)))
18801
18802 (define-public python-anndata
18803 (package
18804 (name "python-anndata")
18805 (version "0.7.1")
18806 (source
18807 (origin
18808 (method url-fetch)
18809 (uri (pypi-uri "anndata" version))
18810 (sha256
18811 (base32
18812 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
18813 (build-system python-build-system)
18814 (arguments
18815 `(#:phases
18816 (modify-phases %standard-phases
18817 (add-after 'unpack 'delete-inconvenient-tests
18818 (lambda _
18819 ;; This test depends on python-scikit-learn.
18820 (delete-file "anndata/tests/test_inplace_subset.py")
18821 #t))
18822 (delete 'check)
18823 (add-after 'install 'check
18824 (lambda* (#:key inputs outputs #:allow-other-keys)
18825 (add-installed-pythonpath inputs outputs)
18826 (invoke "pytest" "-vv"))))))
18827 (propagated-inputs
18828 `(("python-h5py" ,python-h5py)
18829 ("python-importlib-metadata" ,python-importlib-metadata)
18830 ("python-natsort" ,python-natsort)
18831 ("python-numcodecs" ,python-numcodecs)
18832 ("python-packaging" ,python-packaging)
18833 ("python-pandas" ,python-pandas)
18834 ("python-scipy" ,python-scipy)
18835 ("python-zarr" ,python-zarr)))
18836 (native-inputs
18837 `(("python-joblib" ,python-joblib)
18838 ("python-pytest" ,python-pytest)
18839 ("python-setuptools-scm" ,python-setuptools-scm)))
18840 (home-page "https://github.com/theislab/anndata")
18841 (synopsis "Annotated data for data analysis pipelines")
18842 (description "Anndata is a package for simple (functional) high-level APIs
18843 for data analysis pipelines. In this context, it provides an efficient,
18844 scalable way of keeping track of data together with learned annotations and
18845 reduces the code overhead typically encountered when using a mostly
18846 object-oriented library such as @code{scikit-learn}.")
18847 (license license:bsd-3)))
18848
18849 (define-public python-dill
18850 (package
18851 (name "python-dill")
18852 (version "0.3.1.1")
18853 (source
18854 (origin
18855 (method url-fetch)
18856 (uri (pypi-uri "dill" version))
18857 (sha256
18858 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
18859 (build-system python-build-system)
18860 (arguments
18861 `(#:phases
18862 (modify-phases %standard-phases
18863 (replace 'check
18864 (lambda _
18865 (with-directory-excursion "/tmp"
18866 (invoke "nosetests" "-v"))
18867 #t)))))
18868 (native-inputs
18869 `(("python-nose" ,python-nose)))
18870 (home-page "https://pypi.org/project/dill/")
18871 (synopsis "Serialize all of Python")
18872 (description "Dill extends Python's @code{pickle} module for serializing
18873 and de-serializing Python objects to the majority of the built-in Python
18874 types. Dill provides the user the same interface as the @code{pickle} module,
18875 and also includes some additional features. In addition to pickling Python
18876 objects, @code{dill} provides the ability to save the state of an interpreter
18877 session in a single command. Hence, it would be feasible to save a
18878 interpreter session, close the interpreter, ship the pickled file to another
18879 computer, open a new interpreter, unpickle the session and thus continue from
18880 the saved state of the original interpreter session.")
18881 (license license:bsd-3)))
18882
18883 (define-public python-multiprocess
18884 (package
18885 (name "python-multiprocess")
18886 (version "0.70.9")
18887 (source
18888 (origin
18889 (method url-fetch)
18890 (uri (pypi-uri "multiprocess" version))
18891 (sha256
18892 (base32
18893 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
18894 (build-system python-build-system)
18895 (arguments
18896 `(#:phases
18897 (modify-phases %standard-phases
18898 (add-after 'unpack 'disable-broken-tests
18899 (lambda _
18900 ;; This test is broken as there is no keyboard interrupt.
18901 (substitute* "py3.7/multiprocess/tests/__init__.py"
18902 (("^(.*)def test_wait_result"
18903 line indent)
18904 (string-append indent
18905 "@unittest.skip(\"Disabled by Guix\")\n"
18906 line)))
18907 #t))
18908 ;; Tests must be run after installation.
18909 (delete 'check)
18910 (add-after 'install 'check
18911 (lambda* (#:key inputs outputs #:allow-other-keys)
18912 (add-installed-pythonpath inputs outputs)
18913 (invoke "python" "-m" "multiprocess.tests")
18914 #t)))))
18915 (propagated-inputs
18916 `(("python-dill" ,python-dill)))
18917 (home-page "https://pypi.org/project/multiprocess/")
18918 (synopsis "Multiprocessing and multithreading in Python")
18919 (description
18920 "This package is a fork of the multiprocessing Python package, a package
18921 which supports the spawning of processes using the API of the standard
18922 library's @code{threading} module.")
18923 (license license:bsd-3)))
18924
18925 (define-public python-toolz
18926 (package
18927 (name "python-toolz")
18928 (version "0.9.0")
18929 (source
18930 (origin
18931 (method url-fetch)
18932 (uri (pypi-uri "toolz" version))
18933 (sha256
18934 (base32
18935 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
18936 (build-system python-build-system)
18937 ;; FIXME: tests cannot be computed: "Can't perform this operation for
18938 ;; unregistered loader type"
18939 (arguments '(#:tests? #f))
18940 (home-page "https://github.com/pytoolz/toolz/")
18941 (synopsis "List processing tools and functional utilities")
18942 (description
18943 "This package provides a set of utility functions for iterators,
18944 functions, and dictionaries.")
18945 (license license:bsd-3)))
18946
18947 (define-public python2-toolz
18948 (package-with-python2 python-toolz))
18949
18950 (define-public python-cytoolz
18951 (package
18952 (name "python-cytoolz")
18953 (version "0.9.0.1")
18954 (source
18955 (origin
18956 (method url-fetch)
18957 (uri (pypi-uri "cytoolz" version))
18958 (sha256
18959 (base32
18960 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
18961 (build-system python-build-system)
18962 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
18963 ;; 'exceptions'"
18964 (arguments '(#:tests? #f))
18965 (propagated-inputs
18966 `(("python-toolz" ,python-toolz)))
18967 (native-inputs
18968 `(("python-cython" ,python-cython)))
18969 (home-page "https://github.com/pytoolz/cytoolz")
18970 (synopsis "High performance functional utilities")
18971 (description
18972 "The cytoolz package implements the same API as provided by toolz. The
18973 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
18974 that is accessible to other projects developed in Cython.")
18975 (license license:bsd-3)))
18976
18977 (define-public python-sortedcontainers
18978 (package
18979 (name "python-sortedcontainers")
18980 (version "2.1.0")
18981 (source
18982 (origin
18983 (method url-fetch)
18984 (uri (pypi-uri "sortedcontainers" version))
18985 (sha256
18986 (base32
18987 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
18988 (build-system python-build-system)
18989 (arguments
18990 ;; FIXME: Tests require many extra dependencies, and would introduce
18991 ;; a circular dependency on hypothesis, which uses this package.
18992 '(#:tests? #f))
18993 (propagated-inputs
18994 `(("python-appdirs" ,python-appdirs)
18995 ("python-distlib" ,python-distlib)
18996 ("python-filelock" ,python-filelock)
18997 ("python-six" ,python-six-bootstrap)))
18998 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
18999 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19000 (description
19001 "This package provides a sorted collections library, written in
19002 pure-Python.")
19003 (license license:asl2.0)))
19004
19005 (define-public python2-sortedcontainers
19006 (package-with-python2 python-sortedcontainers))
19007
19008 (define-public python-cloudpickle
19009 (package
19010 (name "python-cloudpickle")
19011 (version "1.3.0")
19012 (source
19013 (origin
19014 (method url-fetch)
19015 (uri (pypi-uri "cloudpickle" version))
19016 (sha256
19017 (base32
19018 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19019 (build-system python-build-system)
19020 (arguments
19021 '(#:phases (modify-phases %standard-phases
19022 (add-before 'check 'do-not-override-PYTHONPATH
19023 (lambda _
19024 ;; Append to PYTHONPATH instead of overriding it so
19025 ;; that dependencies from Guix can be found.
19026 (substitute* "tests/testutils.py"
19027 (("env\\['PYTHONPATH'\\] = pythonpath")
19028 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19029 #t))
19030 (replace 'check
19031 (lambda* (#:key tests? #:allow-other-keys)
19032 (if tests?
19033 (invoke "pytest" "-s" "-vv")
19034 (format #t "test suite not run~%"))
19035 #t)))))
19036 (native-inputs
19037 `(;; For tests.
19038 ("python-psutil" ,python-psutil)
19039 ("python-pytest" ,python-pytest)
19040 ("python-tornado" ,python-tornado)))
19041 (home-page "https://github.com/cloudpipe/cloudpickle")
19042 (synopsis "Extended pickling support for Python objects")
19043 (description
19044 "Cloudpickle makes it possible to serialize Python constructs not
19045 supported by the default pickle module from the Python standard library. It
19046 is especially useful for cluster computing where Python expressions are
19047 shipped over the network to execute on remote hosts, possibly close to the
19048 data.")
19049 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19050 (license license:bsd-3)))
19051
19052 (define-public python2-cloudpickle
19053 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19054 (package
19055 (inherit base)
19056 (native-inputs
19057 `(("python-mock" ,python2-mock)
19058 ,@(package-native-inputs base)))
19059 (propagated-inputs
19060 `(("python-futures" ,python2-futures)
19061 ,@(package-propagated-inputs base))))))
19062
19063 (define-public python-locket
19064 (package
19065 (name "python-locket")
19066 (version "0.2.0")
19067 (source
19068 (origin
19069 (method url-fetch)
19070 (uri (pypi-uri "locket" version))
19071 (sha256
19072 (base32
19073 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19074 (build-system python-build-system)
19075 (home-page "https://github.com/mwilliamson/locket.py")
19076 (synopsis "File-based locks for Python")
19077 (description
19078 "Locket implements a lock that can be used by multiple processes provided
19079 they use the same path.")
19080 (license license:bsd-2)))
19081
19082 (define-public python2-locket
19083 (package-with-python2 python-locket))
19084
19085 (define-public python-blosc
19086 (package
19087 (name "python-blosc")
19088 (version "1.5.1")
19089 (source
19090 (origin
19091 (method url-fetch)
19092 (uri (pypi-uri "blosc" version))
19093 (sha256
19094 (base32
19095 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19096 (build-system python-build-system)
19097 ;; FIXME: all tests pass, but then this error is printed:
19098 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19099 (arguments '(#:tests? #f))
19100 (propagated-inputs
19101 `(("python-numpy" ,python-numpy)))
19102 (home-page "https://github.com/blosc/python-blosc")
19103 (synopsis "Python wrapper for the Blosc data compressor library")
19104 (description "Blosc is a high performance compressor optimized for binary
19105 data. It has been designed to transmit data to the processor cache faster
19106 than the traditional, non-compressed, direct memory fetch approach via a
19107 @code{memcpy()} system call.
19108
19109 Blosc works well for compressing numerical arrays that contains data with
19110 relatively low entropy, like sparse data, time series, grids with
19111 regular-spaced values, etc.
19112
19113 This Python package wraps the Blosc library.")
19114 (license license:bsd-3)))
19115
19116 (define-public python2-blosc
19117 (package-with-python2 python-blosc))
19118
19119 (define-public python-partd
19120 (package
19121 (name "python-partd")
19122 (version "0.3.9")
19123 (source
19124 (origin
19125 (method url-fetch)
19126 (uri (pypi-uri "partd" version))
19127 (sha256
19128 (base32
19129 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19130 (build-system python-build-system)
19131 (propagated-inputs
19132 `(("python-blosc" ,python-blosc)
19133 ("python-locket" ,python-locket)
19134 ("python-numpy" ,python-numpy)
19135 ("python-pandas" ,python-pandas)
19136 ("python-pyzmq" ,python-pyzmq)
19137 ("python-toolz" ,python-toolz)))
19138 (home-page "https://github.com/dask/partd/")
19139 (synopsis "Appendable key-value storage")
19140 (description "Partd stores key-value pairs. Values are raw bytes. We
19141 append on old values. Partd excels at shuffling operations.")
19142 (license license:bsd-3)))
19143
19144 (define-public python2-partd
19145 (package-with-python2 python-partd))
19146
19147 (define-public python-fsspec
19148 (package
19149 (name "python-fsspec")
19150 (version "0.6.1")
19151 (source
19152 (origin
19153 (method url-fetch)
19154 (uri (pypi-uri "fsspec" version))
19155 (sha256
19156 (base32
19157 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19158 (build-system python-build-system)
19159 (arguments '(#:tests? #f)) ; there are none
19160 (home-page "https://github.com/intake/filesystem_spec")
19161 (synopsis "File-system specification")
19162 (description "The purpose of this package is to produce a template or
19163 specification for a file-system interface, that specific implementations
19164 should follow, so that applications making use of them can rely on a common
19165 behavior and not have to worry about the specific internal implementation
19166 decisions with any given backend.")
19167 (license license:bsd-3)))
19168
19169 (define-public python-dask
19170 (package
19171 (name "python-dask")
19172 (version "2.14.0")
19173 (source
19174 (origin
19175 (method url-fetch)
19176 (uri (pypi-uri "dask" version))
19177 (sha256
19178 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19179 (build-system python-build-system)
19180 (arguments
19181 `(#:phases
19182 (modify-phases %standard-phases
19183 (add-after 'unpack 'disable-broken-tests
19184 (lambda _
19185 ;; This test is marked as xfail when pytest-xdist is used.
19186 (substitute* "dask/tests/test_threaded.py"
19187 (("def test_interrupt\\(\\)" m)
19188 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19189 m)))
19190 ;; This one fails with a type error:
19191 ;; TypeError: Already tz-aware, use tz_convert to convert.
19192 (substitute* "dask/dataframe/tests/test_shuffle.py"
19193 (("def test_set_index_timestamp\\(\\)" m)
19194 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19195 m)))
19196 #t))
19197 (replace 'check
19198 (lambda _ (invoke "pytest" "-vv"))))))
19199 (propagated-inputs
19200 `(("python-cloudpickle" ,python-cloudpickle)
19201 ("python-fsspec" ,python-fsspec)
19202 ("python-numpy" ,python-numpy)
19203 ("python-packaging" ,python-packaging)
19204 ("python-pandas" ,python-pandas)
19205 ("python-partd" ,python-partd)
19206 ("python-toolz" ,python-toolz)
19207 ("python-pyyaml" ,python-pyyaml)))
19208 (native-inputs
19209 `(("python-pytest" ,python-pytest)
19210 ("python-pytest-runner" ,python-pytest-runner)))
19211 (home-page "https://github.com/dask/dask/")
19212 (synopsis "Parallel computing with task scheduling")
19213 (description
19214 "Dask is a flexible parallel computing library for analytics. It
19215 consists of two components: dynamic task scheduling optimized for computation,
19216 and large data collections like parallel arrays, dataframes, and lists that
19217 extend common interfaces like NumPy, Pandas, or Python iterators to
19218 larger-than-memory or distributed environments. These parallel collections
19219 run on top of the dynamic task schedulers. ")
19220 (license license:bsd-3)))
19221
19222 (define-public python-ilinkedlist
19223 (package
19224 (name "python-ilinkedlist")
19225 (version "0.4.0")
19226 (source
19227 (origin
19228 (method url-fetch)
19229 (uri (pypi-uri "ilinkedlist" version))
19230 (sha256
19231 (base32
19232 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19233 (build-system python-build-system)
19234 (native-inputs `(("python-pytest" ,python-pytest)))
19235 (inputs `(("python" ,python)))
19236 (home-page "https://github.com/luther9/ilinkedlist-py")
19237 (synopsis "Immutable linked list library")
19238 (description
19239 "This is a implementation of immutable linked lists for Python. It
19240 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19241 Since a linked list is treated as immutable, it is hashable, and its length
19242 can be retrieved in constant time. Some of the terminology is inspired by
19243 LISP. It is possible to create an improper list by creating a @code{Pair}
19244 with a non-list @code{cdr}.")
19245 (license license:gpl3+)))
19246
19247 (define-public python-readlike
19248 (package
19249 (name "python-readlike")
19250 (version "0.1.3")
19251 (source
19252 (origin
19253 (method url-fetch)
19254 (uri (pypi-uri "readlike" version))
19255 (sha256
19256 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19257 (build-system python-build-system)
19258 (home-page "https://github.com/jangler/readlike")
19259 (synopsis "GNU Readline-like line editing module")
19260 (description
19261 "This Python module provides line editing functions similar to the default
19262 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19263 @code{readline} package, this one allows access to those capabilities in settings
19264 outside of a standard command-line interface. It is especially well-suited to
19265 interfacing with Urwid, due to a shared syntax for describing key inputs.
19266
19267 Currently, all stateless Readline commands are implemented. Yanking and history
19268 are not supported.")
19269 (license license:expat)))
19270
19271 (define-public python2-readlike
19272 (package-with-python2 python-readlike))
19273
19274 (define-public python-reparser
19275 (package
19276 (name "python-reparser")
19277 (version "1.4.3")
19278 (source
19279 (origin
19280 (method url-fetch)
19281 (uri (pypi-uri "ReParser" version))
19282 (sha256
19283 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19284 (build-system python-build-system)
19285 (home-page "https://github.com/xmikos/reparser")
19286 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19287 (description
19288 "This Python library provides a simple lexer/parser for inline markup based
19289 on regular expressions.")
19290 (license license:expat)))
19291
19292 (define-public python2-reparser
19293 (let ((reparser (package-with-python2
19294 (strip-python2-variant python-reparser))))
19295 (package (inherit reparser)
19296 (propagated-inputs
19297 `(("python2-enum34" ,python2-enum34)
19298 ,@(package-propagated-inputs reparser))))))
19299
19300 (define-public python-retrying
19301 (package
19302 (name "python-retrying")
19303 (version "1.3.3")
19304 (source
19305 (origin
19306 (method git-fetch)
19307 (uri (git-reference
19308 (url "https://github.com/rholder/retrying")
19309 (commit (string-append "v" version))))
19310 (file-name (git-file-name name version))
19311 (sha256
19312 (base32
19313 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19314 (build-system python-build-system)
19315 (propagated-inputs
19316 `(("python-six" ,python-six)))
19317 (home-page "https://github.com/rholder/retrying")
19318 (synopsis "Library for adding retry behavior")
19319 (description "Retrying is a general-purpose retrying library to simplify
19320 the task of adding retry behavior to just about anything.
19321
19322 Features:
19323
19324 @itemize
19325 @item Generic Decorator API.
19326 @item Specify stop condition (i.e. limit by number of attempts).
19327 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19328 @item Customize retrying on Exceptions.
19329 @item Customize retrying on expected returned result.
19330 @end itemize")
19331 (license license:asl2.0)))
19332
19333 (define-public python-precis-i18n
19334 (package
19335 (name "python-precis-i18n")
19336 (version "1.0.0")
19337 (source
19338 (origin
19339 (method url-fetch)
19340 (uri (pypi-uri "precis_i18n" version))
19341 (sha256
19342 (base32
19343 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19344 (build-system python-build-system)
19345 (home-page "https://github.com/byllyfish/precis_i18n")
19346 (synopsis "Implementation of the PRECIS framework")
19347 (description
19348 "This module implements the PRECIS Framework as described in RFC 8264,
19349 RFC 8265 and RFC 8266.")
19350 (license license:expat)))
19351
19352 (define-public python-absl-py
19353 (package
19354 (name "python-absl-py")
19355 (version "0.6.1")
19356 (source
19357 (origin
19358 (method url-fetch)
19359 (uri (pypi-uri "absl-py" version))
19360 (sha256
19361 (base32
19362 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19363 (build-system python-build-system)
19364 (propagated-inputs
19365 `(("python-six" ,python-six)))
19366 (home-page "https://github.com/abseil/abseil-py")
19367 (synopsis "Abseil Python common libraries")
19368 (description
19369 "This package provides the Abseil Python Common Libraries, a collection
19370 of Python libraries for building Python applications.")
19371 (license license:asl2.0)))
19372
19373 (define-public python-astor
19374 (package
19375 (name "python-astor")
19376 (version "0.7.1")
19377 (source
19378 (origin
19379 (method url-fetch)
19380 (uri (pypi-uri "astor" version))
19381 (sha256
19382 (base32
19383 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19384 (build-system python-build-system)
19385 ;; FIXME: There are two errors and two test failures.
19386 (arguments `(#:tests? #f))
19387 (home-page "https://github.com/berkerpeksag/astor")
19388 (synopsis "Read and write Python ASTs")
19389 (description "Astor is designed to allow easy manipulation of Python
19390 source via the Abstract Syntax Tree.")
19391 (license license:bsd-3)))
19392
19393 (define-public python2-astor
19394 (package-with-python2 python-astor))
19395
19396 (define-public python-astunparse
19397 (package
19398 (name "python-astunparse")
19399 (version "1.6.2")
19400 (source
19401 (origin
19402 (method url-fetch)
19403 (uri (pypi-uri "astunparse" version))
19404 (sha256
19405 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19406 (build-system python-build-system)
19407 (arguments '(#:tests? #f)) ; there are none
19408 (propagated-inputs
19409 `(("python-six" ,python-six)
19410 ("python-wheel" ,python-wheel)))
19411 (home-page "https://github.com/simonpercivall/astunparse")
19412 (synopsis "AST unparser for Python")
19413 (description "This package provides an AST unparser for Python. It is a
19414 factored out version of @code{unparse} found in the Python source
19415 distribution.")
19416 (license license:bsd-3)))
19417
19418 (define-public python-gast
19419 (package
19420 (name "python-gast")
19421 (version "0.3.3")
19422 (source
19423 (origin
19424 (method url-fetch)
19425 (uri (pypi-uri "gast" version))
19426 (sha256
19427 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19428 (build-system python-build-system)
19429 (propagated-inputs
19430 `(("python-astunparse" ,python-astunparse)))
19431 (home-page "https://pypi.org/project/gast/")
19432 (synopsis "Generic Python AST that abstracts the underlying Python version")
19433 (description
19434 "GAST provides a compatibility layer between the AST of various Python
19435 versions, as produced by @code{ast.parse} from the standard @code{ast}
19436 module.")
19437 (license license:bsd-3)))
19438
19439 (define-public python-wikidata
19440 (package
19441 (name "python-wikidata")
19442 (version "0.6.1")
19443 (source
19444 (origin
19445 (method url-fetch)
19446 (uri (pypi-uri "Wikidata" version))
19447 (sha256
19448 (base32
19449 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19450 (build-system python-build-system)
19451 (propagated-inputs
19452 `(("python-babel" ,python-babel)))
19453 (home-page "https://github.com/dahlia/wikidata")
19454 (synopsis "Wikidata client library")
19455 (description
19456 "This package provides a Python interface to
19457 @url{https://www.wikidata.org/, Wikidata}.")
19458 (properties '((upstream-name . "Wikidata")))
19459 (license license:gpl3+)))
19460
19461 (define-public python-doctest-ignore-unicode
19462 (package
19463 (name "python-doctest-ignore-unicode")
19464 (version "0.1.2")
19465 (source
19466 (origin
19467 (method url-fetch)
19468 (uri (pypi-uri "doctest-ignore-unicode" version))
19469 (sha256
19470 (base32
19471 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19472 (build-system python-build-system)
19473 (native-inputs
19474 `(("python-nose" ,python-nose)))
19475 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19476 (synopsis "Ignore Unicode literal prefixes in doctests")
19477 (description
19478 "This package adds support for a flag to ignore Unicode literal prefixes
19479 in doctests.")
19480 (license license:asl2.0)))
19481
19482 (define-public python-attr
19483 (package
19484 (name "python-attr")
19485 (version "0.3.1")
19486 (source
19487 (origin
19488 (method url-fetch)
19489 (uri (pypi-uri "attr" version))
19490 (sha256
19491 (base32
19492 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19493 (build-system python-build-system)
19494 (home-page "https://github.com/denis-ryzhkov/attr")
19495 (synopsis "Decorator for attributes of target function or class")
19496 (description "Simple decorator to set attributes of target function or
19497 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19498 (license license:expat)))
19499
19500 (define-public python-construct
19501 (package
19502 (name "python-construct")
19503 (version "2.10.56")
19504 (source
19505 (origin
19506 (method url-fetch)
19507 (uri (pypi-uri "construct" version))
19508 (sha256
19509 (base32
19510 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19511 (build-system python-build-system)
19512 (arguments
19513 `(#:tests? #f)) ; No tests exist.
19514 (propagated-inputs
19515 `(("python-extras" ,python-extras)
19516 ("python-arrow" ,python-arrow)
19517 ("python-numpy" ,python-numpy)
19518 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19519 (home-page "https://construct.readthedocs.io")
19520 (synopsis "Declarative and symmetrical parser and builder for binary data")
19521 (description
19522 "This package provides both simple, atomic constructs (such as
19523 integers of various sizes), as well as composite ones which allow you
19524 form hierarchical and sequential structures of increasing complexity.
19525 It features bit and byte granularity, easy debugging and testing, an
19526 easy-to-extend subclass system, and lots of primitive constructs to
19527 make your work easier.")
19528 (license license:expat)))
19529
19530 (define-public python-outcome
19531 (package
19532 (name "python-outcome")
19533 (version "1.0.1")
19534 (source
19535 (origin
19536 (method url-fetch)
19537 (uri (pypi-uri "outcome" version))
19538 (sha256
19539 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19540 (build-system python-build-system)
19541 (arguments
19542 `(#:phases
19543 (modify-phases %standard-phases
19544 (replace 'check
19545 (lambda* (#:key inputs outputs #:allow-other-keys)
19546 (add-installed-pythonpath inputs outputs)
19547 (invoke "pytest" "-vv"))))))
19548 (native-inputs
19549 `(("python-pytest" ,python-pytest)
19550 ("python-pytest-cov" ,python-pytest-cov)
19551 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19552 (propagated-inputs
19553 `(("python-async-generator" ,python-async-generator)
19554 ("python-attrs" ,python-attrs)))
19555 (home-page "https://github.com/python-trio/outcome")
19556 (synopsis "Capture the outcome of Python function calls")
19557 (description
19558 "Capture the outcome of Python function calls. Extracted from the Trio
19559 project.")
19560 ;; Either license applies.
19561 (license (list license:expat license:asl2.0))))
19562
19563 (define-public python-trio
19564 (package
19565 (name "python-trio")
19566 (version "0.17.0")
19567 (source
19568 (origin
19569 (method url-fetch)
19570 (uri (pypi-uri "trio" version))
19571 (sha256
19572 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19573 (build-system python-build-system)
19574 (arguments
19575 `(#:phases
19576 (modify-phases %standard-phases
19577 (add-before 'check 'change-home
19578 (lambda _
19579 ;; Tests require a writable home.
19580 (setenv "HOME" "/tmp")
19581 #t))
19582 (replace 'check
19583 (lambda _
19584 (invoke "pytest" "-vv" "-k"
19585 (string-append
19586 ;; This test times out.
19587 "not test_ki_protection_works"
19588 ;; Assertion errors.
19589 " and not test_guest_mode_ki"
19590 " and not test_run_in_trio_thread_ki"
19591 ;; These try to raise KeyboardInterrupt which does not work
19592 ;; in the build environment.
19593 " and not test_ki_self"
19594 " and not test_ki_wakes_us_up"
19595 ;; Failure in name resolution.
19596 " and not test_getnameinfo"
19597 " and not test_SocketType_resolve"
19598 ;; OSError: protocol not found.
19599 " and not test_getprotobyname")))))))
19600 (native-inputs
19601 `(("python-astor" ,python-astor)
19602 ("python-ipython" ,python-ipython)
19603 ("python-jedi" ,python-jedi)
19604 ("python-pylint" ,python-pylint)
19605 ("python-pyopenssl" ,python-pyopenssl)
19606 ("python-pytest" ,python-pytest)
19607 ("python-pytest-cov" ,python-pytest-cov)
19608 ("python-trustme" ,python-trustme)))
19609 (propagated-inputs
19610 `(("python-attrs" ,python-attrs)
19611 ("python-idna" ,python-idna)
19612 ("python-outcome" ,python-outcome)
19613 ("python-sniffio" ,python-sniffio)
19614 ("python-sortedcontainers"
19615 ,python-sortedcontainers)))
19616 (home-page "https://github.com/python-trio/trio")
19617 (synopsis "Friendly Python library for async concurrency and I/O")
19618 (description
19619 "Trio strives to be a production-quality, async/await-native I/O library
19620 for Python. Like all async libraries, its main purpose is to help you write
19621 programs that do multiple things at the same time with parallelized I/O.")
19622 ;; Either license applies.
19623 (license (list license:expat license:asl2.0))))
19624
19625 (define-public python-trio-typing
19626 (package
19627 (name "python-trio-typing")
19628 (version "0.5.0")
19629 (source
19630 (origin
19631 (method url-fetch)
19632 (uri (pypi-uri "trio-typing" version))
19633 (sha256
19634 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19635 (build-system python-build-system)
19636 (arguments
19637 `(#:phases
19638 (modify-phases %standard-phases
19639 (replace 'check
19640 (lambda _
19641 (invoke "pytest" "-vv"))))))
19642 (native-inputs
19643 `(("python-attrs" ,python-attrs)
19644 ("python-pytest" ,python-pytest)))
19645 (propagated-inputs
19646 `(("python-mypy" ,python-mypy)
19647 ("python-mypy-extensions"
19648 ,python-mypy-extensions)
19649 ("python-trio" ,python-trio)
19650 ("python-typing-extensions"
19651 ,python-typing-extensions)))
19652 (home-page "https://github.com/python-trio/trio-typing")
19653 (synopsis "Static type checking support for Trio and related projects")
19654 (description
19655 "This package provides:
19656
19657 @itemize
19658 @item PEP 561 typing stubs packages for the Trio project packages:
19659
19660 @itemize
19661 @item trio (@code{trio-stubs})
19662 @item outcome (@code{outcome-stubs})
19663 @item async_generator (@code{async_generator-stubs})
19664 @end itemize
19665
19666 @item A package @code{trio_typing} containing types that Trio programs often
19667 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
19668 a mypy plugin that smooths over some limitations in the basic type hints.
19669 @end itemize")
19670 ;; Either license applies.
19671 (license (list license:expat license:asl2.0))))
19672
19673 (define-public python-humanize
19674 (package
19675 (name "python-humanize")
19676 (version "0.5.1")
19677 (source
19678 (origin
19679 (method url-fetch)
19680 (uri (pypi-uri "humanize" version))
19681 (sha256
19682 (base32
19683 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
19684 (arguments
19685 '(#:tests? #f)) ; tests not in pypi archive
19686 (build-system python-build-system)
19687 (home-page "https://github.com/jmoiron/humanize")
19688 (synopsis "Print numerical information in a human-readable form")
19689 (description "This package provides a Python module that displays numbers
19690 and dates in \"human readable\" forms. For example, it would display
19691 \"12345591313\" as \"12.3 billion\".")
19692 (license license:expat)))
19693
19694 (define-public python-txaio
19695 (package
19696 (name "python-txaio")
19697 (version "18.8.1")
19698 (source
19699 (origin
19700 (method url-fetch)
19701 (uri (pypi-uri "txaio" version))
19702 (sha256
19703 (base32
19704 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
19705 (build-system python-build-system)
19706 (propagated-inputs
19707 `(("python-twisted" ,python-twisted)
19708 ("python-six" ,python-six)))
19709 (home-page "https://github.com/crossbario/txaio")
19710 (synopsis "Compatibility layer between Python asyncio and Twisted")
19711 (description "Txaio provides a compatibility layer between the Python
19712 @code{asyncio} module and @code{Twisted}.")
19713 (license license:expat)))
19714
19715 (define-public python-toolshed
19716 (package
19717 (name "python-toolshed")
19718 (version "0.4.6")
19719 (source
19720 (origin
19721 (method url-fetch)
19722 (uri (pypi-uri "toolshed" version))
19723 (sha256
19724 (base32
19725 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
19726 (build-system python-build-system)
19727 (native-inputs
19728 `(("python-nose" ,python-nose)))
19729 (home-page "https://github.com/brentp/toolshed/")
19730 (synopsis "Collection of modules and functions for working with data")
19731 (description "This is a collection of well-tested, simple modules and
19732 functions that aim to reduce boilerplate when working with data.")
19733 (license license:bsd-2)))
19734
19735 (define-public python-annoy
19736 (package
19737 (name "python-annoy")
19738 (version "1.15.1")
19739 (source
19740 (origin
19741 (method url-fetch)
19742 (uri (pypi-uri "annoy" version))
19743 (sha256
19744 (base32
19745 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
19746 (build-system python-build-system)
19747 (native-inputs
19748 `(("python-nose" ,python-nose)))
19749 (home-page "https://github.com/spotify/annoy/")
19750 (synopsis "Approximate nearest neighbors library")
19751 (description
19752 "Annoy is a C++ library with Python bindings to search for points in
19753 space that are close to a given query point. It also creates large read-only
19754 file-based data structures that are @code{mmap}ped into memory so that many
19755 processes may share the same data.")
19756 (license license:asl2.0)))
19757
19758 (define-public python-croniter
19759 (package
19760 (name "python-croniter")
19761 (version "0.3.34")
19762 (source (origin
19763 (method url-fetch)
19764 (uri (pypi-uri "croniter" version))
19765 (sha256
19766 (base32
19767 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
19768 (build-system python-build-system)
19769 (propagated-inputs
19770 `(("python-dateutil" ,python-dateutil)
19771 ("python-natsort" ,python-natsort)))
19772 (home-page "https://github.com/kiorky/croniter")
19773 (synopsis "Iterate datetime objects with cron-like syntax")
19774 (description
19775 "@code{croniter} provides iteration for datetime object with cron-like
19776 format.")
19777 (license license:expat)))
19778
19779 (define-public python-pylzma
19780 (package
19781 (name "python-pylzma")
19782 (version "0.5.0")
19783 (source
19784 (origin
19785 (method url-fetch)
19786 (uri (pypi-uri "pylzma" version))
19787 (sha256
19788 (base32
19789 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
19790 (build-system python-build-system)
19791 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
19792 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
19793 (description "This package provides Python bindings for the LZMA library
19794 by Igor Pavlov.")
19795 (license license:lgpl2.1+)))
19796
19797 (define-public python2-pylzma
19798 (package-with-python2 python-pylzma))
19799
19800 (define-public python2-zeroconf
19801 (package
19802 (name "python2-zeroconf")
19803
19804 ;; This is the last version that supports Python 2.x.
19805 (version "0.19.1")
19806 (source
19807 (origin
19808 (method url-fetch)
19809 (uri (pypi-uri "zeroconf" version))
19810 (sha256
19811 (base32
19812 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
19813 (build-system python-build-system)
19814 (arguments
19815 `(#:python ,python-2
19816 #:phases
19817 (modify-phases %standard-phases
19818 (add-after 'unpack 'patch-requires
19819 (lambda* (#:key inputs #:allow-other-keys)
19820 (substitute* "setup.py"
19821 (("enum-compat")
19822 "enum34"))
19823 #t)))))
19824 (native-inputs
19825 `(("python2-six" ,python2-six)
19826 ("python2-enum32" ,python2-enum34)
19827 ("python2-netifaces" ,python2-netifaces)
19828 ("python2-typing" ,python2-typing)))
19829 (home-page "https://github.com/jstasiak/python-zeroconf")
19830 (synopsis "Pure Python mDNS service discovery")
19831 (description
19832 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
19833 compatible).")
19834 (license license:lgpl2.1+)))
19835
19836 (define-public python-bsddb3
19837 (package
19838 (name "python-bsddb3")
19839 (version "6.2.6")
19840 (source
19841 (origin
19842 (method url-fetch)
19843 (uri (pypi-uri "bsddb3" version))
19844 (sha256
19845 (base32
19846 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
19847 (build-system python-build-system)
19848 (inputs
19849 `(("bdb" ,bdb)))
19850 (arguments
19851 '(#:phases
19852 (modify-phases %standard-phases
19853 (add-after 'unpack 'configure-locations
19854 (lambda* (#:key inputs #:allow-other-keys)
19855 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
19856 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
19857 #t))
19858 (replace 'check
19859 (lambda _
19860 (invoke "python3" "test3.py" "-v"))))))
19861 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
19862 (synopsis "Python bindings for Oracle Berkeley DB")
19863 (description
19864 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
19865 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
19866 Transaction objects, and each of these is exposed as a Python type in the
19867 bsddb3.db module. The database objects can use various access methods: btree,
19868 hash, recno, and queue. Complete support of Berkeley DB distributed
19869 transactions. Complete support for Berkeley DB Replication Manager.
19870 Complete support for Berkeley DB Base Replication. Support for RPC.")
19871 (license license:bsd-3)))
19872
19873 (define-public python-dbfread
19874 (package
19875 (name "python-dbfread")
19876 (version "2.0.7")
19877 (source (origin
19878 (method url-fetch)
19879 (uri (pypi-uri "dbfread" version))
19880 (sha256
19881 (base32
19882 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
19883 (build-system python-build-system)
19884 (native-inputs
19885 `(("python-pytest" ,python-pytest)))
19886 (home-page "https://dbfread.readthedocs.io")
19887 (synopsis "Read DBF Files with Python")
19888 (description
19889 "This library reads DBF files and returns the data as native Python data
19890 types for further processing. It is primarily intended for batch jobs and
19891 one-off scripts.")
19892 (license license:expat)))
19893
19894 (define-public python-cached-property
19895 (package
19896 (name "python-cached-property")
19897 (version "1.5.1")
19898 (source
19899 (origin
19900 (method url-fetch)
19901 (uri (pypi-uri "cached-property" version))
19902 (sha256
19903 (base32
19904 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
19905 (build-system python-build-system)
19906 (arguments
19907 `(#:phases
19908 (modify-phases %standard-phases
19909 ;; https://github.com/pydanny/cached-property/issues/131
19910 ;; recent versions of freezegun break one test
19911 (add-after 'unpack 'disable-broken-test
19912 (lambda _
19913 (substitute* "tests/test_cached_property.py"
19914 (("def test_threads_ttl_expiry\\(self\\)" m)
19915 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
19916 " " m)))
19917 #t)))))
19918 (native-inputs
19919 `(("python-freezegun" ,python-freezegun)))
19920 (home-page
19921 "https://github.com/pydanny/cached-property")
19922 (synopsis
19923 "Decorator for caching properties in classes")
19924 (description
19925 "This package provides a decorator which makes caching
19926 time-or-computationally-expensive properties quick and easy and works in Python
19927 2 or 3.")
19928 (license license:bsd-3)))
19929
19930 (define-public python-folium
19931 (package
19932 (name "python-folium")
19933 (version "0.11.0")
19934 (source
19935 (origin
19936 (method url-fetch)
19937 (uri (pypi-uri "folium" version))
19938 (sha256
19939 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
19940 (build-system python-build-system)
19941 (propagated-inputs
19942 `(("python-branca" ,python-branca)
19943 ("python-jinja2" ,python-jinja2)
19944 ("python-numpy" ,python-numpy)
19945 ("python-requests" ,python-requests)))
19946 (native-inputs
19947 `(("python-pytest" ,python-pytest)))
19948 (home-page "https://github.com/python-visualization/folium")
19949 (synopsis "Make beautiful maps with Leaflet.js & Python")
19950 (description "@code{folium} makes it easy to visualize data that’s been
19951 manipulated in Python on an interactive leaflet map. It enables both the
19952 binding of data to a map for @code{choropleth} visualizations as well as
19953 passing rich vector/raster/HTML visualizations as markers on the map.
19954
19955 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
19956 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
19957 supports Image, Video, GeoJSON and TopoJSON overlays.")
19958 (license license:expat)))
19959
19960 (define-public jube
19961 (package
19962 ;; This is a command-line tool, so no "python-" prefix.
19963 (name "jube")
19964 (version "2.2.2")
19965 (source (origin
19966 (method url-fetch)
19967 (uri (string-append
19968 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
19969 version))
19970 (sha256
19971 (base32
19972 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
19973 (file-name (string-append "jube-" version ".tar.gz"))))
19974 (build-system python-build-system)
19975 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
19976 (synopsis "Benchmarking environment")
19977 (description
19978 "JUBE helps perform and analyze benchmarks in a systematic way. For each
19979 benchmarked application, benchmark data is stored in a format that allows JUBE
19980 to deduct the desired information. This data can be parsed by automatic pre-
19981 and post-processing scripts that draw information and store it more densely
19982 for manual interpretation.")
19983 (license license:gpl3+)))
19984
19985 (define-public python-pyroutelib3
19986 (package
19987 (name "python-pyroutelib3")
19988 (version "1.3.post1")
19989 (source
19990 (origin
19991 (method url-fetch)
19992 (uri (pypi-uri "pyroutelib3" version))
19993 (sha256
19994 (base32
19995 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
19996 (build-system python-build-system)
19997 (propagated-inputs
19998 `(("python-dateutil" ,python-dateutil)))
19999 (home-page "https://github.com/MKuranowski/pyroutelib3")
20000 (synopsis "Library for simple routing on OSM data")
20001 (description "Library for simple routing on OSM data")
20002 (license license:gpl3+)))
20003
20004 (define-public python-bibtexparser
20005 (package
20006 (name "python-bibtexparser")
20007 (version "1.1.0")
20008 (source
20009 (origin
20010 (method url-fetch)
20011 (uri (pypi-uri "bibtexparser" version))
20012 (sha256
20013 (base32
20014 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20015 (build-system python-build-system)
20016 (propagated-inputs
20017 `(("python-pyparsing" ,python-pyparsing)))
20018 (native-inputs
20019 `(("python-future" ,python-future)))
20020 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20021 (synopsis "Python library to parse BibTeX files")
20022 (description "BibtexParser is a Python library to parse BibTeX files.")
20023 (license (list license:bsd-3 license:lgpl3))))
20024
20025 (define-public python-distro
20026 (package
20027 (name "python-distro")
20028 (version "1.4.0")
20029 (source
20030 (origin
20031 (method url-fetch)
20032 (uri (pypi-uri "distro" version))
20033 (sha256
20034 (base32
20035 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20036 (build-system python-build-system)
20037 (native-inputs
20038 `(("python-pytest" ,python-pytest)))
20039 (home-page "https://github.com/nir0s/distro")
20040 (synopsis
20041 "OS platform information API")
20042 (description
20043 "@code{distro} provides information about the OS distribution it runs on,
20044 such as a reliable machine-readable ID, or version information.
20045
20046 It is the recommended replacement for Python's original
20047 `platform.linux_distribution` function (which will be removed in Python 3.8).
20048 @code{distro} also provides a command-line interface to output the platform
20049 information in various formats.")
20050 (license license:asl2.0)))
20051
20052 (define-public python-cairosvg
20053 (package
20054 (name "python-cairosvg")
20055 (version "2.4.2")
20056 (source
20057 (origin
20058 (method url-fetch)
20059 (uri (pypi-uri "CairoSVG" version))
20060 (sha256
20061 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20062 (build-system python-build-system)
20063 (arguments
20064 `(#:phases
20065 (modify-phases %standard-phases
20066 (replace 'check
20067 (lambda _ (invoke "pytest"))))))
20068 (propagated-inputs
20069 `(("python-cairocffi" ,python-cairocffi)
20070 ("python-cssselect2" ,python-cssselect2)
20071 ("python-defusedxml" ,python-defusedxml)
20072 ("python-pillow" ,python-pillow)
20073 ("python-tinycss2" ,python-tinycss2)))
20074 (native-inputs
20075 `(("python-pytest-flake8" ,python-pytest-flake8)
20076 ("python-pytest-isort" ,python-pytest-isort)
20077 ("python-pytest-runner" ,python-pytest-runner)))
20078 (home-page "https://cairosvg.org/")
20079 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20080 (description "CairoSVG is a SVG converter based on Cairo. It can export
20081 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20082 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20083 parsed, the result is drawn to a Cairo surface that can be exported to
20084 qvarious formats: PDF, PostScript, PNG and even SVG.")
20085 (license license:lgpl3+)))
20086
20087 (define-public python-pyphen
20088 (package
20089 (name "python-pyphen")
20090 (version "0.9.5")
20091 (source
20092 (origin
20093 (method url-fetch)
20094 (uri (pypi-uri "Pyphen" version))
20095 (sha256
20096 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
20097 (build-system python-build-system)
20098 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20099 ;; embedded set provided by upstream - like Debian does.
20100 (home-page "https://github.com/Kozea/Pyphen")
20101 (synopsis "Pure Python module to hyphenate text")
20102 (description "Pyphen is a pure Python module to hyphenate text using
20103 existing Hunspell hyphenation dictionaries.")
20104 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20105
20106 (define-public python-intelhex
20107 (package
20108 (name "python-intelhex")
20109 (version "2.2.1")
20110 (source
20111 (origin
20112 (method url-fetch)
20113 (uri (pypi-uri "intelhex" version))
20114 (sha256
20115 (base32
20116 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20117 (build-system python-build-system)
20118 (arguments '(#:tests? #f)) ;issue with version
20119 (home-page "https://pypi.org/project/IntelHex/")
20120 (synopsis "Python library for Intel HEX files manipulations")
20121 (description "The Intel HEX file format is widely used in microprocessors
20122 and microcontrollers area (embedded systems etc.) as the de facto standard for
20123 representation of code to be programmed into microelectronic devices. This
20124 package provides an intelhex Python library to read, write, create from
20125 scratch and manipulate data from Intel HEX file format. It also includes
20126 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20127 converters and more, those based on the library itself.")
20128 (license license:bsd-3)))
20129
20130 (define-public python-pykwalify
20131 (package
20132 (name "python-pykwalify")
20133 (version "1.7.0")
20134 (source
20135 (origin
20136 (method url-fetch)
20137 (uri (pypi-uri "pykwalify" version))
20138 (sha256
20139 (base32
20140 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20141 (build-system python-build-system)
20142 (arguments '(#:tests? #f)) ;missing dependencies
20143 (propagated-inputs
20144 `(("python-dateutil" ,python-dateutil)
20145 ("python-docopt" ,python-docopt)
20146 ("python-pyyaml" ,python-pyyaml)))
20147 (home-page "https://github.com/grokzen/pykwalify")
20148 (synopsis
20149 "Python lib/cli for JSON/YAML schema validation")
20150 (description
20151 "This package provides a parser, schema validator, and data binding tool
20152 for YAML and JSON.")
20153 (license license:expat)))
20154
20155 (define-public python-dbusmock
20156 (package
20157 (name "python-dbusmock")
20158 (version "0.18.3")
20159 (source
20160 (origin
20161 (method url-fetch)
20162 (uri (pypi-uri "python-dbusmock" version))
20163 (sha256
20164 (base32
20165 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20166 (build-system python-build-system)
20167 (arguments
20168 '(#:phases
20169 (modify-phases %standard-phases
20170 (add-after 'unpack 'patch-shell-path
20171 (lambda _
20172 (substitute* "tests/test_code.py"
20173 (("/bin/bash") (which "bash")))
20174 #t)))))
20175 (native-inputs
20176 `(;; For tests.
20177 ("dbus" ,dbus) ; for dbus-daemon
20178 ("python-nose" ,python-nose)
20179 ("which" ,which)))
20180 (propagated-inputs
20181 `(("python-dbus" ,python-dbus)
20182 ("python-pygobject" ,python-pygobject)))
20183 (home-page "https://github.com/martinpitt/python-dbusmock")
20184 (synopsis "Python library for mock D-Bus objects")
20185 (description "python-dbusmock allows for the easy creation of mock objects on
20186 D-Bus. This is useful for writing tests for software which talks to D-Bus
20187 services such as upower, systemd, logind, gnome-session or others, and it is
20188 hard (or impossible without root privileges) to set the state of the real
20189 services to what you expect in your tests.")
20190 (license license:lgpl3+)))
20191
20192 (define-public python-jsonplus
20193 (package
20194 (name "python-jsonplus")
20195 (version "0.8.0")
20196 (home-page "https://github.com/randomir/jsonplus")
20197 (source (origin
20198 (method url-fetch)
20199 (uri (pypi-uri "jsonplus" version))
20200 (sha256
20201 (base32
20202 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20203 (build-system python-build-system)
20204 ;; XXX: No tests on PyPI, and the repository has no tags.
20205 (arguments '(#:tests? #f))
20206 (propagated-inputs
20207 `(("python-dateutil" ,python-dateutil)
20208 ("python-simplejson" ,python-simplejson)
20209 ("python-sortedcontainers" ,python-sortedcontainers)))
20210 (synopsis "Serialize Python types to/from JSON")
20211 (description
20212 "This package provides functionality to serialize arbitrary data types
20213 to and from JSON. Common data types are implemented and it is easy to
20214 register custom encoders and decoders.")
20215 (license license:expat)))
20216
20217 (define-public python-ujson
20218 (package
20219 (name "python-ujson")
20220 (version "2.0.3")
20221 (source
20222 (origin
20223 (method url-fetch)
20224 (uri (pypi-uri "ujson" version))
20225 (sha256
20226 (base32
20227 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
20228 (modules '((guix build utils)))
20229 (snippet
20230 '(begin (delete-file-recursively "deps") #t))))
20231 (build-system python-build-system)
20232 (arguments
20233 `(#:phases
20234 (modify-phases %standard-phases
20235 (add-after 'unpack 'link-to-system-double-conversion
20236 (lambda* (#:key inputs #:allow-other-keys)
20237 (let ((d-c (assoc-ref inputs "double-conversion")))
20238 (substitute* "setup.py"
20239 (("./deps/double-conversion/double-conversion\"")
20240 (string-append d-c "/include/double-conversion\""))
20241 (("-lstdc++" stdc)
20242 (string-append "-L" d-c "/lib\","
20243 " \"-ldouble-conversion\","
20244 " \"" stdc)))
20245 #t)))
20246 (replace 'check
20247 (lambda* (#:key inputs outputs #:allow-other-keys)
20248 (add-installed-pythonpath inputs outputs)
20249 (invoke "pytest"))))))
20250 (native-inputs
20251 `(("double-conversion" ,double-conversion)
20252 ("python-setuptools-scm" ,python-setuptools-scm)
20253 ("python-pytest" ,python-pytest)))
20254 (home-page "https://github.com/ultrajson/ultrajson")
20255 (synopsis "Ultra fast JSON encoder and decoder for Python")
20256 (description
20257 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20258 bindings for Python 3.")
20259 (license license:bsd-3)))
20260
20261 (define-public python-ujson-1
20262 (package
20263 (inherit python-ujson)
20264 (version "1.35")
20265 (source
20266 (origin
20267 (method url-fetch)
20268 (uri (pypi-uri "ujson" version))
20269 (sha256
20270 (base32
20271 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
20272 (arguments
20273 '(#:phases %standard-phases))
20274 (native-inputs '())
20275 (home-page "http://www.esn.me")
20276 (description
20277 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20278 bindings for Python 2.5+ and 3.")))
20279
20280 (define-public python2-ujson-1
20281 (package-with-python2 python-ujson-1))
20282
20283 (define-public python-iocapture
20284 ;; The latest release is more than a year older than this commit.
20285 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20286 (revision "1"))
20287 (package
20288 (name "python-iocapture")
20289 (version "0.1.2")
20290 (source
20291 (origin
20292 (method git-fetch)
20293 (uri (git-reference
20294 (url "https://github.com/oinume/iocapture")
20295 (commit commit)))
20296 (file-name (git-file-name name version))
20297 (sha256
20298 (base32
20299 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20300 (build-system python-build-system)
20301 (arguments
20302 `(#:phases
20303 (modify-phases %standard-phases
20304 (delete 'check)
20305 (add-after 'install 'check
20306 (lambda* (#:key inputs outputs #:allow-other-keys)
20307 (add-installed-pythonpath inputs outputs)
20308 (invoke "py.test" "-v" "tests")
20309 #t)))))
20310 (propagated-inputs
20311 `(("python-flexmock" ,python-flexmock)
20312 ("python-pytest" ,python-pytest)
20313 ("python-pytest-cov" ,python-pytest-cov)
20314 ("python-six" ,python-six)))
20315 (home-page "https://github.com/oinume/iocapture")
20316 (synopsis "Python capturing tool for stdout and stderr")
20317 (description
20318 "This package helps you to capture the standard out (stdout) and the
20319 standard error channel (stderr) in your program.")
20320 (license license:expat))))
20321
20322 (define-public python-argh
20323 ;; There are 21 commits since the latest release containing important
20324 ;; improvements.
20325 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20326 (revision "1"))
20327 (package
20328 (name "python-argh")
20329 (version (git-version "0.26.2" revision commit))
20330 (source
20331 (origin
20332 (method git-fetch)
20333 (uri (git-reference
20334 (url "https://github.com/neithere/argh")
20335 (commit commit)))
20336 (file-name (git-file-name name version))
20337 (sha256
20338 (base32
20339 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20340 (build-system python-build-system)
20341 (propagated-inputs
20342 `(("python-iocapture" ,python-iocapture)
20343 ("python-mock" ,python-mock)
20344 ("python-pytest" ,python-pytest)
20345 ("python-pytest-cov" ,python-pytest-cov)
20346 ("python-pytest-xdist" ,python-pytest-xdist)
20347 ("python-tox" ,python-tox)))
20348 (home-page "https://github.com/neithere/argh/")
20349 (synopsis "Argparse wrapper with natural syntax")
20350 (description
20351 "python-argh is a small library that provides several layers of
20352 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20353 always possible to declare a command with the highest possible (and least
20354 flexible) layer and then tune the behaviour with any of the lower layers
20355 including the native API of @code{python-argparse}.")
20356 (license license:lgpl3+))))
20357
20358 (define-public python-ppft
20359 (package
20360 (name "python-ppft")
20361 (version "1.6.6.1")
20362 (source
20363 (origin
20364 (method url-fetch)
20365 (uri (pypi-uri "ppft" version))
20366 (sha256
20367 (base32
20368 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20369 (build-system python-build-system)
20370 (arguments '(#:tests? #f)) ; there are none
20371 (propagated-inputs
20372 `(("python-six" ,python-six)))
20373 (home-page "https://pypi.org/project/ppft/")
20374 (synopsis "Fork of Parallel Python")
20375 (description
20376 "This package is a fork of Parallel Python. The Parallel Python
20377 module (@code{pp}) provides an easy and efficient way to create
20378 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20379 computers and clusters. It features cross-platform portability and dynamic
20380 load balancing.")
20381 (license license:bsd-3)))
20382
20383 (define-public python-pox
20384 (package
20385 (name "python-pox")
20386 (version "0.2.7")
20387 (source
20388 (origin
20389 (method url-fetch)
20390 (uri (pypi-uri "pox" version))
20391 (sha256
20392 (base32
20393 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20394 (build-system python-build-system)
20395 (arguments
20396 `(#:phases
20397 (modify-phases %standard-phases
20398 (replace 'check
20399 (lambda _
20400 (mkdir-p "/tmp/guix")
20401 (setenv "SHELL" "bash")
20402 (setenv "USERNAME" "guix")
20403 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20404 (invoke "py.test" "-vv")
20405 #t)))))
20406 (native-inputs
20407 `(("python-pytest" ,python-pytest)
20408 ("which" ,which)))
20409 (home-page "https://pypi.org/project/pox/")
20410 (synopsis "Python utilities for file system exploration and automated builds")
20411 (description
20412 "Pox provides a collection of utilities for navigating and manipulating
20413 file systems. This module is designed to facilitate some of the low-level
20414 operating system interactions that are useful when exploring a file system on a
20415 remote host. Pox provides Python equivalents of several shell commands such
20416 as @command{which} and @command{find}. These commands allow automated
20417 discovery of what has been installed on an operating system, and where the
20418 essential tools are located.")
20419 (license license:bsd-3)))
20420
20421 (define-public python-pathos
20422 (package
20423 (name "python-pathos")
20424 (version "0.2.5")
20425 (source
20426 (origin
20427 (method url-fetch)
20428 (uri (pypi-uri "pathos" version))
20429 (sha256
20430 (base32
20431 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20432 (build-system python-build-system)
20433 (arguments
20434 '(#:phases
20435 (modify-phases %standard-phases
20436 (replace 'check
20437 (lambda _
20438 (setenv "PYTHONPATH"
20439 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20440 (invoke "python" "./tests/__main__.py"))))))
20441 (propagated-inputs
20442 `(("python-dill" ,python-dill)
20443 ("python-multiprocess" ,python-multiprocess)
20444 ("python-pox" ,python-pox)
20445 ("python-ppft" ,python-ppft)))
20446 (native-inputs
20447 `(("python-pytest" ,python-pytest)))
20448 (home-page "https://pypi.org/project/pathos/")
20449 (synopsis
20450 "Parallel graph management and execution in heterogeneous computing")
20451 (description
20452 "Python-pathos is a framework for heterogeneous computing. It provides a
20453 consistent high-level interface for configuring and launching parallel
20454 computations across heterogeneous resources. Python-pathos provides configurable
20455 launchers for parallel and distributed computing, where each launcher contains
20456 the syntactic logic to configure and launch jobs in an execution environment.")
20457 (license license:bsd-3)))
20458
20459 (define-public python-flit
20460 (package
20461 (name "python-flit")
20462 (version "2.1.0")
20463 (source
20464 (origin
20465 (method url-fetch)
20466 (uri (pypi-uri "flit" version))
20467 (sha256
20468 (base32
20469 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20470 (build-system python-build-system)
20471 (arguments
20472 `(#:tests? #f)) ; XXX: Check requires network access.
20473 (home-page "https://flit.readthedocs.io/")
20474 (synopsis
20475 "Simple packaging tool for simple packages")
20476 (description
20477 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20478 packages a single importable module or package at a time, using the import
20479 name as the name on PyPI. All subpackages and data files within a package
20480 are included automatically.")
20481 (license license:bsd-3)))
20482
20483 (define-public python-pathtools
20484 (package
20485 (name "python-pathtools")
20486 (version "0.1.2")
20487 (source
20488 (origin
20489 (method url-fetch)
20490 (uri (pypi-uri "pathtools" version))
20491 (sha256
20492 (base32
20493 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20494 (build-system python-build-system)
20495 (home-page
20496 "https://github.com/gorakhargosh/pathtools")
20497 (synopsis "Path utilities for Python")
20498 (description "Pattern matching and various utilities for file systems
20499 paths.")
20500 (license license:expat)))
20501
20502 (define-public python-fastentrypoints
20503 (package
20504 (name "python-fastentrypoints")
20505 (version "0.12")
20506 (source
20507 (origin
20508 (method url-fetch)
20509 (uri (pypi-uri "fastentrypoints" version))
20510 (sha256
20511 (base32
20512 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20513 (build-system python-build-system)
20514 (home-page
20515 "https://github.com/ninjaaron/fast-entry_points")
20516 (synopsis
20517 "Makes entry_points specified in setup.py load more quickly")
20518 (description
20519 "Using entry_points in your setup.py makes scripts that start really
20520 slowly because it imports pkg_resources. This package allows such setup
20521 scripts to load entry points more quickly.")
20522 (license license:bsd-3)))
20523
20524 (define-public python-funcparserlib
20525 (package
20526 (name "python-funcparserlib")
20527 (version "0.3.6")
20528 (source
20529 (origin
20530 (method url-fetch)
20531 (uri (pypi-uri "funcparserlib" version))
20532 (sha256
20533 (base32
20534 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20535 (native-inputs
20536 `(("python-tox" ,python-tox)))
20537 (arguments
20538 `(#:phases
20539 (modify-phases %standard-phases
20540 (replace 'check
20541 (lambda _
20542 (invoke "tox"))))))
20543 (build-system python-build-system)
20544 (home-page
20545 "https://github.com/vlasovskikh/funcparserlib")
20546 (synopsis
20547 "Recursive descent parsing library based on functional combinators")
20548 (description
20549 "This package is a recursive descent parsing library for Python based on
20550 functional combinators. Parser combinators are just higher-order functions
20551 that take parsers as their arguments and return them as result values.")
20552 (license license:expat)))
20553
20554 (define-public python-speg
20555 (package
20556 (name "python-speg")
20557 (version "0.3")
20558 (source
20559 (origin
20560 (method url-fetch)
20561 (uri (pypi-uri "speg" version ".zip"))
20562 (sha256
20563 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20564 (arguments
20565 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20566 (native-inputs
20567 `(("unzip" ,unzip)))
20568 (build-system python-build-system)
20569 (home-page "https://github.com/avakar/speg")
20570 (synopsis "PEG-based parser interpreter with memoization")
20571 (description "This package is a PEG-based parser and interpreter with
20572 memoization.")
20573 (license license:expat)))
20574
20575 (define-public python-cson
20576 (package
20577 (name "python-cson")
20578 (version "0.8")
20579 (source
20580 (origin
20581 (method url-fetch)
20582 (uri (pypi-uri "cson" version))
20583 (sha256
20584 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20585 (build-system python-build-system)
20586 (propagated-inputs
20587 `(("python-speg" ,python-speg)))
20588 (home-page "https://github.com/avakar/pycson")
20589 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20590 (description "This package is a parser for Coffeescript Object
20591 Notation (CSON).")
20592 (license license:expat)))
20593
20594 (define-public python-asynctest
20595 (package
20596 (name "python-asynctest")
20597 (version "0.13.0")
20598 (source
20599 (origin
20600 (method url-fetch)
20601 (uri (pypi-uri "asynctest" version))
20602 (sha256
20603 (base32
20604 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20605 (build-system python-build-system)
20606 (arguments
20607 '(#:phases
20608 (modify-phases %standard-phases
20609 (replace 'check
20610 (lambda _
20611 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20612 (add-after 'unpack 'disable-tests
20613 (lambda* _
20614 ;; XXX: 7 tests fail out of 220. Disable them for now.
20615 (substitute* (list "test/test_selector.py"
20616 "test/test_mock.py")
20617 (("def test_events_watched_outside_test_are_ignored")
20618 "@unittest.skip('disabled by guix')
20619 def test_events_watched_outside_test_are_ignored")
20620 (("def test_awaited_from_autospec_mock.*" line)
20621 (string-append line " return True\n"))
20622 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
20623 (string-append line " return True\n"))
20624 (("def test_patch_coroutine_with_multiple_scopes.*" line)
20625 (string-append line " return True\n"))
20626 (("def test_multiple_patches_on_coroutine.*" line)
20627 (string-append line " return True\n"))
20628 (("def test_patch_coroutine_only_when_running.*" line)
20629 (string-append line " return True\n")))
20630 #t)))))
20631 (home-page "https://github.com/Martiusweb/asynctest")
20632 (synopsis "Extension of unittest for testing asyncio libraries")
20633 (description
20634 "The package asynctest is built on top of the standard unittest module
20635 and cuts down boilerplate code when testing libraries for asyncio.")
20636 (license license:asl2.0)))
20637
20638 (define-public python-aionotify
20639 (package
20640 (name "python-aionotify")
20641 (version "0.2.0")
20642 (source
20643 (origin
20644 ;; Source tarball on PyPi lacks tests
20645 (method git-fetch)
20646 (uri (git-reference
20647 (url "https://github.com/rbarrois/aionotify")
20648 (commit (string-append "v" version))))
20649 (file-name (git-file-name name version))
20650 (sha256
20651 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
20652 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
20653 (build-system python-build-system)
20654 (home-page "https://github.com/rbarrois/aionotify")
20655 (synopsis "Asyncio-powered inotify library")
20656 (description
20657 "@code{aionotify} is a simple, asyncio-based inotify library.")
20658 (license license:bsd-3)))
20659
20660 (define-public python-forbiddenfruit
20661 (package
20662 (name "python-forbiddenfruit")
20663 (version "0.1.3")
20664 (source
20665 (origin
20666 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
20667 (method git-fetch)
20668 (uri (git-reference
20669 (url "https://github.com/clarete/forbiddenfruit")
20670 (commit version)))
20671 (file-name (git-file-name name version))
20672 (sha256
20673 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
20674 (build-system python-build-system)
20675 (arguments
20676 '(#:phases
20677 (modify-phases %standard-phases
20678 (replace 'check
20679 (lambda _
20680 (invoke "make" "SKIP_DEPS=1"))))))
20681 (native-inputs
20682 `(("python-nose" ,python-nose)
20683 ("python-coverage" ,python-coverage)))
20684 (home-page "https://github.com/clarete/forbiddenfruit")
20685 (synopsis "Patch python built-in objects")
20686 (description "This project allows Python code to extend built-in types.")
20687 (license (list license:gpl3+ license:expat))))
20688
20689 (define-public python-shouldbe
20690 (package
20691 (name "python-shouldbe")
20692 (version "0.1.2")
20693 (source
20694 (origin
20695 (method url-fetch)
20696 (uri (pypi-uri "shouldbe" version))
20697 (sha256
20698 (base32
20699 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
20700 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
20701 (build-system python-build-system)
20702 (propagated-inputs
20703 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
20704 (native-inputs
20705 `(("python-nose" ,python-nose)))
20706 (home-page "https://github.com/directxman12/should_be")
20707 (synopsis "Python Assertion Helpers inspired by Shouldly")
20708 (description
20709 "Python Assertion Helpers inspired by Shouldly.")
20710 (license license:isc)))
20711
20712 (define-public python-k5test
20713 (package
20714 (name "python-k5test")
20715 (version "0.9.2")
20716 (source
20717 (origin
20718 (method url-fetch)
20719 (uri (pypi-uri "k5test" version))
20720 (sha256
20721 (base32
20722 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
20723 (build-system python-build-system)
20724 (propagated-inputs
20725 `(("python-six" ,python-six)
20726 ;; `which`, `kadmin.local` binaries called inside library
20727 ("which" ,which)
20728 ("mit-krb5" ,mit-krb5)))
20729 (native-inputs `(("mit-krb5" ,mit-krb5)))
20730 (arguments
20731 '(#:phases
20732 (modify-phases %standard-phases
20733 (add-after 'unpack 'patch-paths
20734 (lambda* _
20735 (substitute* "k5test/realm.py"
20736 (("'kadmin_local'") "'kadmin.local'")))))))
20737 (home-page "https://github.com/pythongssapi/k5test")
20738 (synopsis "Library for setting up self-contained Kerberos 5 environments")
20739 (description
20740 "@code{k5test} is a library for setting up self-contained Kerberos 5
20741 environments, and running Python unit tests inside those environments. It is
20742 based on the file of the same name found alongside the MIT Kerberos 5 unit
20743 tests.")
20744 (license license:isc)))
20745
20746 (define-public python-gssapi
20747 (package
20748 (name "python-gssapi")
20749 (version "1.6.9")
20750 (source
20751 (origin
20752 (method url-fetch)
20753 (uri (pypi-uri "gssapi" version))
20754 (sha256
20755 (base32
20756 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
20757 (build-system python-build-system)
20758 (arguments
20759 `(#:phases
20760 (modify-phases %standard-phases
20761 ;; Work around
20762 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
20763 (add-before 'check 'disable-failing-tests
20764 (lambda _
20765 (let ((reason "Disabled failing test (see: \
20766 https://github.com/pythongssapi/python-gssapi/issues/220)."))
20767 (substitute* "gssapi/tests/test_high_level.py"
20768 ((".*def test_add_with_impersonate.*" all)
20769 (string-append all " self.skipTest('" reason "')\n")))
20770 (substitute* "gssapi/tests/test_raw.py"
20771 ((".*def test_.*impersonate_name.*" all)
20772 (string-append all " self.skipTest('" reason "')\n")))
20773 #t))))))
20774 (propagated-inputs
20775 `(("python-decorator" ,python-decorator)
20776 ("python-six" ,python-six)))
20777 (inputs
20778 `(("mit-krb5" ,mit-krb5)))
20779 ;; for tests
20780 (native-inputs
20781 `(("python-shouldbe" ,python-shouldbe)
20782 ("python-parameterized" ,python-parameterized)
20783 ("python-k5test" ,python-k5test)
20784 ("python-nose" ,python-nose)))
20785 (home-page "https://github.com/pythongssapi/python-gssapi")
20786 (synopsis "Python GSSAPI Wrapper")
20787 (description
20788 "Python-GSSAPI provides both low-level and high level wrappers around the
20789 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
20790 also be usable with other GSSAPI mechanisms.")
20791 (license license:isc)))
20792
20793 (define-public python-check-manifest
20794 (package
20795 (name "python-check-manifest")
20796 (version "0.37")
20797 (source
20798 (origin
20799 (method url-fetch)
20800 (uri (pypi-uri "check-manifest" version))
20801 (sha256
20802 (base32
20803 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
20804 (build-system python-build-system)
20805 (native-inputs
20806 `(("python-mock" ,python-mock)
20807 ("git" ,git)))
20808 (home-page "https://github.com/mgedmin/check-manifest")
20809 (synopsis "Check MANIFEST.in in a Python source package for completeness")
20810 (description "Python package can include a MANIFEST.in file to help with
20811 sending package files to the Python Package Index. This package checks that
20812 file to ensure it completely and accurately describes your project.")
20813 (license license:expat)))
20814
20815 (define-public python-android-stringslib
20816 (package
20817 (name "python-android-stringslib")
20818 (version "0.1.2")
20819 (source
20820 (origin
20821 (method git-fetch)
20822 (uri (git-reference
20823 (url "https://framagit.org/tyreunom/python-android-strings-lib")
20824 (commit (string-append "v" version))))
20825 (file-name (git-file-name name version))
20826 (sha256
20827 (base32
20828 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
20829 (build-system python-build-system)
20830 (arguments
20831 `(#:tests? #f))
20832 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
20833 (synopsis "Android strings.xml support")
20834 (description "Android Strings Lib provides support for android's strings.xml
20835 files. These files are used to translate strings in android apps.")
20836 (license license:expat)))
20837
20838 (define-public python-watchdog
20839 (package
20840 (name "python-watchdog")
20841 (version "0.9.0")
20842 (source
20843 (origin
20844 (method url-fetch)
20845 (uri (pypi-uri "watchdog" version))
20846 (sha256
20847 (base32
20848 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
20849 (build-system python-build-system)
20850 (arguments
20851 `(#:phases
20852 (modify-phases %standard-phases
20853 (add-before 'check 'remove-failing
20854 (lambda _
20855 (delete-file "tests/test_inotify_buffer.py")
20856 (delete-file "tests/test_snapshot_diff.py")
20857 #t)))))
20858 (propagated-inputs
20859 `(("python-argh" ,python-argh)
20860 ("python-pathtools" ,python-pathtools)
20861 ("python-pyyaml" ,python-pyyaml)))
20862 (native-inputs
20863 `(("python-pytest-cov" ,python-pytest-cov)
20864 ("python-pytest-timeout" ,python-pytest-timeout)))
20865 (home-page "https://github.com/gorakhargosh/watchdog")
20866 (synopsis "File system events monitoring")
20867 (description "This package provides a way to monitor file system events
20868 such as a file modification and trigger an action. This is similar to inotify,
20869 but portable.")
20870 (license license:asl2.0)))
20871
20872 (define-public python-watchgod
20873 (package
20874 (name "python-watchgod")
20875 (version "0.6")
20876 (source
20877 (origin
20878 ;; There are no tests in the PyPI tarball.
20879 (method git-fetch)
20880 (uri (git-reference
20881 (url "https://github.com/samuelcolvin/watchgod")
20882 (commit (string-append "v" version))))
20883 (file-name (git-file-name name version))
20884 (sha256
20885 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
20886 (build-system python-build-system)
20887 (arguments
20888 `(#:phases
20889 (modify-phases %standard-phases
20890 (replace 'check
20891 (lambda _
20892 (invoke "pytest" "-vv"))))))
20893 (native-inputs
20894 `(("python-coverage" ,python-coverage)
20895 ("python-docutils" ,python-docutils)
20896 ("python-flake8" ,python-flake8)
20897 ("python-isort" ,python-isort)
20898 ("python-pycodestyle" ,python-pycodestyle)
20899 ("python-pyflakes" ,python-pyflakes)
20900 ("python-pygments" ,python-pygments)
20901 ("python-pytest" ,python-pytest)
20902 ("python-pytest-cov" ,python-pytest-cov)
20903 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
20904 ("python-pytest-mock" ,python-pytest-mock)
20905 ("python-pytest-sugar" ,python-pytest-sugar)
20906 ("python-pytest-toolbox" ,python-pytest-toolbox)))
20907 (home-page "https://github.com/samuelcolvin/watchgod")
20908 (synopsis "Simple, modern file watching and code reload in Python")
20909 (description
20910 "Simple, modern file watching and code reload in Python inspired by
20911 @code{watchdog}. Among the differences are a unified approach for each
20912 operating systems and an elegant approach to concurrency using threading.")
20913 (license license:expat)))
20914
20915 (define-public python-wget
20916 (package
20917 (name "python-wget")
20918 (version "3.2")
20919 (source
20920 (origin
20921 (method url-fetch)
20922 (uri (pypi-uri "wget" version ".zip"))
20923 (sha256
20924 (base32
20925 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
20926 (build-system python-build-system)
20927 (native-inputs `(("unzip" ,unzip)))
20928 (home-page "https://bitbucket.org/techtonik/python-wget/")
20929 (synopsis "Pure Python download utility")
20930 (description "The python-wget library provides an API to download files
20931 with features similar to the @command{wget} utility.")
20932 (license license:unlicense)))
20933
20934 (define-public offlate
20935 (package
20936 (name "offlate")
20937 (version "0.5")
20938 (source
20939 (origin
20940 (method git-fetch)
20941 (uri (git-reference
20942 (url "https://framagit.org/tyreunom/offlate")
20943 (commit version)))
20944 (file-name (git-file-name name version))
20945 (sha256
20946 (base32
20947 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
20948 (build-system python-build-system)
20949 (arguments
20950 ;; No tests
20951 `(#:tests? #f))
20952 (propagated-inputs
20953 `(("python-android-stringslib" ,python-android-stringslib)
20954 ("python-dateutil" ,python-dateutil)
20955 ("python-gitlab" ,python-gitlab)
20956 ("python-lxml" ,python-lxml)
20957 ("python-polib" ,python-polib)
20958 ("python-pyenchant" ,python-pyenchant)
20959 ("python-pygit2" ,python-pygit2)
20960 ("python-pygithub" ,python-pygithub)
20961 ("python-pyqt" ,python-pyqt)
20962 ("python-requests" ,python-requests)
20963 ("python-ruamel.yaml" ,python-ruamel.yaml)
20964 ("python-translation-finder" ,python-translation-finder)
20965 ("python-watchdog" ,python-watchdog)))
20966 (native-inputs
20967 `(("qttools" ,qttools)))
20968 (home-page "https://framagit.org/tyreunom/offlate")
20969 (synopsis "Offline translation interface for online translation tools")
20970 (description "Offlate offers a unified interface for different translation
20971 file formats, as well as many different online translation platforms. You can
20972 use it to get work from online platforms, specialized such as the Translation
20973 Project, or not such a gitlab instance when your upstream doesn't use any
20974 dedicated platform. The tool proposes a unified interface for any format and
20975 an upload option to send your work back to the platform.")
20976 (license license:gpl3+)))
20977
20978 (define-public python-titlecase
20979 (package
20980 (name "python-titlecase")
20981 (version "0.12.0")
20982 (source
20983 (origin
20984 (method url-fetch)
20985 (uri (pypi-uri "titlecase" version))
20986 (sha256
20987 (base32
20988 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
20989 (build-system python-build-system)
20990 (native-inputs
20991 `(("python-nose" ,python-nose)))
20992 (home-page "https://github.com/ppannuto/python-titlecase")
20993 (synopsis "Capitalize strings similar to book titles")
20994 (description
20995 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
20996 It capitalizes (predominantly English) strings in a way that is similar to
20997 book titles, using the New York Times Manual of Style to leave certain words
20998 lowercase.")
20999 (license license:expat)))
21000
21001 (define-public python-pypng
21002 (package
21003 (name "python-pypng")
21004 (version "0.0.20")
21005 (source
21006 (origin
21007 (method url-fetch)
21008 (uri (pypi-uri "pypng" version))
21009 (sha256
21010 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21011 (build-system python-build-system)
21012 (home-page "https://github.com/drj11/pypng")
21013 (synopsis "Pure Python PNG image encoder/decoder")
21014 (description
21015 "The PyPNG module implements support for PNG images. It reads and writes
21016 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21017 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21018 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21019 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21020 A number of optional chunks can be specified (when writing) and
21021 understood (when reading): tRNS, bKGD, gAMA.
21022
21023 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21024 aim at being a replacement or competitor. Its strength lies in fine-grained
21025 extensive support of PNG features. It can also read and write Netpbm PAM
21026 files, with a focus on its use as an intermediate format for implementing
21027 custom PNG processing.")
21028 (license license:expat)))
21029
21030 (define-public python-fuzzywuzzy
21031 (package
21032 (name "python-fuzzywuzzy")
21033 (version "0.18.0")
21034 (source
21035 (origin
21036 (method url-fetch)
21037 (uri (pypi-uri "fuzzywuzzy" version))
21038 (sha256
21039 (base32
21040 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21041 (build-system python-build-system)
21042 (native-inputs
21043 `(("python-hypothesis" ,python-hypothesis)
21044 ("python-pycodestyle" ,python-pycodestyle)
21045 ("python-pytest" ,python-pytest)))
21046 (propagated-inputs
21047 `(("python-levenshtein" ,python-levenshtein)))
21048 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21049 (synopsis "Fuzzy string matching in Python")
21050 (description "Approximate string matching using
21051 @emph{Levenshtein Distance} to calculate the differences between
21052 sequences.")
21053 (license license:gpl2)))
21054
21055 (define-public python2-fuzzywuzzy
21056 (package-with-python2 python-fuzzywuzzy))
21057
21058 (define-public python-block-tracing
21059 (package
21060 (name "python-block-tracing")
21061 (version "1.0.1")
21062 (source
21063 (origin
21064 (method url-fetch)
21065 (uri (pypi-uri "block_tracing" version))
21066 (sha256
21067 (base32
21068 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21069 (build-system python-build-system)
21070 (arguments '(#:tests? #f)) ; no tests
21071 (home-page "https://github.com/rianhunter/block_tracing")
21072 (synopsis "Protect process memory")
21073 (description
21074 "@code{block_tracing} is a tiny Python library that can be used to
21075 prevent debuggers and other applications from inspecting the memory within
21076 your process.")
21077 (license license:expat)))
21078
21079 (define-public python-gcovr
21080 (package
21081 (name "python-gcovr")
21082 (version "4.2")
21083 (source
21084 (origin
21085 (method url-fetch)
21086 (uri (pypi-uri "gcovr" version))
21087 (sha256
21088 (base32
21089 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21090 (build-system python-build-system)
21091 (propagated-inputs
21092 `(("python-lxml" ,python-lxml)
21093 ("python-jinja2" ,python-jinja2)))
21094 (home-page "https://gcovr.com/")
21095 (synopsis "Utility for generating code coverage results")
21096 (description
21097 "Gcovr provides a utility for managing the use of the GNU gcov
21098 utility and generating summarized code coverage results. It is inspired
21099 by the Python coverage.py package, which provides a similar utility for
21100 Python.")
21101 (license license:bsd-3)))
21102
21103 (define-public python-owslib
21104 (package
21105 (name "python-owslib")
21106 (version "0.19.2")
21107 (source
21108 (origin
21109 (method url-fetch)
21110 (uri (pypi-uri "OWSLib" version))
21111 (sha256
21112 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21113 (build-system python-build-system)
21114 (arguments
21115 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21116 (synopsis "Interface for Open Geospatial Consortium web service")
21117 (description
21118 "OWSLib is a Python package for client programming with Open Geospatial
21119 Consortium (OGC) web service (hence OWS) interface standards, and their related
21120 content models.")
21121 (home-page "https://geopython.github.io/OWSLib/")
21122 (license license:bsd-3)))
21123
21124 (define-public python-docusign-esign
21125 (package
21126 (name "python-docusign-esign")
21127 (version "3.1.0")
21128 (source (origin
21129 (method url-fetch)
21130 (uri (pypi-uri "docusign_esign" version))
21131 (sha256
21132 (base32
21133 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21134 (build-system python-build-system)
21135 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21136 (arguments `(#:tests? #f))
21137 (propagated-inputs
21138 `(("python-certifi" ,python-certifi)
21139 ("python-six" ,python-six)
21140 ("python-dateutil" ,python-dateutil)
21141 ("python-urllib3" ,python-urllib3)
21142 ("python-pyjwt" ,python-pyjwt)
21143 ("python-cryptography" ,python-cryptography)
21144 ("python-nose" ,python-nose)))
21145 (synopsis "DocuSign Python Client")
21146 (description "The Official DocuSign Python Client Library used to interact
21147 with the eSign REST API. Send, sign, and approve documents using this client.")
21148 (home-page "https://www.docusign.com/devcenter")
21149 (license license:expat)))
21150
21151 (define-public python-xattr
21152 (package
21153 (name "python-xattr")
21154 (version "0.9.7")
21155 (source
21156 (origin
21157 (method url-fetch)
21158 (uri (pypi-uri "xattr" version))
21159 (sha256
21160 (base32
21161 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21162 (build-system python-build-system)
21163 (propagated-inputs
21164 `(("python-cffi" ,python-cffi)))
21165 (home-page "https://github.com/xattr/xattr")
21166 (synopsis
21167 "Python wrapper for extended file system attributes")
21168 (description "This package provides a Python wrapper for using extended
21169 file system attributes. Extended attributes extend the basic attributes of files
21170 and directories in the file system. They are stored as name:data pairs
21171 associated with file system objects (files, directories, symlinks, etc).")
21172 (license license:expat)))
21173
21174 (define-public python-json-logger
21175 (package
21176 (name "python-json-logger")
21177 (version "0.1.11")
21178 (source
21179 (origin
21180 (method url-fetch)
21181 (uri (pypi-uri "python-json-logger" version))
21182 (sha256
21183 (base32
21184 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21185 (build-system python-build-system)
21186 (home-page
21187 "https://github.com/madzak/python-json-logger")
21188 (synopsis "JSON log formatter in Python")
21189 (description "This library allows standard Python logging to output log data
21190 as JSON objects. With JSON we can make our logs more readable by machines and
21191 we can stop writing custom parsers for syslog-type records.")
21192 (license license:bsd-3)))
21193
21194 (define-public python-daiquiri
21195 (package
21196 (name "python-daiquiri")
21197 (version "2.1.1")
21198 (source
21199 (origin
21200 (method url-fetch)
21201 (uri (pypi-uri "daiquiri" version))
21202 (sha256
21203 (base32
21204 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21205 (build-system python-build-system)
21206 (propagated-inputs
21207 `(("python-json-logger" ,python-json-logger)))
21208 (native-inputs
21209 `(("python-mock" ,python-mock)
21210 ("python-pytest" ,python-pytest)
21211 ("python-setuptools-scm" ,python-setuptools-scm)
21212 ("python-six" ,python-six)))
21213 (home-page "https://github.com/jd/daiquiri")
21214 (synopsis
21215 "Library to configure Python logging easily")
21216 (description "The daiquiri library provides an easy way to configure
21217 logging in Python. It also provides some custom formatters and handlers.")
21218 (license license:asl2.0)))
21219
21220 (define-public python-pifpaf
21221 (package
21222 (name "python-pifpaf")
21223 (version "2.5.0")
21224 (source
21225 (origin
21226 (method url-fetch)
21227 (uri (pypi-uri "pifpaf" version))
21228 (sha256
21229 (base32
21230 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21231 (build-system python-build-system)
21232 (arguments
21233 '(#:phases
21234 (modify-phases %standard-phases
21235 (replace 'check
21236 (lambda _
21237 (invoke "python" "setup.py" "testr" "--slowest"
21238 "--testr-args=until-failure"))))))
21239 (propagated-inputs
21240 `(("python-click" ,python-click)
21241 ("python-daiquiri" ,python-daiquiri)
21242 ("python-fixtures" ,python-fixtures)
21243 ("python-jinja2" ,python-jinja2)
21244 ("python-pbr" ,python-pbr)
21245 ("python-psutil" ,python-psutil)
21246 ("python-six" ,python-six)
21247 ("python-xattr" ,python-xattr)))
21248 (native-inputs
21249 `(("python-mock" ,python-mock)
21250 ("python-os-testr" ,python-os-testr)
21251 ("python-requests" ,python-requests)
21252 ("python-testrepository" ,python-testrepository)
21253 ("python-testtools" ,python-testtools)))
21254 (home-page "https://github.com/jd/pifpaf")
21255 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21256 (description "Pifpaf is a suite of fixtures and a command-line tool that
21257 starts and stops daemons for a quick throw-away usage. This is typically
21258 useful when needing these daemons to run integration testing. It originally
21259 evolved from its precursor @code{overtest}.")
21260 (license license:asl2.0)))
21261
21262 (define-public python-pytest-check-links
21263 (package
21264 (name "python-pytest-check-links")
21265 (version "0.3.0")
21266 (source
21267 (origin
21268 (method url-fetch)
21269 ;; URI uses underscores
21270 (uri (pypi-uri "pytest_check_links" version))
21271 (sha256
21272 (base32
21273 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21274 (build-system python-build-system)
21275 (propagated-inputs
21276 `(("python-docutils" ,python-docutils)
21277 ("python-html5lib" ,python-html5lib)
21278 ("python-nbconvert" ,python-nbconvert)
21279 ("python-nbformat" ,python-nbformat)
21280 ("python-pytest" ,python-pytest)
21281 ("python-six" ,python-six)))
21282 (native-inputs
21283 `(("python-pbr-minimal" ,python-pbr-minimal)))
21284 (home-page "https://github.com/minrk/pytest-check-links")
21285 (synopsis "Check links in files")
21286 (description "This package provides a pytest plugin that checks URLs for
21287 HTML-containing files.")
21288 (license license:bsd-3)))
21289
21290 (define-public python-json5
21291 (package
21292 (name "python-json5")
21293 (version "0.8.5")
21294 (source
21295 (origin
21296 ;; sample.json5 is missing from PyPi source tarball
21297 (method git-fetch)
21298 (uri (git-reference
21299 (url "https://github.com/dpranke/pyjson5")
21300 (commit (string-append "v" version))))
21301 (file-name (git-file-name name version))
21302 (sha256
21303 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21304 (build-system python-build-system)
21305 (home-page "https://github.com/dpranke/pyjson5")
21306 (synopsis
21307 "Python implementation of the JSON5 data format")
21308 (description
21309 "JSON5 extends the JSON data interchange format to make it slightly more
21310 usable as a configuration language. This Python package implements parsing and
21311 dumping of JSON5 data structures.")
21312 (license license:asl2.0)))
21313
21314 (define-public python-frozendict
21315 (package
21316 (name "python-frozendict")
21317 (version "1.2")
21318 (source
21319 (origin
21320 (method url-fetch)
21321 (uri (pypi-uri "frozendict" version))
21322 (sha256
21323 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21324 (build-system python-build-system)
21325 (home-page "https://github.com/slezica/python-frozendict")
21326 (synopsis "Simple immutable mapping for Python")
21327 (description
21328 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21329 implements the complete mapping interface. It can be used as a drop-in
21330 replacement for dictionaries where immutability is desired.")
21331 (license license:expat)))
21332
21333 (define-public python-unpaddedbase64
21334 (package
21335 (name "python-unpaddedbase64")
21336 (version "1.1.0")
21337 (source
21338 (origin
21339 (method git-fetch)
21340 (uri (git-reference
21341 (url "https://github.com/matrix-org/python-unpaddedbase64")
21342 (commit (string-append "v" version))))
21343 (file-name (git-file-name name version))
21344 (sha256
21345 (base32
21346 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21347 (build-system python-build-system)
21348 (home-page "https://pypi.org/project/unpaddedbase64/")
21349 (synopsis "Encode and decode Base64 without “=” padding")
21350 (description
21351 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21352 using “=” characters. However this conveys no benefit so many protocols
21353 choose to use Base64 without the “=” padding.")
21354 (license license:asl2.0)))
21355
21356 (define-public python-py-cpuinfo
21357 (package
21358 (name "python-py-cpuinfo")
21359 (version "5.0.0")
21360 (source
21361 (origin
21362 (method url-fetch)
21363 (uri (pypi-uri "py-cpuinfo" version))
21364 (sha256
21365 (base32
21366 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21367 (build-system python-build-system)
21368 (home-page "https://github.com/workhorsy/py-cpuinfo")
21369 (synopsis "Get CPU info with Python")
21370 (description
21371 "This Python module returns the CPU info by using the best sources of
21372 information for your operating system.")
21373 (license license:expat)))
21374
21375 (define-public python-canonicaljson
21376 (package
21377 (name "python-canonicaljson")
21378 (version "1.1.4")
21379 (source
21380 (origin
21381 (method url-fetch)
21382 (uri (pypi-uri "canonicaljson" version))
21383 (sha256
21384 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
21385 (build-system python-build-system)
21386 (propagated-inputs
21387 `(("python-six" ,python-six)
21388 ("python-frozendict" ,python-frozendict)
21389 ("python-simplejson" ,python-simplejson)))
21390 (home-page "https://github.com/matrix-org/python-canonicaljson")
21391 (synopsis "Canonical JSON")
21392 (description
21393 "Deterministically encode JSON.
21394
21395 @itemize
21396 @item Encodes objects and arrays as RFC 7159 JSON.
21397 @item Sorts object keys so that you get the same result each time.
21398 @item Has no insignificant whitespace to make the output as small as possible.
21399 @item Escapes only the characters that must be escaped, U+0000 to
21400 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21401 @item Uses the shortest escape sequence for each escaped character.
21402 @item Encodes the JSON as UTF-8.
21403 @item Can encode frozendict immutable dictionaries.
21404 @end itemize")
21405 (license license:asl2.0)))
21406
21407 (define-public python-signedjson
21408 (package
21409 (name "python-signedjson")
21410 (version "1.1.1")
21411 (source
21412 (origin
21413 (method url-fetch)
21414 (uri (pypi-uri "signedjson" version))
21415 (sha256
21416 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21417 (build-system python-build-system)
21418 (propagated-inputs
21419 `(("python-canonicaljson" ,python-canonicaljson)
21420 ("python-importlib-metadata" ,python-importlib-metadata)
21421 ("python-pynacl" ,python-pynacl)
21422 ("python-typing-extensions" ,python-typing-extensions)
21423 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21424 (native-inputs
21425 `(("python-setuptools-scm" ,python-setuptools-scm)))
21426 (home-page "https://github.com/matrix-org/python-signedjson")
21427 (synopsis "Sign JSON objects with ED25519 signatures")
21428 (description
21429 "Sign JSON objects with ED25519 signatures.
21430
21431 @itemize
21432 @item More than one entity can sign the same object.
21433 @item Each entity can sign the object with more than one key making it easier to
21434 rotate keys
21435 @item ED25519 can be replaced with a different algorithm.
21436 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21437 key.
21438 @end itemize")
21439 (license license:asl2.0)))
21440
21441 (define-public python-daemonize
21442 (package
21443 (name "python-daemonize")
21444 (version "2.5.0")
21445 (source
21446 (origin
21447 (method url-fetch)
21448 (uri (pypi-uri "daemonize" version))
21449 (sha256
21450 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21451 (build-system python-build-system)
21452 (home-page "https://github.com/thesharp/daemonize")
21453 (synopsis "Library for writing system daemons in Python")
21454 (description "Daemonize is a library for writing system daemons in Python.")
21455 (license license:expat)))
21456
21457 (define-public python-pymacaroons
21458 (package
21459 (name "python-pymacaroons")
21460 (version "0.13.0")
21461 (source
21462 (origin
21463 (method url-fetch)
21464 (uri (pypi-uri "pymacaroons" version))
21465 (sha256
21466 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21467 (build-system python-build-system)
21468 (propagated-inputs
21469 `(("python-six" ,python-six)
21470 ("python-pynacl" ,python-pynacl)))
21471 (home-page "https://github.com/ecordell/pymacaroons")
21472 (synopsis "Python Macaroon Library")
21473 (description
21474 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21475 tokens, macaroons embed caveats that define specific authorization
21476 requirements for the target service, the service that issued the root macaroon
21477 and which is capable of verifying the integrity of macaroons it receives.
21478
21479 Macaroons allow for delegation and attenuation of authorization. They are
21480 simple and fast to verify, and decouple authorization policy from the
21481 enforcement of that policy.")
21482 (license license:expat)))
21483
21484 (define-public python-ldap3
21485 (package
21486 (name "python-ldap3")
21487 (version "2.7")
21488 (home-page "https://github.com/cannatag/ldap3")
21489 (source
21490 (origin
21491 (method git-fetch)
21492 (uri (git-reference (url home-page)
21493 (commit (string-append "v" version))))
21494 (file-name (git-file-name name version))
21495 (sha256
21496 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21497 (build-system python-build-system)
21498 (arguments
21499 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21500 #:phases (modify-phases %standard-phases
21501 (replace 'check
21502 (lambda* (#:key tests? #:allow-other-keys)
21503 (when tests?
21504 (invoke "nosetests" "-s" "test"))
21505 #t)))))
21506 (native-inputs
21507 `(("python-nose" ,python-nose)))
21508 (propagated-inputs
21509 `(("python-gssapi" ,python-gssapi)
21510 ("python-pyasn1" ,python-pyasn1)))
21511 (synopsis "Python LDAP client")
21512 (description
21513 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21514 library.")
21515 (license license:lgpl3+)))
21516
21517 (define-public python-boltons
21518 (package
21519 (name "python-boltons")
21520 (version "20.0.0")
21521 (source
21522 (origin
21523 (method url-fetch)
21524 (uri (pypi-uri "boltons" version))
21525 (sha256
21526 (base32
21527 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21528 (build-system python-build-system)
21529 (home-page "https://github.com/mahmoud/boltons")
21530 (synopsis "Extensions to the Python standard library")
21531 (description
21532 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21533 as — and yet conspicuously missing from — the standard library, including:
21534
21535 @itemize
21536 @item Atomic file saving, bolted on with fileutils
21537 @item A highly-optimized OrderedMultiDict, in dictutils
21538 @item Two types of PriorityQueue, in queueutils
21539 @item Chunked and windowed iteration, in iterutils
21540 @item Recursive data structure iteration and merging, with iterutils.remap
21541 @item Exponential backoff functionality, including jitter, through
21542 iterutils.backoff
21543 @item A full-featured TracebackInfo type, for representing stack traces, in
21544 tbutils
21545 @end itemize")
21546 (license license:bsd-3)))
21547
21548 (define-public python-eliot
21549 (package
21550 (name "python-eliot")
21551 (version "1.12.0")
21552 (source
21553 (origin
21554 (method url-fetch)
21555 (uri (pypi-uri "eliot" version))
21556 (sha256
21557 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21558 (build-system python-build-system)
21559 (arguments
21560 `(#:phases
21561 (modify-phases %standard-phases
21562 (add-after 'unpack 'remove-journald-support
21563 (lambda _
21564 (for-each delete-file
21565 '("eliot/tests/test_journald.py"
21566 "eliot/journald.py"))
21567 #t))
21568 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21569 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21570 ;; be installed and these tests should pass.
21571 (lambda _
21572 (delete-file "eliot/tests/test_prettyprint.py")
21573 #t)))))
21574 (propagated-inputs
21575 `(("python-boltons" ,python-boltons)
21576 ("python-pyrsistent" ,python-pyrsistent)
21577 ("python-six" ,python-six)
21578 ("python-zope-interface" ,python-zope-interface)))
21579 (native-inputs
21580 `(("python-black" ,python-black)
21581 ("python-coverage" ,python-coverage)
21582 ("python-dask" ,python-dask)
21583 ("python-flake8" ,python-flake8)
21584 ("python-hypothesis" ,python-hypothesis)
21585 ("python-pytest" ,python-pytest)
21586 ("python-setuptools" ,python-setuptools)
21587 ("python-sphinx" ,python-sphinx)
21588 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21589 ("python-testtools" ,python-testtools)
21590 ("python-twine" ,python-twine)
21591 ("python-twisted" ,python-twisted)))
21592 (home-page "https://github.com/itamarst/eliot/")
21593 (synopsis "Eliot: the logging system that tells you why it happened")
21594 (description
21595 "@dfn{eliot} is a Python logging system that outputs causal chains of
21596 actions: actions can spawn other actions, and eventually they either succeed
21597 or fail. The resulting logs tell you the story of what your software did: what
21598 happened, and what caused it.")
21599 (license license:asl2.0)))
21600
21601 (define-public python-pem
21602 (package
21603 (name "python-pem")
21604 (version "20.1.0")
21605 (source
21606 (origin
21607 (method url-fetch)
21608 (uri (pypi-uri "pem" version))
21609 (sha256
21610 (base32
21611 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21612 (build-system python-build-system)
21613 (native-inputs
21614 `(("python-certifi" ,python-certifi)
21615 ("python-coverage" ,python-coverage)
21616 ("python-pretend" ,python-pretend)
21617 ("python-pyopenssl" ,python-pyopenssl)
21618 ("python-pytest" ,python-pytest)
21619 ("python-sphinx" ,python-sphinx)
21620 ("python-twisted" ,python-twisted)))
21621 (home-page "https://pem.readthedocs.io/")
21622 (synopsis "Easy PEM file parsing in Python")
21623 (description
21624 "This package provides a Python module for parsing and splitting PEM files.")
21625 (license license:expat)))
21626
21627 (define-public python-txsni
21628 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21629 ;; Python and OpenSSL.
21630 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21631 (revision "0"))
21632 (package
21633 (name "python-txsni")
21634 (version (git-version "0.1.9" revision commit))
21635 (home-page "https://github.com/glyph/txsni")
21636 (source
21637 (origin
21638 (method git-fetch)
21639 (uri (git-reference (url home-page) (commit commit)))
21640 (file-name (git-file-name name version))
21641 (sha256
21642 (base32
21643 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21644 (build-system python-build-system)
21645 (propagated-inputs
21646 `(("python-pyopenssl" ,python-pyopenssl)
21647 ("python-service-identity" ,python-service-identity)
21648 ("python-twisted" ,python-twisted)))
21649 (synopsis "Run TLS servers with Twisted")
21650 (description
21651 "This package provides an easy-to-use SNI endpoint for use
21652 with the Twisted web framework.")
21653 (license license:expat))))
21654
21655 (define-public python-txacme
21656 (package
21657 (name "python-txacme")
21658 (version "0.9.2")
21659 (source
21660 (origin
21661 (method url-fetch)
21662 (uri (pypi-uri "txacme" version))
21663 (sha256
21664 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
21665 (build-system python-build-system)
21666 (propagated-inputs
21667 `(("python-acme" ,python-acme)
21668 ("python-attrs" ,python-attrs)
21669 ("python-eliot" ,python-eliot)
21670 ("python-josepy" ,python-josepy)
21671 ("python-pem" ,python-pem)
21672 ("python-treq" ,python-treq)
21673 ("python-twisted" ,python-twisted)
21674 ("python-txsni" ,python-txsni)))
21675 (native-inputs
21676 `(("python-fixtures" ,python-fixtures)
21677 ("python-hypothesis" ,python-hypothesis)
21678 ("python-mock" ,python-mock)
21679 ("python-service-identity"
21680 ,python-service-identity)
21681 ("python-testrepository" ,python-testrepository)
21682 ("python-testscenarios" ,python-testscenarios)
21683 ("python-testtools" ,python-testtools)))
21684 (home-page "https://github.com/twisted/txacme")
21685 (synopsis "Twisted implexmentation of the ACME protocol")
21686 (description
21687 "ACME is Automatic Certificate Management Environment, a protocol that
21688 allows clients and certificate authorities to automate verification and
21689 certificate issuance. The ACME protocol is used by the free Let's Encrypt
21690 Certificate Authority.
21691
21692 txacme is an implementation of the protocol for Twisted, the event-driven
21693 networking engine for Python.")
21694 (license license:expat)))
21695
21696 (define-public python-pysaml2
21697 (package
21698 (name "python-pysaml2")
21699 (version "5.0.0")
21700 (source
21701 (origin
21702 (method url-fetch)
21703 (uri (pypi-uri "pysaml2" version))
21704 (sha256
21705 (base32
21706 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
21707 (build-system python-build-system)
21708 (propagated-inputs
21709 `(("python-cryptography" ,python-cryptography)
21710 ("python-dateutil" ,python-dateutil)
21711 ("python-defusedxml" ,python-defusedxml)
21712 ("python-pyopenssl" ,python-pyopenssl)
21713 ("python-pytz" ,python-pytz)
21714 ("python-requests" ,python-requests)
21715 ("python-six" ,python-six)))
21716 (home-page "https://idpy.org")
21717 (synopsis "Python implementation of SAML Version 2 Standard")
21718 (description
21719 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
21720 It contains all necessary pieces for building a SAML2 service provider or
21721 an identity provider. The distribution contains examples of both.
21722
21723 This package was originally written to work in a WSGI environment, but
21724 there are extensions that allow you to use it with other frameworks.")
21725 (license license:asl2.0)))
21726
21727 (define-public python-click-plugins
21728 (package
21729 (name "python-click-plugins")
21730 (version "1.1.1")
21731 (source
21732 (origin
21733 (method url-fetch)
21734 (uri (pypi-uri "click-plugins" version))
21735 (sha256
21736 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
21737 (build-system python-build-system)
21738 (native-inputs
21739 `(("python-pytest" ,python-pytest)))
21740 (propagated-inputs
21741 `(("python-click" ,python-click)))
21742 (synopsis "Extension for Click to register external CLI commands")
21743 (description "This package provides n extension module for Click to
21744 register external CLI commands via setuptools entry-points.")
21745 (home-page "https://github.com/click-contrib/click-plugins")
21746 (license license:bsd-3)))
21747
21748 (define-public python-diceware
21749 (package
21750 (name "python-diceware")
21751 (version "0.9.6")
21752 (source
21753 (origin
21754 (method url-fetch)
21755 (uri (pypi-uri "diceware" version))
21756 (sha256
21757 (base32
21758 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
21759 (build-system python-build-system)
21760 (native-inputs
21761 `(("python-coverage" ,python-coverage)
21762 ("python-pytest" ,python-pytest)
21763 ("python-pytest-runner" ,python-pytest-runner)))
21764 (home-page "https://github.com/ulif/diceware/")
21765 (synopsis "Generates memorable passphrases")
21766 (description "This package generates passphrases by concatenating words
21767 randomly picked from wordlists. It supports several sources of
21768 randomness (including real life dice) and different wordlists (including
21769 cryptographically signed ones).")
21770 (license license:gpl3+)))
21771
21772 (define-public python-dictdiffer
21773 (package
21774 (name "python-dictdiffer")
21775 (version "0.8.1")
21776 (source (origin
21777 (method url-fetch)
21778 (uri (pypi-uri "dictdiffer" version))
21779 (sha256
21780 (base32
21781 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
21782 (build-system python-build-system)
21783 (native-inputs
21784 `(("python-check-manifest" ,python-check-manifest)
21785 ("python-coverage" ,python-coverage)
21786 ("python-isort" ,python-isort)
21787 ("python-mock" ,python-mock)
21788 ("python-pydoctstyle" ,python-pydocstyle)
21789 ("python-pytest-cache" ,python-pytest-cache)
21790 ("python-pytest-cov" ,python-pytest-cov)
21791 ("python-pytest-pep8" ,python-pytest-pep8)
21792 ("python-pytest-runner" ,python-pytest-runner)
21793 ("python-pytest" ,python-pytest)
21794 ("python-setuptools-scm" ,python-setuptools-scm)
21795 ("python-tox" ,python-tox)))
21796 (home-page "https://github.com/inveniosoftware/dictdiffer")
21797 (synopsis "Diff and patch Python dictionary objects")
21798 (description
21799 "Dictdiffer is a Python module that helps you to diff and patch
21800 dictionaries.")
21801 (license license:expat)))
21802
21803 (define-public pyzo
21804 (package
21805 (name "pyzo")
21806 (version "4.10.2")
21807 (source
21808 (origin
21809 (method url-fetch)
21810 (uri (pypi-uri "pyzo" version))
21811 (sha256
21812 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
21813 (build-system python-build-system)
21814 (arguments
21815 `(#:phases
21816 (modify-phases %standard-phases
21817 (add-before 'check 'fix-home-directory
21818 (lambda _
21819 ;; Tests fail with "Permission denied: '/homeless-shelter'".
21820 (setenv "HOME" "/tmp")
21821 #t)))
21822 ;; Tests fail with "Uncaught Python exception: invalid literal for
21823 ;; int() with base 10: 'test'".
21824 #:tests? #f))
21825 (propagated-inputs
21826 `(("python-pyqt" ,python-pyqt)))
21827 (home-page "https://pyzo.org")
21828 (synopsis
21829 "Python IDE for scientific computing")
21830 (description
21831 "Pyzo is a Python IDE focused on interactivity and introspection,
21832 which makes it very suitable for scientific computing. Its practical
21833 design is aimed at simplicity and efficiency.
21834
21835 It consists of two main components, the editor and the shell, and uses
21836 a set of pluggable tools to help the programmer in various ways. Some
21837 example tools are source structure, project manager, interactive help,
21838 workspace...")
21839 (license license:bsd-2)))
21840
21841 (define-public python-osc
21842 (package
21843 (name "python-osc")
21844 (version "1.7.4")
21845 (source
21846 (origin
21847 (method url-fetch)
21848 (uri (pypi-uri "python-osc" version))
21849 (sha256
21850 (base32
21851 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
21852 (build-system python-build-system)
21853 (home-page "https://github.com/attwad/python-osc")
21854 (synopsis "Open Sound Control server and client implementations")
21855 (description
21856 "@code{python-osc} is a pure Python library with no external
21857 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
21858 Open Sound Control 1.0} specification.")
21859 (license license:unlicense)))
21860
21861 (define-public python-voluptuous
21862 (package
21863 (name "python-voluptuous")
21864 (version "0.11.7")
21865 (source
21866 (origin
21867 (method url-fetch)
21868 (uri (pypi-uri "voluptuous" version))
21869 (sha256
21870 (base32
21871 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
21872 (build-system python-build-system)
21873 (native-inputs
21874 `(("python-nose" ,python-nose)))
21875 (home-page "https://github.com/alecthomas/voluptuous")
21876 (synopsis "Python data validation library")
21877 (description
21878 "Voluptuous is a Python data validation library. It is primarily
21879 intended for validating data coming into Python as JSON, YAML, etc.")
21880 (license license:bsd-3)))
21881
21882 (define-public python-cmd2
21883 (package
21884 (name "python-cmd2")
21885 (version "1.0.2")
21886 (source
21887 (origin
21888 (method url-fetch)
21889 (uri (pypi-uri "cmd2" version))
21890 (sha256
21891 (base32
21892 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
21893 (build-system python-build-system)
21894 (propagated-inputs
21895 `(("python-attrs" ,python-attrs)
21896 ("python-colorama" ,python-colorama)
21897 ("python-pyperclip" ,python-pyperclip)
21898 ("python-wcwidth" ,python-wcwidth)))
21899 (native-inputs
21900 `(("python-codecov" ,python-codecov)
21901 ("python-coverage" ,python-coverage)
21902 ("python-doc8" ,python-doc8)
21903 ("python-flake8" ,python-flake8)
21904 ("python-invoke" ,python-invoke)
21905 ("python-mock" ,python-mock)
21906 ("python-pytest" ,python-pytest)
21907 ("python-pytest-cov" ,python-pytest-cov)
21908 ("python-pytest-mock" ,python-pytest-mock)
21909 ("python-setuptools-scm" ,python-setuptools-scm)
21910 ("python-sphinx" ,python-sphinx)
21911 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
21912 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21913 ("python-tox" ,python-tox)
21914 ("python-twine" ,python-twine)
21915 ("which" ,which)))
21916 (home-page "https://github.com/python-cmd2/cmd2")
21917 (synopsis "Tool for building interactive command line applications")
21918 (description
21919 "Cmd2 is a tool for building interactive command line applications in
21920 Python. Its goal is to make it quick and easy for developers to build
21921 feature-rich and user-friendly interactive command line applications. It
21922 provides a simple API which is an extension of Python's built-in @code{cmd}
21923 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
21924 make your life easier and eliminates much of the boilerplate code which would
21925 be necessary when using @code{cmd}.")
21926 (license license:expat)))
21927
21928 (define-public python-pytidylib
21929 (package
21930 (name "python-pytidylib")
21931 (version "0.3.2")
21932 (source (origin
21933 (method url-fetch)
21934 (uri (pypi-uri "pytidylib" version))
21935 (sha256
21936 (base32
21937 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
21938 (build-system python-build-system)
21939 (arguments
21940 '(#:phases
21941 (modify-phases %standard-phases
21942 (add-before 'build 'qualify-libtidy
21943 (lambda* (#:key inputs #:allow-other-keys)
21944 (let ((libtidy (string-append (assoc-ref inputs "tidy")
21945 "/lib/libtidy.so")))
21946 (substitute* "tidylib/tidy.py"
21947 (("ctypes\\.util\\.find_library\\('tidy'\\)")
21948 (format #f "'~a'" libtidy)))
21949 #t))))))
21950 (inputs `(("tidy" ,tidy)))
21951 (home-page "https://github.com/countergram/pytidylib")
21952 (synopsis "Python wrapper for HTML Tidy library")
21953 (description
21954 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
21955 allows you, from Python code, to “fix” invalid (X)HTML markup.")
21956 (license license:expat)))
21957
21958 (define-public python2-pytidylib
21959 (package-with-python2 python-pytidylib))
21960
21961 (define-public python-mujson
21962 (package
21963 (name "python-mujson")
21964 (version "1.4")
21965 (source
21966 (origin
21967 (method url-fetch)
21968 (uri (pypi-uri "mujson" version))
21969 (sha256
21970 (base32
21971 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
21972 (build-system python-build-system)
21973 (home-page "https://github.com/mattgiles/mujson")
21974 (synopsis "Use the fastest JSON functions available at import time")
21975 (description "This packages selects the fastest JSON functions available
21976 at import time.")
21977 (license license:expat)))
21978
21979 (define-public python-bashlex
21980 (package
21981 (name "python-bashlex")
21982 (version "0.14")
21983 (source
21984 (origin
21985 (method url-fetch)
21986 (uri (pypi-uri "bashlex" version))
21987 (sha256
21988 (base32
21989 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
21990 (build-system python-build-system)
21991 (arguments
21992 `(#:phases
21993 (modify-phases %standard-phases
21994 (add-before 'build 'pregenerate-yacc-tables
21995 (lambda _
21996 ;; parser.py caches tables, which attempts to write to site lib
21997 ;; see https://github.com/idank/bashlex/issues/51
21998 (invoke "python" "-c" "import bashlex"))))))
21999 (home-page
22000 "https://github.com/idank/bashlex")
22001 (synopsis "Python parser for bash")
22002 (description "@code{bashlex} is a Python port of the parser used
22003 internally by GNU bash.
22004
22005 For the most part it's transliterated from C, the major differences are:
22006
22007 @itemize
22008 @item it does not execute anything
22009 @item it is reentrant
22010 @item it generates a complete AST
22011 @end itemize
22012 ")
22013 (license license:gpl3+)))
22014
22015 (define-public python-jinxed
22016 (package
22017 (name "python-jinxed")
22018 (version "1.0.0")
22019 (source
22020 (origin
22021 (method url-fetch)
22022 (uri (pypi-uri "jinxed" version))
22023 (sha256
22024 (base32
22025 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22026 (build-system python-build-system)
22027 (arguments
22028 '(#:phases
22029 (modify-phases %standard-phases
22030 (add-before 'check 'set-environment-variables
22031 (lambda* (#:key inputs #:allow-other-keys)
22032 (let ((ncurses (assoc-ref inputs "ncurses")))
22033 (setenv "TERM" "LINUX")
22034 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22035 #t))))
22036 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22037 (native-inputs
22038 `(("ncurses" ,ncurses)))
22039 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22040 (synopsis "Jinxed Terminal Library")
22041 (description
22042 "Jinxed is an implementation of a subset of the Python curses library.")
22043 (license license:mpl2.0)))
22044
22045 (define-public python-blessed
22046 (package
22047 (name "python-blessed")
22048 (version "1.17.8")
22049 (source
22050 (origin
22051 (method url-fetch)
22052 (uri (pypi-uri "blessed" version))
22053 (sha256
22054 (base32
22055 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22056 (modules '((guix build utils)))
22057 (snippet
22058 '(begin
22059 ;; Don't get hung up on Windows test failures.
22060 (delete-file "blessed/win_terminal.py") #t))))
22061 (build-system python-build-system)
22062 (propagated-inputs
22063 `(("python-jinxed" ,python-jinxed)
22064 ("python-six" ,python-six)
22065 ("python-wcwidth" ,python-wcwidth)))
22066 (native-inputs
22067 `(("python-mock" ,python-mock)
22068 ("python-pytest" ,python-pytest)))
22069 (home-page "https://github.com/jquast/blessed")
22070 (synopsis "Wrapper around terminal capabilities")
22071 (description
22072 "Blessed is a thin, practical wrapper around terminal styling, screen
22073 positioning, and keyboard input.")
22074 (license license:expat)))
22075
22076 (define-public python-readme-renderer
22077 (package
22078 (name "python-readme-renderer")
22079 (version "26.0")
22080 (source
22081 (origin
22082 (method url-fetch)
22083 (uri (pypi-uri "readme_renderer" version))
22084 (sha256
22085 (base32
22086 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22087 (build-system python-build-system)
22088 (propagated-inputs
22089 `(("python-bleach" ,python-bleach)
22090 ("python-docutils" ,python-docutils)
22091 ("python-pygments" ,python-pygments)
22092 ("python-six" ,python-six)))
22093 (native-inputs
22094 `(("python-mock" ,python-mock)
22095 ("python-pytest" ,python-pytest)))
22096 (home-page "https://github.com/pypa/readme_renderer")
22097 (synopsis "Render README files in Warehouse")
22098 (description
22099 "Readme Renderer is a library that will safely render arbitrary README
22100 files into HTML. It is designed to be used in Warehouse to render the
22101 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22102 and plain text.")
22103 (license license:asl2.0)))
22104
22105 (define-public python-lazr-delegates
22106 (package
22107 (name "python-lazr-delegates")
22108 (version "2.0.4")
22109 (source
22110 (origin
22111 (method url-fetch)
22112 (uri (pypi-uri "lazr.delegates" version))
22113 (sha256
22114 (base32
22115 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22116 (build-system python-build-system)
22117 (arguments
22118 '(#:phases
22119 (modify-phases %standard-phases
22120 (replace 'check
22121 (lambda _
22122 (invoke "python" "setup.py" "nosetests"))))))
22123 (native-inputs
22124 `(("python-nose" ,python-nose)))
22125 (propagated-inputs
22126 `(("python-zope-interface" ,python-zope-interface)))
22127 (home-page "https://launchpad.net/lazr.delegates")
22128 (synopsis "Easily write objects that delegate behavior")
22129 (description
22130 "The @code{lazr.delegates} package makes it easy to write objects that
22131 delegate behavior to another object. The new object adds some property or
22132 behavior on to the other object, while still providing the underlying interface,
22133 and delegating behavior.")
22134 (license license:lgpl3)))
22135
22136 (define-public python-lazr-config
22137 (package
22138 (name "python-lazr-config")
22139 (version "2.2.2")
22140 (source
22141 (origin
22142 (method url-fetch)
22143 (uri (pypi-uri "lazr.config" version))
22144 (sha256
22145 (base32
22146 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22147 (build-system python-build-system)
22148 (arguments
22149 '(#:phases
22150 (modify-phases %standard-phases
22151 (replace 'check
22152 (lambda _
22153 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22154 (native-inputs
22155 `(("python-nose" ,python-nose)))
22156 (propagated-inputs
22157 `(("python-lazr-delegates" ,python-lazr-delegates)
22158 ("python-zope-interface" ,python-zope-interface)))
22159 (home-page "https://launchpad.net/lazr.config")
22160 (synopsis "Create configuration schemas and process and validate configurations")
22161 (description
22162 "The LAZR config system is typically used to manage process configuration.
22163 Process configuration is for saying how things change when we run systems on
22164 different machines, or under different circumstances. This system uses ini-like
22165 file format of section, keys, and values. The config file supports inheritance
22166 to minimize duplication of information across files. The format supports schema
22167 validation.")
22168 (license license:lgpl3)))
22169
22170 (define-public python-flufl-bounce
22171 (package
22172 (name "python-flufl-bounce")
22173 (version "3.0.1")
22174 (source
22175 (origin
22176 (method url-fetch)
22177 (uri (pypi-uri "flufl.bounce" version))
22178 (sha256
22179 (base32
22180 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22181 (build-system python-build-system)
22182 (propagated-inputs
22183 `(("python-atpublic" ,python-atpublic)
22184 ("python-zope-interface" ,python-zope-interface)))
22185 (native-inputs
22186 `(("python-nose2" ,python-nose2)))
22187 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22188 (synopsis "Email bounce detectors")
22189 (description "The @code{flufl.bounce} library provides a set of heuristics
22190 and an API for detecting the original bouncing email addresses from a bounce
22191 message. Many formats found in the wild are supported, as are VERP and
22192 RFC 3464.")
22193 (license (list license:asl2.0
22194 license:lgpl3)))) ; only for setup_headers.py
22195
22196 (define-public python-flufl-i18n
22197 (package
22198 (name "python-flufl-i18n")
22199 (version "3.0")
22200 (source
22201 (origin
22202 (method url-fetch)
22203 (uri (pypi-uri "flufl.i18n" version))
22204 (sha256
22205 (base32
22206 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22207 (build-system python-build-system)
22208 (propagated-inputs
22209 `(("python-atpublic" ,python-atpublic)))
22210 (home-page "https://flufli18n.readthedocs.io")
22211 (synopsis "API for Python internationalization")
22212 (description
22213 "This package provides a high-level, convenient API for managing
22214 internationalization/translation contexts in Python applications. There is a
22215 simple API for single-context applications, such as command line scripts which
22216 only need to translate into one language during the entire course of their
22217 execution. There is a more flexible, but still convenient API for multi-context
22218 applications, such as servers, which may need to switch language contexts for
22219 different tasks.")
22220 (license license:asl2.0)))
22221
22222 (define-public python-flufl-lock
22223 (package
22224 (name "python-flufl-lock")
22225 (version "4.0")
22226 (source
22227 (origin
22228 (method url-fetch)
22229 (uri (pypi-uri "flufl.lock" version))
22230 (sha256
22231 (base32
22232 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22233 (build-system python-build-system)
22234 (propagated-inputs
22235 `(("python-atpublic" ,python-atpublic)
22236 ("python-psutil" ,python-psutil)))
22237 (home-page "https://flufllock.readthedocs.io")
22238 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22239 (description
22240 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22241 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22242 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22243 and have a maximum lifetime built-in.")
22244 (license (list license:asl2.0
22245 license:lgpl3)))) ; only for setup_helpers.py
22246
22247 (define-public python-flufl-testing
22248 (package
22249 (name "python-flufl-testing")
22250 (version "0.8")
22251 (source
22252 (origin
22253 (method url-fetch)
22254 (uri (pypi-uri "flufl.testing" version))
22255 (sha256
22256 (base32
22257 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22258 (build-system python-build-system)
22259 (native-inputs
22260 `(("python-nose2" ,python-nose2)))
22261 (home-page "https://gitlab.com/warsaw/flufl.testing")
22262 (synopsis "Collection of test tool plugins")
22263 (description
22264 "This package contains a small collection of test tool plugins for
22265 @code{nose2} and @code{flake8}.")
22266 (license license:asl2.0)))
22267
22268 (define-public python-devtools
22269 (package
22270 (name "python-devtools")
22271 (version "0.6")
22272 (source
22273 (origin
22274 (method git-fetch)
22275 (uri (git-reference
22276 (url "https://github.com/samuelcolvin/python-devtools")
22277 (commit (string-append "v" version))))
22278 (file-name (git-file-name name version))
22279 (sha256
22280 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22281 (build-system python-build-system)
22282 (native-inputs
22283 `(("python-pytest" ,python-pytest)
22284 ("python-pytest-mock" ,python-pytest-mock)))
22285 (propagated-inputs
22286 `(("python-pygments" ,python-pygments)))
22287 (arguments
22288 `(#:phases (modify-phases %standard-phases
22289 (replace 'check
22290 (lambda _
22291 (invoke "pytest")
22292 #t)))))
22293 (home-page "https://github.com/samuelcolvin/python-devtools")
22294 (synopsis "Debug command and development tools")
22295 (description
22296 "This package provides a debug print command and other development tools.
22297 It adds a simple and readable way to print stuff during development.")
22298 (license license:expat)))
22299
22300 (define-public python-dateparser
22301 (package
22302 (name "python-dateparser")
22303 (version "0.7.6")
22304 (source
22305 (origin
22306 (method url-fetch)
22307 (uri (pypi-uri "dateparser" version))
22308 (sha256
22309 (base32
22310 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22311 (build-system python-build-system)
22312 (inputs
22313 `(("tzdata" ,tzdata)))
22314 (propagated-inputs
22315 `(("python-dateutil" ,python-dateutil)
22316 ("python-pytz" ,python-pytz)
22317 ("python-regex" ,python-regex)
22318 ("python-ruamel.yaml" ,python-ruamel.yaml)
22319 ("python-tzlocal" ,python-tzlocal)))
22320 (native-inputs
22321 `(("python-mock" ,python-mock)
22322 ("python-parameterized" ,python-parameterized)))
22323 (arguments
22324 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22325 #:tests? #f
22326 #:phases
22327 (modify-phases %standard-phases
22328 (add-before 'check 'set-check-environment
22329 (lambda* (#:key inputs #:allow-other-keys)
22330 (setenv "TZ" "UTC")
22331 (setenv "TZDIR"
22332 (string-append (assoc-ref inputs "tzdata")
22333 "/share/zoneinfo"))
22334 #t)))))
22335 (home-page "https://github.com/scrapinghub/dateparser")
22336 (synopsis
22337 "Date parsing library designed to parse dates from HTML pages")
22338 (description
22339 "@code{python-dateparser} provides modules to easily parse localized
22340 dates in almost any string formats commonly found on web pages.")
22341 (license license:bsd-3)))
22342
22343 (define-public python-dparse
22344 (package
22345 (name "python-dparse")
22346 (version "0.5.1")
22347 (source
22348 (origin
22349 (method url-fetch)
22350 (uri (pypi-uri "dparse" version))
22351 (sha256
22352 (base32
22353 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22354 (build-system python-build-system)
22355 (native-inputs
22356 `(("python-pytest" ,python-pytest)))
22357 (propagated-inputs
22358 `(("python-packaging" ,python-packaging)
22359 ("python-pyyaml" ,python-pyyaml)
22360 ("python-toml" ,python-toml)))
22361 (home-page "https://github.com/pyupio/dparse")
22362 (synopsis "Parser for Python dependency files")
22363 (description "This package provides a parser for Python dependency files.")
22364 (license license:expat)))
22365
22366 (define-public python-dpath
22367 (package
22368 (name "python-dpath")
22369 (version "2.0.1")
22370 (source
22371 (origin
22372 (method url-fetch)
22373 (uri (pypi-uri "dpath" version))
22374 (sha256
22375 (base32
22376 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22377 (build-system python-build-system)
22378 (native-inputs
22379 `(("python-hypothesis" ,python-hypothesis)
22380 ("python-mock" ,python-mock)
22381 ("python-nose" ,python-nose)))
22382 (arguments
22383 '(#:phases
22384 (modify-phases %standard-phases
22385 (replace 'check
22386 (lambda* (#:key inputs outputs #:allow-other-keys)
22387 (add-installed-pythonpath inputs outputs)
22388 ;; This invokation is taken from tox.ini.
22389 (invoke "nosetests" "-d" "-v" "tests/"))))))
22390 (home-page "https://github.com/akesterson/dpath-python")
22391 (synopsis "Filesystem-like pathing and searching for dictionaries")
22392 (description
22393 "@code{python-dpath} is a library for accessing and searching
22394 dictionaries via /slashed/paths ala xpath.
22395
22396 Basically it lets you glob over a dictionary as if it were a filesystem. It
22397 allows you to specify globs (ala the bash eglob syntax, through some advanced
22398 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22399 facility for filtering those results.")
22400 (license license:expat)))
22401
22402 (define-public python-safety
22403 (package
22404 (name "python-safety")
22405 (version "1.9.0")
22406 (source
22407 (origin
22408 (method url-fetch)
22409 (uri (pypi-uri "safety" version))
22410 (sha256
22411 (base32
22412 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22413 (build-system python-build-system)
22414 (arguments
22415 `(#:phases
22416 (modify-phases %standard-phases
22417 (add-after 'unpack 'disable-tests
22418 (lambda _
22419 (substitute* "tests/test_safety.py"
22420 ;; requires network
22421 (("def test_check_live") "def _test_check_live"))
22422 #t)))))
22423 (propagated-inputs
22424 `(("python-click" ,python-click)
22425 ("python-dparse" ,python-dparse)
22426 ("python-packaging" ,python-packaging)
22427 ("python-requests" ,python-requests)))
22428 (home-page "https://github.com/pyupio/safety")
22429 (synopsis "Check installed dependencies for known vulnerabilities")
22430 (description "Safety checks installed dependencies for known vulnerabilities.
22431 By default it uses the open Python vulnerability database Safety DB.")
22432 (license license:expat)))
22433
22434 (define-public python-pypandoc
22435 (package
22436 (name "python-pypandoc")
22437 (version "1.5")
22438 (source
22439 (origin
22440 (method url-fetch)
22441 (uri (pypi-uri "pypandoc" version))
22442 (sha256
22443 (base32
22444 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22445 (build-system python-build-system)
22446 (inputs
22447 `(("pandoc" ,pandoc)
22448 ("pandoc-citeproc" ,pandoc-citeproc)))
22449 (propagated-inputs
22450 `(("wheel" ,python-wheel)))
22451 (native-inputs
22452 `(("texlive" ,(texlive-union (list texlive-amsfonts
22453 texlive-fonts-ec
22454 texlive-latex-hyperref
22455 texlive-latex-oberdiek
22456 texlive-lm
22457 texlive-xcolor)))))
22458 (arguments
22459 `(#:phases
22460 (modify-phases %standard-phases
22461 (add-before 'check 'disable-tests
22462 (lambda _
22463 ;; Disable test requiring network access
22464 (substitute* "tests.py"
22465 (("test_basic_conversion_from_http_url")
22466 "skip_test_basic_conversion_from_http_url"))
22467 ;; Needed by texlive-union to generate fonts
22468 (setenv "HOME" "/tmp")
22469 #t)))))
22470 (home-page "https://github.com/bebraw/pypandoc")
22471 (synopsis "Python wrapper for pandoc")
22472 (description "pypandoc is a thin Python wrapper around pandoc
22473 and pandoc-citeproc.")
22474 (license license:expat)))
22475
22476 (define-public python-rnc2rng
22477 (package
22478 (name "python-rnc2rng")
22479 (version "2.6.4")
22480 (source
22481 (origin
22482 (method url-fetch)
22483 (uri (pypi-uri "rnc2rng" version))
22484 (sha256
22485 (base32
22486 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22487 (build-system python-build-system)
22488 (propagated-inputs
22489 `(("python-rply" ,python-rply)))
22490 (arguments
22491 `(#:phases (modify-phases %standard-phases
22492 (replace 'check
22493 (lambda _
22494 (invoke "python" "test.py"))))))
22495 (home-page "https://github.com/djc/rnc2rng")
22496 (synopsis "Convert RELAX NG Compact to regular syntax")
22497 (description
22498 "This package provides the @command{rnc2rng} command-line tool as well as
22499 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22500 equivalent schemata in the XML-based default RELAX NG syntax.")
22501 (license license:expat)))
22502
22503 (define-public python-citeproc-py
22504 (package
22505 (name "python-citeproc-py")
22506 (version "0.5.1")
22507 (source
22508 (origin
22509 (method url-fetch)
22510 (uri (pypi-uri "citeproc-py" version))
22511 (sha256
22512 (base32
22513 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22514 (build-system python-build-system)
22515 (propagated-inputs
22516 `(("python-lxml" ,python-lxml)
22517 ("python-rnc2rng" ,python-rnc2rng)))
22518 (home-page
22519 "https://github.com/brechtm/citeproc-py")
22520 (synopsis "Citations and bibliography formatter")
22521 (description
22522 "Citeproc-py is a CSL processor for Python. It aims to implement the
22523 CSL 1.0.1 specification. citeproc-py can output styled citations and
22524 bibliographies in a number of different output formats. Currently supported
22525 are plain text, reStructuredText and HTML.")
22526 (license license:bsd-2)))
22527
22528 (define-public python-inform
22529 (package
22530 (name "python-inform")
22531 (version "1.23.0")
22532 (source
22533 (origin
22534 (method url-fetch)
22535 (uri (pypi-uri "inform" version))
22536 (sha256
22537 (base32
22538 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22539 (build-system python-build-system)
22540 (arguments
22541 `(#:tests? #f)) ; PyPI tarball lacks tests
22542 (native-inputs
22543 `(("python-hypothesis" ,python-hypothesis)
22544 ("python-pytest-cov" ,python-pytest-cov)
22545 ("python-pytest-runner" ,python-pytest-runner)))
22546 (propagated-inputs
22547 `(("python-arrow" ,python-arrow)
22548 ("python-six" ,python-six)))
22549 (home-page "https://inform.readthedocs.io")
22550 (synopsis "Print & logging utilities for communicating with user")
22551 (description
22552 "Inform is designed to display messages from programs that are typically run from
22553 a console. It provides a collection of ‘print’ functions that allow you to simply and
22554 cleanly print different types of messages.")
22555 (license license:gpl3+)))
22556
22557 (define-public python-nestedtext
22558 (package
22559 (name "python-nestedtext")
22560 (version "1.0.0")
22561 (source
22562 (origin
22563 (method url-fetch)
22564 (uri (pypi-uri "nestedtext" version))
22565 (sha256
22566 (base32
22567 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22568 (build-system python-build-system)
22569 (arguments
22570 `(#:tests? #f)) ; PyPI tarball lacks tests
22571 (propagated-inputs
22572 `(("python-inform" ,python-inform)))
22573 (home-page "https://nestedtext.org")
22574 (synopsis "Human readable and writable data interchange format")
22575 (description
22576 "NestedText is a file format for holding data that is to be entered, edited, or
22577 viewed by people. It allows data to be organized into a nested collection of
22578 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
22579 without the complexity and risk of YAML and without the syntatic clutter of JSON.
22580 NestedText is both simple and natural. Only a small number of concepts and rules must
22581 be kept in mind when creating it. It is easily created, modified, or viewed with
22582 a text editor and easily understood and used by both programmers and non-programmers.")
22583 (license license:expat))) ; MIT license
22584
22585 (define-public python-parallel
22586 (package
22587 (name "python-parallel")
22588 (version "1.6.4.4")
22589 (source
22590 (origin
22591 (method url-fetch)
22592 (uri (string-append
22593 "https://www.parallelpython.com/downloads/pp/pp-"
22594 version ".zip"))
22595 (sha256
22596 (base32
22597 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22598 (native-inputs
22599 `(("unzip" ,unzip)))
22600 (build-system python-build-system)
22601 (arguments '(#:tests? #f)) ; No test suite.
22602 (home-page "https://www.parallelpython.com")
22603 (synopsis "Parallel and distributed programming for Python")
22604 (description "Parallel Python module (PP) provides an easy and efficient
22605 way to create parallel-enabled applications for SMP computers and clusters.
22606 PP module features cross-platform portability and dynamic load balancing.
22607 Thus applications written with PP will parallelize efficiently even on
22608 heterogeneous and multi-platform clusters (including clusters running other
22609 applications with variable CPU loads).")
22610 (license license:bsd-3)))
22611
22612 (define-public python2-parallel
22613 (package-with-python2 python-parallel))