633f153f682a3d88bcfab61ba88dee8905e32999
[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, 2020 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 © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;;
97 ;;; This file is part of GNU Guix.
98 ;;;
99 ;;; GNU Guix is free software; you can redistribute it and/or modify it
100 ;;; under the terms of the GNU General Public License as published by
101 ;;; the Free Software Foundation; either version 3 of the License, or (at
102 ;;; your option) any later version.
103 ;;;
104 ;;; GNU Guix is distributed in the hope that it will be useful, but
105 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
106 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
107 ;;; GNU General Public License for more details.
108 ;;;
109 ;;; You should have received a copy of the GNU General Public License
110 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
111
112 (define-module (gnu packages python-xyz)
113 #:use-module ((guix licenses) #:prefix license:)
114 #:use-module (gnu packages)
115 #:use-module (gnu packages algebra)
116 #:use-module (gnu packages adns)
117 #:use-module (gnu packages aidc)
118 #:use-module (gnu packages attr)
119 #:use-module (gnu packages backup)
120 #:use-module (gnu packages bash)
121 #:use-module (gnu packages check)
122 #:use-module (gnu packages cmake)
123 #:use-module (gnu packages compression)
124 #:use-module (gnu packages crypto)
125 #:use-module (gnu packages databases)
126 #:use-module (gnu packages dbm)
127 #:use-module (gnu packages djvu)
128 #:use-module (gnu packages docker)
129 #:use-module (gnu packages enchant)
130 #:use-module (gnu packages file)
131 #:use-module (gnu packages fontutils)
132 #:use-module (gnu packages gcc)
133 #:use-module (gnu packages geo)
134 #:use-module (gnu packages ghostscript)
135 #:use-module (gnu packages gl)
136 #:use-module (gnu packages glib)
137 #:use-module (gnu packages gnome)
138 #:use-module (gnu packages gnupg)
139 #:use-module (gnu packages graphviz)
140 #:use-module (gnu packages graphics)
141 #:use-module (gnu packages gsasl)
142 #:use-module (gnu packages gstreamer)
143 #:use-module (gnu packages gtk)
144 #:use-module (gnu packages haskell-xyz)
145 #:use-module (gnu packages icu4c)
146 #:use-module (gnu packages image)
147 #:use-module (gnu packages kerberos)
148 #:use-module (gnu packages libevent)
149 #:use-module (gnu packages libffi)
150 #:use-module (gnu packages libidn)
151 #:use-module (gnu packages linux)
152 #:use-module (gnu packages llvm)
153 #:use-module (gnu packages man)
154 #:use-module (gnu packages maths)
155 #:use-module (gnu packages monitoring)
156 #:use-module (gnu packages multiprecision)
157 #:use-module (gnu packages networking)
158 #:use-module (gnu packages ncurses)
159 #:use-module (gnu packages openstack)
160 #:use-module (gnu packages pcre)
161 #:use-module (gnu packages perl)
162 #:use-module (gnu packages photo)
163 #:use-module (gnu packages pkg-config)
164 #:use-module (gnu packages python)
165 #:use-module (gnu packages python-check)
166 #:use-module (gnu packages python-compression)
167 #:use-module (gnu packages python-crypto)
168 #:use-module (gnu packages python-science)
169 #:use-module (gnu packages python-web)
170 #:use-module (gnu packages qt)
171 #:use-module (gnu packages rdf)
172 #:use-module (gnu packages readline)
173 #:use-module (gnu packages sdl)
174 #:use-module (gnu packages search)
175 #:use-module (gnu packages shells)
176 #:use-module (gnu packages sphinx)
177 #:use-module (gnu packages ssh)
178 #:use-module (gnu packages terminals)
179 #:use-module (gnu packages tex)
180 #:use-module (gnu packages texinfo)
181 #:use-module (gnu packages textutils)
182 #:use-module (gnu packages time)
183 #:use-module (gnu packages tls)
184 #:use-module (gnu packages version-control)
185 #:use-module (gnu packages video)
186 #:use-module (gnu packages web)
187 #:use-module (gnu packages wxwidgets)
188 #:use-module (gnu packages base)
189 #:use-module (gnu packages xml)
190 #:use-module (gnu packages xorg)
191 #:use-module (gnu packages xdisorg)
192 #:use-module (gnu packages tcl)
193 #:use-module (gnu packages bdw-gc)
194 #:use-module (gnu packages serialization)
195 #:use-module (guix packages)
196 #:use-module (guix download)
197 #:use-module (guix git-download)
198 #:use-module (guix hg-download)
199 #:use-module (guix utils)
200 #:use-module (guix build-system gnu)
201 #:use-module (guix build-system cmake)
202 #:use-module (guix build-system python)
203 #:use-module (guix build-system trivial)
204 #:use-module (srfi srfi-1)
205 #:use-module (srfi srfi-26))
206
207 (define-public python-slixmpp
208 (package
209 (name "python-slixmpp")
210 (version "1.5.2")
211 (source
212 (origin
213 (method git-fetch)
214 (uri
215 (git-reference
216 (url "https://lab.louiz.org/poezio/slixmpp.git")
217 (commit
218 (string-append "slix-" version))))
219 (file-name
220 (git-file-name name version))
221 (sha256
222 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
223 (build-system python-build-system)
224 (arguments
225 `(#:phases
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch
228 (lambda _
229 (substitute* "setup.py"
230 (("'CC', 'cc'")
231 "'CC', 'gcc'"))
232 #t)))))
233 (native-inputs
234 `(("cython" ,python-cython)
235 ("gnupg" ,gnupg)
236 ("pkg-config" ,pkg-config)))
237 (propagated-inputs
238 `(("python-aiodns" ,python-aiodns)
239 ("python-aiohttp" ,python-aiohttp)
240 ("python-pyasn1" ,python-pyasn1)
241 ("python-pyasn1-modules" ,python-pyasn1-modules)))
242 (inputs
243 `(("libidn" ,libidn)
244 ("python" ,python))) ; We are building a Python extension.
245 (synopsis "XMPP library without threads")
246 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
247 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
248 socket handling, the timers, the events dispatching) in order to remove all
249 threads.")
250 (home-page "https://lab.louiz.org/poezio/slixmpp")
251 (license license:expat)))
252
253 (define-public python-tenacity
254 (package
255 (name "python-tenacity")
256 (version "6.1.0")
257 (source (origin
258 (method url-fetch)
259 (uri (pypi-uri "tenacity" version))
260 (sha256
261 (base32
262 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
263 (build-system python-build-system)
264 (native-inputs
265 `(("python-setuptools-scm" ,python-setuptools-scm)
266 ("python-sphinx" ,python-sphinx)
267 ("python-tornado" ,python-tornado)
268 ("python-pytest" ,python-pytest)))
269 (propagated-inputs
270 `(("python-six" ,python-six)))
271 (arguments
272 `(#:phases (modify-phases %standard-phases
273 (replace 'check
274 (lambda _
275 (invoke "pytest")
276 #t)))))
277 (home-page "https://github.com/jd/tenacity")
278 (synopsis "Retrying library for python")
279 (description "Tenacity is a general-purpose python library to simplify the
280 task of adding retry behavior to just about anything.")
281 (license license:asl2.0)))
282
283 (define-public python-pytelegrambotapi
284 (package
285 (name "python-pytelegrambotapi")
286 (version "3.7.4")
287 (source
288 (origin
289 (method git-fetch)
290 (uri (git-reference
291 (url "https://github.com/eternnoir/pyTelegramBotAPI")
292 (commit version)))
293 (file-name (git-file-name name version))
294 (sha256
295 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
296 (build-system python-build-system)
297 (arguments
298 `(#:phases
299 (modify-phases %standard-phases
300 (replace 'check
301 (lambda* (#:key tests? #:allow-other-keys)
302 (when tests?
303 (with-directory-excursion "tests"
304 (invoke "py.test")))
305 #t)))))
306 (propagated-inputs
307 `(("python-requests" ,python-requests)))
308 (native-inputs
309 `(("python-pytest" ,python-pytest)))
310 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
311 (synopsis "Python Telegram bot api")
312 (description "This package provides a simple, but extensible Python
313 implementation for the Telegram Bot API.")
314 (license license:gpl2)))
315
316 (define-public python-colorlog
317 (package
318 (name "python-colorlog")
319 (version "4.1.0")
320 (source (origin
321 (method url-fetch)
322 (uri (pypi-uri "colorlog" version))
323 (sha256
324 (base32
325 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
326 (build-system python-build-system)
327 (native-inputs
328 `(("python-pytest" ,python-pytest)))
329 (arguments
330 `(#:phases (modify-phases %standard-phases
331 (replace 'check
332 (lambda _
333 ;; Extend PYTHONPATH so the built package will be found.
334 (setenv "PYTHONPATH"
335 (string-append (getcwd) "/build/lib:"
336 (getenv "PYTHONPATH")))
337 (invoke "pytest" "-p" "no:logging")
338 #t)))))
339 (home-page "https://github.com/borntyping/python-colorlog")
340 (synopsis "Log formatting with colors for python")
341 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
342 with Python's logging module that outputs records using terminal colors.")
343 (license license:expat)))
344
345 (define-public python-pyprind
346 (package
347 (name "python-pyprind")
348 (version "2.11.2")
349 (source (origin
350 (method url-fetch)
351 (uri (pypi-uri "PyPrind" version))
352 (sha256
353 (base32
354 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
355 (build-system python-build-system)
356 (propagated-inputs
357 `(("python-psutil" ,python-psutil)))
358 (home-page "https://github.com/rasbt/pyprind")
359 (synopsis "Python Progress Bar and Percent Indicator Utility")
360 (description "The PyPrind (Python Progress Indicator) module provides a
361 progress bar and a percentage indicator object that let you track the progress
362 of a loop structure or other iterative computation.")
363 (license license:bsd-3)))
364
365 (define-public python-gphoto2
366 (package
367 (name "python-gphoto2")
368 (version "2.2.1")
369 (source (origin
370 (method url-fetch)
371 (uri (pypi-uri "gphoto2" version))
372 (sha256
373 (base32
374 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
375 (build-system python-build-system)
376 (native-inputs
377 `(("pkg-config" ,pkg-config)))
378 (inputs
379 `(("libgphoto2" ,libgphoto2)))
380 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
381 (synopsis "Python interface to libgphoto2")
382 (description "@code{python-gphoto2} is a comprehensive Python interface
383 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
384 automatically generate the interface code.")
385 (license license:gpl3+)))
386
387 (define-public python-colour
388 (package
389 (name "python-colour")
390 (version "0.1.5")
391 (source (origin
392 (method url-fetch)
393 (uri (pypi-uri "colour" version))
394 (sha256
395 (base32
396 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
397 (build-system python-build-system)
398 (native-inputs
399 `(("python-d2to1" ,python-d2to1)))
400 (home-page "https://github.com/vaab/colour")
401 (synopsis "Convert and manipulate various color representations")
402 (description "Pythonic way to manipulate color representations (HSL, RVB,
403 web, X11, ...).")
404 (license license:expat)))
405
406 (define-public python-d2to1
407 (package
408 (name "python-d2to1")
409 (version "0.2.12.post1")
410 (source (origin
411 (method url-fetch)
412 (uri (pypi-uri "d2to1" version))
413 (sha256
414 (base32
415 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
416 (build-system python-build-system)
417 (native-inputs
418 `(("python-nose" ,python-nose)))
419 (home-page "https://github.com/embray/d2to1")
420 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
421 in python")
422 (description "The python package d2to1 (the d is for distutils) allows
423 using distutils2-like setup.cfg files for a package's metadata with a
424 distribute/setuptools setup.py script.")
425 (license license:bsd-2)))
426
427 (define-public python-rawkit
428 (package
429 (name "python-rawkit")
430 (version "0.6.0")
431 (source (origin
432 (method url-fetch)
433 (uri (pypi-uri "rawkit" version))
434 (sha256
435 (base32
436 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
437 (build-system python-build-system)
438 (native-inputs
439 `(("python-pytest" ,python-pytest)
440 ("python-mock" ,python-mock)))
441 (inputs
442 `(("libraw" ,libraw)))
443 (home-page "https://rawkit.readthedocs.io")
444 (synopsis "Ctypes-based LibRaw binding for Python")
445 (description "The rawkit package provides two modules: rawkit and libraw.
446 The rawkit module provides a high-level Pythonic interface for developing raw
447 photos, while the libraw module provides a CTypes based interface for
448 interacting with the low-level LibRaw C APIs.")
449 (license license:expat)))
450
451 (define-public python-easygui
452 (package
453 (name "python-easygui")
454 (version "0.98.1")
455 (source (origin
456 (method url-fetch)
457 (uri (pypi-uri "easygui" version))
458 (sha256
459 (base32
460 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
461 (build-system python-build-system)
462 (propagated-inputs
463 `(("python-tkinter" ,python "tk")))
464 (home-page "https://github.com/robertlugg/easygui")
465 (synopsis "GUI programming module for Python")
466 (description "EasyGUI is a module for very simple, very easy GUI
467 programming in Python. EasyGUI is different from other GUI generators in that
468 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
469 simple function calls.")
470 (license license:bsd-3)))
471
472 (define-public python-pymediainfo
473 (package
474 (name "python-pymediainfo")
475 (version "4.1")
476 (source
477 (origin
478 (method url-fetch)
479 (uri (pypi-uri "pymediainfo" version))
480 (sha256
481 (base32
482 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
483 (build-system python-build-system)
484 (native-inputs
485 `(("python-setuptools-scm" ,python-setuptools-scm)
486 ("python-pytest" ,python-pytest)))
487 (inputs
488 `(("libmediainfo" ,libmediainfo)))
489 (arguments
490 `(#:phases
491 (modify-phases %standard-phases
492 (add-after 'unpack 'patch-libmediainfo
493 (lambda _
494 (substitute* "pymediainfo/__init__.py"
495 (("libmediainfo.so.0")
496 (string-append (assoc-ref %build-inputs "libmediainfo")
497 "/lib/libmediainfo.so.0")))
498 #t))
499 (replace 'check
500 (lambda _
501 ;; Extend PYTHONPATH so the built package will be found.
502 (setenv "PYTHONPATH"
503 (string-append (getcwd) "/build/lib:"
504 (getenv "PYTHONPATH")))
505 ;; Skip the only failing test "test_parse_url"
506 (invoke "pytest" "-vv" "-k" "not test_parse_url")
507 #t)))))
508 (home-page
509 "https://github.com/sbraz/pymediainfo")
510 (synopsis
511 "Python wrapper for the mediainfo library")
512 (description
513 "Python wrapper for the mediainfo library to access the technical and tag
514 data for video and audio files.")
515 (license license:expat)))
516
517 (define-public python-psutil
518 (package
519 (name "python-psutil")
520 (version "5.7.2")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "psutil" version))
525 (sha256
526 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
527 (build-system python-build-system)
528 (arguments
529 ;; FIXME: some tests do not return and time out. Some tests fail because
530 ;; some processes survive kill().
531 '(#:tests? #f))
532 (home-page "https://www.github.com/giampaolo/psutil")
533 (synopsis "Library for retrieving information on running processes")
534 (description
535 "psutil (Python system and process utilities) is a library for retrieving
536 information on running processes and system utilization (CPU, memory, disks,
537 network) in Python. It is useful mainly for system monitoring, profiling and
538 limiting process resources and management of running processes. It implements
539 many functionalities offered by command line tools such as: ps, top, lsof,
540 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
541 pidof, tty, taskset, pmap.")
542 (properties `((python2-variant . ,(delay python2-psutil))))
543 (license license:bsd-3)))
544
545 (define-public python2-psutil
546 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
547 (package
548 (inherit base)
549 (propagated-inputs
550 `(("python2-enum34" ,python2-enum34) ;optional
551 ,@(package-propagated-inputs base))))))
552
553 (define-public python-shapely
554 (package
555 (name "python-shapely")
556 (version "1.7.1")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "Shapely" version))
561 (sha256
562 (base32
563 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
564 (modules '((guix build utils)))
565 (snippet
566 '(begin
567 (delete-file "shapely/speedups/_speedups.c")
568 (delete-file "shapely/vectorized/_vectorized.c")
569 #t))))
570 (build-system python-build-system)
571 (native-inputs
572 `(("python-cython" ,python-cython)
573 ("python-matplotlib" ,python-matplotlib)
574 ("python-pytest" ,python-pytest)
575 ("python-pytest-cov" ,python-pytest-cov)))
576 (inputs
577 `(("geos" ,geos)))
578 (propagated-inputs
579 `(("python-numpy" ,python-numpy)))
580 (arguments
581 `(#:phases
582 (modify-phases %standard-phases
583 (add-after 'unpack 'patch-geos-path
584 (lambda* (#:key inputs #:allow-other-keys)
585 (let ((geos (assoc-ref inputs "geos"))
586 (glibc (assoc-ref inputs ,(if (%current-target-system)
587 "cross-libc" "libc"))))
588 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
589 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
590 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
591 geos "/lib/libgeos_c.so'])"))
592 (("free = load_dll\\('c'\\)\\.free")
593 (string-append "free = load_dll('c', fallbacks=['"
594 glibc "/lib/libc.so.6']).free"))
595 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
596 (string-append "free = load_dll('c', fallbacks=['"
597 glibc "/lib/libc.so.6']).free"))))
598 #t)))))
599 (home-page "https://github.com/Toblerity/Shapely")
600 (synopsis "Library for the manipulation and analysis of geometric objects")
601 (description "Shapely is a Python package for manipulation and analysis of
602 planar geometric objects. It is based on the @code{GEOS} library.")
603 (license license:bsd-3)))
604
605 (define-public python-shortuuid
606 (package
607 (name "python-shortuuid")
608 (version "0.5.0")
609 (source
610 (origin
611 (method url-fetch)
612 (uri (pypi-uri "shortuuid" version))
613 (sha256
614 (base32
615 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
616 (build-system python-build-system)
617 (native-inputs
618 `(("python-pep8" ,python-pep8)))
619 (home-page "https://github.com/skorokithakis/shortuuid")
620 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
621 (description
622 "@code{shortuuid} is a Python library for generating concise, unambiguous
623 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
624 module and then similar looking characters are removed.")
625 (license license:bsd-3)))
626
627 (define-public python-logwrap
628 (package
629 (name "python-logwrap")
630 (version "3.2.1")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "logwrap" version ".zip"))
635 (sha256
636 (base32
637 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
638 (build-system python-build-system)
639 (propagated-inputs
640 `(("python-six" ,python-six)
641 ("python-typing" ,python-typing)))
642 (native-inputs
643 `(("unzip" ,unzip)
644 ("python-cython" ,python-cython)
645 ("python-pytest" ,python-pytest)
646 ("python-pytest-cov" ,python-pytest-cov)
647 ("python-pytest-runner" ,python-pytest-runner)))
648 (home-page "https://github.com/penguinolog/logwrap")
649 (synopsis "Decorator for logging function arguments")
650 (description "This package provides a decorator to log function arguments
651 and function call return values in a human-readable way.")
652 (license license:asl2.0)))
653
654 (define-public python2-shapely
655 (package-with-python2 python-shapely))
656
657 (define-public python-clyent
658 (package
659 (name "python-clyent")
660 (version "1.2.1")
661 (source
662 (origin
663 (method url-fetch)
664 (uri (pypi-uri "clyent" version))
665 (sha256
666 (base32
667 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
668 (build-system python-build-system)
669 (native-inputs
670 `(("python-mock" ,python-mock)))
671 (home-page "https://github.com/Anaconda-Platform/clyent")
672 (synopsis "Command line client library")
673 (description "Clyent is a Python command line utility library. It is used
674 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
675 (license license:bsd-3)))
676
677 (define-public python2-clyent
678 (package-with-python2 python-clyent))
679
680 (define-public python-babel
681 (package
682 (name "python-babel")
683 (version "2.8.0")
684 (source
685 (origin
686 (method url-fetch)
687 (uri (pypi-uri "Babel" version))
688 (sha256
689 (base32
690 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
691 (build-system python-build-system)
692 (native-inputs
693 `(("python-freezegun" ,python-freezegun)
694 ("python-pytest" ,python-pytest)))
695 (propagated-inputs
696 `(("python-pytz" ,python-pytz)))
697 (arguments
698 `(#:phases (modify-phases %standard-phases
699 (replace 'check
700 (lambda _
701 (invoke "pytest" "-vv" "-k"
702 (string-append
703 ;; XXX: These tests fail when using Pytest 4.x and
704 ;; Babel 2.6.0. Try removing this for later versions.
705 "not test_no_inherit_metazone_marker_never_in_output"
706 " and not test_smoke_dates"
707 " and not test_smoke_numbers")))))))
708 (home-page "http://babel.pocoo.org/")
709 (synopsis
710 "Tools for internationalizing Python applications")
711 (description
712 "Babel is composed of two major parts:
713 - tools to build and work with gettext message catalogs
714 - a Python interface to the CLDR (Common Locale Data Repository), providing
715 access to various locale display names, localized number and date formatting,
716 etc. ")
717 (license license:bsd-3)))
718
719 (define-public python2-babel
720 (package-with-python2 python-babel))
721
722 (define-public python2-backport-ssl-match-hostname
723 (package
724 (name "python2-backport-ssl-match-hostname")
725 (version "3.5.0.1")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "backports.ssl_match_hostname" version))
730 (sha256
731 (base32
732 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
733 (build-system python-build-system)
734 (arguments
735 `(#:python ,python-2
736 #:tests? #f)) ; no test target
737 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
738 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
739 (description
740 "This backport brings the ssl.match_hostname() function to users of
741 earlier versions of Python. The function checks the hostname in the
742 certificate returned by the server to which a connection has been established,
743 and verifies that it matches the intended target hostname.")
744 (license license:psfl)))
745
746 (define-public python-bitarray
747 (package
748 (name "python-bitarray")
749 (version "1.4.0")
750 (source (origin
751 (method url-fetch)
752 (uri (pypi-uri "bitarray" version))
753 (sha256
754 (base32
755 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
756 (build-system python-build-system)
757 (home-page "https://github.com/ilanschnell/bitarray")
758 (synopsis "Efficient arrays of booleans")
759 (description "This package provides an object type which efficiently
760 represents an array of booleans. Bitarrays are sequence types and behave very
761 much like usual lists. Eight bits are represented by one byte in a contiguous
762 block of memory. The user can select between two representations:
763 little-endian and big-endian. All of the functionality is implemented in C.
764 Methods for accessing the machine representation are provided. This can be
765 useful when bit level access to binary files is required, such as portable
766 bitmap image files. Also, when dealing with compressed data which uses
767 variable bit length encoding, you may find this module useful.")
768 (license license:psfl)))
769
770 (define-public python-boolean.py
771 (package
772 (name "python-boolean.py")
773 (version "3.6")
774 (source
775 (origin
776 ;; There's no source tarball on PyPI.
777 (method git-fetch)
778 (uri (git-reference
779 (url "https://github.com/bastikr/boolean.py")
780 (commit (string-append "v" version))))
781 (file-name (git-file-name name version))
782 (sha256
783 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
784 (build-system python-build-system)
785 (home-page "https://github.com/bastikr/boolean.py")
786 (synopsis "Boolean algebra in one Python module")
787 (description
788 "This is a small Python library that implements boolean algebra.
789 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
790 @code{Symbol} class that can take on one of these two values. Calculations
791 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
792 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
793 Expressions are constructed from parsed strings or directly in Python.")
794 (license license:bsd-2)))
795
796 (define-public python-hdf4
797 (package
798 (name "python-hdf4")
799 (version "0.9")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri name version))
804 (sha256
805 (base32
806 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
807 (build-system python-build-system)
808 (native-inputs `(("nose" ,python-nose)))
809 (propagated-inputs `(("numpy" ,python-numpy)))
810 (inputs
811 `(("hdf4" ,hdf4)
812 ("libjpeg" ,libjpeg-turbo)
813 ("zlib" ,zlib)))
814 (arguments
815 `(#:phases
816 (modify-phases %standard-phases
817 (replace 'check
818 (lambda _
819 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
820 ;; on to import numpy. Somehow this works on their CI system.
821 ;; Let's just manage PYTHONPATH here instead.
822 (substitute* "runexamples.sh"
823 (("export PYTHONPATH=.*") ""))
824 (setenv "PYTHONPATH"
825 (string-append (getcwd) ":"
826 (getenv "PYTHONPATH")))
827 (invoke "./runexamples.sh")
828 (invoke "nosetests" "-v"))))))
829 (home-page "https://github.com/fhs/python-hdf4")
830 (synopsis "Python interface to the NCSA HDF4 library")
831 (description
832 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
833 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
834 NetCDF files can also be read and modified. Python-HDF4 is a fork of
835 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
836 (license license:expat)))
837
838 (define-public python2-hdf4
839 (package-with-python2 python-hdf4))
840
841 (define-public python-h5py
842 (package
843 (name "python-h5py")
844 (version "2.10.0")
845 (source
846 (origin
847 (method url-fetch)
848 (uri (pypi-uri "h5py" version))
849 (sha256
850 (base32
851 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
852 (build-system python-build-system)
853 (arguments
854 `(#:tests? #f ; no test target
855 #:phases
856 (modify-phases %standard-phases
857 (add-after 'unpack 'fix-hdf5-paths
858 (lambda* (#:key inputs #:allow-other-keys)
859 (let ((prefix (assoc-ref inputs "hdf5")))
860 (substitute* "setup_build.py"
861 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
862 (string-append "['" prefix "/lib" "']"))
863 (("'/opt/local/include', '/usr/local/include'")
864 (string-append "'" prefix "/include" "'")))
865 (substitute* "setup_configure.py"
866 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
867 (string-append "['" prefix "/lib" "']")))
868 #t))))))
869 (propagated-inputs
870 `(("python-six" ,python-six)
871 ("python-numpy" ,python-numpy)))
872 (inputs
873 `(("hdf5" ,hdf5-1.10)))
874 (native-inputs
875 `(("python-cython" ,python-cython)
876 ("python-pkgconfig" ,python-pkgconfig)
877 ("pkg-config" ,pkg-config)))
878 (home-page "https://www.h5py.org/")
879 (synopsis "Read and write HDF5 files from Python")
880 (description
881 "The h5py package provides both a high- and low-level interface to the
882 HDF5 library from Python. The low-level interface is intended to be a
883 complete wrapping of the HDF5 API, while the high-level component supports
884 access to HDF5 files, datasets and groups using established Python and NumPy
885 concepts.")
886 (license license:bsd-3)))
887
888 (define-public python2-h5py
889 (package-with-python2 python-h5py))
890
891 (define-public python-sh
892 (package
893 (name "python-sh")
894 (version "1.12.14")
895 (source
896 (origin
897 (method url-fetch)
898 (uri (pypi-uri "sh" version))
899 (sha256
900 (base32
901 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
902 (build-system python-build-system)
903 (arguments
904 '(#:phases
905 (modify-phases %standard-phases
906 (replace 'check
907 (lambda _
908 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
909 (setenv "HOME" "/tmp")
910 (invoke "python" "sh.py" "test"))))))
911 (native-inputs
912 `(("python-coverage" ,python-coverage)))
913 (home-page "https://github.com/amoffat/sh")
914 (synopsis "Python subprocess replacement")
915 (description "This package provides a replacement for Python's
916 @code{subprocess} feature.")
917 (license license:expat)))
918
919 (define-public python2-sh
920 (package-with-python2 python-sh))
921
922 (define-public python-cftime
923 (package
924 (name "python-cftime")
925 (version "1.0.4.2")
926 (source
927 (origin
928 (method url-fetch)
929 (uri (pypi-uri "cftime" version))
930 (sha256
931 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
932 (build-system python-build-system)
933 (propagated-inputs
934 `(("python-numpy" ,python-numpy)))
935 (native-inputs
936 `(("python-coveralls" ,python-coveralls)
937 ("python-cython" ,python-cython)
938 ("python-pytest-cov" ,python-pytest-cov)))
939 (home-page "https://github.com/Unidata/cftime")
940 (synopsis "Library for time handling")
941 (description
942 "This package provides time-handling functionality that used to be part
943 of the netcdf4 package before.")
944 ;; This package claims to include code under the GPLv3 but is released
945 ;; under ISC.
946 (license (list license:isc license:gpl3+))))
947
948 (define-public python-netcdf4
949 (package
950 (name "python-netcdf4")
951 (version "1.5.3")
952 (source
953 (origin
954 (method url-fetch)
955 (uri (pypi-uri "netCDF4" version))
956 (sha256
957 (base32
958 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
959 (build-system python-build-system)
960 (arguments
961 '(#:phases
962 (modify-phases %standard-phases
963 (add-after 'unpack 'configure-locations
964 (lambda* (#:key inputs #:allow-other-keys)
965 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
966 #t)))))
967 (native-inputs
968 `(("python-cython" ,python-cython)))
969 (propagated-inputs
970 `(("python-numpy" ,python-numpy)
971 ("python-cftime" ,python-cftime)))
972 (inputs
973 `(("netcdf" ,netcdf)
974 ("hdf4" ,hdf4)
975 ("hdf5" ,hdf5)))
976 (home-page "https://github.com/Unidata/netcdf4-python")
977 (synopsis "Python/numpy interface to the netCDF library")
978 (description "Netcdf4-python is a Python interface to the netCDF C
979 library. netCDF version 4 has many features not found in earlier
980 versions of the library and is implemented on top of HDF5. This module
981 can read and write files in both the new netCDF 4 and the old netCDF 3
982 format, and can create files that are readable by HDF5 clients. The
983 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
984 to users of that module.")
985 ;; The software is mainly ISC, but includes some files covered
986 ;; by the Expat license.
987 (license (list license:isc license:expat))))
988
989 (define-public python-license-expression
990 (package
991 (name "python-license-expression")
992 (version "1.2")
993 (source
994 (origin
995 (method url-fetch)
996 (uri (pypi-uri "license-expression" version))
997 (sha256
998 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
999 (build-system python-build-system)
1000 (propagated-inputs
1001 `(("python-boolean.py" ,python-boolean.py)))
1002 (home-page "https://github.com/nexB/license-expression")
1003 (synopsis "Apply boolean logic to license expressions")
1004 (description
1005 "This Python module defines a tiny language to evaluate and compare
1006 license expressions using boolean logic. Logical combinations of licenses can
1007 be tested for equality, containment, and equivalence. They can be normalised
1008 and simplified. It supports SPDX license expressions as well as other naming
1009 conventions and aliases in the same expression.")
1010 (license license:gpl2+)))
1011
1012 (define-public python-lockfile
1013 (package
1014 (name "python-lockfile")
1015 (version "0.12.2")
1016 (source
1017 (origin
1018 (method url-fetch)
1019 (uri (pypi-uri "lockfile" version))
1020 (sha256
1021 (base32
1022 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1023 (build-system python-build-system)
1024 (arguments '(#:test-target "check"))
1025 (native-inputs
1026 `(("python-pbr" ,python-pbr)))
1027 (home-page "https://launchpad.net/pylockfile")
1028 (synopsis "Platform-independent file locking module")
1029 (description
1030 "The lockfile package exports a LockFile class which provides a simple
1031 API for locking files.")
1032 (license license:expat)))
1033
1034 (define-public python2-lockfile
1035 (package-with-python2 python-lockfile))
1036
1037 (define-public python-filelock
1038 (package
1039 (name "python-filelock")
1040 (version "3.0.12")
1041 (source
1042 (origin
1043 (method url-fetch)
1044 (uri (pypi-uri "filelock" version))
1045 (sha256
1046 (base32
1047 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1048 (build-system python-build-system)
1049 (home-page
1050 "https://github.com/benediktschmitt/py-filelock")
1051 (synopsis "Platform independent file lock")
1052 (description "@code{filelock} contains a single module implementing
1053 a platform independent file lock in Python, which provides a simple way of
1054 inter-process communication.")
1055 (license license:unlicense)))
1056
1057 (define-public python-semantic-version
1058 (package
1059 (name "python-semantic-version")
1060 (version "2.6.0")
1061 (source
1062 (origin
1063 (method url-fetch)
1064 (uri (pypi-uri "semantic_version" version))
1065 (sha256
1066 (base32
1067 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1068 (build-system python-build-system)
1069 (arguments
1070 `(#:tests? #f)) ; PyPI tarball lacks tests
1071 (home-page "https://github.com/rbarrois/python-semanticversion")
1072 (synopsis "Semantic versioning module for Python")
1073 (description
1074 "The @code{semantic_version} class is a small library for handling
1075 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1076
1077 It can compare versions, generate a new version that represents a bump in one of
1078 the version levels, and check whether any given string is a proper semantic
1079 version identifier.")
1080 (license license:bsd-3)))
1081
1082 (define-public python2-semantic-version
1083 (package-with-python2 python-semantic-version))
1084
1085 (define-public python-serpent
1086 (package
1087 (name "python-serpent")
1088 (version "1.28")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri (pypi-uri "serpent" version))
1093 (sha256
1094 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1095 (build-system python-build-system)
1096 (native-inputs
1097 `(("python-attrs" ,python-attrs)
1098 ("python-pytz" ,python-pytz)))
1099 (home-page "https://github.com/irmen/Serpent")
1100 (synopsis "Serializer for literal Python expressions")
1101 (description
1102 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1103 serialization. It serializes an object tree into bytes (an utf-8 encoded
1104 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1105 to rebuild the original object tree.
1106
1107 Because only safe literals are encoded, it is safe to send serpent data to
1108 other machines, such as over the network.")
1109 (properties `((python2-variant . ,(delay python2-serpent))))
1110 (license license:expat)))
1111
1112 (define-public python2-serpent
1113 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1114 (package
1115 (inherit base)
1116 (propagated-inputs
1117 `(("python-enum34" ,python2-enum34)
1118 ,@(package-propagated-inputs base))))))
1119
1120 (define-public python-setuptools
1121 (package
1122 (name "python-setuptools")
1123 (version "41.0.1")
1124 (source
1125 (origin
1126 (method url-fetch)
1127 (uri (pypi-uri "setuptools" version ".zip"))
1128 (sha256
1129 (base32
1130 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1131 (modules '((guix build utils)))
1132 (snippet
1133 '(begin
1134 ;; Remove included binaries which are used to build self-extracting
1135 ;; installers for Windows.
1136 ;; TODO: Find some way to build them ourself so we can include them.
1137 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1138 #t))))
1139 (build-system python-build-system)
1140 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1141 ;; One could bootstrap with an internal untested setuptools.
1142 (arguments
1143 `(#:tests? #f))
1144 (home-page "https://pypi.org/project/setuptools/")
1145 (synopsis
1146 "Library designed to facilitate packaging Python projects")
1147 (description
1148 "Setuptools is a fully-featured, stable library designed to facilitate
1149 packaging Python projects, where packaging includes:
1150 Python package and module definitions,
1151 distribution package metadata,
1152 test hooks,
1153 project installation,
1154 platform-specific details,
1155 Python 3 support.")
1156 ;; TODO: setuptools now bundles the following libraries:
1157 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1158 (license (list license:psfl ; setuptools itself
1159 license:expat ; six, appdirs, pyparsing
1160 license:asl2.0 ; packaging is dual ASL2/BSD-2
1161 license:bsd-2))))
1162
1163 (define-public python2-setuptools
1164 (package-with-python2 python-setuptools))
1165
1166 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1167 (define-public python-setuptools-for-tensorflow
1168 (hidden-package
1169 (package
1170 (inherit python-setuptools)
1171 (version "39.1.0")
1172 (source (origin
1173 (inherit (package-source python-setuptools))
1174 (uri (pypi-uri "setuptools" version ".zip"))
1175 (sha256
1176 (base32
1177 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1178
1179 (define-public python-uniseg
1180 (package
1181 (name "python-uniseg")
1182 (version "0.7.1")
1183 (source
1184 (origin
1185 (method url-fetch)
1186 (uri (pypi-uri "uniseg" version ".zip"))
1187 (sha256
1188 (base32
1189 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1190 (build-system python-build-system)
1191 (arguments
1192 '(#:tests? #f)) ; The test suite requires network access.
1193 (native-inputs
1194 `(("unzip" ,unzip)))
1195 (home-page
1196 "https://bitbucket.org/emptypage/uniseg-python")
1197 (synopsis
1198 "Python library to determine Unicode text segmentations")
1199 (description
1200 "Uniseg is a Python package used to determine Unicode text segmentations.
1201 Supported segmentations include:
1202 @enumerate
1203 @item @dfn{Code point} (any value in the Unicode codespace)
1204 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1205 multiple Unicode code points, e.g. \"G\" + acute-accent)
1206 @item Word break
1207 @item Sentence break
1208 @item Line break
1209 @end enumerate")
1210 (license license:expat)))
1211
1212 (define-public python2-uniseg
1213 (package-with-python2 python-uniseg))
1214
1215 (define-public python-humanfriendly
1216 (package
1217 (name "python-humanfriendly")
1218 (version "8.2")
1219 (source
1220 (origin
1221 (method url-fetch)
1222 (uri (pypi-uri "humanfriendly" version))
1223 (sha256
1224 (base32
1225 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1226 (build-system python-build-system)
1227 (arguments
1228 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1229 #:tests? #f))
1230 (home-page "https://humanfriendly.readthedocs.io")
1231 (synopsis "Human-friendly input and output in Python")
1232 (description
1233 "The functions and classes in @code{humanfriendly} can be used to make
1234 text interfaces more user-friendly. It includes tools to parse and format
1235 numbers, file sizes, and timespans, timers for long-running operations, menus
1236 to allow the user to choose from a list of options, and terminal interaction
1237 helpers.")
1238 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1239 (license license:expat)))
1240
1241 (define-public python2-humanfriendly
1242 (let ((base (package-with-python2
1243 (strip-python2-variant python-humanfriendly))))
1244 (package (inherit base)
1245 (propagated-inputs
1246 `(("python2-monotonic" ,python2-monotonic)
1247 ,@(package-propagated-inputs base))))))
1248
1249 (define-public python-textparser
1250 (package
1251 (name "python-textparser")
1252 (version "0.23.0")
1253 (source
1254 (origin
1255 (method url-fetch)
1256 (uri (pypi-uri "textparser" version))
1257 (sha256
1258 (base32
1259 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1260 (build-system python-build-system)
1261 (home-page "https://github.com/eerimoq/textparser")
1262 (synopsis "Fast text parser for Python")
1263 (description "This library provides a text parser written in the Python
1264 language. It aims to be fast.")
1265 (license license:expat)))
1266
1267 (define-public python-aenum
1268 (package
1269 (name "python-aenum")
1270 (version "2.2.4")
1271 (source
1272 (origin
1273 (method url-fetch)
1274 (uri (pypi-uri "aenum" version))
1275 (sha256
1276 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1277 (build-system python-build-system)
1278 (arguments
1279 `(#:phases (modify-phases %standard-phases
1280 (replace 'check
1281 (lambda _
1282 (format #t "current working dir ~s~%" (getcwd))
1283 (setenv "PYTHONPATH"
1284 (string-append ".:" (getenv "PYTHONPATH")))
1285 ;; We must run the test suite module directly, as it
1286 ;; fails to define the 'tempdir' variable in scope for
1287 ;; the tests otherwise
1288 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1289 ;; issues/32/running-tests-with-python-setuppy-test).
1290 (invoke "python3" "aenum/test.py")
1291 ;; This one fails with "NameError: name
1292 ;; 'test_pickle_dump_load' is not defined" (see:
1293 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1294 ;; /error-running-the-test_v3py-test-suite).
1295 ;; (invoke "python3" "aenum/test_v3.py")
1296 #t)))))
1297 (home-page "https://bitbucket.org/stoneleaf/aenum")
1298 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1299 (description "The aenum library includes an @code{Enum} base class, a
1300 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1301 class.")
1302 (license license:bsd-3)))
1303
1304 (define-public python-can
1305 (package
1306 (name "python-can")
1307 (version "3.3.3")
1308 (source
1309 (origin
1310 (method url-fetch)
1311 (uri (pypi-uri "python-can" version))
1312 (sha256
1313 (base32
1314 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1315 (build-system python-build-system)
1316 (arguments
1317 `(#:phases (modify-phases %standard-phases
1318 (add-after 'unpack 'relax-version-requirements
1319 (lambda _
1320 (substitute* "setup.py"
1321 (("mock~=2\\.0") "mock")
1322 (("coverage<5") "coverage")
1323 (("pytest~=4\\.3") "pytest")
1324 (("hypothesis~=4\\.56") "hypothesis"))
1325 #t))
1326 (add-after 'unpack 'fix-broken-tests
1327 ;; The tests try to run two scripts it expects should be
1328 ;; in PATH, but they aren't at this time (see:
1329 ;; https://github.com/hardbyte/python-can/issues/805).
1330 (lambda _
1331 (substitute* "test/test_scripts.py"
1332 (("\"can_logger\\.py --help\"") "")
1333 (("\"can_player\\.py --help\"") ""))
1334 #t)))))
1335 (propagated-inputs
1336 `(("python-aenum" ,python-aenum)
1337 ("python-wrapt" ,python-wrapt)))
1338 (native-inputs
1339 `(("python-codecov" ,python-codecov)
1340 ("python-coverage" ,python-coverage)
1341 ("python-future" ,python-future)
1342 ("python-hypothesis" ,python-hypothesis)
1343 ("python-mock" ,python-mock)
1344 ("python-pyserial" ,python-pyserial)
1345 ("python-pytest" ,python-pytest)
1346 ("python-pytest-cov" ,python-pytest-cov)
1347 ("python-pytest-runner" ,python-pytest-runner)
1348 ("python-pytest-timeout" ,python-pytest-timeout)))
1349 (home-page "https://github.com/hardbyte/python-can")
1350 (synopsis "Controller Area Network (CAN) interface module for Python")
1351 (description "This package defines the @code{can} module, which provides
1352 controller area network (CAN) support for Python developers; providing common
1353 abstractions to different hardware devices, and a suite of utilities for
1354 sending and receiving messages on a CAN bus.")
1355 (license license:lgpl3+)))
1356
1357 (define-public python-diskcache
1358 (package
1359 (name "python-diskcache")
1360 (version "4.1.0")
1361 (source
1362 (origin
1363 (method url-fetch)
1364 (uri (pypi-uri "diskcache" version))
1365 (sha256
1366 (base32
1367 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:tests? #f)) ;test suite not included in the release
1371 (home-page "http://www.grantjenks.com/docs/diskcache/")
1372 (synopsis "Disk and file backed cache library")
1373 (description "DiskCache is a disk and file backed persistent cache.")
1374 (license license:asl2.0)))
1375
1376 (define-public python-bitstruct
1377 (package
1378 (name "python-bitstruct")
1379 (version "8.9.0")
1380 (source
1381 (origin
1382 (method url-fetch)
1383 (uri (pypi-uri "bitstruct" version))
1384 (sha256
1385 (base32
1386 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1387 (build-system python-build-system)
1388 (home-page "https://github.com/eerimoq/bitstruct")
1389 (synopsis "Python values to and C bit field structs converter")
1390 (description "This module performs conversions between Python values and C
1391 bit field structs represented as Python byte strings. It is intended to have
1392 a similar interface as the @code{struct} module from Python, but working on
1393 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1394 (license license:expat)))
1395
1396 (define-public python-cantools
1397 (package
1398 (name "python-cantools")
1399 (version "33.1.1")
1400 (source
1401 (origin
1402 ;; We take the sources from the Git repository as the documentation is
1403 ;; not included with the PyPI archive.
1404 (method git-fetch)
1405 (uri (git-reference
1406 (url "https://github.com/eerimoq/cantools")
1407 (commit version)))
1408 (file-name (git-file-name name version))
1409 (sha256
1410 (base32
1411 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1412 (build-system python-build-system)
1413 (arguments
1414 `(#:phases
1415 (modify-phases %standard-phases
1416 (add-after 'build 'build-doc
1417 (lambda _
1418 ;; See: https://github.com/eerimoq/cantools/issues/190.
1419 (substitute* "README.rst"
1420 (("https://github.com/eerimoq/cantools/raw/master\
1421 /docs/monitor.png")
1422 "monitor.png"))
1423 (with-directory-excursion "docs"
1424 (invoke "make" "man" "info"))))
1425 (add-after 'install 'install-doc
1426 (lambda* (#:key outputs #:allow-other-keys)
1427 (let* ((out (assoc-ref outputs "out"))
1428 (info (string-append out "/share/info"))
1429 (man1 (string-append out "/share/man/man1")))
1430 (format #t "CWD: ~s~%" (getcwd))
1431 (install-file "docs/_build/texinfo/cantools.info" info)
1432 (install-file "docs/_build/man/cantools.1" man1)
1433 #t))))))
1434 (native-inputs
1435 `(("sphinx" ,python-sphinx)
1436 ("texinfo" ,texinfo)))
1437 (propagated-inputs
1438 `(("python-bitstruct" ,python-bitstruct)
1439 ("python-can" ,python-can)
1440 ("python-diskcache" ,python-diskcache)
1441 ("python-textparser" ,python-textparser)))
1442 (home-page "https://github.com/eerimoq/cantools")
1443 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1444 (description "This package includes Controller Area Network (CAN) related
1445 tools that can be used to:
1446 @itemize
1447 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1448 @item encode and decode CAN messages
1449 @item multiplex simple and extended signals
1450 @item diagnose DID encoding and decoding
1451 @item dump the CAN decoder output
1452 @item test CAN nodes
1453 @item generate C source code
1454 @item monitor the CAN bus
1455 @end itemize")
1456 (license license:expat)))
1457
1458 (define-public python-capturer
1459 (package
1460 (name "python-capturer")
1461 (version "2.4")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "capturer" version))
1466 (sha256
1467 (base32
1468 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1469 (build-system python-build-system)
1470 (arguments
1471 `(#:tests? #f))
1472 (propagated-inputs
1473 `(("python-humanfriendly" ,python-humanfriendly)))
1474 (home-page "https://capturer.readthedocs.io")
1475 (synopsis "Capture stdout and stderr streams of the current process")
1476 (description
1477 "The capturer package makes it easy to capture the stdout and stderr
1478 streams of the current process and subprocesses. Output can be relayed
1479 to the terminal in real time but is also available to the Python program
1480 for additional processing.")
1481 (license license:expat)))
1482
1483 (define-public python2-capturer
1484 (package-with-python2 python-capturer))
1485
1486 (define-public python-case
1487 (package
1488 (name "python-case")
1489 (version "1.5.3")
1490 (source
1491 (origin
1492 (method url-fetch)
1493 (uri (pypi-uri "case" version))
1494 (sha256
1495 (base32
1496 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1497 (build-system python-build-system)
1498 (propagated-inputs
1499 `(("python-mock" ,python-mock)
1500 ("python-nose" ,python-nose)
1501 ("python-six" ,python-six)
1502 ("python-unittest2" ,python-unittest2)))
1503 (native-inputs
1504 `(("python-coverage" ,python-coverage)))
1505 (home-page "https://github.com/celery/case")
1506 (synopsis "Unittest utilities and convenience methods")
1507 (description
1508 "The @code{case} package provides utilities on top of unittest, including
1509 some helpful Python 2 compatibility convenience methods.")
1510 (license license:bsd-3)))
1511
1512 (define-public python-verboselogs
1513 (package
1514 (name "python-verboselogs")
1515 (version "1.7")
1516 (source
1517 (origin
1518 (method url-fetch)
1519 (uri (pypi-uri "verboselogs" version))
1520 (sha256
1521 (base32
1522 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1523 (build-system python-build-system)
1524 (arguments
1525 `(#:phases
1526 (modify-phases %standard-phases
1527 (replace 'check
1528 (lambda _
1529 ;; Do not run pylint plugin test, as astroid is an old
1530 ;; unsupported version.
1531 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1532 "verboselogs/tests.py"))))))
1533 (native-inputs
1534 `(("python-mock" ,python-mock)
1535 ("python-pytest" ,python-pytest)))
1536 (home-page "https://verboselogs.readthedocs.io")
1537 (synopsis "Verbose logging level for Python's logging module")
1538 (description
1539 "The @code{verboselogs} package extends Python's @code{logging} module to
1540 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1541 (license license:expat)))
1542
1543 (define-public python2-verboselogs
1544 (package-with-python2 python-verboselogs))
1545
1546 (define-public python-coloredlogs
1547 (package
1548 (name "python-coloredlogs")
1549 (version "10.0")
1550 (source
1551 (origin
1552 (method url-fetch)
1553 (uri (pypi-uri "coloredlogs" version))
1554 (sha256
1555 (base32
1556 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1557 (build-system python-build-system)
1558 (arguments
1559 `(;Tests require some updated modules
1560 #:tests? #f))
1561 (propagated-inputs
1562 `(("python-capturer" ,python-capturer)))
1563 (home-page "https://coloredlogs.readthedocs.io")
1564 (synopsis "Colored stream handler for Python's logging module")
1565 (description
1566 "The @code{coloredlogs} package enables colored terminal output for
1567 Python's logging module. The @code{ColoredFormatter} class inherits from
1568 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1569 messages in color.")
1570 (license license:expat)))
1571
1572 (define-public python2-coloredlogs
1573 (package-with-python2 python-coloredlogs))
1574
1575 (define-public python-editorconfig
1576 (package
1577 (name "python-editorconfig")
1578 (version "0.12.2")
1579 (source
1580 (origin
1581 (method url-fetch)
1582 (uri (pypi-uri "EditorConfig" version))
1583 (sha256
1584 (base32
1585 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1586 (build-system python-build-system)
1587 (home-page "https://editorconfig.org/")
1588 (synopsis "EditorConfig bindings for python")
1589 (description "The EditorConfig project consists of a file format for
1590 defining coding styles and a collection of text editor plugins that enable
1591 editors to read the file format and adhere to defined styles. EditorConfig
1592 files are easily readable and they work nicely with version control systems.")
1593 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1594 (license (list license:bsd-2 license:psfl))))
1595
1596 (define-public dosage
1597 (package
1598 (name "dosage")
1599 (version "2.17")
1600 (source
1601 (origin
1602 (method url-fetch)
1603 (uri (pypi-uri "dosage" version))
1604 (sha256
1605 (base32
1606 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1607 (build-system python-build-system)
1608 (propagated-inputs
1609 `(("python2-backports-functools-lru-cache"
1610 ,python2-backports-functools-lru-cache)
1611 ("python2-backports-shutil-get-terminal-size"
1612 ,python2-backports-shutil-get-terminal-size)
1613 ("python-cached-property" ,python-cached-property)
1614 ("python-colorama" ,python-colorama)
1615 ("python-imagesize" ,python-imagesize)
1616 ("python-importlib-metadata" ,python-importlib-metadata)
1617 ("python-lxml" ,python-lxml)
1618 ("python-requests" ,python-requests)
1619 ("python-six" ,python-six)))
1620 (native-inputs
1621 `(("python-pytest-cov" ,python-pytest-cov)
1622 ("python-pytest-xdist" ,python-pytest-xdist)
1623 ("python-responses" ,python-responses)
1624 ("python-setuptools-scm" ,python-setuptools-scm)))
1625 (home-page "https://github.com/webcomics/dosage")
1626 (synopsis "Comic strip downloader and archiver")
1627 (description "Dosage is designed to keep a local copy of specific webcomics and other
1628 picture-based content such as Picture of the Day sites. With the @command{dosage}
1629 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1630 downloaded, or download a strip for a particular date or index, if possible.")
1631 (license license:expat)))
1632
1633 (define-public python-et-xmlfile
1634 (package
1635 (name "python-et-xmlfile")
1636 (version "1.0.1")
1637 (source
1638 (origin
1639 (method url-fetch)
1640 (uri (pypi-uri "et_xmlfile" version))
1641 (sha256
1642 (base32
1643 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1644 (build-system python-build-system)
1645 (arguments
1646 `(#:phases (modify-phases %standard-phases
1647 (replace 'check
1648 (lambda _
1649 (invoke "pytest"))))))
1650 (native-inputs
1651 `(("python-pytest" ,python-pytest)
1652 ("python-lxml" ,python-lxml))) ;used for the tests
1653 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1654 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1655 (description "This Python library is based upon the @code{xmlfile} module
1656 from @code{lxml}. It aims to provide a low memory, compatible implementation
1657 of @code{xmlfile}.")
1658 (license license:expat)))
1659
1660 (define-public python2-et-xmlfile
1661 (package-with-python2 python-et-xmlfile))
1662
1663 (define-public python-openpyxl
1664 (package
1665 (name "python-openpyxl")
1666 (version "3.0.5")
1667 (source
1668 (origin
1669 ;; We use the upstream repository, as the tests are not included in the
1670 ;; PyPI releases.
1671 (method hg-fetch)
1672 (uri (hg-reference
1673 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1674 (changeset version)))
1675 (file-name (string-append name "-" version "-checkout"))
1676 (sha256
1677 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1678 (build-system python-build-system)
1679 (arguments
1680 `(#:phases (modify-phases %standard-phases
1681 (replace 'check
1682 (lambda _
1683 (invoke "pytest"))))))
1684 (native-inputs
1685 ;; For the test suite.
1686 `(("python-lxml" ,python-lxml)
1687 ("python-pillow" ,python-pillow)
1688 ("python-pytest" ,python-pytest)))
1689 (propagated-inputs
1690 `(("python-et-xmlfile" ,python-et-xmlfile)
1691 ("python-jdcal" ,python-jdcal)))
1692 (home-page "https://openpyxl.readthedocs.io")
1693 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1694 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1695 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1696 standard.")
1697 (properties `((python2-variant . ,(delay python2-openpyxl))))
1698 (license license:expat)))
1699
1700 (define-public python2-openpyxl
1701 (let ((base (package-with-python2
1702 (strip-python2-variant python-openpyxl))))
1703 (package
1704 (inherit base)
1705 ;; This is the latest version that has python2 support
1706 (version "2.6.4")
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (pypi-uri "openpyxl" version))
1711 (sha256
1712 (base32
1713 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1714 (arguments '(#:tests? #f))))) ; No test suite.
1715
1716 (define-public python-eventlet
1717 (package
1718 (name "python-eventlet")
1719 (version "0.25.1")
1720 (source
1721 (origin
1722 (method url-fetch)
1723 (uri (pypi-uri "eventlet" version))
1724 (sha256
1725 (base32
1726 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1727 (build-system python-build-system)
1728 (propagated-inputs
1729 `(("python-greenlet" ,python-greenlet)))
1730 (arguments
1731 ;; TODO: Requires unpackaged 'enum-compat'.
1732 '(#:tests? #f))
1733 (home-page "https://eventlet.net")
1734 (synopsis "Concurrent networking library for Python")
1735 (description
1736 "Eventlet is a concurrent networking library for Python that
1737 allows you to change how you run your code, not how you write it.
1738 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1739 Coroutines ensure that the developer uses a blocking style of programming
1740 that is similar to threading, but provide the benefits of non-blocking I/O.
1741 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1742 from the Python interpreter, or as a small part of a larger application.")
1743 (license license:expat)))
1744
1745 (define-public python-six
1746 (package
1747 (name "python-six")
1748 (version "1.14.0")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (pypi-uri "six" version))
1753 (sha256
1754 (base32
1755 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1756 (build-system python-build-system)
1757 (arguments
1758 `(#:phases
1759 (modify-phases %standard-phases
1760 (replace 'check
1761 (lambda _
1762 (invoke "py.test" "-v"))))))
1763 (native-inputs
1764 `(("python-pytest" ,python-pytest-bootstrap)))
1765 (home-page "https://pypi.org/project/six/")
1766 (synopsis "Python 2 and 3 compatibility utilities")
1767 (description
1768 "Six is a Python 2 and 3 compatibility library. It provides utility
1769 functions for smoothing over the differences between the Python versions with
1770 the goal of writing Python code that is compatible on both Python versions.
1771 Six supports every Python version since 2.5. It is contained in only one
1772 Python file, so it can be easily copied into your project.")
1773 (license license:x11)))
1774
1775 (define-public python2-six
1776 (package-with-python2 python-six))
1777
1778 (define-public python-six-bootstrap
1779 (package
1780 (inherit python-six)
1781 (name "python-six-bootstrap")
1782 (native-inputs `())
1783 (arguments `(#:tests? #f))))
1784
1785 (define-public python2-six-bootstrap
1786 (package-with-python2 python-six-bootstrap))
1787
1788 (define-public python-schedule
1789 (package
1790 (name "python-schedule")
1791 (version "0.4.3")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "schedule" version))
1796 (sha256
1797 (base32
1798 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1799 (build-system python-build-system)
1800 (native-inputs
1801 `(("python-pytest" ,python-pytest)
1802 ("python-mock" ,python-mock)))
1803 (home-page "https://github.com/dbader/schedule")
1804 (synopsis "Schedule periodic function calls in Python")
1805 (description
1806 "Schedule is an in-process scheduler for periodic jobs that uses the
1807 builder pattern for configuration. Schedule lets you run Python functions (or
1808 any other callable) periodically at pre-determined intervals using a simple,
1809 human-friendly syntax.")
1810 (license license:expat)))
1811
1812 (define-public python2-schedule
1813 (package-with-python2 python-schedule))
1814
1815 (define-public python-scour
1816 (package
1817 (name "python-scour")
1818 (version "038.1")
1819 (source
1820 (origin
1821 (method git-fetch)
1822 (uri
1823 (git-reference
1824 (url "https://github.com/scour-project/scour")
1825 (commit
1826 (string-append "v" version))))
1827 (file-name (git-file-name name version))
1828 (sha256
1829 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1830 (propagated-inputs
1831 `(("python-six" ,python-six)))
1832 (build-system python-build-system)
1833 (home-page "https://github.com/scour-project/scour")
1834 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1835 (description "The goal of Scour is to output a file that renderes
1836 identically at a fraction of the size by removing a lot of redundant
1837 information created by most SVG editors. Optimization options are typically
1838 lossless but can be tweaked for more aggressive cleaning.")
1839 (license license:asl2.0)))
1840
1841 (define-public python-mechanize
1842 (package
1843 (name "python-mechanize")
1844 (version "0.4.5")
1845 (source
1846 (origin
1847 (method url-fetch)
1848 (uri (pypi-uri "mechanize" version))
1849 (sha256
1850 (base32
1851 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1852 (build-system python-build-system)
1853 (propagated-inputs
1854 `(("python-html5lib" ,python-html5lib)))
1855 (home-page "https://github.com/python-mechanize/mechanize")
1856 (synopsis
1857 "Stateful programmatic web browsing in Python")
1858 (description
1859 "Mechanize implements stateful programmatic web browsing in Python,
1860 after Andy Lester’s Perl module WWW::Mechanize.")
1861 (license license:bsd-3)))
1862
1863 (define-public python2-mechanize
1864 (package-with-python2 python-mechanize))
1865
1866 (define-public python-simpleaudio
1867 (package
1868 (name "python-simpleaudio")
1869 (version "1.0.4")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (pypi-uri "simpleaudio" version))
1874 (sha256
1875 (base32
1876 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1877 (build-system python-build-system)
1878 (arguments
1879 `(#:tests? #f))
1880 (inputs
1881 `(("alsa-lib" ,alsa-lib)))
1882 (home-page
1883 "https://github.com/hamiltron/py-simple-audio")
1884 (synopsis "Simple, asynchronous audio playback for Python 3")
1885 (description
1886 "The @code{simplaudio} package provides cross-platform, dependency-free
1887 audio playback capability for Python 3 on OSX, Windows, and Linux.")
1888 (license license:expat))) ; MIT license
1889
1890 (define-public python-simplejson
1891 (package
1892 (name "python-simplejson")
1893 (version "3.17.0")
1894 (source
1895 (origin
1896 (method url-fetch)
1897 (uri (pypi-uri "simplejson" version))
1898 (sha256
1899 (base32
1900 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1901 (build-system python-build-system)
1902 (home-page "http://simplejson.readthedocs.org/en/latest/")
1903 (synopsis
1904 "Json library for Python")
1905 (description
1906 "JSON (JavaScript Object Notation) is a subset of JavaScript
1907 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1908 format.
1909
1910 Simplejson exposes an API familiar to users of the standard library marshal
1911 and pickle modules. It is the externally maintained version of the json
1912 library contained in Python 2.6, but maintains compatibility with Python 2.5
1913 and (currently) has significant performance advantages, even without using
1914 the optional C extension for speedups. Simplejson is also supported on
1915 Python 3.3+.")
1916 (license license:x11)))
1917
1918 (define-public python2-simplejson
1919 (package-with-python2 python-simplejson))
1920
1921
1922 (define-public python-pyicu
1923 (package
1924 (name "python-pyicu")
1925 (version "2.4.3")
1926 (source
1927 (origin
1928 (method url-fetch)
1929 (uri (pypi-uri "PyICU" version))
1930 (sha256
1931 (base32
1932 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1933 (build-system python-build-system)
1934 (inputs
1935 `(("icu4c" ,icu4c)))
1936 (native-inputs
1937 `(("python-pytest" ,python-pytest)
1938 ("python-six" ,python-six)))
1939 (home-page "https://github.com/ovalhub/pyicu")
1940 (synopsis "Python extension wrapping the ICU C++ API")
1941 (description
1942 "PyICU is a python extension wrapping the ICU C++ API.")
1943 (license license:x11)))
1944
1945 (define-public python2-pyicu
1946 (package-with-python2 python-pyicu))
1947
1948 (define-public python-dogtail
1949 (package
1950 (name "python-dogtail")
1951 (version "0.9.11")
1952 (source (origin
1953 (method url-fetch)
1954 (uri
1955 (string-append
1956 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1957 "dogtail-" version ".tar.gz"))
1958 (sha256
1959 (base32
1960 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1961 (build-system python-build-system)
1962 (arguments
1963 `(#:tests? #f ; TODO Launching dbus for the tests
1964 ; fails
1965 #:phases
1966 (modify-phases %standard-phases
1967 (replace 'check
1968 (lambda* (#:key tests? #:allow-other-keys)
1969 (when tests?
1970 (system "Xvfb :1 &")
1971 (setenv "DISPLAY" ":1")
1972 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1973 #t)))))
1974 (propagated-inputs
1975 `(("python-pygobject" ,python-pygobject)
1976 ("python-pycairo" ,python-pycairo)
1977 ("python-pyatspi" ,python-pyatspi)))
1978 (native-inputs
1979 `(("python-nose" ,python-nose)
1980 ("gtk+" ,gtk+)
1981 ("xvfb" ,xorg-server)
1982 ("dbus" ,dbus)
1983 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1984 ("gobject-introspection" ,gobject-introspection)))
1985 (home-page "https://gitlab.com/dogtail/dogtail/")
1986 (synopsis "GUI test tool and automation framework written in Python")
1987 (description
1988 "Dogtail is a GUI test tool and automation framework written in Python.
1989 It uses Accessibility (a11y) technologies to communicate with desktop
1990 applications. dogtail scripts are written in Python and executed like any
1991 other Python program.")
1992 (license license:gpl2+)))
1993
1994 (define-public python2-dogtail
1995 (package-with-python2 python-dogtail))
1996
1997 (define-public python-empy
1998 (package
1999 (name "python-empy")
2000 (version "3.3.3")
2001 (source (origin
2002 (method url-fetch)
2003 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2004 version ".tar.gz"))
2005 (sha256
2006 (base32
2007 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2008 (build-system python-build-system)
2009 (arguments
2010 `(#:tests? #f)) ; python2 only
2011 (home-page "http://www.alcyone.com/software/empy/")
2012 (synopsis "Templating system for Python")
2013 (description
2014 "EmPy is a system for embedding Python expressions and statements in
2015 template text; it takes an EmPy source file, processes it, and produces
2016 output. This is accomplished via expansions, which are special signals to the
2017 EmPy system and are set off by a special prefix (by default the at sign, @@).
2018 EmPy can expand arbitrary Python expressions and statements in this way, as
2019 well as a variety of special forms. Textual data not explicitly delimited in
2020 this way is sent unaffected to the output, allowing Python to be used in
2021 effect as a markup language. Also supported are callbacks via hooks,
2022 recording and playback via diversions, and dynamic, chainable filters. The
2023 system is highly configurable via command line options and embedded
2024 commands.")
2025 (license license:lgpl2.1+)))
2026
2027 (define-public python2-empy
2028 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2029 (package
2030 (inherit base)
2031 (arguments `(,@(package-arguments base)
2032 #:tests? #t)))))
2033
2034 (define-public python2-element-tree
2035 (package
2036 (name "python2-element-tree")
2037 (version "1.2.6")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (string-append
2041 "http://effbot.org/media/downloads/elementtree-"
2042 version "-20050316.tar.gz"))
2043 (sha256
2044 (base32
2045 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2046 (build-system python-build-system)
2047 (arguments
2048 `(#:python ,python-2 ; seems to be part of Python 3
2049 #:tests? #f)) ; no 'test' sub-command
2050 (synopsis "Toolkit for XML processing in Python")
2051 (description
2052 "ElementTree is a Python library supporting lightweight XML processing.")
2053 (home-page "https://effbot.org/zone/element-index.htm")
2054 (license (license:x11-style
2055 "http://docs.python.org/2/license.html"
2056 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2057
2058 (define-public python2-pybugz
2059 (package
2060 (name "python2-pybugz")
2061 (version "0.6.11")
2062 (source (origin
2063 (method url-fetch)
2064 (uri (string-append
2065 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2066 version ".tar.gz"))
2067 (sha256
2068 (base32
2069 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2070 (patches (search-patches "pybugz-stty.patch"
2071 "pybugz-encode-error.patch"))))
2072 (build-system python-build-system)
2073 (arguments
2074 `(#:python ,python-2 ; SyntaxError with Python 3
2075 #:tests? #f)) ; no 'test' sub-command
2076 (propagated-inputs
2077 `(("element-tree" ,python2-element-tree)))
2078 (synopsis "Python and command-line interface to Bugzilla")
2079 (description
2080 "PyBugz is a Python library and command-line tool to query the Bugzilla
2081 bug tracking system. It is meant as an aid to speed up interaction with the
2082 bug tracker.")
2083 (home-page "http://www.liquidx.net/pybugz/")
2084 (license license:gpl2)))
2085
2086 (define-public python2-enum
2087 (package
2088 (name "python2-enum")
2089 (version "0.4.6")
2090 (source (origin
2091 (method url-fetch)
2092 (uri (pypi-uri "enum" version))
2093 (sha256
2094 (base32
2095 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2096 (build-system python-build-system)
2097 (arguments
2098 `(#:python ,python-2))
2099 (home-page "https://pypi.org/project/enum/")
2100 (synopsis "Robust enumerated type support in Python")
2101 (description
2102 "This provides a module for robust enumerations in Python. It has
2103 been superseded by the Python standard library and is provided only for
2104 compatibility.")
2105 ;; Choice of either license.
2106 (license (list license:gpl3+ license:psfl))))
2107
2108 (define-public python-enum34
2109 (package
2110 (name "python-enum34")
2111 (version "1.1.6")
2112 (source
2113 (origin
2114 (method url-fetch)
2115 (uri (pypi-uri "enum34" version))
2116 (sha256
2117 (base32
2118 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2119 (build-system python-build-system)
2120 (home-page "https://pypi.org/project/enum34/")
2121 (synopsis "Backported Python 3.4 Enum")
2122 (description
2123 "Enum34 is the new Python stdlib enum module available in Python 3.4
2124 backported for previous versions of Python from 2.4 to 3.3.")
2125 (license license:bsd-3)))
2126
2127 (define-public python2-enum34
2128 (package-with-python2 python-enum34))
2129
2130 (define-public python-parse-type
2131 (package
2132 (name "python-parse-type")
2133 (version "0.4.2")
2134 (source
2135 (origin
2136 (method url-fetch)
2137 (uri (pypi-uri "parse_type" version))
2138 (sha256
2139 (base32
2140 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2141 (build-system python-build-system)
2142 (propagated-inputs
2143 `(("python-six" ,python-six)
2144 ("python-parse" ,python-parse)))
2145 (native-inputs
2146 `(("python-pytest" ,python-pytest)
2147 ("python-pytest-runner" ,python-pytest-runner)))
2148 (home-page "https://github.com/jenisys/parse_type")
2149 (synopsis "Extended parse module")
2150 (description
2151 "Parse_type extends the python parse module.")
2152 (properties
2153 `((python2-variant . ,(delay python2-parse-type))))
2154 (license license:bsd-3)))
2155
2156 (define-public python2-parse-type
2157 (let ((base (package-with-python2
2158 (strip-python2-variant python-parse-type))))
2159 (package (inherit base)
2160 (propagated-inputs
2161 `(("python2-enum34" ,python2-enum34)
2162 ,@(package-propagated-inputs base))))))
2163
2164 (define-public python-parse
2165 (package
2166 (name "python-parse")
2167 (version "1.18.0")
2168 (source
2169 (origin
2170 (method url-fetch)
2171 (uri (pypi-uri "parse" version))
2172 (sha256
2173 (base32
2174 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2175 (build-system python-build-system)
2176 (arguments
2177 `(#:phases
2178 (modify-phases %standard-phases
2179 (replace 'check
2180 (lambda _ (invoke "python" "test_parse.py"))))))
2181 (home-page "https://github.com/r1chardj0n3s/parse")
2182 (synopsis "Parse strings")
2183 (description
2184 "Parse strings using a specification based on the Python @code{format()}
2185 syntax.")
2186 (license license:x11)))
2187
2188 (define-public python-polib
2189 (package
2190 (name "python-polib")
2191 (version "1.0.8")
2192 (source (origin
2193 (method url-fetch)
2194 (uri (pypi-uri "polib" version))
2195 (sha256
2196 (base32
2197 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2198 (build-system python-build-system)
2199 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2200 (synopsis "Manipulate, create and modify gettext files")
2201 (description "Polib can manipulate any gettext format (po, pot and mo)
2202 files. It can be used to create po files from scratch or to modify
2203 existing ones.")
2204 (license license:expat)))
2205
2206 (define-public python2-polib
2207 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2208 (package
2209 (inherit base)
2210 (arguments `(,@(package-arguments base)
2211 ;; Tests don't work with python2.
2212 #:tests? #f)))))
2213
2214 (define-public python-poyo
2215 (package
2216 (name "python-poyo")
2217 (version "0.5.0")
2218 (source
2219 (origin
2220 (method url-fetch)
2221 (uri (pypi-uri "poyo" version))
2222 (sha256
2223 (base32
2224 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2225 (build-system python-build-system)
2226 (home-page "https://github.com/hackebrot/poyo")
2227 (synopsis "Lightweight YAML Parser for Python")
2228 (description
2229 "This package provides a lightweight YAML Parser for Python. It supports
2230 only a chosen subset of the YAML format that is required to parse cookiecutter
2231 user configuration files. It does not have support for serializing into YAML
2232 and is not compatible with JSON.")
2233 (license license:expat)))
2234
2235 (define-public scons
2236 (package
2237 (name "scons")
2238 (version "3.0.4")
2239 (source (origin
2240 (method git-fetch)
2241 (uri (git-reference
2242 (url "https://github.com/SCons/scons")
2243 (commit version)))
2244 (file-name (git-file-name name version))
2245 (sha256
2246 (base32
2247 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2248 (build-system python-build-system)
2249 (arguments
2250 `(#:use-setuptools? #f ; still relies on distutils
2251 #:tests? #f ; no 'python setup.py test' command
2252 #:phases
2253 (modify-phases %standard-phases
2254 (add-before 'build 'bootstrap
2255 (lambda _
2256 (substitute* "src/engine/SCons/compat/__init__.py"
2257 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2258 "sys.modules[new] = __import__(old)"))
2259 (substitute* "src/engine/SCons/Platform/__init__.py"
2260 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2261 "mod = __import__(full_name)"))
2262 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2263 (chdir "build/scons")
2264 #t)))))
2265 (home-page "https://scons.org/")
2266 (synopsis "Software construction tool written in Python")
2267 (description
2268 "SCons is a software construction tool. Think of SCons as an improved,
2269 cross-platform substitute for the classic Make utility with integrated
2270 functionality similar to autoconf/automake and compiler caches such as ccache.
2271 In short, SCons is an easier, more reliable and faster way to build
2272 software.")
2273 (license license:x11)))
2274
2275 (define-public scons-python2
2276 (package
2277 (inherit (package-with-python2 scons))
2278 (name "scons-python2")))
2279
2280 (define-public python-extras
2281 (package
2282 (name "python-extras")
2283 (version "1.0.0")
2284 (source
2285 (origin
2286 (method url-fetch)
2287 (uri (pypi-uri "extras" version))
2288 (sha256
2289 (base32
2290 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2291 (build-system python-build-system)
2292 (arguments
2293 ;; FIXME: Circular dependency on testtools.
2294 '(#:tests? #f))
2295 (home-page "https://github.com/testing-cabal/extras")
2296 (synopsis "Useful extensions to the Python standard library")
2297 (description
2298 "Extras is a set of extensions to the Python standard library.")
2299 (license license:expat)))
2300
2301 (define-public python2-extras
2302 (package-with-python2 python-extras))
2303
2304 (define-public python-mimeparse
2305 (package
2306 (name "python-mimeparse")
2307 (version "1.6.0")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "python-mimeparse" version))
2312 (sha256
2313 (base32
2314 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2315 (build-system python-build-system)
2316 (arguments
2317 '(#:phases
2318 (modify-phases %standard-phases
2319 (replace 'check
2320 (lambda _
2321 (invoke "./mimeparse_test.py"))))))
2322 (home-page
2323 "https://github.com/dbtsai/python-mimeparse")
2324 (synopsis "Python library for parsing MIME types")
2325 (description
2326 "Mimeparse provides basic functions for parsing MIME type names and
2327 matching them against a list of media-ranges.")
2328 (license license:expat)))
2329
2330 (define-public python2-mimeparse
2331 (package-with-python2 python-mimeparse))
2332
2333 (define-public python-miniboa
2334 (package
2335 (name "python-miniboa")
2336 (version "1.0.7")
2337 (source
2338 (origin
2339 (method url-fetch)
2340 (uri (pypi-uri "miniboa" version))
2341 (sha256
2342 (base32
2343 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2344 (build-system python-build-system)
2345 (home-page "https://github.com/shmup/miniboa")
2346 (synopsis "Simple, single-threaded Telnet server")
2347 (description
2348 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2349 server.")
2350 (license license:asl2.0)))
2351
2352 (define-public python2-miniboa
2353 (package-with-python2 python-miniboa))
2354
2355 (define-public python-pafy
2356 (package
2357 (name "python-pafy")
2358 (version "0.5.3.1")
2359 (source
2360 (origin
2361 (method url-fetch)
2362 (uri (pypi-uri "pafy" version))
2363 (sha256
2364 (base32
2365 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2366 (build-system python-build-system)
2367 (arguments
2368 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2369 (propagated-inputs
2370 ;; Youtube-dl is a python package which is imported in the file
2371 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2372 `(("youtube-dl" ,youtube-dl)))
2373 (home-page "https://np1.github.io/pafy/")
2374 (synopsis "Retrieve YouTube content and metadata")
2375 (description
2376 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2377 (license license:lgpl3+)))
2378
2379 (define-public python2-funcsigs
2380 (package
2381 (name "python2-funcsigs")
2382 (version "1.0.2")
2383 (source (origin
2384 (method url-fetch)
2385 (uri (pypi-uri "funcsigs" version))
2386 (sha256
2387 (base32
2388 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2389 (build-system python-build-system)
2390 (arguments
2391 `(#:python ,python-2))
2392 (native-inputs
2393 `(("python2-unittest2" ,python2-unittest2)))
2394 (home-page "http://funcsigs.readthedocs.org")
2395 (synopsis "Python function signatures from PEP362")
2396 (description
2397 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2398 (license license:asl2.0)))
2399
2400 (define-public python2-funcsigs-bootstrap
2401 (package
2402 (inherit python2-funcsigs)
2403 (name "python2-funcsigs-bootstrap")
2404 (native-inputs `())
2405 (arguments
2406 `(#:tests? #f
2407 ,@(package-arguments python2-funcsigs)))))
2408
2409 (define-public python-py
2410 (package
2411 (name "python-py")
2412 (version "1.8.1")
2413 (source
2414 (origin
2415 (method url-fetch)
2416 (uri (pypi-uri "py" version))
2417 (sha256
2418 (base32
2419 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2420 (build-system python-build-system)
2421 (arguments
2422 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2423 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2424 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2425 ;; Is this module globally installed?"
2426 '(#:tests? #f))
2427 (native-inputs
2428 `(("python-setuptools-scm" ,python-setuptools-scm)))
2429 (home-page "https://github.com/pytest-dev/py")
2430 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2431 (description
2432 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2433 code introspection, and logging.")
2434 (license license:expat)))
2435
2436 (define-public python-py-next
2437 (package
2438 (inherit python-py)
2439 (version "1.9.0")
2440 (source
2441 (origin
2442 (method url-fetch)
2443 (uri (pypi-uri "py" version))
2444 (sha256
2445 (base32
2446 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2447
2448 (define-public python2-py
2449 (package-with-python2 python-py))
2450
2451 ;; Recent versions of python-fixtures and python-testrepository need
2452 ;; python-pbr for packaging, which itself needs these two packages for
2453 ;; testing.
2454 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2455 ;; same source, just without any test dependencies and with tests disabled.
2456 ;; python-pbr-minmal is then used to package python-fixtures and
2457 ;; python-testrepository.
2458 ;; Strictly speaking we currently could remove the test-requirements from the
2459 ;; normal python-pbr package (and save this package) since test are disabled
2460 ;; there anyway. But this may change in future.
2461 (define-public python-pbr-minimal
2462 (package
2463 (name "python-pbr-minimal")
2464 (version "3.0.1")
2465 (source
2466 (origin
2467 (method url-fetch)
2468 (uri (pypi-uri "pbr" version))
2469 (sha256
2470 (base32
2471 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2472 (build-system python-build-system)
2473 (arguments
2474 `(#:tests? #f))
2475 (home-page "https://docs.openstack.org/pbr/latest/")
2476 (synopsis "Minimal build of python-pbr used for bootstrapping")
2477 (description
2478 "Used only for bootstrapping python2-pbr, you should not need this.")
2479 (license license:asl2.0)))
2480
2481 (define-public python2-pbr-minimal
2482 (package-with-python2 python-pbr-minimal))
2483
2484 (define-public python-pbr
2485 (package
2486 (inherit python-pbr-minimal)
2487 (name "python-pbr")
2488 (arguments
2489 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2490 (propagated-inputs
2491 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2492 (native-inputs
2493 `(("python-fixtures" ,python-fixtures-bootstrap)
2494 ;; discover, coverage, hacking, subunit
2495 ("python-mock" ,python-mock)
2496 ("python-six" ,python-six)
2497 ("python-sphinx" ,python-sphinx)
2498 ("python-testrepository" ,python-testrepository-bootstrap)
2499 ("python-testresources" ,python-testresources-bootstrap)
2500 ("python-testscenarios" ,python-testscenarios-bootstrap)
2501 ("python-testtools" ,python-testtools-bootstrap)
2502 ("python-virtualenv" ,python-virtualenv)))
2503 (synopsis "Enhance the default behavior of Python’s setuptools")
2504 (description
2505 "Python Build Reasonableness (PBR) is a library that injects some useful
2506 and sensible default behaviors into your setuptools run. It will set
2507 versions, process requirements files and generate AUTHORS and ChangeLog file
2508 from git information.
2509 ")))
2510
2511 (define-public python2-pbr
2512 (package-with-python2 python-pbr))
2513
2514 (define-public python-pyrsistent
2515 (package
2516 (name "python-pyrsistent")
2517 (version "0.16.0")
2518 (home-page "https://github.com/tobgu/pyrsistent")
2519 (source (origin
2520 (method url-fetch)
2521 (uri (pypi-uri "pyrsistent" version))
2522 (sha256
2523 (base32
2524 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2525 (build-system python-build-system)
2526 (arguments
2527 '(#:phases (modify-phases %standard-phases
2528 ;; The package works fine with newer Pytest and Hypothesis, but
2529 ;; has pinned older versions to stay compatible with Python 2.
2530 (add-before 'check 'loosen-pytest-requirement
2531 (lambda _
2532 (substitute* "setup.py"
2533 (("pytest<5") "pytest")
2534 (("hypothesis<5") "hypothesis"))
2535 #t)))))
2536 (native-inputs
2537 `(("python-hypothesis" ,python-hypothesis)
2538 ("python-pytest" ,python-pytest)
2539 ("python-pytest-runner" ,python-pytest-runner)))
2540 (propagated-inputs
2541 `(("python-six" ,python-six)))
2542 (synopsis "Persistent data structures for Python")
2543 (description
2544 "Pyrsistent is a number of persistent collections (by some referred to as
2545 functional data structures). Persistent in the sense that they are immutable.
2546
2547 All methods on a data structure that would normally mutate it instead return a
2548 new copy of the structure containing the requested updates. The original
2549 structure is left untouched.")
2550 (license license:expat)))
2551
2552 (define-public python2-pyrsistent
2553 (package-with-python2 python-pyrsistent))
2554
2555 (define-public python-exif-read
2556 (package
2557 (name "python-exif-read")
2558 (version "2.1.2")
2559 (source (origin
2560 (method url-fetch)
2561 (uri (pypi-uri "ExifRead" version))
2562 (sha256
2563 (base32
2564 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2565 (build-system python-build-system)
2566 (arguments `(#:tests? #f)) ; no tests
2567 (home-page "https://github.com/ianare/exif-py")
2568 (synopsis "Python library to extract EXIF data from image files")
2569 (description
2570 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2571 files.")
2572 (license license:bsd-3)))
2573
2574 (define-public python2-exif-read
2575 (package-with-python2 python-exif-read))
2576
2577 (define-public python-pyld
2578 (package
2579 (name "python-pyld")
2580 (version "1.0.5")
2581 (source (origin
2582 (method url-fetch)
2583 (uri (pypi-uri "PyLD" version))
2584 (sha256
2585 (base32
2586 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2587 (build-system python-build-system)
2588 (home-page "https://github.com/digitalbazaar/pyld")
2589 (synopsis "Python implementation of the JSON-LD specification")
2590 (description
2591 "PyLD is an implementation of the JSON-LD specification.")
2592 (license license:bsd-3)))
2593
2594 (define-public python2-pyld
2595 (package-with-python2 python-pyld))
2596
2597 (define-public python-cli-helpers
2598 (package
2599 (name "python-cli-helpers")
2600 (version "2.0.1")
2601 (source
2602 (origin
2603 ;; There's no source tarball on PyPI.
2604 (method git-fetch)
2605 (uri (git-reference
2606 (url "https://github.com/dbcli/cli_helpers")
2607 (commit (string-append "v" version))))
2608 (file-name (git-file-name name version))
2609 (sha256
2610 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2611 (build-system python-build-system)
2612 (native-inputs
2613 `(("python-pytest" ,python-pytest)))
2614 (propagated-inputs
2615 `(("python-wcwidth" ,python-wcwidth)
2616 ("python-configobj" ,python-configobj)
2617 ("python-tabulate" ,python-tabulate)
2618 ("python-terminaltables" ,python-terminaltables)))
2619 (home-page "https://github.com/dbcli/cli_helpers")
2620 (synopsis "Helpers for building command-line apps")
2621 (description
2622 "CLI Helpers is a Python package that makes it easy to perform common
2623 tasks when building command-line apps. It's a helper library for command-line
2624 interfaces.")
2625 (license license:bsd-3)))
2626
2627 (define-public python-click
2628 (package
2629 (name "python-click")
2630 (version "7.1.2")
2631 (source
2632 (origin
2633 (method url-fetch)
2634 (uri (pypi-uri "click" version))
2635 (sha256
2636 (base32
2637 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2638 (build-system python-build-system)
2639 (arguments
2640 `(#:phases
2641 (modify-phases %standard-phases
2642 (add-after 'unpack 'fix-paths
2643 (lambda* (#:key inputs #:allow-other-keys)
2644 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2645 "cross-libc" "libc"))))
2646 (substitute* "src/click/_unicodefun.py"
2647 (("'locale'")
2648 (string-append "'" glibc "/bin/locale'"))))
2649 #t))
2650 (replace 'check
2651 (lambda _
2652 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2653 (invoke "python" "-m" "pytest"))))))
2654 (native-inputs
2655 `(("python-pytest" ,python-pytest)))
2656 (home-page "https://palletsprojects.com/p/click/")
2657 (synopsis "Command line library for Python")
2658 (description
2659 "Click is a Python package for creating command line interfaces in a
2660 composable way with as little code as necessary. Its name stands for
2661 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2662 with sensible defaults out of the box.")
2663 (license license:bsd-3)))
2664
2665 (define-public python2-click
2666 (package-with-python2 python-click))
2667
2668 (define-public python-click-5
2669 (package (inherit python-click)
2670 (name "python-click")
2671 (version "5.1")
2672 (source
2673 (origin
2674 (method url-fetch)
2675 (uri (pypi-uri "click" version))
2676 (sha256
2677 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2678 (arguments `())))
2679
2680 (define-public python-wheel
2681 (package
2682 (name "python-wheel")
2683 (version "0.33.6")
2684 (source
2685 (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "wheel" version))
2688 (sha256
2689 (base32
2690 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2691 (build-system python-build-system)
2692 (arguments
2693 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2694 ;; fails to find the newly-built bdist_wheel library, even though it is
2695 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2696 '(#:tests? #f))
2697 (home-page "https://bitbucket.org/pypa/wheel/")
2698 (synopsis "Format for built Python packages")
2699 (description
2700 "A wheel is a ZIP-format archive with a specially formatted filename and
2701 the @code{.whl} extension. It is designed to contain all the files for a PEP
2702 376 compatible install in a way that is very close to the on-disk format. Many
2703 packages will be properly installed with only the @code{Unpack} step and the
2704 unpacked archive preserves enough information to @code{Spread} (copy data and
2705 scripts to their final locations) at any later time. Wheel files can be
2706 installed with a newer @code{pip} or with wheel's own command line utility.")
2707 (license license:expat)))
2708
2709 (define-public python2-wheel
2710 (package-with-python2 python-wheel))
2711
2712 (define-public python-vcversioner
2713 (package
2714 (name "python-vcversioner")
2715 (version "2.16.0.0")
2716 (source
2717 (origin
2718 (method url-fetch)
2719 (uri (pypi-uri "vcversioner" version))
2720 (sha256
2721 (base32
2722 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2723 (build-system python-build-system)
2724 (synopsis "Python library for version number discovery")
2725 (description "Vcversioner is a Python library that inspects tagging
2726 information in a variety of version control systems in order to discover
2727 version numbers.")
2728 (home-page "https://github.com/habnabit/vcversioner")
2729 (license license:isc)))
2730
2731 (define-public python2-vcversioner
2732 (package-with-python2 python-vcversioner))
2733
2734 (define-public python-jdcal
2735 (package
2736 (name "python-jdcal")
2737 (version "1.4")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "jdcal" version))
2742 (sha256
2743 (base32
2744 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2745 (build-system python-build-system)
2746 (arguments
2747 `(#:phases (modify-phases %standard-phases
2748 (replace 'check
2749 (lambda _
2750 (invoke "pytest"))))))
2751 (native-inputs
2752 `(("python-pytest" ,python-pytest)))
2753 (home-page "https://github.com/phn/jdcal")
2754 (synopsis "Functions to convert between Julian dates Gregorian dates")
2755 (description "This Python library provides functions for converting
2756 between Julian dates and Gregorian dates.")
2757 (license license:bsd-2)))
2758
2759 (define-public python2-jdcal
2760 (package-with-python2 python-jdcal))
2761
2762 (define-public python-jsondiff
2763 (package
2764 (name "python-jsondiff")
2765 (version "1.2.0")
2766 (source
2767 (origin
2768 (method url-fetch)
2769 (uri (pypi-uri "jsondiff" version))
2770 (sha256
2771 (base32
2772 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2773 (build-system python-build-system)
2774 (native-inputs
2775 `(("python-nose" ,python-nose)
2776 ("python-nose-random" ,python-nose-random)))
2777 (home-page
2778 "https://github.com/fzumstein/jsondiff")
2779 (synopsis "Compare JSON and JSON-like structures in Python")
2780 (description "@code{jsondiff} is a Python library which lets you
2781 compare, diff, and patch JSON and JSON-like structures in Python.")
2782 (license license:expat)))
2783
2784 (define-public python-jsonschema
2785 (package
2786 (name "python-jsonschema")
2787 (version "3.2.0")
2788 (source (origin
2789 (method url-fetch)
2790 (uri (pypi-uri "jsonschema" version))
2791 (sha256
2792 (base32
2793 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2794 (build-system python-build-system)
2795 (arguments
2796 '(#:phases
2797 (modify-phases %standard-phases
2798 (replace 'check
2799 (lambda* (#:key inputs outputs #:allow-other-keys)
2800 (add-installed-pythonpath inputs outputs)
2801 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2802 (invoke "trial" "jsonschema"))))))
2803 (native-inputs
2804 `(("python-setuptools_scm" ,python-setuptools-scm)
2805 ("python-twisted" ,python-twisted)))
2806 (propagated-inputs
2807 `(("python-attrs" ,python-attrs)
2808 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2809 ("python-pyrsistent" ,python-pyrsistent)
2810 ("python-six" ,python-six)))
2811 (home-page "https://github.com/Julian/jsonschema")
2812 (synopsis "Implementation of JSON Schema for Python")
2813 (description
2814 "Jsonschema is an implementation of JSON Schema for Python.")
2815 (license license:expat)
2816 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2817
2818 (define-public python2-jsonschema
2819 (let ((jsonschema (package-with-python2
2820 (strip-python2-variant python-jsonschema))))
2821 (package (inherit jsonschema)
2822 (propagated-inputs
2823 `(("python2-functools32" ,python2-functools32)
2824 ,@(package-propagated-inputs jsonschema))))))
2825
2826 (define-public python-schema
2827 (package
2828 (name "python-schema")
2829 (version "0.6.6")
2830 (source
2831 (origin
2832 (method url-fetch)
2833 (uri (pypi-uri "schema" version))
2834 (sha256
2835 (base32
2836 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2837 (build-system python-build-system)
2838 (native-inputs
2839 `(("python-pytest" ,python-pytest)))
2840 (home-page "https://github.com/keleshev/schema")
2841 (synopsis "Simple data validation library")
2842 (description
2843 "@code{python-schema} is a library for validating Python data
2844 structures, such as those obtained from config-files, forms, external
2845 services or command-line parsing, converted from JSON/YAML (or
2846 something else) to Python data-types.")
2847 (license license:psfl)))
2848
2849 (define-public python2-schema
2850 (package-with-python2 python-schema))
2851
2852 (define-public python-schema-0.5
2853 (package (inherit python-schema)
2854 (version "0.5.0")
2855 (source
2856 (origin
2857 (method url-fetch)
2858 (uri (pypi-uri "schema" version))
2859 (sha256
2860 (base32
2861 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2862
2863 (define-public python2-schema-0.5
2864 (package-with-python2 python-schema-0.5))
2865
2866 (define-public python-kitchen
2867 (package
2868 (name "python-kitchen")
2869 (version "1.2.5")
2870 (source
2871 (origin
2872 (method url-fetch)
2873 (uri (pypi-uri "kitchen" version))
2874 (sha256
2875 (base32
2876 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2877 (build-system python-build-system)
2878 (propagated-inputs
2879 `(("python-chardet" ,python-chardet)))
2880 (home-page "https://github.com/fedora-infra/kitchen")
2881 (synopsis "Python API for snippets")
2882 (description "@code{kitchen} module provides a python API for all sorts of
2883 little useful snippets of code that everybody ends up writing for their projects
2884 but never seem big enough to build an independent release. Use kitchen and stop
2885 cutting and pasting that code over and over.")
2886 (license (list license:lgpl2.1+
2887 ;; subprocess.py, test_subprocess.py,
2888 ;; kitchen/pycompat25/defaultdict.py:
2889 license:psfl))))
2890
2891 (define-public python2-kitchen
2892 (package-with-python2 python-kitchen))
2893
2894 (define-public python-unidecode
2895 (package
2896 (name "python-unidecode")
2897 (version "1.1.1")
2898 (source (origin
2899 (method url-fetch)
2900 (uri (pypi-uri "Unidecode" version))
2901 (sha256
2902 (base32
2903 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2904 (build-system python-build-system)
2905 (home-page "https://pypi.org/project/Unidecode/")
2906 (synopsis "ASCII transliterations of Unicode text")
2907 (description
2908 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2909 useful when integrating with legacy code that doesn't support Unicode, or for
2910 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2911 machine identifiers from human-readable Unicode strings that should still be
2912 somewhat intelligible.")
2913 (license license:gpl2+)))
2914
2915 (define-public python2-unidecode
2916 (package-with-python2 python-unidecode))
2917
2918 (define-public python-text-unidecode
2919 (package
2920 (name "python-text-unidecode")
2921 (version "1.3")
2922 (source (origin
2923 (method url-fetch)
2924 (uri (pypi-uri "text-unidecode" version))
2925 (sha256
2926 (base32
2927 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2928 (build-system python-build-system)
2929 (arguments
2930 '(#:phases (modify-phases %standard-phases
2931 (replace 'check
2932 (lambda _
2933 (setenv "PYTHONPATH"
2934 (string-append "./build/lib:"
2935 (getenv "PYTHONPATH")))
2936 (invoke "pytest" "-vv"))))))
2937 (native-inputs
2938 `(("python-pytest" ,python-pytest)))
2939 (home-page "https://github.com/kmike/text-unidecode/")
2940 (synopsis "Decode Unicode data")
2941 (description
2942 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2943 Perl library. It can create ASCII representations of Unicode data. In general
2944 users should prefer the @code{python-unidecode} package which offers better
2945 memory usage and transliteration quality.")
2946 ;; The user can choose either license.
2947 (license (list license:clarified-artistic license:gpl2+))))
2948
2949 (define-public python2-text-unidecode
2950 (package-with-python2 python-text-unidecode))
2951
2952 (define-public python-pyjwt
2953 (package
2954 (name "python-pyjwt")
2955 (version "1.7.1")
2956 (source
2957 (origin
2958 (method url-fetch)
2959 (uri (pypi-uri "PyJWT" version))
2960 (sha256
2961 (base32
2962 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2963 (modules '((guix build utils)))
2964 (snippet
2965 '(begin
2966 (for-each delete-file-recursively
2967 (find-files "." "\\.pyc$"))
2968 #t))))
2969 (build-system python-build-system)
2970 (arguments
2971 '(#:phases (modify-phases %standard-phases
2972 (replace 'check
2973 (lambda _
2974 ;; Mimic upstream commit 3a20892442b34c7 to get
2975 ;; rid of dependency on pytest-runner < 5.0.
2976 ;; Remove substitution for PyJWT > 1.7.1.
2977 (substitute* "setup.py"
2978 ((".*pytest-runner.*")
2979 ""))
2980 (invoke "pytest" "-vv"))))))
2981 (native-inputs
2982 `(("python-pytest" ,python-pytest)
2983 ("python-pytest-cov" ,python-pytest-cov)))
2984 (home-page "https://github.com/progrium/pyjwt")
2985 (synopsis "JSON Web Token implementation in Python")
2986 (description
2987 "PyJWT is a JSON Web Token implementation written in Python.")
2988 (license license:expat)))
2989
2990 (define-public python2-pyjwt
2991 (package-with-python2 python-pyjwt))
2992
2993 (define-public python-pykka
2994 (package
2995 (name "python-pykka")
2996 (version "1.2.1")
2997 (source
2998 (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "Pykka" version))
3001 (sha256
3002 (base32
3003 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3004 (build-system python-build-system)
3005 (native-inputs
3006 `(("python-mock" ,python-mock)
3007 ("python-nose" ,python-nose)
3008 ("python-gevent" ,python-gevent)
3009 ("python-eventlet" ,python-eventlet)))
3010 (home-page "https://www.pykka.org/")
3011 (synopsis "Pykka is a Python implementation of the actor model")
3012 (description
3013 "Pykka is a Python implementation of the actor model.
3014 The actor model introduces some simple rules to control the sharing
3015 of state and cooperation between execution units, which makes it
3016 easier to build concurrent applications.")
3017 (license license:asl2.0)))
3018
3019 (define-public python-pymsgbox
3020 (package
3021 (name "python-pymsgbox")
3022 (version "1.0.6")
3023 (source
3024 (origin
3025 (method git-fetch)
3026 (uri (git-reference
3027 ;; LICENSE.txt is not present on pypi
3028 (url "https://github.com/asweigart/PyMsgBox")
3029 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3030 (file-name (git-file-name name version))
3031 (sha256
3032 (base32
3033 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3034 (arguments
3035 ;; Circular dependency to run tests:
3036 ;; Tests need pyautogui, which depends on pymsgbox.
3037 '(#:tests? #f))
3038 (build-system python-build-system)
3039 (home-page "https://github.com/asweigart/PyMsgBox")
3040 (synopsis "Python module for JavaScript-like message boxes")
3041 (description
3042 "PyMsgBox is a simple, cross-platform, pure Python module for
3043 JavaScript-like message boxes. Types of dialog boxes include:
3044 @enumerate
3045 @item alert
3046 @item confirm
3047 @item prompt
3048 @item password
3049 @end enumerate
3050 ")
3051 (license license:bsd-3)))
3052
3053 (define-public python-pympler
3054 (package
3055 (name "python-pympler")
3056 (home-page "https://pythonhosted.org/Pympler/")
3057 (version "0.8")
3058 (source (origin
3059 (method url-fetch)
3060 (uri (pypi-uri "Pympler" version))
3061 (sha256
3062 (base32
3063 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3064 (build-system python-build-system)
3065 (arguments
3066 `(#:phases (modify-phases %standard-phases
3067 (delete 'check)
3068 (add-after 'install 'check
3069 (lambda* (#:key inputs outputs #:allow-other-keys)
3070 (add-installed-pythonpath inputs outputs)
3071 (invoke "python" "setup.py" "test"))))))
3072 (synopsis "Measure, monitor and analyze memory behavior")
3073 (description
3074 "Pympler is a development tool to measure, monitor and analyze
3075 the memory behavior of Python objects in a running Python application.
3076
3077 By pympling a Python application, detailed insight in the size and the
3078 lifetime of Python objects can be obtained. Undesirable or unexpected
3079 runtime behavior like memory bloat and other @samp{pymples} can easily
3080 be identified.
3081
3082 A web profiling frontend exposes process statistics, garbage
3083 visualisation and class tracker statistics.")
3084 (license license:asl2.0)))
3085
3086 (define-public python2-pympler
3087 (package-with-python2 python-pympler))
3088
3089 (define-public python-itsdangerous
3090 (package
3091 (name "python-itsdangerous")
3092 (version "1.1.0")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (pypi-uri "itsdangerous" version))
3097 (sha256
3098 (base32
3099 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3100 (build-system python-build-system)
3101 (home-page "https://palletsprojects.com/p/itsdangerous/")
3102 (synopsis "Python library for passing data to/from untrusted environments")
3103 (description
3104 "Itsdangerous provides various helpers to pass trusted data to untrusted
3105 environments and back.")
3106 (license license:bsd-3)))
3107
3108 (define-public python2-itsdangerous
3109 (package-with-python2 python-itsdangerous))
3110
3111 (define-public python-pyyaml
3112 (package
3113 (name "python-pyyaml")
3114 (version "5.3.1")
3115 (source
3116 (origin
3117 (method url-fetch)
3118 (uri (pypi-uri "PyYAML" version))
3119 (sha256
3120 (base32
3121 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3122 (build-system python-build-system)
3123 (inputs
3124 `(("libyaml" ,libyaml)))
3125 (home-page "https://pyyaml.org")
3126 (synopsis "YAML parser and emitter for Python")
3127 (description
3128 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3129 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3130 API, and sensible error messages. PyYAML supports standard YAML tags and
3131 provides Python-specific tags that represent an arbitrary Python object.")
3132 (license license:expat)))
3133
3134 (define-public python2-pyyaml
3135 (package-with-python2 python-pyyaml))
3136
3137 (define-public python-vine
3138 (package
3139 (name "python-vine")
3140 (version "1.1.4")
3141 (source
3142 (origin
3143 (method url-fetch)
3144 (uri (pypi-uri "vine" version))
3145 (sha256
3146 (base32
3147 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3148 (build-system python-build-system)
3149 (native-inputs
3150 `(("python-pytest" ,python-pytest)
3151 ("python-case" ,python-case)))
3152 (home-page "https://github.com/celery/vine")
3153 (synopsis "Promises for Python")
3154 (description
3155 "@code{vine} provides a special implementation of promises in that it can
3156 be used both for \"promise of a value\" and lazy evaluation. The biggest
3157 upside for this is that everything in a promise can also be a promise,
3158 e.g. filters, callbacks and errbacks can all be promises.")
3159 (license license:bsd-3)))
3160
3161 (define-public python-virtualenv
3162 (package
3163 (name "python-virtualenv")
3164 (version "20.2.1")
3165 (source
3166 (origin
3167 (method url-fetch)
3168 (uri (pypi-uri "virtualenv" version))
3169 (sha256
3170 (base32
3171 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3172 (build-system python-build-system)
3173 (native-inputs
3174 `(("python-mock" ,python-mock)
3175 ("python-pytest" ,python-pytest)
3176 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3177 ;; be an input at all". However, removing the input makes the build error:
3178 ;; File "setup.py", line 4, in <module>
3179 ;; raise RuntimeError("setuptools >= 41 required to build")
3180 ("python-setuptools" ,python-setuptools)
3181 ("python-setuptools-scm" ,python-setuptools-scm)))
3182 (propagated-inputs
3183 `(("python-appdirs" ,python-appdirs)
3184 ("python-distlib" ,python-distlib/next)
3185 ("python-filelock" ,python-filelock)
3186 ("python-six" ,python-six)
3187 ("python-importlib-metadata" ,python-importlib-metadata)))
3188 (home-page "https://virtualenv.pypa.io/")
3189 (synopsis "Virtual Python environment builder")
3190 (description
3191 "Virtualenv is a tool to create isolated Python environments.")
3192 (properties `((python2-variant . ,(delay python2-virtualenv))))
3193 (license license:expat)))
3194
3195 (define-public python2-virtualenv
3196 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3197 (package
3198 (inherit base)
3199 (arguments
3200 `(#:python ,python-2
3201 #:phases
3202 (modify-phases %standard-phases
3203 (add-after 'set-paths 'adjust-PYTHONPATH
3204 (lambda* (#:key inputs #:allow-other-keys)
3205 (let* ((python (assoc-ref inputs "python"))
3206 (python-sitedir (string-append python "/lib/python2.7"
3207 "/site-packages")))
3208 ;; XXX: 'python2' always comes first on PYTHONPATH
3209 ;; and shadows the 'setuptools' input. Move python2
3210 ;; last: this should be fixed in python-build-system
3211 ;; in a future rebuild cycle.
3212 (setenv "PYTHONPATH"
3213 (string-append (string-join (delete python-sitedir
3214 (string-split
3215 (getenv "PYTHONPATH")
3216 #\:))
3217 ":")
3218 ":" python-sitedir))
3219 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3220 (getenv "PYTHONPATH"))
3221 #t))))))
3222 (propagated-inputs
3223 `(("python-contextlib2" ,python2-contextlib2)
3224 ,@(package-propagated-inputs base))))))
3225
3226 (define-public python-markupsafe
3227 (package
3228 (name "python-markupsafe")
3229 (version "1.1.1")
3230 (source
3231 (origin
3232 (method url-fetch)
3233 (uri (pypi-uri "MarkupSafe" version))
3234 (sha256
3235 (base32
3236 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3237 (build-system python-build-system)
3238 (arguments
3239 `(#:modules ((ice-9 ftw)
3240 (srfi srfi-1)
3241 (srfi srfi-26)
3242 (guix build utils)
3243 (guix build python-build-system))
3244 #:phases (modify-phases %standard-phases
3245 (replace 'check
3246 (lambda _
3247 (let ((cwd (getcwd))
3248 (libdir (find (cut string-prefix? "lib." <>)
3249 (scandir "build"))))
3250 (setenv "PYTHONPATH"
3251 (string-append cwd "/build/" libdir ":"
3252 (getenv "PYTHONPATH")))
3253 (invoke "pytest" "-vv")))))))
3254 (native-inputs
3255 `(("python-pytest" ,python-pytest)))
3256 (home-page "https://github.com/mitsuhiko/markupsafe")
3257 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3258 (description
3259 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3260 for Python.")
3261 (license license:bsd-3)))
3262
3263 (define-public python2-markupsafe
3264 (package-with-python2 python-markupsafe))
3265
3266 (define-public python-jinja2
3267 (package
3268 (name "python-jinja2")
3269 (version "2.11.2")
3270 (source
3271 (origin
3272 (method url-fetch)
3273 (uri (pypi-uri "Jinja2" version))
3274 (sha256
3275 (base32
3276 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3277 (build-system python-build-system)
3278 (arguments
3279 '(#:phases (modify-phases %standard-phases
3280 (replace 'check
3281 (lambda* (#:key tests? #:allow-other-keys)
3282 (if tests?
3283 (begin
3284 (setenv "PYTHONPATH"
3285 (string-append "./build/lib:"
3286 (getenv "PYTHONPATH")))
3287 (invoke "pytest" "-vv"))
3288 (format #t "test suite not run~%"))
3289 #t)))))
3290 (native-inputs
3291 `(("python-pytest" ,python-pytest)))
3292 (propagated-inputs
3293 `(("python-markupsafe" ,python-markupsafe)))
3294 (home-page "http://jinja.pocoo.org/")
3295 (synopsis "Python template engine")
3296 (description
3297 "Jinja2 is a small but fast and easy to use stand-alone template engine
3298 written in pure Python.")
3299 (license license:bsd-3)))
3300
3301 (define-public python2-jinja2
3302 (package-with-python2 python-jinja2))
3303
3304 (define-public python-jinja2-time
3305 (package
3306 (name "python-jinja2-time")
3307 (version "0.2.0")
3308 (source
3309 (origin
3310 (method url-fetch)
3311 (uri (pypi-uri "jinja2-time" version))
3312 (sha256
3313 (base32
3314 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3315 (build-system python-build-system)
3316 (propagated-inputs
3317 `(("python-arrow" ,python-arrow)
3318 ("python-jinja2" ,python-jinja2)))
3319 (home-page
3320 "https://github.com/hackebrot/jinja2-time")
3321 (synopsis "Jinja2 Extension for Dates and Times")
3322 (description
3323 "This package provides an extension for the template engine Jinja2. It
3324 adds a 'now' tag providing a convenient access to the arrow.now() API from
3325 templates. A format string can be provided to control the output.")
3326 (license license:expat)))
3327
3328 (define-public python-pystache
3329 (package
3330 (name "python-pystache")
3331 (version "0.5.4")
3332 (source (origin
3333 (method url-fetch)
3334 (uri (pypi-uri "pystache" version))
3335 (sha256
3336 (base32
3337 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3338 (build-system python-build-system)
3339 (arguments
3340 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3341 (home-page "http://defunkt.io/pystache/")
3342 (synopsis "Python logic-less template engine")
3343 (description
3344 "Pystache is a Python implementation of the framework agnostic,
3345 logic-free templating system Mustache.")
3346 (license license:expat)
3347 (properties `((python2-variant . ,(delay python2-pystache))))))
3348
3349 (define-public python2-pystache
3350 (package (inherit (package-with-python2
3351 (strip-python2-variant python-pystache)))
3352 (arguments
3353 `(#:python ,python-2
3354 #:phases
3355 (modify-phases %standard-phases
3356 (replace 'check
3357 (lambda _
3358 (invoke "python" "test_pystache.py"))))))))
3359
3360 (define-public python-joblib
3361 (package
3362 (name "python-joblib")
3363 (version "0.14.1")
3364 (source (origin
3365 (method url-fetch)
3366 (uri (pypi-uri "joblib" version))
3367 (sha256
3368 (base32
3369 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3370 (build-system python-build-system)
3371 (arguments
3372 `(#:phases
3373 (modify-phases %standard-phases
3374 (replace 'check
3375 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3376 (native-inputs
3377 `(("python-pytest" ,python-pytest)))
3378 (home-page "https://joblib.readthedocs.io/")
3379 (synopsis "Using Python functions as pipeline jobs")
3380 (description
3381 "Joblib is a set of tools to provide lightweight pipelining in Python.
3382 In particular, joblib offers: transparent disk-caching of the output values
3383 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3384 logging and tracing of the execution.")
3385 (license license:bsd-3)))
3386
3387 (define-public python2-joblib
3388 (package-with-python2 python-joblib))
3389
3390 (define-public python-daemon
3391 (package
3392 (name "python-daemon")
3393 (version "2.2.3")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (pypi-uri "python-daemon" version))
3398 (sha256
3399 (base32
3400 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3401 (build-system python-build-system)
3402 (arguments
3403 `(#:phases
3404 (modify-phases %standard-phases
3405 (add-before 'check 'disable-tests
3406 (lambda _
3407 ;; FIXME: Determine why test fails
3408 (substitute* "test/test_daemon.py"
3409 (("test_detaches_process_context")
3410 "skip_test_detaches_process_context"))
3411 #t)))))
3412 (propagated-inputs
3413 `(("python-lockfile" ,python-lockfile)))
3414 (native-inputs
3415 `(("python-unittest2" ,python-unittest2)
3416 ("python-testtools" ,python-testtools)
3417 ("python-testscenarios" ,python-testscenarios)
3418 ("python-mock" ,python-mock)
3419 ("python-docutils" ,python-docutils)))
3420 (home-page "https://pagure.io/python-daemon/")
3421 (synopsis "Python library for making a Unix daemon process")
3422 (description "Python-daemon is a library that assists a Python program to
3423 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3424
3425 This library provides a @code{DaemonContext} class that manages the following
3426 important tasks for becoming a daemon process:
3427 @enumerate
3428 @item Detach the process into its own process group.
3429 @item Set process environment appropriate for running inside a chroot.
3430 @item Renounce suid and sgid privileges.
3431 @item Close all open file descriptors.
3432 @item Change the working directory, uid, gid, and umask.
3433 @item Set appropriate signal handlers.
3434 @item Open new file descriptors for stdin, stdout, and stderr.
3435 @item Manage a specified PID lock file.
3436 @item Register cleanup functions for at-exit processing.
3437 @end enumerate")
3438 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3439 (license (list license:asl2.0 license:gpl3+))))
3440
3441 (define-public python-anytree
3442 (package
3443 (name "python-anytree")
3444 (version "2.8.0")
3445 (source (origin
3446 (method url-fetch)
3447 (uri (pypi-uri "anytree" version))
3448 (sha256
3449 (base32
3450 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3451 (build-system python-build-system)
3452 (propagated-inputs
3453 `(("python-six" ,python-six)))
3454 (native-inputs
3455 `(;; For tests.
3456 ("graphviz" ,graphviz) ;for 'dot'
3457 ("python-nose" ,python-nose)))
3458 (home-page "https://github.com/c0fec0de/anytree")
3459 (synopsis "Lightweight tree data library")
3460 (description
3461 "@code{anytree} is a simple, lightweight, and extensible tree data
3462 structure for Python.")
3463 (license license:asl2.0)))
3464
3465 (define-public python-docutils
3466 (package
3467 (name "python-docutils")
3468 (version "0.16")
3469 (source
3470 (origin
3471 (method url-fetch)
3472 (uri (pypi-uri "docutils" version))
3473 (sha256
3474 (base32
3475 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3476 (build-system python-build-system)
3477 (arguments
3478 '(#:phases (modify-phases %standard-phases
3479 (replace 'check
3480 (lambda* (#:key tests? #:allow-other-keys)
3481 (if tests?
3482 (invoke "python" "test/alltests.py")
3483 (format #t "test suite not run~%"))
3484 #t)))))
3485 (home-page "http://docutils.sourceforge.net/")
3486 (synopsis "Python Documentation Utilities")
3487 (description
3488 "Docutils is a modular system for processing documentation into useful
3489 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3490 easy to use markup language, for input.
3491
3492 This package provides tools for converting @file{.rst} files to other formats
3493 via commands such as @command{rst2man}, as well as supporting Python code.")
3494 ;; Most of the source code is public domain, but some source files are
3495 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3496 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3497
3498 (define-public python2-docutils
3499 (package-with-python2 python-docutils))
3500
3501 ;; python2-sphinx fails its test suite with newer versions.
3502 (define-public python2-docutils-0.14
3503 (package
3504 (inherit python2-docutils)
3505 (version "0.14")
3506 (source (origin
3507 (method url-fetch)
3508 (uri (pypi-uri "docutils" version))
3509 (sha256
3510 (base32
3511 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3512
3513 (define-public python-restructuredtext-lint
3514 (package
3515 (name "python-restructuredtext-lint")
3516 (version "1.3.0")
3517 (source
3518 (origin
3519 (method url-fetch)
3520 (uri (pypi-uri "restructuredtext-lint" version))
3521 (sha256
3522 (base32
3523 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3524 (build-system python-build-system)
3525 (arguments
3526 `(#:phases
3527 (modify-phases %standard-phases
3528 (delete 'check)
3529 (add-after 'install 'check
3530 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3531 (when tests?
3532 (add-installed-pythonpath inputs outputs)
3533 (invoke "nosetests" "-v"))
3534 #t)))))
3535 (propagated-inputs
3536 `(("python-docutils" ,python-docutils)))
3537 (native-inputs
3538 `(("python-nose" ,python-nose)))
3539 (home-page "https://github.com/twolfson/restructuredtext-lint")
3540 (synopsis "reStructuredText linter")
3541 (description "This package provides a linter for the reStructuredText
3542 format.")
3543 (license license:unlicense)))
3544
3545 (define-public python-doc8
3546 (package
3547 (name "python-doc8")
3548 (version "0.8.0")
3549 (source
3550 (origin
3551 (method url-fetch)
3552 (uri (pypi-uri "doc8" version))
3553 (sha256
3554 (base32
3555 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3556 (build-system python-build-system)
3557 (arguments
3558 `(#:phases
3559 (modify-phases %standard-phases
3560 (delete 'check)
3561 (add-after 'install 'check
3562 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3563 (when tests?
3564 (add-installed-pythonpath inputs outputs)
3565 (invoke "pytest" "-v"))
3566 #t)))))
3567 (propagated-inputs
3568 `(("python-chardet" ,python-chardet)
3569 ("python-docutils" ,python-docutils)
3570 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3571 ("python-six" ,python-six)
3572 ("python-stevedore" ,python-stevedore)))
3573 (native-inputs
3574 `(("python-testtools" ,python-testtools)
3575 ("python-pytest" ,python-pytest)))
3576 (home-page "https://launchpad.net/doc8")
3577 (synopsis
3578 "Style checker for Sphinx (or other) RST documentation")
3579 (description
3580 "Doc8 is an opinionated style checker for reStructured Text and plain
3581 text styles of documentation.")
3582 (license license:asl2.0)))
3583
3584 (define-public python-pygments
3585 (package
3586 (name "python-pygments")
3587 (version "2.6.1")
3588 (source
3589 (origin
3590 (method url-fetch)
3591 (uri (pypi-uri "Pygments" version))
3592 (sha256
3593 (base32
3594 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3595 (build-system python-build-system)
3596 (arguments
3597 ;; FIXME: Tests require sphinx, which depends on this.
3598 '(#:tests? #f))
3599 (home-page "https://pygments.org/")
3600 (synopsis "Syntax highlighting")
3601 (description
3602 "Pygments is a syntax highlighting package written in Python.")
3603 (license license:bsd-2)
3604 (properties `((python2-variant . ,(delay python2-pygments))))))
3605
3606 ;; Pygments 2.6 and later does not support Python 2.
3607 (define-public python2-pygments
3608 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3609 (package
3610 (inherit base)
3611 (version "2.5.2")
3612 (source (origin
3613 (method url-fetch)
3614 (uri (pypi-uri "Pygments" version))
3615 (sha256
3616 (base32
3617 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3618
3619 (define-public python-bumpversion
3620 (package
3621 (name "python-bumpversion")
3622 (version "0.5.3")
3623 (source
3624 (origin
3625 (method url-fetch)
3626 (uri (pypi-uri "bumpversion" version))
3627 (sha256
3628 (base32
3629 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3630 (build-system python-build-system)
3631 (home-page "https://github.com/peritus/bumpversion")
3632 (synopsis "Tool to bump software version")
3633 (description "This tool provides a command-line interface (CLI) to bump a
3634 software version simply.")
3635 (license license:expat)))
3636
3637 (define-public python-deprecated
3638 (package
3639 (name "python-deprecated")
3640 (version "1.2.5")
3641 (source
3642 (origin
3643 (method git-fetch)
3644 (uri (git-reference
3645 (url "https://github.com/tantale/deprecated")
3646 (commit (string-append "v" version))))
3647 (file-name (git-file-name name version))
3648 (sha256
3649 (base32
3650 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3651 (build-system python-build-system)
3652 (arguments
3653 `(#:phases (modify-phases %standard-phases
3654 (replace 'check
3655 (lambda _
3656 (invoke "pytest"))))))
3657 (propagated-inputs
3658 `(("python-wrapt" ,python-wrapt)))
3659 (native-inputs
3660 `(("python-bumpversion" ,python-bumpversion)
3661 ("python-pytest" ,python-pytest)
3662 ("python-pytest-cov" ,python-pytest-cov)
3663 ("python-sphinx" ,python-sphinx)
3664 ("python-tox" ,python-tox)))
3665 (home-page "https://github.com/tantale/deprecated")
3666 (synopsis "Python decorator to deprecate classes, functions or methods")
3667 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3668 to deprecate classes, functions or methods.")
3669 (license license:expat)))
3670
3671 (define-public python-pygithub
3672 (package
3673 (name "python-pygithub")
3674 (version "1.43.8")
3675 (source
3676 ;; We fetch from the Git repo because there are no tests in the PyPI
3677 ;; archive.
3678 (origin
3679 (method git-fetch)
3680 (uri (git-reference
3681 (url "https://github.com/PyGithub/PyGithub")
3682 (commit (string-append "v" version))))
3683 (file-name (git-file-name name version))
3684 (sha256
3685 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3686 (build-system python-build-system)
3687 (arguments
3688 `(#:phases (modify-phases %standard-phases
3689 ;; Some tests rely on the network.
3690 (add-after 'unpack 'disable-failing-tests
3691 (lambda _
3692 (substitute* "tests/Issue142.py"
3693 (("testDecodeJson") "disabled_testDecodeJson"))
3694 #t))
3695 (add-before 'check 'prepare-for-tests
3696 (lambda _
3697 (for-each (lambda (f)
3698 (chmod f #o666))
3699 (find-files "./tests"))
3700 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3701 (setenv "PYTHONPATH"
3702 (string-append "./tests:" (getenv "PYTHONPATH")))
3703 #t)))))
3704 (propagated-inputs
3705 `(("python-deprecated" ,python-deprecated)
3706 ("python-pyjwt" ,python-pyjwt)
3707 ("python-requests" ,python-requests)))
3708 (native-inputs `(("python-httpretty" ,python-httpretty)))
3709 (home-page "https://pygithub.readthedocs.io/en/latest/")
3710 (synopsis "Python library for the GitHub API")
3711 (description "This library allows managing GitHub resources such as
3712 repositories, user profiles, and organizations in your Python applications,
3713 using version 3 of the GitHub application programming interface (API).")
3714 (license license:lgpl3+)))
3715
3716 (define-public python-rellu
3717 (package
3718 (name "python-rellu")
3719 (version "0.7")
3720 (source
3721 (origin
3722 (method url-fetch)
3723 (uri (pypi-uri "rellu" version))
3724 (sha256
3725 (base32
3726 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3727 (build-system python-build-system)
3728 (propagated-inputs
3729 `(("python-invoke" ,python-invoke)
3730 ("python-pygithub" ,python-pygithub)))
3731 (home-page "https://github.com/robotframework/rellu")
3732 (synopsis "Utilities to create PyPI releases")
3733 (description "This collection of utilities contains tooling and templates
3734 to assist in creating releases on GitHub and publishing them on PyPI. It is
3735 designed to be used by Robot Framework and tools and libraries in its
3736 ecosystem, but can naturally be used also by other projects.")
3737 (license license:asl2.0)))
3738
3739 (define-public python-robotframework
3740 (package
3741 (name "python-robotframework")
3742 (version "3.2.2")
3743 ;; There are no tests in the PyPI archive.
3744 (source
3745 (origin
3746 (method git-fetch)
3747 (uri (git-reference
3748 (url "https://github.com/robotframework/robotframework")
3749 (commit (string-append "v" version))))
3750 (file-name (git-file-name name version))
3751 (sha256
3752 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3753 (patches (search-patches
3754 "python-robotframework-source-date-epoch.patch"))))
3755 (build-system python-build-system)
3756 (arguments
3757 `(#:phases (modify-phases %standard-phases
3758 (add-before 'build 'build-and-install-doc
3759 (lambda* (#:key outputs #:allow-other-keys)
3760 (let* ((doc-output (assoc-ref outputs "doc"))
3761 (doc (string-append doc-output "/share/"
3762 ,name "-" ,version "/")))
3763 (invoke "invoke" "library-docs" "all")
3764 (mkdir-p doc)
3765 (copy-recursively "doc/libraries"
3766 (string-append doc "/libraries"))
3767 #t)))
3768 (replace 'check
3769 (lambda* (#:key inputs #:allow-other-keys)
3770 ;; Some tests require timezone data. Otherwise, they
3771 ;; look up /etc/localtime, which doesn't exist, and fail
3772 ;; with:
3773 ;;
3774 ;; OverflowError: mktime argument out of range
3775 (setenv "TZDIR"
3776 (string-append (assoc-ref inputs "tzdata")
3777 "/share/zoneinfo"))
3778 (setenv "TZ" "Europe/Paris")
3779
3780 (invoke "python" "utest/run.py"))))))
3781 (native-inputs
3782 `(("python-invoke" ,python-invoke)
3783 ("python-rellu" ,python-rellu)
3784 ("python:tk" ,python "tk") ;used when building the HTML doc
3785 ("tzdata" ,tzdata-for-tests)))
3786 (outputs '("out" "doc"))
3787 (home-page "https://robotframework.org")
3788 (synopsis "Generic automation framework")
3789 (description "Robot Framework is a generic automation framework for
3790 acceptance testing, acceptance test driven development (ATDD), and robotic
3791 process automation (RPA).")
3792 (license license:asl2.0)))
3793
3794 (define-public python-robotframework-lint
3795 ;; There is no properly tagged release; the commit below seems to correspond
3796 ;; to the 0.9 stable release available from PyPI. The tests are not
3797 ;; included in the PyPI archive, so we fetch the sources from the upstream
3798 ;; Git repo.
3799 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3800 (revision "0"))
3801 (package
3802 (name "python-robotframework-lint")
3803 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3804 revision commit))
3805 (source
3806 (origin
3807 (method git-fetch)
3808 (uri (git-reference
3809 (url "https://github.com/boakley/robotframework-lint")
3810 (commit commit)))
3811 (file-name (git-file-name name version))
3812 (sha256
3813 (base32
3814 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3815 (build-system python-build-system)
3816 (arguments
3817 `(#:phases
3818 (modify-phases %standard-phases
3819 (replace 'check
3820 (lambda _
3821 (invoke "python" "-m" "robot" "-A"
3822 "tests/conf/default.args" "tests"))))))
3823 (propagated-inputs
3824 `(("python-robotframework" ,python-robotframework)))
3825 (home-page "https://github.com/boakley/robotframework-lint/")
3826 (synopsis "Static analysis tool (linter) for Robot Framework")
3827 (description "This package provides the @code{rflint} command-line
3828 utility, a static analysis tool (linter) for Robot Framework source files.")
3829 (license license:asl2.0))))
3830
3831 (define-public python-robotframework-sshlibrary
3832 (package
3833 (name "python-robotframework-sshlibrary")
3834 (version "3.3.0")
3835 ;; There are no tests in the PyPI archive.
3836 (source
3837 (origin
3838 (method git-fetch)
3839 (uri (git-reference
3840 (url "https://github.com/robotframework/SSHLibrary")
3841 (commit (string-append "v" version))))
3842 (file-name (git-file-name name version))
3843 (sha256
3844 (base32
3845 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3846 (build-system python-build-system)
3847 (arguments
3848 `(#:phases
3849 (modify-phases %standard-phases
3850 (add-before 'build 'build-and-install-doc
3851 (lambda* (#:key outputs #:allow-other-keys)
3852 (let* ((doc-output (assoc-ref outputs "doc"))
3853 (doc (string-append doc-output "/share/"
3854 ,name "-" ,version "/")))
3855 (invoke "chmod" "-R" "+w" "docs")
3856 (invoke "invoke" "kw-docs" "project-docs")
3857 (mkdir-p doc)
3858 (for-each delete-file (find-files "docs" "\\.rst"))
3859 (copy-recursively "docs" doc)
3860 #t)))
3861 (replace 'check
3862 (lambda _
3863 ;; Some tests require an SSH server; we remove them.
3864 (delete-file "utest/test_client_api.py")
3865 (delete-file "utest/test_scp.py")
3866 (invoke "python" "utest/run.py"))))))
3867 (propagated-inputs
3868 `(("python-robotframework" ,python-robotframework)
3869 ("python-paramiko" ,python-paramiko)
3870 ("python-scp" ,python-scp)))
3871 (native-inputs
3872 `(("openssh" ,openssh)
3873 ("which" ,which)
3874 ;; To generate the documentation
3875 ("python-docutils" ,python-docutils)
3876 ("python-invoke" ,python-invoke)
3877 ("python-pygments" ,python-pygments)
3878 ("python-rellu" ,python-rellu)))
3879 (outputs '("out" "doc"))
3880 (home-page "https://github.com/robotframework/SSHLibrary")
3881 (synopsis "Robot Framework library for SSH and SFTP")
3882 (description "SSHLibrary is a Robot Framework library providing support
3883 for SSH and SFTP. It has the following main usages:
3884 @itemize @bullet
3885 @item Executing commands on the remote machine, either blocking or non-blocking.
3886 @item Writing and reading in an interactive shell.
3887 @item Transferring files and directories over SFTP.
3888 @item Ensuring that files and directories exist on the remote machine.
3889 @end itemize")
3890 (license license:asl2.0)))
3891
3892 (define-public python-rstr
3893 (package
3894 (name "python-rstr")
3895 (version "2.2.6")
3896 (source
3897 (origin
3898 (method url-fetch)
3899 (uri (pypi-uri "rstr" version))
3900 (sha256
3901 (base32
3902 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3903 (build-system python-build-system)
3904 (home-page
3905 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3906 (synopsis "Generate random strings in Python")
3907 (description "This package provides a python module for generating
3908 random strings of various types. It could be useful for fuzz testing,
3909 generating dummy data, or other applications. It has no dependencies
3910 outside the standard library.")
3911 (license license:bsd-3)))
3912
3913 (define-public python-scp
3914 (package
3915 (name "python-scp")
3916 (version "0.13.3")
3917 (source
3918 (origin
3919 (method url-fetch)
3920 (uri (pypi-uri "scp" version))
3921 (sha256
3922 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
3923 (build-system python-build-system)
3924 (arguments
3925 '(#:tests? #f)) ;tests require an SSH server
3926 (propagated-inputs
3927 `(("python-paramiko" ,python-paramiko)))
3928 (home-page "https://github.com/jbardin/scp.py")
3929 (synopsis "SCP protocol module for Python and Paramiko")
3930 (description "The scp module extends the Paramiko library to send and
3931 receive files via the SCP1 protocol, as implemented by the OpenSSH
3932 @command{scp} program.")
3933 (license license:gpl2+)))
3934
3935 (define-public python-rst.linker
3936 (package
3937 (name "python-rst.linker")
3938 (version "1.11")
3939 (source
3940 (origin
3941 (method url-fetch)
3942 (uri (pypi-uri "rst.linker" version))
3943 (sha256
3944 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3945 (build-system python-build-system)
3946 (propagated-inputs
3947 `(("python-dateutil" ,python-dateutil)
3948 ("python-six" ,python-six)))
3949 (native-inputs
3950 `(("python-setuptools-scm" ,python-setuptools-scm)))
3951 ;; Test would require path.py, which would introduce a cyclic dependence.
3952 (arguments `(#:tests? #f))
3953 ;; Note: As of version 1.7 the documentation is not worth building.
3954 (home-page "https://github.com/jaraco/rst.linker")
3955 (synopsis "Sphinx plugin to add links and timestamps")
3956 (description "rst.linker automatically replaces text by a
3957 reStructuredText external reference or timestamps. It's primary purpose is to
3958 augment the changelog, but it can be used for other documents, too.")
3959 (license license:expat)))
3960
3961 (define-public python2-rst.linker
3962 (package-with-python2 python-rst.linker))
3963
3964 (define-public python-sshpubkeys
3965 (package
3966 (name "python-sshpubkeys")
3967 (version "3.1.0")
3968 (home-page "https://github.com/ojarva/python-sshpubkeys")
3969 (source (origin
3970 (method git-fetch)
3971 (uri (git-reference
3972 (url home-page)
3973 (commit (string-append "v" version))))
3974 (file-name (git-file-name name version))
3975 (sha256
3976 (base32
3977 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
3978 (build-system python-build-system)
3979 (propagated-inputs
3980 `(("python-cryptography" ,python-cryptography)
3981 ("python-ecdsa" ,python-ecdsa)))
3982 (synopsis "OpenSSH public key parser")
3983 (description
3984 "This package provides a library for parsing and validating OpenSSH
3985 public key files.")
3986 (license license:bsd-3)))
3987
3988 (define-public python-feedgenerator
3989 (package
3990 (name "python-feedgenerator")
3991 (version "1.9")
3992 (source
3993 (origin
3994 (method url-fetch)
3995 (uri (pypi-uri "feedgenerator" version))
3996 (sha256
3997 (base32
3998 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3999 (modules '((guix build utils)))
4000 (snippet
4001 '(begin
4002 ;; Remove pre-compiled .pyc files from source.
4003 (for-each delete-file-recursively
4004 (find-files "." "__pycache__" #:directories? #t))
4005 (for-each delete-file (find-files "." "\\.pyc$"))
4006 #t))))
4007 (build-system python-build-system)
4008 (propagated-inputs
4009 `(("python-pytz" ,python-pytz)
4010 ("python-six" ,python-six)))
4011 (home-page "https://github.com/getpelican/feedgenerator")
4012 (synopsis
4013 "Standalone version of Django's Atom/RSS feed generator")
4014 (description
4015 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4016 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4017 (license license:bsd-3)))
4018
4019 (define-public python2-feedgenerator
4020 (package-with-python2 python-feedgenerator))
4021
4022 (define-public python-toml
4023 (package
4024 (name "python-toml")
4025 (version "0.10.1")
4026 (source
4027 (origin
4028 (method url-fetch)
4029 (uri (pypi-uri "toml" version))
4030 (sha256
4031 (base32
4032 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
4033 (build-system python-build-system)
4034 (arguments
4035 `(#:tests? #f)) ;no tests suite in release
4036 (home-page "https://github.com/uiri/toml")
4037 (synopsis "Library for TOML")
4038 (description
4039 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
4040 Language (TOML) configuration files.")
4041 (license license:expat)))
4042
4043 (define-public python-jsonrpc-server
4044 (package
4045 (name "python-jsonrpc-server")
4046 (version "0.4.0")
4047 (source
4048 (origin
4049 (method url-fetch)
4050 (uri (pypi-uri "python-jsonrpc-server" version))
4051 (sha256
4052 (base32
4053 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4054 (build-system python-build-system)
4055 (propagated-inputs
4056 `(("python-mock" ,python-mock)
4057 ("python-pytest" ,python-pytest)
4058 ("python-ujson" ,python-ujson)))
4059 (home-page
4060 "https://github.com/palantir/python-jsonrpc-server")
4061 (synopsis "JSON RPC 2.0 server library")
4062 (description
4063 "This package provides a JSON RPC 2.0 server library for Python.")
4064 (license license:expat)))
4065
4066 (define-public python-pydantic
4067 (package
4068 (name "python-pydantic")
4069 (version "1.6.1")
4070 (source
4071 (origin
4072 (method git-fetch)
4073 (uri (git-reference
4074 (url "https://github.com/samuelcolvin/pydantic")
4075 (commit (string-append "v" version))))
4076 (file-name (git-file-name name version))
4077 (sha256
4078 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4079 (build-system python-build-system)
4080 (arguments
4081 '(#:phases
4082 (modify-phases %standard-phases
4083 ;; Reported upstream:
4084 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4085 ;; Disable the faulty test as the fix is unclear.
4086 (add-before 'check 'disable-test
4087 (lambda _
4088 (substitute* "tests/test_validators.py"
4089 (("test_assert_raises_validation_error")
4090 "_test_assert_raises_validation_error"))
4091 #t))
4092 (replace 'check
4093 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4094 (native-inputs
4095 `(("python-pytest" ,python-pytest)))
4096 (home-page "https://github.com/samuelcolvin/pydantic")
4097 (synopsis "Python data validation and settings management")
4098 (description
4099 "Pydantic enforces type hints at runtime, and provides user friendly
4100 errors when data is invalid.")
4101 (license license:expat)))
4102
4103 (define-public python-pydocstyle
4104 (package
4105 (name "python-pydocstyle")
4106 (version "3.0.0")
4107 (source
4108 (origin
4109 (method url-fetch)
4110 (uri (pypi-uri "pydocstyle" version))
4111 (sha256
4112 (base32
4113 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4114 (build-system python-build-system)
4115 (propagated-inputs
4116 `(("python-six" ,python-six)
4117 ("python-snowballstemmer" ,python-snowballstemmer)))
4118 (home-page
4119 "https://github.com/PyCQA/pydocstyle/")
4120 (synopsis "Python docstring style checker")
4121 (description
4122 "This package provides a style checker for the Python Language
4123 Server (PLS).")
4124 (license license:expat)))
4125
4126 (define-public python-language-server
4127 (package
4128 (name "python-language-server")
4129 (version "0.36.2")
4130 (source
4131 (origin
4132 (method url-fetch)
4133 (uri (pypi-uri "python-language-server" version))
4134 (sha256
4135 (base32
4136 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4137 (build-system python-build-system)
4138 (propagated-inputs
4139 `(("python-autopep8" ,python-autopep8)
4140 ("python-configparser" ,python-configparser)
4141 ("python-pydocstyle" ,python-pydocstyle)
4142 ("python-future" ,python-future)
4143 ("python-jedi" ,python-jedi)
4144 ("python-jsonrpc-server" ,python-jsonrpc-server)
4145 ("python-pluggy" ,python-pluggy)
4146 ("python-pycodestyle" ,python-pycodestyle)
4147 ("python-pyflakes" ,python-pyflakes)
4148 ("python-rope" ,python-rope)
4149 ("python-ujson" ,python-ujson)
4150 ("python-yapf" ,python-yapf)))
4151 (native-inputs
4152 `(("python-coverage" ,python-coverage)
4153 ("python-flaky" ,python-flaky)
4154 ("python-matplotlib" ,python-matplotlib)
4155 ("python-mock" ,python-mock)
4156 ("python-numpy" ,python-numpy)
4157 ("python-pandas" ,python-pandas)
4158 ("python-pylint" ,python-pylint)
4159 ("python-pytest" ,python-pytest)
4160 ("python-pytest-cov" ,python-pytest-cov)
4161 ("python-versioneer" ,python-versioneer)))
4162 (home-page "https://github.com/palantir/python-language-server")
4163 (synopsis "Python implementation of the Language Server Protocol")
4164 (description
4165 "The Python Language Server (pyls) is an implementation of the Python 3
4166 language specification for the Language Server Protocol (LSP). This tool is
4167 used in text editing environments to provide a complete and integrated
4168 feature-set for programming Python effectively.")
4169 (license license:expat)))
4170
4171 (define-public python-pathspec
4172 (package
4173 (name "python-pathspec")
4174 (version "0.7.0")
4175 (source
4176 (origin
4177 (method url-fetch)
4178 (uri (pypi-uri "pathspec" version))
4179 (sha256
4180 (base32
4181 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4182 (build-system python-build-system)
4183 (home-page "https://github.com/cpburnz/python-path-specification")
4184 (synopsis "Utility library for gitignore style pattern matching of file paths")
4185 (description
4186 "This package provides a utility library for gitignore style pattern
4187 matching of file paths.")
4188 (license license:mpl2.0)))
4189
4190 (define-public python-black
4191 (package
4192 (name "python-black")
4193 (version "20.8b1")
4194 (source
4195 (origin
4196 (method url-fetch)
4197 (uri (pypi-uri "black" version))
4198 (sha256
4199 (base32
4200 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4201 (build-system python-build-system)
4202 (arguments
4203 `(#:phases
4204 (modify-phases %standard-phases
4205 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4206 (lambda _
4207 (let ((python3 (which "python3")))
4208 (substitute* '("tests/data/fmtonoff.py"
4209 "tests/data/string_prefixes.py"
4210 "tests/data/function.py"
4211 "tests/data/python37.py")
4212 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4213 (string-append "#!" python3 (if (string? minor-version)
4214 minor-version
4215 "")))))
4216 #t))
4217 (add-after 'unpack 'disable-broken-tests
4218 (lambda* (#:key outputs inputs #:allow-other-keys)
4219 ;; Make installed package available for running the tests
4220 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4221 ":" (getenv "PATH")))
4222
4223 ;; These tests are supposed to be skipped when the blackd
4224 ;; dependencies are missing, but this doesn't quite work.
4225 (substitute* "tests/test_black.py"
4226 (("( *)class BlackDTestCase.*" match indent)
4227 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4228 indent "class BlackDTestCase(unittest.TestCase):\n"))
4229 (("web.Application") "False")
4230 (("@unittest_run_loop") ""))
4231
4232 ;; Patching the above file breaks the self test
4233 (substitute* "tests/test_black.py"
4234 (("( *)def test_self" match indent)
4235 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4236
4237 (substitute* "tests/test_black.py"
4238 (("( *)def test_python38" match indent)
4239 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4240 #t)))))
4241 (propagated-inputs
4242 `(("python-click" ,python-click)
4243 ("python-attrs" ,python-attrs)
4244 ("python-appdirs" ,python-appdirs)
4245 ("python-pathspec" ,python-pathspec)
4246 ("python-mypy-extensions" ,python-mypy-extensions)
4247 ("python-regex" ,python-regex)
4248 ("python-toml" ,python-toml)
4249 ("python-typed-ast" ,python-typed-ast)
4250 ("python-typing-extensions" ,python-typing-extensions)))
4251 (native-inputs
4252 `(("python-setuptools-scm" ,python-setuptools-scm)))
4253 (home-page "https://github.com/ambv/black")
4254 (synopsis "The uncompromising code formatter")
4255 (description "Black is the uncompromising Python code formatter.")
4256 (license license:expat)))
4257
4258 (define-public python-black-macchiato
4259 (package
4260 (name "python-black-macchiato")
4261 (version "1.3.0")
4262 (source
4263 (origin
4264 (method url-fetch)
4265 (uri (pypi-uri "black-macchiato" version))
4266 (sha256
4267 (base32
4268 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4269 (build-system python-build-system)
4270 (propagated-inputs
4271 `(("python-black" ,python-black)))
4272 (home-page "https://github.com/wbolster/black-macchiato")
4273 (synopsis "Partial @code{python-black} formatting")
4274 (description
4275 "This package is built on top the @{python-black} code formatter to
4276 enable formatting of partial files.")
4277 (license license:bsd-3)))
4278
4279 (define-public python-blinker
4280 (package
4281 (name "python-blinker")
4282 (version "1.4")
4283 (source
4284 (origin
4285 (method url-fetch)
4286 (uri (pypi-uri "blinker" version))
4287 (sha256
4288 (base32
4289 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4290 (build-system python-build-system)
4291 (home-page "https://pythonhosted.org/blinker/")
4292 (synopsis "Fast, simple object-to-object and broadcast signaling")
4293 (description
4294 "Blinker provides a fast dispatching system that allows any number of
4295 interested parties to subscribe to events, or \"signals\".")
4296 (license license:expat)))
4297
4298 (define-public python2-blinker
4299 (package-with-python2 python-blinker))
4300
4301 (define-public pelican
4302 (package
4303 (name "pelican")
4304 (version "4.2.0")
4305 (source
4306 (origin
4307 (method url-fetch)
4308 (uri (pypi-uri "pelican" version))
4309 (sha256
4310 (base32
4311 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4312 (build-system python-build-system)
4313 (propagated-inputs
4314 `(("python-blinker" ,python-blinker)
4315 ("python-dateutil" ,python-dateutil)
4316 ("python-docutils" ,python-docutils)
4317 ("python-feedgenerator" ,python-feedgenerator)
4318 ("python-jinja2" ,python-jinja2)
4319 ("python-markdown" ,python-markdown)
4320 ("python-pygments" ,python-pygments)
4321 ("python-pytz" ,python-pytz)
4322 ("python-six" ,python-six)
4323 ("python-unidecode" ,python-unidecode)))
4324 (home-page "https://getpelican.com/")
4325 (arguments
4326 `(;; XXX Requires a lot more packages to do unit tests :P
4327 #:tests? #f))
4328 (synopsis "Python-based static site publishing system")
4329 (description
4330 "Pelican is a tool to generate a static blog from reStructuredText,
4331 Markdown input files, and more. Pelican uses Jinja2 for templating
4332 and is very extensible.")
4333 (license license:agpl3+)))
4334
4335 (define-public mallard-ducktype
4336 (package
4337 (name "mallard-ducktype")
4338 (version "1.0.2")
4339 (source
4340 (origin
4341 (method git-fetch)
4342 ;; git-reference because tests are not included in pypi source tarball
4343 ;; https://issues.guix.gnu.org/issue/36755#2
4344 (uri (git-reference
4345 (url "https://github.com/projectmallard/mallard-ducktype")
4346 (commit version)))
4347 (file-name (git-file-name name version))
4348 (sha256
4349 (base32
4350 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4351 (build-system python-build-system)
4352 (arguments
4353 '(#:phases
4354 (modify-phases %standard-phases
4355 (replace 'check
4356 (lambda _
4357 (with-directory-excursion "tests"
4358 (invoke "sh" "runtests")))))))
4359 (home-page "http://projectmallard.org")
4360 (synopsis "Convert Ducktype to Mallard documentation markup")
4361 (description
4362 "Ducktype is a lightweight syntax that can represent all the semantics
4363 of the Mallard XML documentation system. Ducktype files can be converted to
4364 Mallard using the @command{ducktype} tool. The yelp-tools package
4365 provides additional functionality on the produced Mallard documents.")
4366 (license license:expat)))
4367
4368 (define-public python-cython
4369 (package
4370 (name "python-cython")
4371 (version "0.29.21")
4372 (source
4373 (origin
4374 (method url-fetch)
4375 (uri (pypi-uri "Cython" version))
4376 (sha256
4377 (base32
4378 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4379 (build-system python-build-system)
4380 ;; we need the full python package and not just the python-wrapper
4381 ;; because we need libpython3.3m.so
4382 (inputs
4383 `(("python" ,python)))
4384 (arguments
4385 `(#:phases
4386 (modify-phases %standard-phases
4387 (add-before 'check 'set-HOME
4388 ;; some tests require access to "$HOME/.cython"
4389 (lambda _ (setenv "HOME" "/tmp") #t))
4390 (replace 'check
4391 (lambda _
4392 ;; Disable compiler optimizations to greatly reduce the running
4393 ;; time of the test suite.
4394 (setenv "CFLAGS" "-O0")
4395
4396 (invoke "python" "runtests.py" "-vv"
4397 "-j" (number->string (parallel-job-count))
4398 ;; XXX: On 32-bit architectures, running the parallel tests
4399 ;; fails on many-core systems, see
4400 ;; <https://github.com/cython/cython/issues/2807>.
4401 ,@(if (not (target-64bit?))
4402 '("-x" "run.parallel")
4403 '())))))))
4404 (home-page "https://cython.org/")
4405 (synopsis "C extensions for Python")
4406 (description "Cython is an optimising static compiler for both the Python
4407 programming language and the extended Cython programming language. It makes
4408 writing C extensions for Python as easy as Python itself.")
4409 (license license:asl2.0)
4410 (properties `((python2-variant . ,(delay python2-cython))))))
4411
4412 (define-public python2-cython
4413 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4414 (package
4415 (inherit base)
4416 (name "python2-cython")
4417 (inputs
4418 `(("python-2" ,python-2))) ;this is not automatically changed
4419 (arguments
4420 (substitute-keyword-arguments (package-arguments base)
4421 ((#:phases phases)
4422 `(modify-phases ,phases
4423 (add-before 'check 'adjust-test_embed
4424 (lambda _
4425 (substitute* "runtests.py"
4426 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4427 ;; so it can give the right -L flag to GCC when embedding static
4428 ;; builds of Python. It is unaware that the Python "config"
4429 ;; directory (where the static library lives) was renamed in
4430 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4431 ;; which works fine, because that is where the shared library is.
4432 ;;
4433 ;; It also appears to be unaware that the Makefile in Demos/embed
4434 ;; already unconditionally pass the static library location to GCC,
4435 ;; after checking sysconfig.get_config_var('LIBPL).
4436 ;;
4437 ;; The effect is that the linker is unable to resolve libexpat
4438 ;; symbols when building for Python 2, because neither the Python 2
4439 ;; shared library nor Expat is available. To fix it, we can either
4440 ;; add Expat as an input and make it visible to the linker, or just
4441 ;; prevent it from overriding the Python shared library location.
4442 ;; The end result is identical, so we take the easy route.
4443 ((" or libname not in os\\.listdir\\(libdir\\)")
4444 ""))
4445 #t)))))))))
4446
4447 ;; The RPython toolchain currently does not support Python 3.
4448 (define-public python2-rpython
4449 (package
4450 (name "python2-rpython")
4451 (version "0.2.1")
4452 (source
4453 (origin
4454 (method url-fetch)
4455 (uri (pypi-uri "rpython" version))
4456 (sha256
4457 (base32
4458 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4459 (build-system python-build-system)
4460 (arguments `(#:python ,python-2))
4461 (native-inputs
4462 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4463 (home-page "https://rpython.readthedocs.org")
4464 (synopsis "Framework for implementing interpreters and virtual machines")
4465 (description "RPython is a translation and support framework for
4466 producing implementations of dynamic languages, emphasizing a clean separation
4467 between language specification and implementation aspects.")
4468 (license license:expat)))
4469
4470 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4471 ;; python-scipy still build, as these three packages are often used together.
4472 (define-public python-numpy
4473 (package
4474 (name "python-numpy")
4475 (version "1.17.3")
4476 (source
4477 (origin
4478 (method url-fetch)
4479 (uri (string-append
4480 "https://github.com/numpy/numpy/releases/download/v"
4481 version "/numpy-" version ".tar.gz"))
4482 (sha256
4483 (base32
4484 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4485 (build-system python-build-system)
4486 (inputs
4487 `(("openblas" ,openblas)
4488 ("lapack" ,lapack)))
4489 (native-inputs
4490 `(("python-cython" ,python-cython)
4491 ("python-pytest" ,python-pytest)
4492 ("gfortran" ,gfortran)))
4493 (arguments
4494 `(#:phases
4495 (modify-phases %standard-phases
4496 (add-before 'build 'configure-blas-lapack
4497 (lambda* (#:key inputs #:allow-other-keys)
4498 (call-with-output-file "site.cfg"
4499 (lambda (port)
4500 (format port
4501 "[openblas]
4502 libraries = openblas
4503 library_dirs = ~a/lib
4504 include_dirs = ~a/include
4505
4506 # backslash-n to make emacs happy
4507 \n[lapack]
4508 lapack_libs = lapack
4509 library_dirs = ~a/lib
4510 include_dirs = ~a/include
4511 "
4512 (assoc-ref inputs "openblas")
4513 (assoc-ref inputs "openblas")
4514 (assoc-ref inputs "lapack")
4515 (assoc-ref inputs "lapack"))))
4516 #t))
4517 (add-before 'build 'fix-executable-paths
4518 (lambda* (#:key inputs #:allow-other-keys)
4519 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4520 ;; instead of /bin/sh.
4521 (substitute* "numpy/distutils/exec_command.py"
4522 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4523 (string-append match-start (assoc-ref inputs "bash") match-end)))
4524 ;; Use "gcc" executable, not "cc".
4525 (substitute* "numpy/distutils/system_info.py"
4526 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4527 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4528 #t))
4529 ;; Tests can only be run after the library has been installed and not
4530 ;; within the source directory.
4531 (delete 'check)
4532 (add-after 'install 'check
4533 (lambda* (#:key outputs inputs #:allow-other-keys)
4534 ;; Make installed package available for running the tests
4535 (add-installed-pythonpath inputs outputs)
4536 ;; Make sure "f2py" etc is found.
4537 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4538 ":" (getenv "PATH")))
4539 (with-directory-excursion "/tmp"
4540 (invoke "python" "-c"
4541 "import numpy; numpy.test(verbose=2)")))))))
4542 (home-page "https://numpy.org")
4543 (synopsis "Fundamental package for scientific computing with Python")
4544 (description "NumPy is the fundamental package for scientific computing
4545 with Python. It contains among other things: a powerful N-dimensional array
4546 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4547 and Fortran code, useful linear algebra, Fourier transform, and random number
4548 capabilities.")
4549 (properties `((python2-variant . ,(delay python2-numpy))))
4550 (license license:bsd-3)))
4551
4552 ;; Numpy 1.16.x are the last versions that support Python 2.
4553 (define-public python2-numpy
4554 (let ((numpy (package-with-python2
4555 (strip-python2-variant python-numpy))))
4556 (package/inherit
4557 numpy
4558 (version "1.16.5")
4559 (source (origin
4560 (method url-fetch)
4561 (uri (string-append
4562 "https://github.com/numpy/numpy/releases/download/v"
4563 version "/numpy-" version ".tar.gz"))
4564 (sha256
4565 (base32
4566 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4567
4568 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4569 ;; interest only for legacy code going back to NumPy's predecessor
4570 ;; Numeric.
4571 (define-public python2-numpy-1.8
4572 (package (inherit python2-numpy)
4573 (version "1.8.2")
4574 (source
4575 (origin
4576 (method git-fetch)
4577 (uri (git-reference
4578 (url "https://github.com/numpy/numpy")
4579 (commit (string-append "v" version))))
4580 (file-name (git-file-name "numpy" version))
4581 (sha256
4582 (base32
4583 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4584 (arguments
4585 (substitute-keyword-arguments (package-arguments python2-numpy)
4586 ((#:phases phases)
4587 `(modify-phases ,phases
4588 (replace 'configure-blas-lapack
4589 (lambda* (#:key inputs #:allow-other-keys)
4590 (call-with-output-file "site.cfg"
4591 (lambda (port)
4592 (format port
4593 "[openblas]
4594 libraries = openblas,lapack
4595 library_dirs = ~a/lib:~a/lib
4596 include_dirs = ~a/include:~a/include
4597 "
4598 (assoc-ref inputs "openblas")
4599 (assoc-ref inputs "lapack")
4600 (assoc-ref inputs "openblas")
4601 (assoc-ref inputs "lapack"))))
4602 #t))))))
4603 (native-inputs
4604 `(("python2-nose" ,python2-nose)))
4605 (description "NumPy is the fundamental package for scientific computing
4606 with Python. It contains among other things: a powerful N-dimensional array
4607 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4608 and Fortran code, useful linear algebra, Fourier transform, and random number
4609 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4610 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4611 Numeric.")
4612 (license license:bsd-3)))
4613
4614 (define-public python-munch
4615 (package
4616 (name "python-munch")
4617 (version "2.0.4")
4618 (source
4619 (origin
4620 (method url-fetch)
4621 (uri (pypi-uri "munch" version))
4622 (sha256
4623 (base32
4624 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4625 (build-system python-build-system)
4626 (home-page "https://github.com/Infinidat/munch")
4627 (synopsis "Dot-accessible dictionary")
4628 (description "Munch is a dot-accessible dictionary similar to JavaScript
4629 objects.")
4630 (license license:expat)))
4631
4632 (define-public python2-munch
4633 (package-with-python2 python-munch))
4634
4635 (define-public python-colormath
4636 (package
4637 (name "python-colormath")
4638 (version "3.0.0")
4639 (source
4640 (origin
4641 (method url-fetch)
4642 (uri (pypi-uri "colormath" version))
4643 (sha256
4644 (base32
4645 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4646 (build-system python-build-system)
4647 (propagated-inputs
4648 `(("python-networkx" ,python-networkx)
4649 ("python-numpy" ,python-numpy)))
4650 (home-page "https://github.com/gtaylor/python-colormath")
4651 (synopsis "Color math and conversion library")
4652 (description
4653 "This is a Python library for color math and conversions.")
4654 (license license:bsd-3)))
4655
4656 (define-public python2-colormath
4657 (package-with-python2 python-colormath))
4658
4659 (define-public python-spectra
4660 (package
4661 (name "python-spectra")
4662 (version "0.0.11")
4663 (source
4664 (origin
4665 (method url-fetch)
4666 (uri (pypi-uri "spectra" version))
4667 (sha256
4668 (base32
4669 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4670 (build-system python-build-system)
4671 (arguments
4672 `(#:phases
4673 (modify-phases %standard-phases
4674 (replace 'check
4675 (lambda _ (invoke "nosetests" "-v"))))))
4676 (propagated-inputs
4677 `(("python-colormath" ,python-colormath)))
4678 (native-inputs
4679 `(("python-nose" ,python-nose)))
4680 (home-page "https://github.com/jsvine/spectra")
4681 (synopsis "Color scales and color conversion")
4682 (description
4683 "This package provides a Python library intended to make color math,
4684 color scales, and color space conversion easy. It has support for:
4685
4686 @enumerate
4687 @item Color scales
4688 @item Color ranges
4689 @item Color blending
4690 @item Brightening/darkening colors
4691 @item Saturating/desaturating colors
4692 @item Conversion to/from multiple color spaces.
4693 @end enumerate\n")
4694 (license license:expat)))
4695
4696 (define-public python2-spectra
4697 (package-with-python2 python-spectra))
4698
4699 (define-public python-numpy-documentation
4700 (package
4701 (name "python-numpy-documentation")
4702 (version (package-version python-numpy))
4703 (source (package-source python-numpy))
4704 (build-system python-build-system)
4705 (native-inputs
4706 `(("python-matplotlib" ,python-matplotlib)
4707 ("python-numpy" ,python-numpy)
4708 ("pkg-config" ,pkg-config)
4709 ("python-sphinx" ,python-sphinx)
4710 ("python-numpydoc" ,python-numpydoc)
4711 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4712 texlive-fonts-ec
4713 texlive-generic-ifxetex
4714 texlive-generic-pdftex
4715 texlive-amsfonts
4716 texlive-latex-capt-of
4717 texlive-latex-cmap
4718 texlive-latex-environ
4719 texlive-latex-eqparbox
4720 texlive-latex-etoolbox
4721 texlive-latex-expdlist
4722 texlive-latex-fancyhdr
4723 texlive-latex-fancyvrb
4724 texlive-latex-fncychap
4725 texlive-latex-float
4726 texlive-latex-framed
4727 texlive-latex-geometry
4728 texlive-latex-graphics
4729 texlive-latex-hyperref
4730 texlive-latex-mdwtools
4731 texlive-latex-multirow
4732 texlive-latex-needspace
4733 texlive-latex-oberdiek
4734 texlive-latex-parskip
4735 texlive-latex-preview
4736 texlive-latex-tabulary
4737 texlive-latex-threeparttable
4738 texlive-latex-titlesec
4739 texlive-latex-trimspaces
4740 texlive-latex-ucs
4741 texlive-latex-upquote
4742 texlive-latex-url
4743 texlive-latex-varwidth
4744 texlive-latex-wrapfig)))
4745 ("texinfo" ,texinfo)
4746 ("perl" ,perl)
4747 ("scipy-sphinx-theme"
4748 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4749 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4750 (method git-fetch)
4751 (uri (git-reference
4752 (url "https://github.com/scipy/scipy-sphinx-theme")
4753 (commit commit)))
4754 (file-name (git-file-name "python-scipy-sphinx-theme"
4755 (string-take commit 7)))
4756 (sha256
4757 (base32
4758 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4759 ,@(package-native-inputs python-numpy)))
4760 (arguments
4761 `(#:tests? #f ; we're only generating the documentation
4762 #:phases
4763 (modify-phases %standard-phases
4764 (delete 'build)
4765 (replace 'install
4766 (lambda* (#:key inputs outputs #:allow-other-keys)
4767 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4768 (doc (string-append
4769 data "/doc/" ,name "-"
4770 ,(package-version python-numpy)))
4771 (info-reader (string-append data "/info"))
4772 (html (string-append doc "/html"))
4773 (scipy-sphinx-theme "scipy-sphinx-theme")
4774 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4775 (pyver ,(string-append "PYVER=")))
4776
4777 ;; FIXME: this is needed to for texlive-union to generate
4778 ;; fonts, which are not found.
4779 (setenv "HOME" "/tmp")
4780
4781 (with-directory-excursion "doc"
4782 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4783 (mkdir-p html)
4784 (invoke "make" "html" pyver)
4785 (invoke "make" "latex" "PAPER=a4" pyver)
4786 (invoke "make" "-C" "build/latex"
4787 "all-pdf" "PAPER=a4" pyver)
4788 ;; FIXME: Generation of the info file fails.
4789 ;; (invoke "make" "info" pyver)
4790 ;; (mkdir-p info)
4791 ;; (copy-file "build/texinfo/numpy.info"
4792 ;; (string-append info "/numpy.info"))
4793 (for-each (lambda (file)
4794 (copy-file (string-append "build/latex" file)
4795 (string-append doc file)))
4796 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4797 (with-directory-excursion "build/html"
4798 (for-each (lambda (file)
4799 (let* ((dir (dirname file))
4800 (tgt-dir (string-append html "/" dir)))
4801 (unless (equal? "." dir)
4802 (mkdir-p tgt-dir))
4803 (install-file file html)))
4804 (find-files "." ".*")))))
4805 #t)))))
4806 (home-page (package-home-page python-numpy))
4807 (synopsis "Documentation for the python-numpy package")
4808 (description (package-description python-numpy))
4809 (license (package-license python-numpy))))
4810
4811 (define-public python2-numpy-documentation
4812 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4813 (package
4814 (inherit numpy-documentation)
4815 (native-inputs `(("python2-functools32" ,python2-functools32)
4816 ,@(package-native-inputs numpy-documentation))))))
4817
4818 (define-public python-pygit2
4819 (package
4820 (name "python-pygit2")
4821 (version "1.4.0")
4822 (source
4823 (origin
4824 (method url-fetch)
4825 (uri (pypi-uri "pygit2" version))
4826 (sha256
4827 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4828 (build-system python-build-system)
4829 (arguments
4830 '(#:tests? #f)) ; tests don't run correctly in our environment
4831 (propagated-inputs
4832 `(("python-cached-property" ,python-cached-property)
4833 ("python-cffi" ,python-cffi)
4834 ("libgit2" ,libgit2)))
4835 (native-inputs
4836 `(("python-pytest" ,python-pytest)))
4837 (home-page "https://github.com/libgit2/pygit2")
4838 (synopsis "Python bindings for libgit2")
4839 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4840 library, libgit2 implements Git plumbing.")
4841 ;; GPL2.0 only, with linking exception.
4842 (license license:gpl2)))
4843
4844 (define-public python-patiencediff
4845 (package
4846 (name "python-patiencediff")
4847 (version "0.2.0")
4848 (source
4849 (origin
4850 (method url-fetch)
4851 (uri (pypi-uri "patiencediff" version))
4852 (sha256
4853 (base32
4854 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4855 (build-system python-build-system)
4856 (home-page "https://www.breezy-vcs.org/")
4857 (synopsis "Python implementation of the patiencediff algorithm")
4858 (description
4859 "This package contains a Python implementation of the @code{patiencediff}
4860 algorithm. Patiencediff provides a good balance of performance, nice output for
4861 humans, and implementation simplicity.")
4862 (license license:gpl2)))
4863
4864 (define-public python-pyparsing
4865 (package
4866 (name "python-pyparsing")
4867 (version "2.4.6")
4868 (source
4869 (origin
4870 (method url-fetch)
4871 (uri (pypi-uri "pyparsing" version))
4872 (sha256
4873 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4874 (build-system python-build-system)
4875 (outputs '("out" "doc"))
4876 (arguments
4877 `(#:tests? #f ; no test target
4878 #:phases
4879 (modify-phases %standard-phases
4880 (add-after 'install 'install-doc
4881 (lambda* (#:key outputs #:allow-other-keys)
4882 (let* ((doc (string-append (assoc-ref outputs "doc")
4883 "/share/doc/" ,name "-" ,version))
4884 (html-doc (string-append doc "/html"))
4885 (examples (string-append doc "/examples")))
4886 (mkdir-p html-doc)
4887 (mkdir-p examples)
4888 (for-each
4889 (lambda (dir tgt)
4890 (map (lambda (file)
4891 (install-file file tgt))
4892 (find-files dir ".*")))
4893 (list "docs" "htmldoc" "examples")
4894 (list doc html-doc examples))
4895 #t))))))
4896 (home-page "https://github.com/pyparsing/pyparsing")
4897 (synopsis "Python parsing class library")
4898 (description
4899 "The pyparsing module is an alternative approach to creating and
4900 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4901 of regular expressions. The pyparsing module provides a library of classes
4902 that client code uses to construct the grammar directly in Python code.")
4903 (license license:expat)))
4904
4905 (define-public python2-pyparsing
4906 (package-with-python2 python-pyparsing))
4907
4908 (define-public python-pyparsing-2.4.7
4909 (package
4910 (inherit python-pyparsing)
4911 (version "2.4.7")
4912 (source
4913 (origin
4914 (method url-fetch)
4915 (uri (pypi-uri "pyparsing" version))
4916 (sha256
4917 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4918
4919 (define-public python-numpydoc
4920 (package
4921 (name "python-numpydoc")
4922 (version "0.8.0")
4923 (source
4924 (origin
4925 (method url-fetch)
4926 (uri (pypi-uri "numpydoc" version))
4927 (sha256
4928 (base32
4929 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4930 (build-system python-build-system)
4931 (propagated-inputs
4932 `(("python-sphinx" ,python-sphinx)))
4933 (native-inputs
4934 `(("python-nose" ,python-nose)))
4935 (home-page "https://pypi.org/project/numpydoc/")
4936 (synopsis
4937 "Numpy's Sphinx extensions")
4938 (description
4939 "Sphinx extension to support docstrings in Numpy format.")
4940 (license license:bsd-2)))
4941
4942 (define-public python2-numpydoc
4943 (package-with-python2 python-numpydoc))
4944
4945 (define-public python-numexpr
4946 (package
4947 (name "python-numexpr")
4948 (version "2.6.5")
4949 (source
4950 (origin
4951 (method url-fetch)
4952 (uri (pypi-uri "numexpr" version))
4953 (sha256
4954 (base32
4955 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4956 (build-system python-build-system)
4957 (arguments `(#:tests? #f)) ; no tests included
4958 (propagated-inputs
4959 `(("python-numpy" ,python-numpy)))
4960 (home-page "https://github.com/pydata/numexpr")
4961 (synopsis "Fast numerical expression evaluator for NumPy")
4962 (description
4963 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4964 expressions that operate on arrays are accelerated and use less memory than
4965 doing the same calculation in Python. In addition, its multi-threaded
4966 capabilities can make use of all your cores, which may accelerate
4967 computations, most specially if they are not memory-bounded (e.g. those using
4968 transcendental functions).")
4969 (license license:expat)))
4970
4971 (define-public python2-numexpr
4972 (package-with-python2 python-numexpr))
4973
4974 (define-public python-cycler
4975 (package
4976 (name "python-cycler")
4977 (version "0.10.0")
4978 (source (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "cycler" version))
4981 (sha256
4982 (base32
4983 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4984 (build-system python-build-system)
4985 (arguments
4986 ;; XXX: The current version requires 'coveralls' which we don't have.
4987 ;; Enable this for the next release which uses 'python-pytest'.
4988 '(#:tests? #f))
4989 (propagated-inputs
4990 `(("python-six" ,python-six)))
4991 (home-page "http://matplotlib.org/cycler/")
4992 (synopsis "Composable keyword argument iterator")
4993 (description
4994 "When using @code{matplotlib} and plotting more than one line, it is
4995 common to want to be able to want to be able to cycle over one or more artist
4996 styles; but the plotting logic can quickly become involved.
4997 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4998 @code{Cycler} class was developed.")
4999 (license license:bsd-3)))
5000
5001 (define-public python2-cycler
5002 (package-with-python2 python-cycler))
5003
5004 (define-public python-colorspacious
5005 (package
5006 (name "python-colorspacious")
5007 (version "1.1.2")
5008 (source
5009 (origin
5010 (method git-fetch)
5011 (uri (git-reference
5012 (url "https://github.com/njsmith/colorspacious")
5013 (commit (string-append "v" version))))
5014 (file-name (git-file-name name version))
5015 (sha256
5016 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5017 (build-system python-build-system)
5018 (propagated-inputs
5019 `(("python-numpy" ,python-numpy)))
5020 (native-inputs
5021 `(("python-nose" ,python-nose)))
5022 (arguments
5023 `(#:phases
5024 (modify-phases %standard-phases
5025 (replace 'check
5026 (lambda _
5027 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5028 (home-page "https://github.com/njsmith/colorspacious")
5029 (synopsis "Python library for colorspace conversions")
5030 (description "@code{colorspacious} is a Python library that lets you
5031 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5032 (license license:expat)))
5033
5034 (define-public python2-colorspacious
5035 (package-with-python2 python-colorspacious))
5036
5037 (define-public python-matplotlib
5038 (package
5039 (name "python-matplotlib")
5040 (version "3.1.2")
5041 (source
5042 (origin
5043 (method url-fetch)
5044 (uri (pypi-uri "matplotlib" version))
5045 (sha256
5046 (base32
5047 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
5048 (build-system python-build-system)
5049 (propagated-inputs ; the following packages are all needed at run time
5050 `(("python-cycler" ,python-cycler)
5051 ("python-kiwisolver" ,python-kiwisolver)
5052 ("python-pyparsing" ,python-pyparsing)
5053 ("python-pygobject" ,python-pygobject)
5054 ("gobject-introspection" ,gobject-introspection)
5055 ("python-tkinter" ,python "tk")
5056 ("python-dateutil" ,python-dateutil)
5057 ("python-numpy" ,python-numpy)
5058 ("python-pillow" ,python-pillow)
5059 ("python-pytz" ,python-pytz)
5060 ("python-six" ,python-six)
5061 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5062 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5063 ;; object. For this reason we need to import both libraries.
5064 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5065 ("python-pycairo" ,python-pycairo)
5066 ("python-cairocffi" ,python-cairocffi)))
5067 (inputs
5068 `(("libpng" ,libpng)
5069 ("freetype" ,freetype)
5070 ("cairo" ,cairo)
5071 ("glib" ,glib)
5072 ;; FIXME: Add backends when available.
5073 ;("python-wxpython" ,python-wxpython)
5074 ("tcl" ,tcl)
5075 ("tk" ,tk)))
5076 (native-inputs
5077 `(("pkg-config" ,pkg-config)
5078 ("python-pytest" ,python-pytest)
5079 ("python-mock" ,python-mock)
5080 ("unzip" ,unzip)
5081 ("jquery-ui"
5082 ,(origin
5083 (method url-fetch)
5084 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5085 (sha256
5086 (base32
5087 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5088 (arguments
5089 `(#:phases
5090 (modify-phases %standard-phases
5091 ;; XXX We disable all image comparison tests because we're using a
5092 ;; newer version of FreeType than matplotlib expects. This leads to
5093 ;; minor differences throughout the tests.
5094 (add-after 'unpack 'fix-and-disable-failing-tests
5095 (lambda _
5096 (substitute* (append (find-files "lib/matplotlib/tests/"
5097 "test_.*\\.py$")
5098 (find-files "lib/mpl_toolkits/tests"
5099 "test_.*\\.py$"))
5100 (("^from matplotlib" match)
5101 (string-append "import pytest\n" match))
5102 (("( *)@image_comparison" match indent)
5103 (string-append indent
5104 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5105 match)))
5106 (substitute* "lib/matplotlib/tests/test_animation.py"
5107 (("/bin/sh") (which "sh")))
5108 (for-each delete-file
5109 ;; test_normal_axes, test_get_tightbbox_polar
5110 '("lib/matplotlib/tests/test_axes.py"
5111 ;; We don't use the webagg backend and this test forces it.
5112 "lib/matplotlib/tests/test_backend_webagg.py"
5113 ;; test_outward_ticks
5114 "lib/matplotlib/tests/test_tightlayout.py"
5115 ;; test_hidden_axes fails with minor extent
5116 ;; differences, possibly due to the use of a
5117 ;; different version of FreeType.
5118 "lib/matplotlib/tests/test_constrainedlayout.py"
5119 ;; Fontconfig returns no fonts.
5120 "lib/matplotlib/tests/test_font_manager.py"))
5121 #t))
5122 (add-before 'install 'install-jquery-ui
5123 (lambda* (#:key outputs inputs #:allow-other-keys)
5124 (let ((dir (string-append (assoc-ref outputs "out")
5125 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5126 (mkdir-p dir)
5127 (invoke "unzip"
5128 (assoc-ref inputs "jquery-ui")
5129 "-d" dir))
5130 #t))
5131 (replace 'check
5132 (lambda* (#:key outputs inputs #:allow-other-keys)
5133 (add-installed-pythonpath inputs outputs)
5134 (invoke "python" "tests.py" "-v"
5135 "-m" "not network and not webagg")))
5136 (add-before 'build 'configure-environment
5137 (lambda* (#:key outputs inputs #:allow-other-keys)
5138 (let ((cairo (assoc-ref inputs "cairo")))
5139 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5140 ;; has not effect.
5141 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5142 (setenv "HOME" (getcwd))
5143 ;; Fix rounding errors when using the x87 FPU.
5144 (when (string-prefix? "i686" ,(%current-system))
5145 (setenv "CFLAGS" "-ffloat-store"))
5146 (call-with-output-file "setup.cfg"
5147 (lambda (port)
5148 (format port "[directories]~%
5149 basedirlist = ~a,~a~%
5150 [packages]~%
5151 tests = True~%"
5152 (assoc-ref inputs "tcl")
5153 (assoc-ref inputs "tk")))))
5154 #t)))))
5155 (home-page "https://matplotlib.org/")
5156 (synopsis "2D plotting library for Python")
5157 (description
5158 "Matplotlib is a Python 2D plotting library which produces publication
5159 quality figures in a variety of hardcopy formats and interactive environments
5160 across platforms. Matplotlib can be used in Python scripts, the python and
5161 ipython shell, web application servers, and six graphical user interface
5162 toolkits.")
5163 (license license:psfl)
5164 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5165
5166 (define-public python2-matplotlib
5167 (let ((matplotlib (package-with-python2
5168 (strip-python2-variant python-matplotlib))))
5169 (package (inherit matplotlib)
5170 (version "2.2.4")
5171 (source
5172 (origin
5173 (method url-fetch)
5174 (uri (pypi-uri "matplotlib" version))
5175 (sha256
5176 (base32
5177 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5178 (arguments
5179 (substitute-keyword-arguments (package-arguments matplotlib)
5180 ((#:phases phases)
5181 `(modify-phases ,phases
5182 (replace 'install-jquery-ui
5183 (lambda* (#:key outputs inputs #:allow-other-keys)
5184 (let ((dir (string-append (assoc-ref outputs "out")
5185 "/lib/python2.7/site-packages/"
5186 "matplotlib/backends/web_backend/")))
5187 (mkdir-p dir)
5188 (invoke "unzip"
5189 (assoc-ref inputs "jquery-ui")
5190 "-d" dir))
5191 #t))
5192 (delete 'fix-and-disable-failing-tests)
5193 (delete 'check))))) ; These tests weren't run the the past.
5194 ;; Make sure to use special packages for Python 2 instead
5195 ;; of those automatically rewritten by package-with-python2.
5196 (propagated-inputs
5197 `(("python2-pycairo" ,python2-pycairo)
5198 ("python2-backports-functools-lru-cache"
5199 ,python2-backports-functools-lru-cache)
5200 ("python2-functools32" ,python2-functools32)
5201 ("python2-pygobject-2" ,python2-pygobject-2)
5202 ("python2-subprocess32" ,python2-subprocess32)
5203 ("python2-tkinter" ,python-2 "tk")
5204 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5205 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5206
5207 (define-public python-matplotlib-documentation
5208 (package
5209 (name "python-matplotlib-documentation")
5210 (version (package-version python-matplotlib))
5211 (source (package-source python-matplotlib))
5212 (build-system python-build-system)
5213 (native-inputs
5214 `(("python-matplotlib" ,python-matplotlib)
5215 ("python-colorspacious" ,python-colorspacious)
5216 ("python-sphinx" ,python-sphinx)
5217 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5218 ("python-sphinx-gallery" ,python-sphinx-gallery)
5219 ("python-numpydoc" ,python-numpydoc)
5220 ("python-ipython" ,python-ipython)
5221 ("python-ipykernel" ,python-ipykernel)
5222 ("python-mock" ,python-mock)
5223 ("graphviz" ,graphviz)
5224 ("texlive" ,(texlive-union (list texlive-amsfonts
5225 texlive-latex-amsmath
5226 texlive-latex-enumitem
5227 texlive-latex-expdlist
5228 texlive-latex-geometry
5229 texlive-latex-preview
5230 texlive-latex-type1cm
5231 texlive-latex-ucs
5232
5233 texlive-generic-pdftex
5234
5235 texlive-fonts-ec
5236 texlive-fonts-adobe-times
5237 texlive-fonts-txfonts)))
5238 ("texinfo" ,texinfo)
5239 ,@(package-native-inputs python-matplotlib)))
5240 (arguments
5241 `(#:tests? #f ; we're only generating documentation
5242 #:phases
5243 (modify-phases %standard-phases
5244 ;; The tests in python-matplotlib are run after the install phase, so
5245 ;; we need to delete the extra phase here.
5246 (delete 'check)
5247 (replace 'build
5248 (lambda _
5249 (chdir "doc")
5250 (setenv "PYTHONPATH"
5251 (string-append (getenv "PYTHONPATH")
5252 ":" (getcwd) "/../examples/units"))
5253 (substitute* "conf.py"
5254 ;; Don't use git.
5255 (("^SHA = check_output.*")
5256 (string-append "SHA = \"" ,version "\"\n"))
5257 ;; Don't fetch intersphinx files from the Internet
5258 (("^explicit_order_folders" m)
5259 (string-append "intersphinx_mapping = {}\n" m))
5260 (("'sphinx.ext.intersphinx',") "")
5261 ;; Disable URL embedding which requires internet access.
5262 (("'https://docs.scipy.org/doc/numpy'") "None")
5263 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5264 (invoke "make"
5265 "SPHINXBUILD=sphinx-build"
5266 "SPHINXOPTS=" ; don't abort on warnings
5267 "html" "texinfo")))
5268 (replace 'install
5269 (lambda* (#:key inputs outputs #:allow-other-keys)
5270 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5271 (doc (string-append data "/doc/python-matplotlib-" ,version))
5272 (info (string-append data "/info"))
5273 (html (string-append doc "/html")))
5274 (mkdir-p html)
5275 (mkdir-p info)
5276 (copy-recursively "build/html" html)
5277 (symlink (string-append html "/_images")
5278 (string-append info "/matplotlib-figures"))
5279 (with-directory-excursion "build/texinfo"
5280 (substitute* "matplotlib.texi"
5281 (("@image\\{([^,]*)" all file)
5282 (string-append "@image{matplotlib-figures/" file)))
5283 (symlink (string-append html "/_images")
5284 "./matplotlib-figures")
5285 (invoke "makeinfo" "--no-split"
5286 "-o" "matplotlib.info" "matplotlib.texi"))
5287 (install-file "build/texinfo/matplotlib.info" info))
5288 #t)))))
5289 (home-page (package-home-page python-matplotlib))
5290 (synopsis "Documentation for the python-matplotlib package")
5291 (description (package-description python-matplotlib))
5292 (license (package-license python-matplotlib))))
5293
5294 (define-public python2-matplotlib-documentation
5295 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5296 (package
5297 (inherit parent)
5298 (native-inputs
5299 (alist-delete "python-sphinx-copybutton"
5300 (package-native-inputs parent))))))
5301
5302 (define-public python-matplotlib-venn
5303 (package
5304 (name "python-matplotlib-venn")
5305 (version "0.11.5")
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5310 (sha256
5311 (base32
5312 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5313 (build-system python-build-system)
5314 (arguments '(#:tests? #f)) ; tests are not included
5315 (propagated-inputs
5316 `(("python-matplotlib" ,python-matplotlib)
5317 ("python-numpy" ,python-numpy)
5318 ("python-scipy" ,python-scipy)))
5319 (native-inputs
5320 `(("unzip" ,unzip)))
5321 (home-page "https://github.com/konstantint/matplotlib-venn")
5322 (synopsis "Plot area-proportional Venn diagrams")
5323 (description
5324 "This package provides tools for plotting area-proportional two- and
5325 three-way Venn diagrams in @code{matplotlib}.")
5326 (license license:expat)))
5327
5328 (define-public python-pysnptools
5329 (package
5330 (name "python-pysnptools")
5331 (version "0.4.11")
5332 (source
5333 (origin
5334 (method url-fetch)
5335 (uri (pypi-uri "pysnptools" version))
5336 (sha256
5337 (base32
5338 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5339 (build-system python-build-system)
5340 (arguments
5341 `(#:tests? #f ; no test data are included
5342 #:phases
5343 (modify-phases %standard-phases
5344 (replace 'check
5345 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5346 (if tests?
5347 (begin
5348 (add-installed-pythonpath inputs outputs)
5349 (invoke "python3" "pysnptools/test.py"))
5350 #t))))))
5351 (propagated-inputs
5352 `(("python-dill" ,python-dill)
5353 ("python-h5py" ,python-h5py)
5354 ("python-numpy" ,python-numpy)
5355 ("python-pandas" ,python-pandas)
5356 ("python-psutil" ,python-psutil)
5357 ("python-scipy" ,python-scipy)))
5358 (native-inputs
5359 `(("python-cython" ,python-cython)))
5360 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5361 (synopsis "Library for reading and manipulating genetic data")
5362 (description
5363 "PySnpTools is a library for reading and manipulating genetic data. It
5364 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5365 those files. It can also efficiently manipulate ranges of integers using set
5366 operators such as union, intersection, and difference.")
5367 (license license:asl2.0)))
5368
5369 (define-public python2-pysnptools
5370 (package-with-python2 python-pysnptools))
5371
5372 (define-public python-wurlitzer
5373 (package
5374 (name "python-wurlitzer")
5375 (version "2.0.1")
5376 (source
5377 (origin
5378 (method url-fetch)
5379 (uri (pypi-uri "wurlitzer" version))
5380 (sha256
5381 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5382 (build-system python-build-system)
5383 (arguments
5384 '(#:phases
5385 (modify-phases %standard-phases
5386 (replace 'check
5387 (lambda _
5388 (invoke "pytest" "-vv" "test.py"))))))
5389 (native-inputs
5390 `(("python-mock" ,python-mock)
5391 ("python-pytest" ,python-pytest)))
5392 (home-page "https://github.com/minrk/wurlitzer")
5393 (synopsis "Capture C-level output in context managers")
5394 (description
5395 "This library helps to redirect @code{sys.stdout} to a stream or a file
5396 while executing some piece of code, including C code running within a Python
5397 process.")
5398 (license license:expat)))
5399
5400 (define-public python-socksipy-branch
5401 (package
5402 (name "python-socksipy-branch")
5403 (version "1.01")
5404 (source
5405 (origin
5406 (method url-fetch)
5407 (uri (pypi-uri "SocksiPy-branch" version))
5408 (sha256
5409 (base32
5410 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5411 (build-system python-build-system)
5412 (arguments
5413 `(#:tests? #f)) ; There are no tests
5414 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5415 (synopsis "Python SOCKS module")
5416 (description
5417 "SocksiPy - A Python SOCKS client module. It provides a
5418 socket-like interface that supports connections to any TCP
5419 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5420 The original version was developed by Dan Haim, this is a
5421 branch created by Mario Vilas to address some open issues,
5422 as the original project seems to have been abandoned circa 2007.")
5423 (license license:bsd-3)))
5424
5425 (define-public python2-socksipy-branch
5426 (package-with-python2 python-socksipy-branch))
5427
5428 (define-public python-socksipychain
5429 (package
5430 (name "python-socksipychain")
5431 (version "2.1.2")
5432 (source
5433 (origin
5434 (method git-fetch)
5435 (uri (git-reference
5436 (url "https://github.com/pagekite/PySocksipyChain")
5437 (commit (string-append "v" version))))
5438 (file-name (git-file-name name version))
5439 (sha256
5440 (base32
5441 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5442 (build-system python-build-system)
5443 (arguments
5444 `(#:tests? #f)) ; Tests try to access the network.
5445 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5446 (synopsis "Python SOCKS module with chained proxies support")
5447 (description
5448 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5449 adds support for arbitrary chaining of proxy servers and various modes of
5450 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5451 a simple netcat replacement with chaining support.")
5452 (license license:bsd-3)))
5453
5454 (define-public python-pycodestyle
5455 (package
5456 (name "python-pycodestyle")
5457 (version "2.6.0")
5458 (source
5459 (origin
5460 (method url-fetch)
5461 (uri (pypi-uri "pycodestyle" version))
5462 (sha256
5463 (base32
5464 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5465 (build-system python-build-system)
5466 (arguments
5467 `(#:phases
5468 (modify-phases %standard-phases
5469 (replace 'check
5470 (lambda _
5471 (invoke "pytest" "-vv"))))))
5472 (native-inputs
5473 `(("python-pytest" ,python-pytest)))
5474 (home-page "https://pycodestyle.readthedocs.io/")
5475 (synopsis "Python style guide checker")
5476 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5477 Python code against some of the style conventions in
5478 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5479 (license license:expat)))
5480
5481 (define-public python2-pycodestyle
5482 (package-with-python2 python-pycodestyle))
5483
5484 (define-public python-multidict
5485 (package
5486 (name "python-multidict")
5487 (version "4.7.5")
5488 (source
5489 (origin
5490 (method url-fetch)
5491 (uri (pypi-uri "multidict" version))
5492 (sha256
5493 (base32
5494 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5495 (build-system python-build-system)
5496 (arguments
5497 '(#:modules ((ice-9 ftw)
5498 (srfi srfi-1)
5499 (srfi srfi-26)
5500 (guix build utils)
5501 (guix build python-build-system))
5502 #:phases (modify-phases %standard-phases
5503 (replace 'check
5504 (lambda* (#:key tests? #:allow-other-keys)
5505 (if tests?
5506 (begin
5507 (let ((libdir (find (cut string-prefix? "lib." <>)
5508 (scandir "build"))))
5509 (setenv "PYTHONPATH"
5510 (string-append "./build/" libdir ":"
5511 (getenv "PYTHONPATH")))
5512 (invoke "pytest" "-vv")))
5513 (format #t "test suite not run~%"))
5514 #t)))))
5515 (native-inputs
5516 `(("python-pytest" ,python-pytest)
5517 ("python-pytest-cov" ,python-pytest-cov)))
5518 (home-page "https://github.com/aio-libs/multidict/")
5519 (synopsis "Multidict implementation")
5520 (description "Multidict is dict-like collection of key-value pairs
5521 where key might be occurred more than once in the container.")
5522 (license license:asl2.0)))
5523
5524 (define-public python-orderedmultidict
5525 (package
5526 (name "python-orderedmultidict")
5527 (version "1.0")
5528 (source
5529 (origin
5530 (method url-fetch)
5531 (uri (pypi-uri "orderedmultidict" version))
5532 (sha256
5533 (base32
5534 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5535 (build-system python-build-system)
5536 (arguments
5537 `(#:phases
5538 (modify-phases %standard-phases
5539 (add-after 'unpack 'fix-tests
5540 (lambda _
5541 ;; The package uses nosetest for running the tests.
5542 ;; Adding this initfile allows to run the test suite
5543 ;; without requiring nosetest.
5544 (with-output-to-file "tests/__init__.py" newline)
5545 #t)))))
5546 (propagated-inputs
5547 `(("python-six" ,python-six)))
5548 (native-inputs
5549 `(("python-pycodestyle" ,python-pycodestyle)))
5550 (home-page "https://github.com/gruns/orderedmultidict")
5551 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5552 (description "This package contains a library for ordered multivalue
5553 dictionaries. A multivalue dictionary is a dictionary that can store
5554 multiple values for the same key. An ordered multivalue dictionary is a
5555 multivalue dictionary that retains the order of insertions and deletions.")
5556 (license license:unlicense)))
5557
5558 (define-public python2-orderedmultidict
5559 (package-with-python2 python-orderedmultidict))
5560
5561 (define-public python-autopep8
5562 (package
5563 (name "python-autopep8")
5564 (version "1.5.3")
5565 (source
5566 (origin
5567 (method url-fetch)
5568 (uri (pypi-uri "autopep8" version))
5569 (sha256
5570 (base32
5571 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5572 (build-system python-build-system)
5573 (propagated-inputs
5574 `(("python-pycodestyle" ,python-pycodestyle)
5575 ("python-toml" ,python-toml)))
5576 (home-page "https://github.com/hhatto/autopep8")
5577 (synopsis "Format Python code according to the PEP 8 style guide")
5578 (description
5579 "@code{autopep8} automatically formats Python code to conform to
5580 the PEP 8 style guide. It uses the pycodestyle utility to determine
5581 what parts of the code needs to be formatted. @code{autopep8} is
5582 capable of fixing most of the formatting issues that can be reported
5583 by pycodestyle.")
5584 (license (license:non-copyleft
5585 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5586
5587 (define-public python2-autopep8
5588 (package-with-python2 python-autopep8))
5589
5590 (define-public python-distlib
5591 (package
5592 (name "python-distlib")
5593 (version "0.3.0")
5594 (source
5595 (origin
5596 (method url-fetch)
5597 (uri (pypi-uri "distlib" version ".zip"))
5598 (sha256
5599 (base32
5600 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5601 (build-system python-build-system)
5602 (arguments
5603 `(#:phases
5604 (modify-phases %standard-phases
5605 (add-before 'build 'no-/bin/sh
5606 (lambda _
5607 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5608 (("/bin/sh") (which "sh")))
5609 #t))
5610 (add-before 'check 'prepare-test-env
5611 (lambda _
5612 (setenv "HOME" "/tmp")
5613 ;; NOTE: Any value works, the variable just has to be present.
5614 (setenv "SKIP_ONLINE" "1")
5615 #t)))))
5616 (native-inputs `(("unzip" ,unzip)))
5617 (home-page "https://bitbucket.org/pypa/distlib")
5618 (synopsis "Distribution utilities")
5619 (description "Distlib is a library which implements low-level functions that
5620 relate to packaging and distribution of Python software. It is intended to be
5621 used as the basis for third-party packaging tools.")
5622 (license license:psfl)))
5623
5624 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5625 (define-public python-distlib/next
5626 (package
5627 (inherit python-distlib)
5628 (version "0.3.1")
5629 (source
5630 (origin
5631 (method url-fetch)
5632 (uri (pypi-uri "distlib" version ".zip"))
5633 (sha256
5634 (base32
5635 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5636
5637 (define-public python-distutils-extra
5638 (package
5639 (name "python-distutils-extra")
5640 (version "2.38")
5641 (source
5642 (origin
5643 (method url-fetch)
5644 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5645 version "/+download/python-distutils-extra-"
5646 version ".tar.gz"))
5647 (sha256
5648 (base32
5649 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5650 (build-system python-build-system)
5651 (home-page "https://launchpad.net/python-distutils-extra/")
5652 (synopsis "Enhancements to Python's distutils")
5653 (description
5654 "The python-distutils-extra module enables you to easily integrate
5655 gettext support, themed icons, and scrollkeeper-based documentation into
5656 Python's distutils.")
5657 (license license:gpl2)))
5658
5659 (define-public python2-distutils-extra
5660 (package-with-python2 python-distutils-extra))
5661
5662 (define-public python2-elib.intl
5663 (package
5664 (name "python2-elib.intl")
5665 (version "0.0.3")
5666 (source
5667 (origin
5668 ;; This project doesn't tag releases or publish tarballs, so we take
5669 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5670 (method git-fetch)
5671 (uri (git-reference
5672 (url "https://github.com/dieterv/elib.intl")
5673 (commit "d09997cfef")))
5674 (file-name (string-append name "-" version "-checkout"))
5675 (sha256
5676 (base32
5677 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5678 (build-system python-build-system)
5679 (arguments
5680 ;; incompatible with Python 3 (exception syntax)
5681 `(#:python ,python-2
5682 #:tests? #f))
5683 (home-page "https://github.com/dieterv/elib.intl")
5684 (synopsis "Enhanced internationalization for Python")
5685 (description
5686 "The elib.intl module provides enhanced internationalization (I18N)
5687 services for your Python modules and applications.")
5688 (license license:lgpl3+)))
5689
5690 (define-public python-olefile
5691 (package
5692 (name "python-olefile")
5693 (version "0.46")
5694 (source
5695 (origin
5696 (method url-fetch)
5697 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5698 "download/v" version "/olefile-" version ".tar.gz"))
5699 (file-name (string-append name "-" version ".tar.gz"))
5700 (sha256
5701 (base32
5702 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5703 (build-system python-build-system)
5704 (home-page "https://www.decalage.info/python/olefileio")
5705 (synopsis "Read and write Microsoft OLE2 files.")
5706 (description
5707 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5708 Storage or Compound Document, Microsoft Office). It is an improved version of
5709 the OleFileIO module from PIL, the Python Image Library.")
5710 (license license:bsd-3)))
5711
5712 (define-public python2-olefile
5713 (package-with-python2 python-olefile))
5714
5715 (define-public python-pillow
5716 (package
5717 (name "python-pillow")
5718 (version "8.0.1")
5719 (source
5720 (origin
5721 (method url-fetch)
5722 (uri (pypi-uri "Pillow" version))
5723 (sha256
5724 (base32
5725 "17pv0flaqqfld9m4lz8ayxyqb11gbbmr7w04mw4ar79cn3lwdi8i"))))
5726 (build-system python-build-system)
5727 (native-inputs
5728 `(("python-pytest" ,python-pytest)))
5729 (inputs
5730 `(("freetype" ,freetype)
5731 ("lcms" ,lcms)
5732 ("libjpeg" ,libjpeg-turbo)
5733 ("libtiff" ,libtiff)
5734 ("libwebp" ,libwebp)
5735 ("openjpeg" ,openjpeg)
5736 ("zlib" ,zlib)))
5737 (propagated-inputs
5738 `(("python-olefile" ,python-olefile)))
5739 (arguments
5740 `(#:phases
5741 (modify-phases %standard-phases
5742 (add-after 'unpack 'patch-ldconfig
5743 (lambda _
5744 (substitute* "setup.py"
5745 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5746 (replace 'check
5747 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5748 (if tests?
5749 (begin
5750 (setenv "HOME" (getcwd))
5751 ;; Make installed package available for running the tests.
5752 (add-installed-pythonpath inputs outputs)
5753 (invoke "python" "selftest.py" "--installed")
5754 (invoke "python" "-m" "pytest" "-vv"))
5755 #t))))))
5756 (home-page "https://python-pillow.org")
5757 (synopsis "Fork of the Python Imaging Library")
5758 (description
5759 "The Python Imaging Library adds image processing capabilities to your
5760 Python interpreter. This library provides extensive file format support, an
5761 efficient internal representation, and fairly powerful image processing
5762 capabilities. The core image library is designed for fast access to data
5763 stored in a few basic pixel formats. It should provide a solid foundation for
5764 a general image processing tool.")
5765 (properties `((python2-variant . ,(delay python2-pillow))))
5766 (license (license:x11-style
5767 "http://www.pythonware.com/products/pil/license.htm"
5768 "The PIL Software License"))))
5769
5770 (define-public python2-pillow
5771 (package-with-python2
5772 (package
5773 (inherit (strip-python2-variant python-pillow))
5774 ;; Version 6 is the last series with Python 2 support.
5775 (version "6.2.2")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "Pillow" version))
5780 (sha256
5781 (base32
5782 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5783
5784 (define-public python-pillow-2.9
5785 (package
5786 (inherit python-pillow)
5787 (version "2.9.0")
5788 (source
5789 (origin
5790 (method url-fetch)
5791 (uri (pypi-uri "Pillow" version))
5792 (sha256
5793 (base32
5794 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5795 (arguments
5796 (substitute-keyword-arguments (package-arguments python-pillow)
5797 ((#:tests? _ #f) #f)))
5798 (properties '((hidden? #t)))))
5799
5800 (define-public python-roifile
5801 (package
5802 (name "python-roifile")
5803 (version "2020.5.28")
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (pypi-uri "roifile" version))
5808 (sha256
5809 (base32
5810 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5811 (build-system python-build-system)
5812 (arguments `(#:tests? #f)) ; there are none
5813 (propagated-inputs
5814 `(("python-numpy" ,python-numpy)))
5815 (home-page "https://www.lfd.uci.edu/~gohlke/")
5816 (synopsis "Read and write ImageJ ROI format")
5817 (description "Roifile is a Python library to read, write, create, and plot
5818 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5819 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5820 (license license:bsd-3)))
5821
5822 (define-public python-tifffile
5823 (package
5824 (name "python-tifffile")
5825 (version "2020.6.3")
5826 (source
5827 (origin
5828 (method url-fetch)
5829 (uri (pypi-uri "tifffile" version))
5830 (sha256
5831 (base32
5832 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5833 (build-system python-build-system)
5834 ;; Tests require lfdfiles, which depends on tifffile
5835 (arguments `(#:tests? #f))
5836 (propagated-inputs
5837 `(("python-numpy" ,python-numpy)
5838 ;;("python-lfdfiles" ,python-lfdfiles)
5839 ("python-roifile" ,python-roifile)))
5840 (home-page "https://www.lfd.uci.edu/~gohlke/")
5841 (synopsis "Read and write TIFF(r) files")
5842 (description "This package lets you read image and metadata from many
5843 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5844 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5845 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5846 (license license:bsd-3)))
5847
5848 (define-public python-lfdfiles
5849 (package
5850 (name "python-lfdfiles")
5851 (version "2020.1.1")
5852 (source
5853 (origin
5854 (method url-fetch)
5855 (uri (pypi-uri "lfdfiles" version))
5856 (sha256
5857 (base32
5858 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5859 (build-system python-build-system)
5860 (propagated-inputs
5861 `(("python-click" ,python-click)
5862 ("python-numpy" ,python-numpy)
5863 ("python-tifffile" ,python-tifffile)))
5864 (home-page "https://www.lfd.uci.edu/~gohlke/")
5865 (synopsis "Work with LFD data files")
5866 (description
5867 "Lfdfiles is a Python library and console script for reading, writing,
5868 converting, and viewing many of the proprietary file formats used to store
5869 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5870 (license license:bsd-3)))
5871
5872 (define-public python-imageio
5873 (package
5874 (name "python-imageio")
5875 (version "2.8.0")
5876 (source
5877 (origin
5878 (method url-fetch)
5879 (uri (pypi-uri "imageio" version))
5880 (sha256
5881 (base32
5882 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5883 (build-system python-build-system)
5884 (arguments
5885 `(#:tests? #f ; many tests require online data
5886 #:phases
5887 (modify-phases %standard-phases
5888 (replace 'check
5889 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5890 (if tests?
5891 (begin
5892 ;; Make installed package available for running the tests.
5893 (add-installed-pythonpath inputs outputs)
5894 (invoke "pytest" "-vv"))
5895 #t))))))
5896 (propagated-inputs
5897 `(("python-numpy" ,python-numpy)
5898 ("python-pillow" ,python-pillow)
5899 ("python-psutil" ,python-psutil)))
5900 (native-inputs
5901 `(("python-pytest" ,python-pytest)))
5902 (home-page "https://imageio.github.io/")
5903 (synopsis "Library for reading and writing a wide range of image data")
5904 (description
5905 "Imageio is a Python library that provides an easy interface to read and
5906 write a wide range of image data, including animated images, video, volumetric
5907 data, and scientific formats.")
5908 (license license:bsd-2)))
5909
5910 (define-public python-pycparser
5911 (package
5912 (name "python-pycparser")
5913 (version "2.20")
5914 (source
5915 (origin
5916 (method url-fetch)
5917 (uri (pypi-uri "pycparser" version))
5918 (sha256
5919 (base32
5920 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5921 (outputs '("out" "doc"))
5922 (build-system python-build-system)
5923 (native-inputs
5924 `(("pkg-config" ,pkg-config)))
5925 (arguments
5926 `(#:phases
5927 (modify-phases %standard-phases
5928 (replace 'check
5929 (lambda _
5930 (with-directory-excursion "tests"
5931 (invoke "python" "all_tests.py"))
5932 #t))
5933 (add-after 'install 'install-doc
5934 (lambda* (#:key outputs #:allow-other-keys)
5935 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5936 (doc (string-append data "/doc/" ,name "-" ,version))
5937 (examples (string-append doc "/examples")))
5938 (mkdir-p examples)
5939 (for-each (lambda (file)
5940 (copy-file (string-append "." file)
5941 (string-append doc file)))
5942 '("/README.rst" "/CHANGES" "/LICENSE"))
5943 (copy-recursively "examples" examples)
5944 #t))))))
5945 (home-page "https://github.com/eliben/pycparser")
5946 (synopsis "C parser in Python")
5947 (description
5948 "Pycparser is a complete parser of the C language, written in pure Python
5949 using the PLY parsing library. It parses C code into an AST and can serve as
5950 a front-end for C compilers or analysis tools.")
5951 (license license:bsd-3)))
5952
5953 (define-public python2-pycparser
5954 (package-with-python2 python-pycparser))
5955
5956 (define-public python-xlsxwriter
5957 (package
5958 (name "python-xlsxwriter")
5959 (version "1.3.7")
5960 (source
5961 (origin
5962 ;; There are no tests in the PyPI tarball.
5963 (method git-fetch)
5964 (uri (git-reference
5965 (url "https://github.com/jmcnamara/XlsxWriter")
5966 (commit (string-append "RELEASE_" version))))
5967 (file-name (git-file-name name version))
5968 (sha256
5969 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
5970 (build-system python-build-system)
5971 (home-page "https://github.com/jmcnamara/XlsxWriter")
5972 (synopsis "Python module for creating Excel XLSX files")
5973 (description
5974 "XlsxWriter is a Python module that can be used to write text, numbers,
5975 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
5976 (license license:bsd-2)))
5977
5978 (define-public python-pywavelets
5979 (package
5980 (name "python-pywavelets")
5981 (version "1.1.1")
5982 (home-page "https://github.com/PyWavelets/pywt")
5983 (source (origin
5984 (method url-fetch)
5985 (uri (pypi-uri "PyWavelets" version))
5986 (sha256
5987 (base32
5988 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5989 (build-system python-build-system)
5990 (arguments
5991 '(#:modules ((ice-9 ftw)
5992 (srfi srfi-1)
5993 (srfi srfi-26)
5994 (guix build utils)
5995 (guix build python-build-system))
5996 #:phases
5997 (modify-phases %standard-phases
5998 (replace 'check
5999 (lambda _
6000 (let ((cwd (getcwd))
6001 (libdir (find (cut string-prefix? "lib." <>)
6002 (scandir "build"))))
6003 (with-directory-excursion (string-append cwd "/build/" libdir)
6004 (invoke "pytest" "-vv"))))))))
6005 (native-inputs
6006 `(("python-matplotlib" ,python-matplotlib) ;for tests
6007 ("python-pytest" ,python-pytest)))
6008 (propagated-inputs
6009 `(("python-numpy" ,python-numpy)))
6010 (synopsis "Wavelet transforms in Python")
6011 (description
6012 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6013 mathematical basis functions that are localized in both time and frequency.
6014 Wavelet transforms are time-frequency transforms employing wavelets. They are
6015 similar to Fourier transforms, the difference being that Fourier transforms are
6016 localized only in frequency instead of in time and frequency.")
6017 (license license:expat)))
6018
6019 (define-public python-pywinrm
6020 (package
6021 (name "python-pywinrm")
6022 (version "0.4.1")
6023 (source
6024 (origin
6025 (method url-fetch)
6026 (uri (pypi-uri "pywinrm" version))
6027 (sha256
6028 (base32
6029 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6030 (build-system python-build-system)
6031 (propagated-inputs
6032 `(("python-six" ,python-six)
6033 ("python-requests_ntlm" ,python-requests_ntlm)
6034 ("python-xmltodict" ,python-xmltodict)
6035 ("python-kerberos" ,python-kerberos)))
6036 (native-inputs
6037 `(("python-mock" ,python-mock)
6038 ("python-pytest" ,python-pytest)))
6039 (home-page "https://github.com/diyan/pywinrm/")
6040 (synopsis
6041 "Python library for Windows Remote Management (WinRM)")
6042 (description
6043 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6044 service. It allows you to invoke commands on target Windows machines from
6045 any machine that can run Python.")
6046 (license license:expat)))
6047
6048 (define-public python-xcffib
6049 (package
6050 (name "python-xcffib")
6051 (version "0.6.0")
6052 (source
6053 (origin
6054 (method url-fetch)
6055 (uri (pypi-uri "xcffib" version))
6056 (sha256
6057 (base32
6058 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6059 (build-system python-build-system)
6060 (inputs
6061 `(("libxcb" ,libxcb)))
6062 (propagated-inputs
6063 `(("python-cffi" ,python-cffi) ; used at run time
6064 ("python-six" ,python-six)))
6065 (arguments
6066 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6067 #:tests? #f
6068 #:phases
6069 (modify-phases %standard-phases
6070 (add-after 'unpack 'fix-libxcb-path
6071 (lambda* (#:key inputs #:allow-other-keys)
6072 (let ((libxcb (assoc-ref inputs "libxcb")))
6073 (substitute* '("xcffib/__init__.py")
6074 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6075 #t)))
6076 (add-after 'install 'install-doc
6077 (lambda* (#:key outputs #:allow-other-keys)
6078 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6079 "/doc/" ,name "-" ,version)))
6080 (mkdir-p doc)
6081 (copy-file "README.md"
6082 (string-append doc "/README.md"))
6083 #t))))))
6084 (home-page "https://github.com/tych0/xcffib")
6085 (synopsis "XCB Python bindings")
6086 (description
6087 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6088 support for Python 3 and PyPy. It is based on cffi.")
6089 (license license:expat)))
6090
6091 (define-public python2-xcffib
6092 (package-with-python2 python-xcffib))
6093
6094 (define-public python-cairocffi
6095 (package
6096 (name "python-cairocffi")
6097 (version "1.2.0")
6098 (source
6099 (origin
6100 ;; The PyPI archive does not include the documentation, so use Git.
6101 (method git-fetch)
6102 (uri (git-reference
6103 (url "https://github.com/Kozea/cairocffi")
6104 (commit (string-append "v" version))))
6105 (file-name (git-file-name name version))
6106 (sha256
6107 (base32
6108 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6109 (build-system python-build-system)
6110 (outputs '("out" "doc"))
6111 (inputs
6112 `(("glib" ,glib)
6113 ("gtk+" ,gtk+)
6114 ("gdk-pixbuf" ,gdk-pixbuf)
6115 ("cairo" ,cairo)))
6116 (native-inputs
6117 `(("python-numpy" ,python-numpy)
6118 ("python-pytest" ,python-pytest)
6119 ("python-pytest-cov" ,python-pytest-cov)
6120 ("python-pytest-runner" ,python-pytest-runner)
6121 ("python-sphinx" ,python-sphinx)
6122 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6123 (propagated-inputs
6124 `(("python-xcffib" ,python-xcffib))) ; used at run time
6125 (arguments
6126 `(#:phases
6127 (modify-phases %standard-phases
6128 (add-after 'unpack 'patch-paths
6129 (lambda* (#:key inputs #:allow-other-keys)
6130 (substitute* "cairocffi/__init__.py"
6131 ;; Hack the dynamic library loading mechanism.
6132 (("find_library\\(library_name\\)")
6133 "\"found\"")
6134 (("filenames = \\(library_filename,\\) \\+ filenames")
6135 "pass")
6136 (("libcairo.so.2")
6137 (string-append (assoc-ref inputs "cairo")
6138 "/lib/libcairo.so.2")))
6139 (substitute* "cairocffi/pixbuf.py"
6140 (("libgdk_pixbuf-2.0.so.0")
6141 (string-append (assoc-ref inputs "gdk-pixbuf")
6142 "/lib/libgdk_pixbuf-2.0.so.0"))
6143 (("libgobject-2.0.so.0")
6144 (string-append (assoc-ref inputs "glib")
6145 "/lib/libgobject-2.0.so.0"))
6146 (("libglib-2.0.so.0")
6147 (string-append (assoc-ref inputs "glib")
6148 "/lib/libglib-2.0.so.0"))
6149 (("libgdk-3.so.0")
6150 (string-append (assoc-ref inputs "gtk+")
6151 "/lib/libgdk-3.so.0")))
6152 #t))
6153 (add-after 'unpack 'disable-linters
6154 ;; Their check fails; none of our business.
6155 (lambda _
6156 (substitute* "setup.cfg"
6157 ((".*pytest-flake8.*") "")
6158 ((".*pytest-isort.*") "")
6159 (("--flake8") "")
6160 (("--isort") ""))
6161 #t))
6162 (add-after 'install 'install-doc
6163 (lambda* (#:key inputs outputs #:allow-other-keys)
6164 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6165 (doc (string-append data "/doc/" ,name "-" ,version))
6166 (html (string-append doc "/html")))
6167 (setenv "LD_LIBRARY_PATH"
6168 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6169 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6170 (setenv "LANG" "en_US.UTF-8")
6171 (mkdir-p html)
6172 (for-each (lambda (file)
6173 (copy-file (string-append "." file)
6174 (string-append doc file)))
6175 '("/README.rst" "/NEWS.rst"))
6176 (system* "python" "setup.py" "build_sphinx")
6177 (copy-recursively "docs/_build/html" html)
6178 #t))))))
6179 (home-page "https://github.com/Kozea/cairocffi")
6180 (synopsis "Python bindings and object-oriented API for Cairo")
6181 (description
6182 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6183 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6184 graphics library with support for multiple backends including image buffers,
6185 PNG, PostScript, PDF, and SVG file output.")
6186 (license license:bsd-3)))
6187
6188 (define-public python2-cairocffi
6189 (package-with-python2 python-cairocffi))
6190
6191 (define-public python-decorator
6192 (package
6193 (name "python-decorator")
6194 (version "4.3.0")
6195 (source
6196 (origin
6197 (method url-fetch)
6198 (uri (pypi-uri "decorator" version))
6199 (sha256
6200 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6201 (build-system python-build-system)
6202 (home-page "https://pypi.org/project/decorator/")
6203 (synopsis "Python module to simplify usage of decorators")
6204 (description
6205 "The aim of the decorator module is to simplify the usage of decorators
6206 for the average programmer, and to popularize decorators usage giving examples
6207 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6208 etc. The core of this module is a decorator factory.")
6209 (license license:expat)))
6210
6211 (define-public python2-decorator
6212 (package-with-python2 python-decorator))
6213
6214 (define-public python-drmaa
6215 (package
6216 (name "python-drmaa")
6217 (version "0.7.7")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (pypi-uri "drmaa" version))
6222 (sha256
6223 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6224 (build-system python-build-system)
6225 ;; The test suite requires libdrmaa which is provided by the cluster
6226 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6227 ;; should be set to the path of the libdrmaa library.
6228 (arguments '(#:tests? #f))
6229 (native-inputs
6230 `(("python-nose" ,python-nose)))
6231 (home-page "https://pypi.org/project/drmaa/")
6232 (synopsis "Python bindings for the DRMAA library")
6233 (description
6234 "A Python package for Distributed Resource Management (DRM) job
6235 submission and control. This package is an implementation of the DRMAA 1.0
6236 Python language binding specification.")
6237 (license license:bsd-3)))
6238
6239 (define-public python2-drmaa
6240 (package-with-python2 python-drmaa))
6241
6242 (define-public python-grako
6243 (package
6244 (name "python-grako")
6245 (version "3.99.9")
6246 (source
6247 (origin
6248 (method url-fetch)
6249 (uri
6250 (pypi-uri "grako" version ".zip"))
6251 (sha256
6252 (base32
6253 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6254 (build-system python-build-system)
6255 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6256 (native-inputs
6257 `(("unzip" ,unzip)
6258 ("python-pytest" ,python-pytest)
6259 ("python-pytest-runner" ,python-pytest-runner)))
6260 (home-page "https://bitbucket.org/neogeny/grako")
6261 (synopsis "EBNF parser generator")
6262 (description
6263 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6264 memoizing PEG/Packrat parser in Python.")
6265 (license license:bsd-3)))
6266
6267 (define-public python2-grako
6268 (package-with-python2 python-grako))
6269
6270 (define-public python-grandalf
6271 (package
6272 (name "python-grandalf")
6273 (version "0.7")
6274 (source
6275 (origin
6276 ;; There's no source tarball on PyPI.
6277 (method git-fetch)
6278 (uri (git-reference
6279 (url "https://github.com/bdcht/grandalf")
6280 (commit (string-append "v" version))))
6281 (file-name (git-file-name name version))
6282 (sha256
6283 (base32
6284 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6285 (build-system python-build-system)
6286 (arguments
6287 '(#:phases
6288 (modify-phases %standard-phases
6289 (replace 'check
6290 (lambda _
6291 (invoke "python" "setup.py" "pytest"))))))
6292 (native-inputs
6293 `(("python-pytest" ,python-pytest)
6294 ("python-pytest-runner" ,python-pytest-runner)))
6295 (propagated-inputs
6296 `(("python-numpy" ,python-numpy)
6297 ("python-ply" ,python-ply)))
6298 (home-page "https://github.com/bdcht/grandalf")
6299 (synopsis "Graph and drawing algorithms framework")
6300 (description
6301 "Grandalf is a Python package made for experimentations with graphs
6302 drawing algorithms. It is written in pure Python, and currently implements
6303 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6304 minimization approach. While not as fast or featured as graphviz or other
6305 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6306 than thousands of nodes, while keeping the source code simple enough to tweak
6307 and hack any part of it for experimental purpose. With a total of about 1500
6308 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6309 in less than 600 lines. The energy minimization approach is comprised of only
6310 250 lines!
6311
6312 Grandalf does only 2 not-so-simple things:
6313 @itemize
6314 @item computing the nodes (x,y) coordinates (based on provided nodes
6315 dimensions, and a chosen layout)
6316 @item routing the edges with lines or nurbs
6317 @end itemize
6318
6319 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6320 will help you find where to draw things like nodes and edges, but it’s up to
6321 you to actually draw things with your favorite toolkit.")
6322 ;; The user can choose either license.
6323 (license (list license:gpl2 license:epl1.0))))
6324
6325 (define-public python-gridmap
6326 (package
6327 (name "python-gridmap")
6328 (version "0.14.0")
6329 (source
6330 (origin
6331 (method git-fetch)
6332 (uri (git-reference
6333 (url "https://github.com/pygridtools/gridmap")
6334 (commit (string-append "v" version))))
6335 (file-name (git-file-name name version))
6336 (sha256
6337 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6338 (build-system python-build-system)
6339 (arguments
6340 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6341 (propagated-inputs
6342 `(("python-psutil" ,python-psutil)
6343 ("python-drmaa" ,python-drmaa)
6344 ("python-pyzmq" ,python-pyzmq)))
6345 (home-page "https://github.com/pygridtools/gridmap")
6346 (synopsis "Create jobs on a cluster directly from Python")
6347 (description
6348 "Gridmap is a Python package to allow you to easily create jobs on the
6349 cluster directly from Python. You can directly map Python functions onto the
6350 cluster without needing to write any wrapper code yourself.")
6351 (license license:gpl3+)))
6352
6353 (define-public python2-gridmap
6354 (package-with-python2 python-gridmap))
6355
6356 (define-public python-honcho
6357 (package
6358 (name "python-honcho")
6359 (version "1.0.1")
6360 (source
6361 (origin
6362 (method git-fetch)
6363 (uri (git-reference
6364 (url "https://github.com/nickstenning/honcho")
6365 (commit (string-append "v" version))))
6366 (file-name (git-file-name name version))
6367 (sha256
6368 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6369 (build-system python-build-system)
6370 (native-inputs
6371 `(("python-pytest" ,python-pytest)
6372 ("python-mock" ,python-mock)
6373 ("python-tox" ,python-tox)
6374 ("which" ,which))) ;for tests
6375 (propagated-inputs
6376 `(("python-jinja2" ,python-jinja2)))
6377 (arguments
6378 `(#:phases
6379 (modify-phases %standard-phases
6380 (delete 'check)
6381 (add-after 'install 'check
6382 (lambda* (#:key outputs inputs #:allow-other-keys)
6383 ;; fix honcho path in testsuite
6384 (substitute* "tests/conftest.py"
6385 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6386 "/bin/honcho" "'")))
6387 ;; It's easier to run tests after install.
6388 ;; Make installed package available for running the tests
6389 (add-installed-pythonpath inputs outputs)
6390 (invoke "py.test" "-v"))))))
6391 (home-page "https://github.com/nickstenning/honcho")
6392 (synopsis "Manage Procfile-based applications")
6393 (description
6394 "A Procfile is a file which describes how to run an application
6395 consisting of several processes. honcho starts all listed processes.
6396 The output of all running processes is collected by honcho and
6397 displayed.")
6398 (license license:expat)))
6399
6400 (define-public python2-honcho
6401 (package-with-python2 python-honcho))
6402
6403 (define-public python-pexpect
6404 (package
6405 (name "python-pexpect")
6406 (version "4.8.0")
6407 (source
6408 (origin
6409 (method url-fetch)
6410 (uri (pypi-uri "pexpect" version))
6411 (sha256
6412 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6413 (build-system python-build-system)
6414 (arguments
6415 `(#:phases
6416 (modify-phases %standard-phases
6417 (add-before 'check 'prepare-tests
6418 (lambda _
6419 (substitute* (find-files "tests")
6420 (("/bin/ls") (which "ls"))
6421 (("/bin/echo") (which "echo"))
6422 (("/bin/which") (which "which"))
6423 ;; Many tests try to use the /bin directory which
6424 ;; is not present in the build environment.
6425 ;; Use one that's non-empty and unlikely to change.
6426 (("/bin'") "/dev'")
6427 ;; Disable failing test. See upstream bug report
6428 ;; https://github.com/pexpect/pexpect/issues/568
6429 (("def test_bash") "def _test_bash"))
6430 ;; XXX: Socket connection test gets "Connection reset by peer".
6431 ;; Why does it not work? Delete for now.
6432 (delete-file "tests/test_socket.py")
6433 #t))
6434 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6435 (native-inputs
6436 `(("python-nose" ,python-nose)
6437 ("python-pytest" ,python-pytest)
6438 ("man-db" ,man-db)
6439 ("which" ,which)
6440 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6441 (propagated-inputs
6442 `(("python-ptyprocess" ,python-ptyprocess)))
6443 (home-page "http://pexpect.readthedocs.org/")
6444 (synopsis "Controlling interactive console applications")
6445 (description
6446 "Pexpect is a pure Python module for spawning child applications;
6447 controlling them; and responding to expected patterns in their output.
6448 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6449 child application and control it as if a human were typing commands.")
6450 (license license:isc)))
6451
6452 (define-public python2-pexpect
6453 (package-with-python2 python-pexpect))
6454
6455 (define-public python-setuptools-scm
6456 (package
6457 (name "python-setuptools-scm")
6458 (version "3.4.3")
6459 (source (origin
6460 (method url-fetch)
6461 (uri (pypi-uri "setuptools_scm" version))
6462 (sha256
6463 (base32
6464 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6465 (build-system python-build-system)
6466 (home-page "https://github.com/pypa/setuptools_scm/")
6467 (synopsis "Manage Python package versions in SCM metadata")
6468 (description
6469 "Setuptools_scm handles managing your Python package versions in
6470 @dfn{software configuration management} (SCM) metadata instead of declaring
6471 them as the version argument or in a SCM managed file.")
6472 (license license:expat)))
6473
6474 (define-public python2-setuptools-scm
6475 (package-with-python2 python-setuptools-scm))
6476
6477 (define-public python-sexpdata
6478 (package
6479 (name "python-sexpdata")
6480 (version "0.0.3")
6481 (source
6482 (origin
6483 (method url-fetch)
6484 (uri (pypi-uri "sexpdata" version))
6485 (sha256
6486 (base32
6487 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6488 (build-system python-build-system)
6489 (home-page "https://github.com/jd-boyd/sexpdata")
6490 (synopsis "S-expression parser for Python")
6491 (description
6492 "Sexpdata is an S-expression parser/serializer. It has load and dump
6493 functions like pickle, json or PyYAML module.")
6494 (license license:bsd-3)))
6495
6496 (define-public python-pathlib2
6497 (package
6498 (name "python-pathlib2")
6499 (version "2.3.3")
6500 (source
6501 (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "pathlib2" version))
6504 (sha256
6505 (base32
6506 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6507 (build-system python-build-system)
6508 (propagated-inputs
6509 `(("python-scandir" ,python-scandir)
6510 ("python-six" ,python-six)))
6511 (home-page "https://pypi.org/project/pathlib2/")
6512 (synopsis "Object-oriented file system paths")
6513 (description "The goal of pathlib2 is to provide a backport of the
6514 standard @code{pathlib} module which tracks the standard library module, so
6515 all the newest features of the standard @code{pathlib} can be used also on
6516 older Python versions.")
6517 (license license:expat)))
6518
6519 (define-public python-importlib-resources
6520 (package
6521 (name "python-importlib-resources")
6522 (version "3.0.0")
6523 (source
6524 (origin
6525 (method url-fetch)
6526 (uri (pypi-uri "importlib_resources" version))
6527 (sha256
6528 (base32
6529 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6530 (build-system python-build-system)
6531 (native-inputs
6532 `(("python-setuptools-scm" ,python-setuptools-scm)
6533 ("python-toml" ,python-toml)))
6534 (home-page "http://importlib-resources.readthedocs.io/")
6535 (synopsis "Read resources from Python packages")
6536 (description
6537 "@code{importlib_resources} is a backport of Python 3's standard library
6538 @code{importlib.resources} module for Python 2.7, and Python 3.")
6539 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6540 (license license:asl2.0)))
6541
6542 (define-public python2-importlib-resources
6543 (package
6544 (name "python2-importlib-resources")
6545 (version "1.0.2")
6546 (source (origin
6547 (method url-fetch)
6548 (uri (pypi-uri "importlib_resources" version))
6549 (sha256
6550 (base32
6551 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6552 (build-system python-build-system)
6553 (arguments
6554 `(#:python ,python-2
6555 #:phases (modify-phases %standard-phases
6556 ;; The build system tests for python-wheel, but it is
6557 ;; not required for Guix nor the test suite. Just drop
6558 ;; it to make bootstrapping pytest easier.
6559 (add-after 'unpack 'drop-wheel-dependency
6560 (lambda _
6561 (substitute* "setup.cfg"
6562 (("^[[:blank:]]+wheel")
6563 ""))
6564 #t)))))
6565 (propagated-inputs
6566 `(("python-pathlib2" ,python2-pathlib2)
6567 ("python-typing" ,python2-typing)))
6568 (home-page "https://gitlab.com/python-devs/importlib_resources")
6569 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6570 (description
6571 "This package provides an implementation of @code{importlib.resources}
6572 for older versions of Python.")
6573 (license license:asl2.0)))
6574
6575 ;; For importlib-metadata-bootstrap below.
6576 (define-public python2-importlib-resources-bootstrap
6577 (hidden-package
6578 (package/inherit
6579 python2-importlib-resources
6580 (name "python2-importlib-resources-bootstrap")
6581 (propagated-inputs
6582 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6583 ("python-typing" ,python2-typing))))))
6584
6585 (define-public python-importlib-metadata
6586 (package
6587 (name "python-importlib-metadata")
6588 (version "1.5.0")
6589 (source
6590 (origin
6591 (method url-fetch)
6592 (uri (pypi-uri "importlib_metadata" version))
6593 (sha256
6594 (base32
6595 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6596 (build-system python-build-system)
6597 (propagated-inputs
6598 `(("python-zipp" ,python-zipp)))
6599 (native-inputs
6600 `(("python-setuptools-scm" ,python-setuptools-scm)
6601 ("python-pyfakefs" ,python-pyfakefs)
6602 ("python-packaging" ,python-packaging)))
6603 (home-page "https://importlib-metadata.readthedocs.io/")
6604 (synopsis "Read metadata from Python packages")
6605 (description
6606 "@code{importlib_metadata} is a library which provides an API for
6607 accessing an installed Python package's metadata, such as its entry points or
6608 its top-level name. This functionality intends to replace most uses of
6609 @code{pkg_resources} entry point API and metadata API. Along with
6610 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6611 need to use the older and less efficient @code{pkg_resources} package.")
6612 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6613 (license license:asl2.0)))
6614
6615 (define-public python2-importlib-metadata
6616 (let ((base (package-with-python2 (strip-python2-variant
6617 python-importlib-metadata))))
6618 (package/inherit
6619 base
6620 (name "python2-importlib-metadata")
6621 (native-inputs
6622 `(("python-setuptools-scm" ,python2-setuptools-scm)
6623 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6624 ("python-packaging" ,python2-packaging-bootstrap)))
6625 (propagated-inputs
6626 `(("python-configparser" ,python2-configparser)
6627 ("python-contextlib2" ,python2-contextlib2)
6628 ("python-importlib-resources" ,python2-importlib-resources)
6629 ("python-pathlib2" ,python2-pathlib2)
6630 ,@(package-propagated-inputs base))))))
6631
6632 ;; This package is used by python2-pytest, and thus must not depend on it.
6633 (define-public python2-importlib-metadata-bootstrap
6634 (hidden-package
6635 (package/inherit
6636 python2-importlib-metadata
6637 (name "python2-importlib-metadata-bootstrap")
6638 (arguments
6639 `(#:tests? #f
6640 ,@(package-arguments python2-importlib-metadata)))
6641 (propagated-inputs
6642 `(("python-zipp" ,python2-zipp-bootstrap)
6643 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6644 ("python-configparser" ,python2-configparser)
6645 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6646 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6647
6648 (define-public python-importmagic
6649 (package
6650 (name "python-importmagic")
6651 (version "0.1.7")
6652 (source
6653 (origin
6654 (method url-fetch)
6655 (uri (pypi-uri "importmagic" version))
6656 (sha256
6657 (base32
6658 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6659 (build-system python-build-system)
6660 (home-page "https://github.com/alecthomas/importmagic")
6661 (synopsis "Library for adding, removing and managing Python imports")
6662 (description
6663 "Importmagic is a Python library for automatically managing imports by
6664 finding unresolved symbols in Python code and their corresponding imports.")
6665 (license license:bsd-3)))
6666
6667 (define-public python-jaraco-packaging
6668 (package
6669 (name "python-jaraco-packaging")
6670 (version "6.1")
6671 (source
6672 (origin
6673 (method url-fetch)
6674 (uri (pypi-uri "jaraco.packaging" version))
6675 (sha256
6676 (base32
6677 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6678 (build-system python-build-system)
6679 (propagated-inputs
6680 `(("python-pytest" ,python-pytest)
6681 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6682 ("python-pytest-flake8" ,python-pytest-flake8)
6683 ("python-rst.linker" ,python-rst.linker)
6684 ("python-setuptools" ,python-setuptools)
6685 ("python-setuptools-scm" ,python-setuptools-scm)
6686 ("python-six" ,python-six)
6687 ("python-sphinx" ,python-sphinx)))
6688 (home-page "https://github.com/jaraco/jaraco.packaging")
6689 (synopsis "Tools to supplement packaging Python releases")
6690 (description
6691 "This package provides various tools to supplement packaging Python
6692 releases.")
6693 (license license:expat)))
6694
6695 (define-public python-pathpy
6696 (package
6697 (name "python-pathpy")
6698 (version "11.5.1")
6699 (source
6700 (origin
6701 (method url-fetch)
6702 (uri (pypi-uri "path.py" version))
6703 (sha256
6704 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6705 (outputs '("out" "doc"))
6706 (build-system python-build-system)
6707 (propagated-inputs
6708 `(("python-appdirs" ,python-appdirs)
6709 ("python-importlib-metadata" ,python-importlib-metadata)))
6710 (native-inputs
6711 `(("python-setuptools-scm" ,python-setuptools-scm)
6712 ("python-sphinx" ,python-sphinx)
6713 ("python-rst.linker" ,python-rst.linker)
6714 ("python-pytest" ,python-pytest)
6715 ("python-pytest-runner" ,python-pytest-runner)
6716 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6717 (arguments
6718 `(#:phases
6719 (modify-phases %standard-phases
6720 (add-after 'build 'build-doc
6721 (lambda _
6722 (setenv "LANG" "en_US.UTF-8")
6723 (invoke "python" "setup.py" "build_sphinx")))
6724 (add-after 'install 'install-doc
6725 (lambda* (#:key outputs #:allow-other-keys)
6726 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6727 (doc (string-append data "/doc/" ,name "-" ,version))
6728 (html (string-append doc "/html")))
6729 (mkdir-p html)
6730 (for-each (lambda (file)
6731 (copy-file file (string-append doc "/" file)))
6732 '("README.rst" "CHANGES.rst"))
6733 (copy-recursively "build/sphinx/html" html)
6734 #t)))
6735 (replace 'check
6736 (lambda _
6737 ;; The import time test aborts if an import takes longer than
6738 ;; 100ms. It may very well take a little longer than that.
6739 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6740 (home-page "https://github.com/jaraco/path.py")
6741 (synopsis "Python module wrapper for built-in os.path")
6742 (description
6743 "@code{path.py} implements path objects as first-class entities, allowing
6744 common operations on files to be invoked on those path objects directly.")
6745 (license license:expat)))
6746
6747 (define-public python2-pathpy
6748 (package-with-python2 python-pathpy))
6749
6750 (define-public python-simplegeneric
6751 (package
6752 (name "python-simplegeneric")
6753 (version "0.8.1")
6754 (source
6755 (origin
6756 (method url-fetch)
6757 (uri (pypi-uri "simplegeneric" version ".zip"))
6758 (sha256
6759 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6760 (build-system python-build-system)
6761 (native-inputs
6762 `(("unzip" ,unzip)))
6763 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6764 (synopsis "Python module for simple generic functions")
6765 (description
6766 "The simplegeneric module lets you define simple single-dispatch generic
6767 functions, akin to Python’s built-in generic functions like @code{len()},
6768 @code{iter()} and so on. However, instead of using specially-named methods,
6769 these generic functions use simple lookup tables, akin to those used by
6770 e.g. @code{pickle.dump()} and other generic functions found in the Python
6771 standard library.")
6772 (license license:zpl2.1)))
6773
6774 (define-public python2-simplegeneric
6775 (package-with-python2 python-simplegeneric))
6776
6777 (define-public python-ipython-genutils
6778 ;; TODO: This package is retired, check if can be removed, see description.
6779 (package
6780 (name "python-ipython-genutils")
6781 (version "0.1.0")
6782 (source
6783 (origin
6784 (method url-fetch)
6785 (uri (pypi-uri "ipython_genutils" version))
6786 (sha256
6787 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6788 (build-system python-build-system)
6789 (arguments `(#:tests? #f)) ; no tests
6790 (home-page "https://ipython.org")
6791 (synopsis "Vestigial utilities from IPython")
6792 (description
6793 "This package provides retired utilities from IPython. No packages
6794 outside IPython/Jupyter should depend on it.
6795
6796 This package shouldn't exist. It contains some common utilities shared by
6797 Jupyter and IPython projects during The Big Split. As soon as possible, those
6798 packages will remove their dependency on this, and this package will go
6799 away.")
6800 (license license:bsd-3)))
6801
6802 (define-public python2-ipython-genutils
6803 (package-with-python2 python-ipython-genutils))
6804
6805 (define-public python-ipyparallel
6806 (package
6807 (name "python-ipyparallel")
6808 (version "6.2.4")
6809 (source
6810 (origin
6811 (method url-fetch)
6812 (uri (pypi-uri "ipyparallel" version))
6813 (sha256
6814 (base32
6815 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6816 (build-system python-build-system)
6817 (arguments
6818 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6819 #:phases
6820 (modify-phases %standard-phases
6821 (add-before 'check 'prepare-for-tests
6822 (lambda _
6823 (setenv "HOME" (getcwd))
6824 #t)))))
6825 (propagated-inputs
6826 `(("python-dateutil" ,python-dateutil)
6827 ("python-decorator" ,python-decorator)
6828 ("python-ipykernel" ,python-ipykernel)
6829 ("python-ipython" ,python-ipython)
6830 ("python-ipython-genutils" ,python-ipython-genutils)
6831 ("python-jupyter-client" ,python-jupyter-client)
6832 ("python-pyzmq" ,python-pyzmq)
6833 ("python-tornado" ,python-tornado)
6834 ("python-traitlets" ,python-traitlets)))
6835 (native-inputs
6836 `(("python-ipython" ,python-ipython)
6837 ("python-mock" ,python-mock)
6838 ("python-nose" ,python-nose)
6839 ("python-pytest" ,python-pytest)
6840 ("python-pytest-cov" ,python-pytest-cov)
6841 ("python-testpath" ,python-testpath)))
6842 (home-page "https://ipython.org/")
6843 (synopsis "Interactive Parallel Computing with IPython")
6844 (description
6845 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6846 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6847 CLI scripts:
6848 @enumerate
6849 @item ipcluster - start/stop a cluster
6850 @item ipcontroller - start a scheduler
6851 @item ipengine - start an engine
6852 @end enumerate")
6853 (license license:bsd-3)))
6854
6855 (define-public python2-ipyparallel
6856 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6857 (package
6858 (inherit ipyparallel)
6859 (propagated-inputs
6860 `(("python2-futures" ,python2-futures)
6861 ,@(package-propagated-inputs ipyparallel))))))
6862
6863 (define-public python-ipython-cluster-helper
6864 (package
6865 (name "python-ipython-cluster-helper")
6866 (version "0.6.4")
6867 (source
6868 (origin
6869 (method url-fetch)
6870 (uri (pypi-uri "ipython-cluster-helper" version))
6871 (sha256
6872 (base32
6873 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6874 (modules '((guix build utils)))
6875 (snippet
6876 '(begin (substitute* "requirements.txt"
6877 (("ipython.*") "ipython\n"))
6878 #t))))
6879 (build-system python-build-system)
6880 (arguments
6881 `(#:tests? #f ; Test suite can't find IPython.
6882 #:phases
6883 (modify-phases %standard-phases
6884 (replace 'check
6885 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6886 (if tests?
6887 (begin
6888 (setenv "HOME" (getcwd))
6889 (add-installed-pythonpath inputs outputs)
6890 (invoke "python" "example/example.py" "--local"))
6891 #t))))))
6892 (propagated-inputs
6893 `(("python-ipyparallel" ,python-ipyparallel)
6894 ("python-ipython" ,python-ipython)
6895 ("python-netifaces" ,python-netifaces)
6896 ("python-pyzmq" ,python-pyzmq)
6897 ("python-setuptools" ,python-setuptools)
6898 ("python-six" ,python-six)))
6899 (home-page "https://github.com/roryk/ipython-cluster-helper")
6900 (synopsis
6901 "Simplify IPython cluster start up and use for multiple schedulers")
6902 (description
6903 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6904 profile, launches a cluster and returns a view. On program exit it shuts the
6905 cluster down and deletes the throwaway profile.")
6906 (license license:expat)))
6907
6908 (define-public python2-ipython-cluster-helper
6909 (package-with-python2 python-ipython-cluster-helper))
6910
6911 (define-public python-traitlets
6912 (package
6913 (name "python-traitlets")
6914 (version "4.3.3")
6915 (source
6916 (origin
6917 (method url-fetch)
6918 (uri (pypi-uri "traitlets" version))
6919 (sha256
6920 (base32
6921 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6922 (build-system python-build-system)
6923 (arguments
6924 `(#:phases
6925 (modify-phases %standard-phases
6926 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6927 (propagated-inputs
6928 `(("python-ipython-genutils" ,python-ipython-genutils)
6929 ("python-decorator" ,python-decorator)))
6930 (native-inputs
6931 `(("python-pytest" ,python-pytest)))
6932 (properties `((python2-variant . ,(delay python2-traitlets))))
6933 (home-page "https://ipython.org")
6934 (synopsis "Configuration system for Python applications")
6935 (description
6936 "Traitlets is a framework that lets Python classes have attributes with
6937 type checking, dynamically calculated default values, and ‘on change’
6938 callbacks. The package also includes a mechanism to use traitlets for
6939 configuration, loading values from files or from command line arguments. This
6940 is a distinct layer on top of traitlets, so you can use traitlets in your code
6941 without using the configuration machinery.")
6942 (license license:bsd-3)))
6943
6944 (define-public python2-traitlets
6945 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6946 (package
6947 (inherit traitlets)
6948 (propagated-inputs
6949 `(("python2-enum34" ,python2-enum34)
6950 ,@(package-propagated-inputs traitlets))))))
6951
6952 (define-public python-jupyter-core
6953 (package
6954 (name "python-jupyter-core")
6955 (version "4.4.0")
6956 (source
6957 (origin
6958 (method url-fetch)
6959 (uri (string-append (pypi-uri "jupyter_core" version)))
6960 (sha256
6961 (base32
6962 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6963 (build-system python-build-system)
6964 ;; FIXME: not sure how to run the tests
6965 (arguments `(#:tests? #f))
6966 (propagated-inputs
6967 `(("python-traitlets" ,python-traitlets)))
6968 (home-page "http://jupyter.org/")
6969 (synopsis "Jupyter base package")
6970 (description
6971 "Jupyter core is the base package on which Jupyter projects rely.")
6972 (license license:bsd-3)))
6973
6974 (define-public python2-jupyter-core
6975 (package-with-python2 python-jupyter-core))
6976
6977 (define-public python-jupyter-client
6978 (package
6979 (name "python-jupyter-client")
6980 (version "5.2.4")
6981 (source
6982 (origin
6983 (method url-fetch)
6984 (uri (pypi-uri "jupyter_client" version))
6985 (sha256
6986 (base32
6987 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6988 (build-system python-build-system)
6989 ;; Tests fail because of missing native python kernel which I assume is
6990 ;; provided by the ipython package, which we cannot use because it would
6991 ;; cause a dependency cycle.
6992 (arguments
6993 `(#:tests? #f
6994
6995 #:phases (modify-phases %standard-phases
6996 (add-after 'unpack 'set-tool-file-names
6997 (lambda* (#:key inputs #:allow-other-keys)
6998 (let ((iproute (assoc-ref inputs "iproute")))
6999 (substitute* "jupyter_client/localinterfaces.py"
7000 (("'ip'")
7001 (string-append "'" iproute "/sbin/ip'")))
7002 #t))))))
7003 (inputs
7004 `(("iproute" ,iproute)))
7005 (propagated-inputs
7006 `(("python-pyzmq" ,python-pyzmq)
7007 ("python-traitlets" ,python-traitlets)
7008 ("python-jupyter-core" ,python-jupyter-core)))
7009 (home-page "http://jupyter.org/")
7010 (synopsis "Jupyter protocol implementation and client libraries")
7011 (description
7012 "The @code{jupyter_client} package contains the reference implementation
7013 of the Jupyter protocol. It also provides client and kernel management APIs
7014 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7015 installing @code{kernelspec}s for use with Jupyter frontends.")
7016 (license license:bsd-3)))
7017
7018 (define-public python2-jupyter-client
7019 (package-with-python2 python-jupyter-client))
7020
7021 (define-public python-ipykernel
7022 (package
7023 (name "python-ipykernel")
7024 (version "5.1.3")
7025 (source
7026 (origin
7027 (method url-fetch)
7028 (uri (pypi-uri "ipykernel" version))
7029 (sha256
7030 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7031 (build-system python-build-system)
7032 (arguments
7033 `(#:phases
7034 (modify-phases %standard-phases
7035 (replace 'check
7036 (lambda _
7037 (setenv "HOME" "/tmp")
7038 (invoke "pytest" "-v")
7039 #t))
7040 (add-after 'install 'set-python-file-name
7041 (lambda* (#:key outputs #:allow-other-keys)
7042 ;; Record the absolute file name of the 'python' executable in
7043 ;; 'kernel.json'.
7044 (let ((out (assoc-ref outputs "out")))
7045 (substitute* (string-append out "/share/jupyter"
7046 "/kernels/python3/kernel.json")
7047 (("\"python\"")
7048 (string-append "\"" (which "python") "\"")))
7049 #t))))))
7050 (propagated-inputs
7051 `(("python-ipython" ,python-ipython)
7052 ;; imported at runtime during connect
7053 ("python-jupyter-client" ,python-jupyter-client)))
7054 (native-inputs
7055 `(("python-flaky" ,python-flaky)
7056 ("python-nose" ,python-nose)
7057 ("python-pytest" ,python-pytest)))
7058 (home-page "https://ipython.org")
7059 (synopsis "IPython Kernel for Jupyter")
7060 (description
7061 "This package provides the IPython kernel for Jupyter.")
7062 (properties `((python2-variant . ,(delay python2-ipykernel))))
7063 (license license:bsd-3)))
7064
7065 ;; Version 5.x and above no longer support Python 2.
7066 (define-public python2-ipykernel
7067 (package
7068 (name "python2-ipykernel")
7069 (version "4.10.1")
7070 (source
7071 (origin
7072 (method url-fetch)
7073 (uri (pypi-uri "ipykernel" version))
7074 (sha256
7075 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7076 (build-system python-build-system)
7077 (arguments
7078 `(#:python ,python-2))
7079 (propagated-inputs
7080 `(("python2-ipython" ,python2-ipython)
7081 ;; imported at runtime during connect
7082 ("python2-jupyter-client" ,python2-jupyter-client)
7083 ("python2-tornado" ,python2-tornado)
7084 ("python2-traitlets" ,python2-traitlets)))
7085 (native-inputs
7086 `(("python2-mock" ,python2-mock)
7087 ("python2-nose" ,python2-nose)
7088 ("python2-pytest" ,python2-pytest)
7089 ("python2-pytest-cov" ,python2-pytest-cov)))
7090 (home-page "https://ipython.org")
7091 (synopsis "IPython Kernel for Jupyter")
7092 (description
7093 "This package provides the IPython kernel for Jupyter.")
7094 (license license:bsd-3)))
7095
7096 (define-public python-pari-jupyter
7097 (package
7098 (name "python-pari-jupyter")
7099 (version "1.3.2")
7100 (source
7101 (origin
7102 (method url-fetch)
7103 (uri (pypi-uri "pari_jupyter" version))
7104 (sha256
7105 (base32
7106 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7107 (build-system python-build-system)
7108 (propagated-inputs
7109 `(("python-ipykernel" ,python-ipykernel)))
7110 (inputs
7111 `(("pari-gp" ,pari-gp)
7112 ("readline" ,readline)))
7113 (arguments
7114 `(#:tests? #f)) ; no test suite
7115 (home-page
7116 "https://github.com/jdemeyer/pari_jupyter")
7117 (synopsis "A Jupyter kernel for PARI/GP")
7118 (description "The package provides a PARI/GP kernel for Jupyter.")
7119 (license license:gpl3+)))
7120
7121 (define-public python-backcall
7122 (package
7123 (name "python-backcall")
7124 (version "0.1.0")
7125 (source
7126 (origin
7127 (method url-fetch)
7128 (uri (pypi-uri "backcall" version))
7129 (sha256
7130 (base32
7131 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7132 (build-system python-build-system)
7133 (home-page "https://github.com/takluyver/backcall/")
7134 (synopsis "Specifications for callback functions passed in to an API")
7135 (description
7136 "If your code lets other people supply callback functions, it's important
7137 to specify the function signature you expect, and check that functions support
7138 that. Adding extra parameters later would break other peoples code unless
7139 you're careful. The @code{backcall} package provides a way of specifying the
7140 callback signature using a prototype function.")
7141 (license license:bsd-3)))
7142
7143 (define-public python-ipython
7144 (package
7145 (name "python-ipython")
7146 (version "7.9.0")
7147 (source
7148 (origin
7149 (method url-fetch)
7150 (uri (pypi-uri "ipython" version ".tar.gz"))
7151 (sha256
7152 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7153 (build-system python-build-system)
7154 (propagated-inputs
7155 `(("python-backcall" ,python-backcall)
7156 ("python-pyzmq" ,python-pyzmq)
7157 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7158 ("python-terminado" ,python-terminado)
7159 ("python-matplotlib" ,python-matplotlib)
7160 ("python-numpy" ,python-numpy)
7161 ("python-numpydoc" ,python-numpydoc)
7162 ("python-jedi" ,python-jedi)
7163 ("python-jinja2" ,python-jinja2)
7164 ("python-mistune" ,python-mistune)
7165 ("python-pexpect" ,python-pexpect)
7166 ("python-pickleshare" ,python-pickleshare)
7167 ("python-simplegeneric" ,python-simplegeneric)
7168 ("python-jsonschema" ,python-jsonschema)
7169 ("python-traitlets" ,python-traitlets)
7170 ("python-nbformat" ,python-nbformat)
7171 ("python-pygments" ,python-pygments)))
7172 (inputs
7173 `(("readline" ,readline)
7174 ("which" ,which)))
7175 (native-inputs
7176 `(("graphviz" ,graphviz)
7177 ("pkg-config" ,pkg-config)
7178 ("python-requests" ,python-requests) ;; for tests
7179 ("python-testpath" ,python-testpath)
7180 ("python-nose" ,python-nose)))
7181 (arguments
7182 `(#:phases
7183 (modify-phases %standard-phases
7184 (add-after 'unpack 'make-docs-reproducible
7185 (lambda _
7186 (substitute* "IPython/sphinxext/ipython_directive.py"
7187 ((".*import datetime") "")
7188 ((".*datetime.datetime.now\\(\\)") "")
7189 (("%timeit") "# %timeit"))
7190 #t))
7191 ;; Tests can only be run after the library has been installed and not
7192 ;; within the source directory.
7193 (delete 'check)
7194 (add-after 'install 'check
7195 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7196 (if tests?
7197 (begin
7198 ;; Make installed package available for running the tests
7199 (add-installed-pythonpath inputs outputs)
7200 (setenv "HOME" "/tmp/") ;; required by a test
7201 ;; We only test the core because one of the other tests
7202 ;; tries to import ipykernel.
7203 (invoke "python" "IPython/testing/iptest.py"
7204 "-v" "IPython/core/tests"))
7205 #t)))
7206 (add-before 'check 'fix-tests
7207 (lambda* (#:key inputs #:allow-other-keys)
7208 (substitute* "./IPython/utils/_process_posix.py"
7209 (("/usr/bin/env', 'which") (which "which")))
7210 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7211 (("#!/usr/bin/env python")
7212 (string-append "#!" (which "python"))))
7213 ;; This test introduces a circular dependency on ipykernel
7214 ;; (which depends on ipython).
7215 (delete-file "IPython/core/tests/test_display.py")
7216 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7217 (delete-file "IPython/core/tests/test_interactiveshell.py")
7218 #t)))))
7219 (home-page "https://ipython.org")
7220 (synopsis "IPython is a tool for interactive computing in Python")
7221 (description
7222 "IPython provides a rich architecture for interactive computing with:
7223 Powerful interactive shells, a browser-based notebook, support for interactive
7224 data visualization, embeddable interpreters and tools for parallel
7225 computing.")
7226 (properties `((python2-variant . ,(delay python2-ipython))))
7227 (license license:bsd-3)))
7228
7229 ;; This is the latest release of the LTS version of ipython with support for
7230 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7231 ;; dropped support for Python 2.7.
7232 (define-public python2-ipython
7233 (package
7234 (name "python2-ipython")
7235 (version "5.8.0")
7236 (source
7237 (origin
7238 (method url-fetch)
7239 (uri (pypi-uri "ipython" version ".tar.gz"))
7240 (sha256
7241 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7242 (build-system python-build-system)
7243 (propagated-inputs
7244 `(("python2-backports-shutil-get-terminal-size"
7245 ,python2-backports-shutil-get-terminal-size)
7246 ("python2-pathlib2" ,python2-pathlib2)
7247 ("python2-pyzmq" ,python2-pyzmq)
7248 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7249 ("python2-terminado" ,python2-terminado)
7250 ("python2-matplotlib" ,python2-matplotlib)
7251 ("python2-numpy" ,python2-numpy)
7252 ("python2-numpydoc" ,python2-numpydoc)
7253 ("python2-jinja2" ,python2-jinja2)
7254 ("python2-mistune" ,python2-mistune)
7255 ("python2-pexpect" ,python2-pexpect)
7256 ("python2-pickleshare" ,python2-pickleshare)
7257 ("python2-simplegeneric" ,python2-simplegeneric)
7258 ("python2-jsonschema" ,python2-jsonschema)
7259 ("python2-traitlets" ,python2-traitlets)
7260 ("python2-nbformat" ,python2-nbformat)
7261 ("python2-pygments" ,python2-pygments)))
7262 (inputs
7263 `(("readline" ,readline)
7264 ("which" ,which)))
7265 (native-inputs
7266 `(("graphviz" ,graphviz)
7267 ("pkg-config" ,pkg-config)
7268 ("python2-requests" ,python2-requests) ;; for tests
7269 ("python2-testpath" ,python2-testpath)
7270 ("python2-mock" ,python2-mock)
7271 ("python2-nose" ,python2-nose)))
7272 (arguments
7273 `(#:python ,python-2
7274 #:phases
7275 (modify-phases %standard-phases
7276 (add-before 'check 'delete-broken-tests
7277 (lambda* (#:key inputs #:allow-other-keys)
7278 ;; These tests throw errors for unknown reasons.
7279 (delete-file "IPython/core/tests/test_displayhook.py")
7280 (delete-file "IPython/core/tests/test_magic_terminal.py")
7281 (delete-file "IPython/core/tests/test_profile.py")
7282 #t)))))
7283 (home-page "https://ipython.org")
7284 (synopsis "IPython is a tool for interactive computing in Python")
7285 (description
7286 "IPython provides a rich architecture for interactive computing with:
7287 Powerful interactive shells, a browser-based notebook, support for interactive
7288 data visualization, embeddable interpreters and tools for parallel
7289 computing.")
7290 (license license:bsd-3)))
7291
7292 (define-public python-ipython-documentation
7293 (package
7294 (inherit python-ipython)
7295 (name "python-ipython-documentation")
7296 (version (package-version python-ipython))
7297 (arguments
7298 `(#:phases
7299 (modify-phases %standard-phases
7300 (delete 'build)
7301 (delete 'check)
7302 (replace 'install
7303 (lambda* (#:key outputs #:allow-other-keys)
7304 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7305 (doc (string-append data "/doc/" ,name "-" ,version))
7306 (html (string-append doc "/html"))
7307 (man1 (string-append data "/man/man1"))
7308 (info (string-append data "/info"))
7309 (examples (string-append doc "/examples"))
7310 (python-arg (string-append "PYTHON=" (which "python"))))
7311 (setenv "LANG" "en_US.utf8")
7312 (with-directory-excursion "docs"
7313 ;; FIXME: pdf fails to build
7314 ;;(system* "make" "pdf" "PAPER=a4")
7315 (system* "make" python-arg "html")
7316 ;; FIXME: the generated texi file contains ^@^@, which trips
7317 ;; up the parser.
7318 ;; (system* "make" python-arg "info")
7319 )
7320 (copy-recursively "docs/man" man1)
7321 (copy-recursively "examples" examples)
7322 (copy-recursively "docs/build/html" html)
7323 ;; (copy-file "docs/build/latex/ipython.pdf"
7324 ;; (string-append doc "/ipython.pdf"))
7325 (mkdir-p info)
7326 ;; (copy-file "docs/build/texinfo/ipython.info"
7327 ;; (string-append info "/ipython.info"))
7328 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7329 #t)))))
7330 (inputs
7331 `(("python-ipython" ,python-ipython)
7332 ("python-ipykernel" ,python-ipykernel)))
7333 (native-inputs
7334 `(("python-sphinx" ,python-sphinx)
7335 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7336 ;; FIXME: It's possible that a smaller union would work just as well.
7337 ("texlive" ,(texlive-union (list texlive-amsfonts
7338 texlive-fonts-ec
7339 texlive-generic-ifxetex
7340 texlive-generic-pdftex
7341 texlive-latex-capt-of
7342 texlive-latex-cmap
7343 texlive-latex-environ
7344 texlive-latex-eqparbox
7345 texlive-latex-etoolbox
7346 texlive-latex-expdlist
7347 texlive-latex-fancyhdr
7348 texlive-latex-fancyvrb
7349 texlive-latex-fncychap
7350 texlive-latex-float
7351 texlive-latex-framed
7352 texlive-latex-geometry
7353 texlive-latex-graphics
7354 texlive-latex-hyperref
7355 texlive-latex-mdwtools
7356 texlive-latex-multirow
7357 texlive-latex-needspace
7358 texlive-latex-oberdiek
7359 texlive-latex-parskip
7360 texlive-latex-preview
7361 texlive-latex-tabulary
7362 texlive-latex-threeparttable
7363 texlive-latex-titlesec
7364 texlive-latex-trimspaces
7365 texlive-latex-ucs
7366 texlive-latex-upquote
7367 texlive-latex-url
7368 texlive-latex-varwidth
7369 texlive-latex-wrapfig)))
7370 ("texinfo" ,texinfo)))))
7371
7372 (define-public python-urwid
7373 (package
7374 (name "python-urwid")
7375 (version "2.1.0")
7376 (source
7377 (origin
7378 (method url-fetch)
7379 (uri (pypi-uri "urwid" version))
7380 (sha256
7381 (base32
7382 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7383 (build-system python-build-system)
7384 (home-page "http://urwid.org")
7385 (synopsis "Console user interface library for Python")
7386 (description
7387 "Urwid is a curses-based UI/widget library for Python. It includes many
7388 features useful for text console applications.")
7389 (license license:lgpl2.1+)))
7390
7391 (define-public python2-urwid
7392 (package-with-python2 python-urwid))
7393
7394 (define-public python-urwidtrees
7395 (package
7396 (name "python-urwidtrees")
7397 (version "1.0.2")
7398 (source
7399 (origin
7400 (method git-fetch)
7401 ;; package author intends on distributing via github rather than pypi:
7402 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7403 (uri (git-reference
7404 (url "https://github.com/pazz/urwidtrees")
7405 (commit version)))
7406 (file-name (git-file-name name version))
7407 (sha256
7408 (base32
7409 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7410 (build-system python-build-system)
7411 (arguments
7412 '(#:use-setuptools? #f
7413 #:tests? #f)) ; no tests
7414 (propagated-inputs `(("python-urwid" ,python-urwid)))
7415 (home-page "https://github.com/pazz/urwidtrees")
7416 (synopsis "Tree widgets for urwid")
7417 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7418 toolkit. Use it to build trees of widgets.")
7419 (license license:gpl3+)))
7420
7421 (define-public python2-urwidtrees
7422 (package-with-python2 python-urwidtrees))
7423
7424 (define-public python-ua-parser
7425 (package
7426 (name "python-ua-parser")
7427 (version "0.8.0")
7428 (source
7429 (origin
7430 (method url-fetch)
7431 (uri (pypi-uri "ua-parser" version))
7432 (sha256
7433 (base32
7434 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7435 (build-system python-build-system)
7436 (arguments
7437 `(#:tests? #f)) ;no test suite in release
7438 (native-inputs
7439 `(("python-pyyaml" ,python-pyyaml)))
7440 (home-page "https://github.com/ua-parser/uap-python")
7441 (synopsis "User agent parser")
7442 (description
7443 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7444 (license license:asl2.0)))
7445
7446 (define-public python2-ua-parser
7447 (package-with-python2 python-ua-parser))
7448
7449 (define-public python-user-agents
7450 (package
7451 (name "python-user-agents")
7452 (version "1.1.0")
7453 (source
7454 (origin
7455 (method url-fetch)
7456 (uri (pypi-uri "user-agents" version))
7457 (sha256
7458 (base32
7459 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7460 (build-system python-build-system)
7461 (arguments
7462 `(#:tests? #f)) ;missing devices.json test file in release
7463 (propagated-inputs
7464 `(("python-ua-parser" ,python-ua-parser)))
7465 (home-page "https://github.com/selwin/python-user-agents")
7466 (synopsis "User Agent strings parsing library")
7467 (description
7468 "A library to identify devices (phones, tablets) and their capabilities by
7469 parsing (browser/HTTP) user agent strings.")
7470 (license license:expat)))
7471
7472 (define-public python2-user-agents
7473 (package-with-python2 python-user-agents))
7474
7475 (define-public python-dbus
7476 (package
7477 (name "python-dbus")
7478 (version "1.2.16")
7479 (source
7480 (origin
7481 (method url-fetch)
7482 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7483 "dbus-python-" version ".tar.gz"))
7484 (sha256
7485 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7486 (build-system gnu-build-system)
7487 (native-inputs
7488 `(("pkg-config" ,pkg-config)))
7489 (inputs
7490 `(("python" ,python-wrapper)
7491 ("dbus-glib" ,dbus-glib)))
7492 (synopsis "Python bindings for D-bus")
7493 (description "python-dbus provides bindings for libdbus, the reference
7494 implementation of D-Bus.")
7495 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7496 (license license:expat)))
7497
7498 (define-public python2-dbus
7499 (package (inherit python-dbus)
7500 (name "python2-dbus")
7501 (inputs `(("python" ,python-2)
7502 ,@(alist-delete "python"
7503 (package-inputs python-dbus)
7504 equal?)))))
7505
7506 (define-public python-notify2
7507 (package
7508 (name "python-notify2")
7509 (version "0.3.1")
7510 (source
7511 (origin
7512 (method url-fetch)
7513 (uri (pypi-uri "notify2" version))
7514 (sha256
7515 (base32
7516 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7517 (build-system python-build-system)
7518 (arguments `(#:tests? #f)) ; tests depend on system state
7519 (native-inputs
7520 `(("python-dbus" ,python-dbus)))
7521 (home-page "https://bitbucket.org/takluyver/pynotify2")
7522 (synopsis "Python interface to D-Bus notifications")
7523 (description
7524 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7525 It is a reimplementation of pynotify in pure Python, and an alternative to
7526 the GObject Introspection bindings to libnotify for non-GTK applications.")
7527 (license (list license:bsd-2
7528 license:lgpl2.1+))))
7529
7530 (define-public python2-notify2
7531 (package-with-python2 python-notify2))
7532
7533 ;; beautifulsoup4 has a totally different namespace than 3.x,
7534 ;; and pypi seems to put it under its own name, so I guess we should too
7535 (define-public python-beautifulsoup4
7536 (package
7537 (name "python-beautifulsoup4")
7538 (version "4.9.1")
7539 (source
7540 (origin
7541 (method url-fetch)
7542 (uri (pypi-uri "beautifulsoup4" version))
7543 (sha256
7544 (base32
7545 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7546 (build-system python-build-system)
7547 (arguments
7548 `(#:phases
7549 (modify-phases %standard-phases
7550 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7551 ;; must use this conversion script when building with Python 3. The
7552 ;; conversion script also runs the tests.
7553 ;; For more information, see the file 'convert-py3k' in the source
7554 ;; distribution.
7555 (replace 'check
7556 (lambda _ (invoke "./convert-py3k"))))))
7557 (propagated-inputs
7558 `(("python-soupsieve" ,python-soupsieve)))
7559 (home-page
7560 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7561 (synopsis
7562 "Python screen-scraping library")
7563 (description
7564 "Beautiful Soup is a Python library designed for rapidly setting up
7565 screen-scraping projects. It offers Pythonic idioms for navigating,
7566 searching, and modifying a parse tree, providing a toolkit for
7567 dissecting a document and extracting what you need. It automatically
7568 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7569 (license license:expat)
7570 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7571
7572 (define-public python2-beautifulsoup4
7573 (package
7574 (inherit (package-with-python2
7575 (strip-python2-variant python-beautifulsoup4)))
7576 (arguments `(#:python ,python-2))))
7577
7578 (define-public python-soupsieve
7579 (package
7580 (name "python-soupsieve")
7581 (version "2.0.1")
7582 (source
7583 (origin
7584 (method url-fetch)
7585 (uri (pypi-uri "soupsieve" version))
7586 (sha256
7587 (base32
7588 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7589 (build-system python-build-system)
7590 (arguments `(#:tests? #f))
7591 ;;XXX: 2 tests fail currently despite claming they were to be
7592 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7593 ;;don't want to create a circular dependency.
7594 (home-page "https://github.com/facelessuser/soupsieve")
7595 (synopsis "CSS selector library")
7596 (description
7597 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7598 Soup 4. It aims to provide selecting, matching, and filtering using modern
7599 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7600 specifications up through the latest CSS level 4 drafts and beyond (though
7601 some are not yet implemented).")
7602 (properties `((python2-variant . ,(delay python2-soupsieve))))
7603 (license license:expat)))
7604
7605 ;; This is the last version that supports python-2
7606 (define-public python2-soupsieve
7607 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7608 (package
7609 (inherit base)
7610 (version "1.9.6")
7611 (source
7612 (origin
7613 (method url-fetch)
7614 (uri (pypi-uri "soupsieve" version))
7615 (sha256
7616 (base32
7617 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7618 (propagated-inputs
7619 `(("python2-backports-functools-lru-cache"
7620 ,python2-backports-functools-lru-cache)
7621 ,@(package-propagated-inputs base))))))
7622
7623 (define-public python-netifaces
7624 (package
7625 (name "python-netifaces")
7626 (version "0.10.9")
7627 (source
7628 (origin
7629 (method url-fetch)
7630 (uri (pypi-uri "netifaces" version))
7631 (sha256
7632 (base32
7633 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7634 (build-system python-build-system)
7635 (home-page "https://github.com/al45tair/netifaces")
7636 (synopsis
7637 "Python module for portable network interface information")
7638 (description
7639 "Netifaces is a Python module providing information on network
7640 interfaces in an easy and portable manner.")
7641 (license license:expat)))
7642
7643 (define-public python2-netifaces
7644 (package-with-python2 python-netifaces))
7645
7646 (define-public python-networkx
7647 (package
7648 (name "python-networkx")
7649 (version "2.5")
7650 (source
7651 (origin
7652 (method url-fetch)
7653 (uri (pypi-uri "networkx" version))
7654 (sha256
7655 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7656 (build-system python-build-system)
7657 (arguments
7658 '(#:phases (modify-phases %standard-phases
7659 (replace 'check
7660 (lambda* (#:key tests? #:allow-other-keys)
7661 (if tests?
7662 (invoke "pytest" "-vv" "--pyargs" "networkx")
7663 (format #t "test suite not run~%"))
7664 #t)))))
7665 ;; python-decorator is needed at runtime.
7666 (propagated-inputs
7667 `(("python-decorator" ,python-decorator)))
7668 (native-inputs
7669 `(("python-pytest" ,python-pytest)))
7670 (home-page "https://networkx.github.io/")
7671 (synopsis "Python module for creating and manipulating graphs and networks")
7672 (description
7673 "NetworkX is a Python package for the creation, manipulation, and study
7674 of the structure, dynamics, and functions of complex networks.")
7675 (properties `((python2-variant . ,(delay python2-networkx))))
7676 (license license:bsd-3)))
7677
7678 ;; NetworkX 2.2 is the last version with support for Python 2.
7679 (define-public python2-networkx
7680 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7681 (package
7682 (inherit base)
7683 (version "2.2")
7684 (source (origin
7685 (method url-fetch)
7686 (uri (pypi-uri "networkx" version ".zip"))
7687 (sha256
7688 (base32
7689 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7690 (arguments
7691 `(#:python ,python-2))
7692 (native-inputs
7693 `(("python-nose" ,python2-nose)
7694 ("unzip" ,unzip))))))
7695
7696 (define-public python-datrie
7697 (package
7698 (name "python-datrie")
7699 (version "0.8.2")
7700 (source
7701 (origin
7702 (method url-fetch)
7703 (uri (pypi-uri "datrie" version))
7704 (sha256
7705 (base32
7706 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7707 (build-system python-build-system)
7708 (native-inputs
7709 `(("python-cython" ,python-cython)
7710 ("python-hypothesis" ,python-hypothesis)
7711 ("python-pytest" ,python-pytest)
7712 ("python-pytest-runner" ,python-pytest-runner)))
7713 (home-page "https://github.com/kmike/datrie")
7714 (synopsis "Fast, efficiently stored trie for Python")
7715 (description
7716 "This package provides a fast, efficiently stored trie implementation for
7717 Python.")
7718 (license license:lgpl2.1+)))
7719
7720 (define-public snakemake
7721 (package
7722 (name "snakemake")
7723 (version "5.7.1")
7724 (source
7725 (origin
7726 (method url-fetch)
7727 (uri (pypi-uri "snakemake" version))
7728 (sha256
7729 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7730 (build-system python-build-system)
7731 (arguments
7732 ;; TODO: Package missing test dependencies.
7733 '(#:tests? #f
7734 #:phases
7735 (modify-phases %standard-phases
7736 ;; For cluster execution Snakemake will call Python. Since there is
7737 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7738 ;; this by calling the snakemake wrapper instead.
7739 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7740 (lambda* (#:key outputs #:allow-other-keys)
7741 (substitute* "snakemake/executors.py"
7742 (("\\{sys.executable\\} -m snakemake")
7743 (string-append (assoc-ref outputs "out")
7744 "/bin/snakemake")))
7745 #t)))))
7746 (propagated-inputs
7747 `(("python-appdirs" ,python-appdirs)
7748 ("python-configargparse" ,python-configargparse)
7749 ("python-datrie" ,python-datrie)
7750 ("python-docutils" ,python-docutils)
7751 ("python-gitpython" ,python-gitpython)
7752 ("python-jinja2" ,python-jinja2)
7753 ("python-jsonschema" ,python-jsonschema)
7754 ("python-networkx" ,python-networkx)
7755 ("python-psutil" ,python-psutil)
7756 ("python-pyyaml" ,python-pyyaml)
7757 ("python-ratelimiter" ,python-ratelimiter)
7758 ("python-requests" ,python-requests)
7759 ("python-wrapt" ,python-wrapt)))
7760 (home-page "https://snakemake.readthedocs.io")
7761 (synopsis "Python-based execution environment for make-like workflows")
7762 (description
7763 "Snakemake aims to reduce the complexity of creating workflows by
7764 providing a clean and modern domain specific specification language (DSL) in
7765 Python style, together with a fast and comfortable execution environment.")
7766 (license license:expat)))
7767
7768 (define-public python-pyqrcode
7769 (package
7770 (name "python-pyqrcode")
7771 (version "1.2.1")
7772 (source
7773 (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "PyQRCode" version))
7776 (sha256
7777 (base32
7778 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7779 (build-system python-build-system)
7780 (home-page
7781 "https://github.com/mnooner256/pyqrcode")
7782 (synopsis "QR code generator")
7783 (description
7784 "Pyqrcode is a QR code generator written purely in Python with
7785 SVG, EPS, PNG and terminal output.")
7786 (license license:bsd-3)))
7787
7788 (define-public python-seaborn
7789 (package
7790 (name "python-seaborn")
7791 (version "0.10.0")
7792 (source
7793 (origin
7794 (method url-fetch)
7795 (uri (pypi-uri "seaborn" version))
7796 (sha256
7797 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7798 (build-system python-build-system)
7799 (arguments
7800 `(#:phases
7801 (modify-phases %standard-phases
7802 (add-before 'check 'start-xserver
7803 (lambda* (#:key inputs #:allow-other-keys)
7804 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7805 ;; There must be a running X server and make check doesn't
7806 ;; start one. Therefore we must do it.
7807 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7808 (setenv "DISPLAY" ":1")
7809 #t)))
7810 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7811 (propagated-inputs
7812 `(("python-pandas" ,python-pandas)
7813 ("python-matplotlib" ,python-matplotlib)
7814 ("python-numpy" ,python-numpy)
7815 ("python-scipy" ,python-scipy)))
7816 (native-inputs
7817 `(("python-pytest" ,python-pytest)
7818 ("xorg-server" ,xorg-server-for-tests)))
7819 (home-page "https://seaborn.pydata.org/")
7820 (synopsis "Statistical data visualization")
7821 (description
7822 "Seaborn is a library for making attractive and informative statistical
7823 graphics in Python. It is built on top of matplotlib and tightly integrated
7824 with the PyData stack, including support for numpy and pandas data structures
7825 and statistical routines from scipy and statsmodels.")
7826 (properties `((python2-variant . ,(delay python2-seaborn))))
7827 (license license:bsd-3)))
7828
7829 ;; 0.9.1 is the last release with support for Python 2.
7830 (define-public python2-seaborn
7831 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7832 (package
7833 (inherit base)
7834 (version "0.9.1")
7835 (source (origin
7836 (method url-fetch)
7837 (uri (pypi-uri "seaborn" version))
7838 (sha256
7839 (base32
7840 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7841
7842 (define-public python-mpmath
7843 (package
7844 (name "python-mpmath")
7845 (version "1.1.0")
7846 (source (origin
7847 (method url-fetch)
7848 (uri (pypi-uri "mpmath" version))
7849 (file-name (git-file-name name version))
7850 (sha256
7851 (base32
7852 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7853 (build-system python-build-system)
7854 (native-inputs
7855 `(("python-pytest" ,python-pytest)))
7856 (arguments
7857 '(#:phases
7858 (modify-phases %standard-phases
7859 (replace 'check
7860 (lambda _
7861 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7862 (home-page "http://mpmath.org")
7863 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7864 (description
7865 "@code{mpmath} can be used as an arbitrary-precision substitute for
7866 Python's float/complex types and math/cmath modules, but also does much
7867 more advanced mathematics.")
7868 (license license:bsd-3)))
7869
7870 (define-public python2-mpmath
7871 (package-with-python2 python-mpmath))
7872
7873 (define-public python-bigfloat
7874 (package
7875 (name "python-bigfloat")
7876 (version "0.3.0")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "bigfloat" version))
7881 (sha256
7882 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7883 (build-system python-build-system)
7884 (inputs
7885 `(("mpfr" ,mpfr)))
7886 (home-page "https://github.com/mdickinson/bigfloat")
7887 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7888 (description
7889 "This package provides a Python interface to the MPFR library for
7890 multiprecision arithmetic.")
7891 (license license:lgpl3+)))
7892
7893 (define-public python2-bigfloat
7894 (package-with-python2 python-bigfloat))
7895
7896 (define-public python-sympy
7897 (package
7898 (name "python-sympy")
7899 (version "1.6.2")
7900 (source
7901 (origin
7902 (method url-fetch)
7903 (uri (pypi-uri "sympy" version))
7904 (sha256
7905 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7906 (build-system python-build-system)
7907 (arguments
7908 `(#:phases
7909 (modify-phases %standard-phases
7910 (replace 'check
7911 (lambda* (#:key outputs #:allow-other-keys)
7912 (invoke
7913 (or (which "python3") (which "python"))
7914 "-c" "import sympy; sympy.test(\"/core\")"))))))
7915 (propagated-inputs
7916 `(("python-mpmath" ,python-mpmath)))
7917 (home-page "https://www.sympy.org/")
7918 (synopsis "Python library for symbolic mathematics")
7919 (description
7920 "SymPy is a Python library for symbolic mathematics. It aims to become a
7921 full-featured computer algebra system (CAS) while keeping the code as simple
7922 as possible in order to be comprehensible and easily extensible.")
7923 (license license:bsd-3)))
7924
7925 (define-public python2-sympy
7926 (package
7927 (inherit (package-with-python2 python-sympy))
7928 (version "1.5.1") ; last release for python2
7929 (source
7930 (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "sympy" version))
7933 (sha256
7934 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7935
7936 (define-public python-q
7937 (package
7938 (name "python-q")
7939 (version "2.6")
7940 (source
7941 (origin
7942 (method url-fetch)
7943 (uri (pypi-uri "q" version))
7944 (sha256
7945 (base32
7946 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7947 (build-system python-build-system)
7948 (home-page "https://github.com/zestyping/q")
7949 (synopsis "Quick-and-dirty debugging output for tired programmers")
7950 (description
7951 "q is a Python module for \"print\" style of debugging Python code. It
7952 provides convenient short API for print out of values, tracebacks, and
7953 falling into the Python interpreter.")
7954 (license license:asl2.0)))
7955
7956 (define-public python2-q
7957 (package-with-python2 python-q))
7958
7959 (define-public python-xlib
7960 (package
7961 (name "python-xlib")
7962 (version "0.27")
7963 (source
7964 (origin
7965 (method git-fetch)
7966 (uri (git-reference
7967 (url "https://github.com/python-xlib/python-xlib")
7968 (commit version)))
7969 (file-name (git-file-name name version))
7970 (sha256
7971 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7972 (build-system python-build-system)
7973 (arguments
7974 `(#:phases
7975 (modify-phases %standard-phases
7976 (add-before 'check 'start-xserver
7977 (lambda* (#:key inputs #:allow-other-keys)
7978 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7979 ;; There must be a running X server and make check doesn't
7980 ;; start one. Therefore we must do it.
7981 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7982 (setenv "DISPLAY" ":1")
7983 #t))))))
7984 (native-inputs
7985 `(("python-mock" ,python-mock)
7986 ("python-setuptools-scm" ,python-setuptools-scm)
7987 ("python-six" ,python-six)
7988 ("xorg-server" ,xorg-server)))
7989 (home-page "https://github.com/python-xlib/python-xlib")
7990 (synopsis "Python X11 client library")
7991 (description
7992 "The Python X Library is intended to be a fully functional
7993 X client library for Python programs. It is useful to implement
7994 low-level X clients. It is written entirely in Python.")
7995 (license license:gpl2+)))
7996
7997 (define-public python2-xlib
7998 (package-with-python2 python-xlib))
7999
8000 (define-public python-singledispatch
8001 (package
8002 (name "python-singledispatch")
8003 (version "3.4.0.3")
8004 (source
8005 (origin
8006 (method url-fetch)
8007 (uri (pypi-uri "singledispatch" version))
8008 (sha256
8009 (base32
8010 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8011 (build-system python-build-system)
8012 (native-inputs
8013 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8014 (home-page
8015 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8016 (synopsis "Backport of singledispatch feature from Python 3.4")
8017 (description
8018 "This library brings functools.singledispatch from Python 3.4 to Python
8019 2.6-3.3.")
8020 (license license:expat)))
8021
8022 (define-public python2-singledispatch
8023 (package-with-python2 python-singledispatch))
8024
8025 ;; the python- version can be removed with python-3.5
8026 (define-public python-backports-abc
8027 (package
8028 (name "python-backports-abc")
8029 (version "0.5")
8030 (source
8031 (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "backports_abc" version))
8034 (sha256
8035 (base32
8036 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8037 (build-system python-build-system)
8038 (home-page "https://github.com/cython/backports_abc")
8039 (synopsis "Backport of additions to the 'collections.abc' module")
8040 (description
8041 "Python-backports-abc provides a backport of additions to the
8042 @code{collections.abc} module in Python-3.5.")
8043 (license license:psfl)))
8044
8045 (define-public python2-backports-abc
8046 (package-with-python2 python-backports-abc))
8047
8048 (define-public python-backports-csv
8049 (package
8050 (name "python-backports-csv")
8051 (version "1.0.7")
8052 (source
8053 (origin
8054 (method url-fetch)
8055 (uri (pypi-uri "backports.csv" version))
8056 (sha256
8057 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8058 (build-system python-build-system)
8059 (home-page "https://github.com/ryanhiebert/backports.csv")
8060 (synopsis "Backport of Python 3's csv module for Python 2")
8061 (description
8062 "Provides a backport of Python 3's @code{csv} module for parsing
8063 comma separated values. The API of the @code{csv} module in Python 2
8064 is drastically different from the @code{csv} module in Python 3.
8065 This is due, for the most part, to the difference between str in
8066 Python 2 and Python 3.")
8067 (license license:psfl)))
8068
8069 (define-public python2-backports-csv
8070 (package-with-python2 python-backports-csv))
8071
8072 (define-public python2-backports-shutil-get-terminal-size
8073 (package
8074 (name "python2-backports-shutil-get-terminal-size")
8075 (version "1.0.0")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8080 (sha256
8081 (base32
8082 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8083 (build-system python-build-system)
8084 (arguments
8085 `(#:python ,python-2
8086 #:phases
8087 (modify-phases %standard-phases
8088 (replace 'check
8089 (lambda _
8090 (setenv "PYTHONPATH" (string-append "./build/lib:"
8091 (getenv "PYTHONPATH")))
8092 (invoke "py.test" "-v"))))))
8093 (native-inputs
8094 `(("python2-pytest" ,python2-pytest)))
8095 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8096 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8097 (description
8098 "This package provides a backport of the @code{get_terminal_size
8099 function} from Python 3.3's @code{shutil}.
8100 Unlike the original version it is written in pure Python rather than C,
8101 so it might be a tiny bit slower.")
8102 (license license:expat)))
8103
8104 (define-public python-waf
8105 (package
8106 (name "python-waf")
8107 (version "2.0.19")
8108 (source (origin
8109 (method url-fetch)
8110 (uri (string-append "https://waf.io/"
8111 "waf-" version ".tar.bz2"))
8112 (sha256
8113 (base32
8114 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8115 (build-system python-build-system)
8116 (arguments
8117 '(#:phases
8118 (modify-phases %standard-phases
8119 (replace 'build
8120 (lambda _
8121 ;; XXX: Find a way to add all extra tools.
8122 (let ((tools '("gccdeps"
8123 "clang_compilation_database")))
8124 (invoke "python" "waf-light" "configure" "build"
8125 (string-append "--tools="
8126 (string-join tools ","))))))
8127 (replace 'check
8128 (lambda _
8129 (invoke "python" "waf" "--version")))
8130 (replace 'install
8131 (lambda* (#:key outputs #:allow-other-keys)
8132 (let ((out (assoc-ref outputs "out")))
8133 (install-file "waf" (string-append out "/bin")))
8134 #t))
8135 ;; waf breaks when it is wrapped.
8136 (delete 'wrap))))
8137 (home-page "https://waf.io/")
8138 (synopsis "Python-based build system")
8139 (description
8140 "Waf is a Python-based framework for configuring, compiling and installing
8141 applications.")
8142 (license license:bsd-3)))
8143
8144 (define-public python2-waf
8145 (package-with-python2 python-waf))
8146
8147 (define-public python-pyzmq
8148 (package
8149 (name "python-pyzmq")
8150 (version "17.1.2")
8151 (source
8152 (origin
8153 (method url-fetch)
8154 (uri (pypi-uri "pyzmq" version))
8155 (sha256
8156 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8157 (build-system python-build-system)
8158 (arguments
8159 `(#:configure-flags
8160 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8161 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8162 ;; --inplace' for 'python setup.py test' to work.
8163 #:tests? #f))
8164 (inputs
8165 `(("zeromq" ,zeromq)))
8166 (native-inputs
8167 `(("pkg-config" ,pkg-config)
8168 ("python-nose" ,python-nose)))
8169 (home-page "https://github.com/zeromq/pyzmq")
8170 (synopsis "Python bindings for 0MQ")
8171 (description
8172 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8173 (license license:bsd-4)))
8174
8175 (define-public python2-pyzmq
8176 (package-with-python2 python-pyzmq))
8177
8178 (define-public python-pep8
8179 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8180 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8181 ;; some dependents' test suites, and nothing more.
8182 (package
8183 (name "python-pep8")
8184 (version "1.7.0")
8185 (source
8186 (origin
8187 (method url-fetch)
8188 (uri (pypi-uri "pep8" version))
8189 (sha256
8190 (base32
8191 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8192 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8193 (build-system python-build-system)
8194 (home-page "https://pep8.readthedocs.org/")
8195 (synopsis "Python style guide checker")
8196 (description
8197 "This tools checks Python code against some of the style conventions in
8198 PEP 8.")
8199 (license license:expat)))
8200
8201 (define-public python2-pep8
8202 (package-with-python2 python-pep8))
8203
8204 (define-public python-pep517
8205 (package
8206 (name "python-pep517")
8207 (version "0.8.2")
8208 (source
8209 (origin
8210 (method url-fetch)
8211 (uri (pypi-uri "pep517" version))
8212 (sha256
8213 (base32
8214 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8215 (build-system python-build-system)
8216 (arguments
8217 '(#:phases
8218 (modify-phases %standard-phases
8219 (replace 'check
8220 (lambda* (#:key tests? #:allow-other-keys)
8221 (delete-file "pytest.ini")
8222 ;; This test tries to connect to the internet
8223 (delete-file "tests/test_meta.py")
8224 (if tests?
8225 (invoke "pytest")
8226 #t))))))
8227 (native-inputs
8228 `(("python-mock" ,python-mock)
8229 ("python-pytest" ,python-pytest)
8230 ("python-testpath" ,python-testpath)))
8231 (propagated-inputs
8232 `(("python-toml" ,python-toml)
8233 ("python-wheel" ,python-wheel)))
8234 (home-page "https://github.com/pypa/pep517")
8235 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8236 (description
8237 "Wrappers to build Python packages using PEP 517 hooks.")
8238 (properties `((python2-variant . ,(delay python2-pep517))))
8239 (license license:expat)))
8240
8241 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8242 (define-public python2-pep517
8243 (let ((base (package-with-python2
8244 (strip-python2-variant python-pep517))))
8245 (package
8246 (inherit base)
8247 (name "python2-pep517")
8248 (arguments
8249 `(#:tests? #f
8250 ,@(package-arguments base)))
8251 (native-inputs `()))))
8252
8253 (define-public python-pyflakes
8254 (package
8255 (name "python-pyflakes")
8256 (version "2.2.0")
8257 (source
8258 (origin
8259 (method url-fetch)
8260 (uri (pypi-uri "pyflakes" version))
8261 (sha256
8262 (base32
8263 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8264 (build-system python-build-system)
8265 (home-page
8266 "https://github.com/pyflakes/pyflakes")
8267 (synopsis "Passive checker of Python programs")
8268 (description
8269 "Pyflakes statically checks Python source code for common errors.")
8270 (license license:expat)))
8271
8272 (define-public python2-pyflakes
8273 (package-with-python2 python-pyflakes))
8274
8275 (define-public python-mccabe
8276 (package
8277 (name "python-mccabe")
8278 (version "0.6.1")
8279 (source
8280 (origin
8281 (method url-fetch)
8282 (uri (pypi-uri "mccabe" version))
8283 (sha256
8284 (base32
8285 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8286 (build-system python-build-system)
8287 (native-inputs
8288 `(("python-pytest" ,python-pytest-bootstrap)
8289 ("python-pytest-runner" ,python-pytest-runner)))
8290 (home-page "https://github.com/flintwork/mccabe")
8291 (synopsis "McCabe checker, plugin for flake8")
8292 (description
8293 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8294 complexity of Python source code.")
8295 (license license:expat)))
8296
8297 (define-public python2-mccabe
8298 (package-with-python2 python-mccabe))
8299
8300 (define-public python-flake8
8301 (package
8302 (name "python-flake8")
8303 (version "3.8.4")
8304 (source (origin
8305 (method url-fetch)
8306 (uri (pypi-uri "flake8" version))
8307 (sha256
8308 (base32
8309 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8310 (build-system python-build-system)
8311 (arguments
8312 `(#:phases
8313 (modify-phases %standard-phases
8314 (delete 'check)
8315 (add-after 'install 'check
8316 (lambda* (#:key inputs outputs #:allow-other-keys)
8317 (add-installed-pythonpath inputs outputs)
8318 (invoke "pytest" "-v")
8319 #t)))))
8320 (propagated-inputs
8321 `(("python-pycodestyle" ,python-pycodestyle)
8322 ("python-entrypoints" ,python-entrypoints)
8323 ("python-pyflakes" ,python-pyflakes)
8324 ("python-mccabe" ,python-mccabe)))
8325 (native-inputs
8326 `(("python-mock" ,python-mock)
8327 ("python-pytest" ,python-pytest-bootstrap)))
8328 (home-page "https://gitlab.com/pycqa/flake8")
8329 (synopsis
8330 "The modular source code checker: pep8, pyflakes and co")
8331 (description
8332 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8333 (properties `((python2-variant . ,(delay python2-flake8))))
8334 (license license:expat)))
8335
8336 (define-public python2-flake8
8337 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8338 (package (inherit base)
8339 (propagated-inputs
8340 `(("python2-configparser" ,python2-configparser)
8341 ("python2-enum34" ,python2-enum34)
8342 ("python2-functools32" ,python2-functools32)
8343 ("python2-typing" ,python2-typing)
8344 ,@(package-propagated-inputs base))))))
8345
8346 (define-public python-flake8-bugbear
8347 (package
8348 (name "python-flake8-bugbear")
8349 (version "20.1.4")
8350 (source
8351 (origin
8352 (method url-fetch)
8353 (uri (pypi-uri "flake8-bugbear" version))
8354 (sha256
8355 (base32
8356 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8357 (build-system python-build-system)
8358 (arguments
8359 '(#:phases
8360 (modify-phases %standard-phases
8361 (add-before 'check 'disable-test
8362 (lambda _
8363 ;; This test fails on slow computers.
8364 (substitute* "tests/test_bugbear.py"
8365 (("def test_does_not_crash_on_any_valid_code")
8366 "def _test_does_not_crash_on_any_valid_code")))))))
8367 (native-inputs
8368 `(("python-hypothesis" ,python-hypothesis)
8369 ("python-hypothesmith" ,python-hypothesmith)))
8370 (propagated-inputs
8371 `(("python-attrs" ,python-attrs)
8372 ("python-flake8" ,python-flake8)))
8373 (home-page "https://github.com/PyCQA/flake8-bugbear")
8374 (synopsis
8375 "Flake8 plugin for finding likely bugs and design problems in your program")
8376 (description
8377 "This package contains a plugin for Flake8 finding likely bugs and
8378 design problems in your program. It contains warnings that don't belong
8379 in pyflakes and pycodestyle.")
8380 (license license:expat)))
8381
8382 (define-public python-flake8-polyfill
8383 (package
8384 (name "python-flake8-polyfill")
8385 (version "1.0.2")
8386 (source
8387 (origin
8388 (method url-fetch)
8389 (uri (pypi-uri "flake8-polyfill" version))
8390 (sha256
8391 (base32
8392 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8393 (build-system python-build-system)
8394 (arguments
8395 '(#:phases
8396 (modify-phases %standard-phases
8397 (replace 'check
8398 (lambda _
8399 ;; Be compatible with Pytest 4:
8400 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8401 (substitute* "setup.cfg"
8402 (("\\[pytest\\]")
8403 "[tool:pytest]"))
8404
8405 (setenv "PYTHONPATH"
8406 (string-append (getcwd) "/build/lib:"
8407 (getenv "PYTHONPATH")))
8408 (invoke "py.test" "-v"))))))
8409 (native-inputs
8410 `(("python-flake8" ,python-flake8)
8411 ("python-mock" ,python-mock)
8412 ("python-pep8" ,python-pep8)
8413 ("python-pycodestyle" ,python-pycodestyle)
8414 ("python-pytest" ,python-pytest)))
8415 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8416 (synopsis "Polyfill package for Flake8 plugins")
8417 (description
8418 "This package that provides some compatibility helpers for Flake8
8419 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8420 (license license:expat)))
8421
8422 (define-public python2-flake8-polyfill
8423 (package-with-python2 python-flake8-polyfill))
8424
8425 (define-public python-flake8-pyi
8426 (package
8427 (name "python-flake8-pyi")
8428 (version "20.5.0")
8429 (source
8430 (origin
8431 (method url-fetch)
8432 (uri (pypi-uri "flake8-pyi" version))
8433 (sha256
8434 (base32
8435 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8436 (build-system python-build-system)
8437 (propagated-inputs
8438 `(("python-attrs" ,python-attrs)
8439 ("python-flake8" ,python-flake8)
8440 ("python-pyflakes" ,python-pyflakes)))
8441 (home-page "https://github.com/ambv/flake8-pyi")
8442 (synopsis
8443 "Flake8 plugin that provides specializations for type hinting stub files")
8444 (description
8445 "This package contains a plugin that provides specializations for
8446 type hinting stub files, especially interesting for linting typeshed. It
8447 adds the @file{.pyi} extension to the default value of the @code{--filename}
8448 command-line argument to Flake8. This means stubs are linted by default with
8449 this plugin enabled, without needing to explicitly list every file. It
8450 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8451 expressions after the entire file has been read. This enables support for
8452 first-class forward references that stub files use.")
8453 (license license:expat)))
8454
8455 (define-public python-flake8-pie
8456 (package
8457 (name "python-flake8-pie")
8458 (version "0.5.0")
8459 (source
8460 (origin
8461 (method url-fetch)
8462 (uri (pypi-uri "flake8-pie" version))
8463 (sha256
8464 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8465 (build-system python-build-system)
8466 (home-page "https://github.com/sbdchd/flake8-pie")
8467 (synopsis "Flake8 extension that implements lints")
8468 (description
8469 "This package provides a flake8 extension that implements miscellaneous
8470 lints.")
8471 (license license:bsd-2)))
8472
8473 (define-public python-autoflake
8474 (package
8475 (name "python-autoflake")
8476 (version "1.3.1")
8477 (source
8478 (origin
8479 (method url-fetch)
8480 (uri (pypi-uri "autoflake" version))
8481 (sha256
8482 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8483 (build-system python-build-system)
8484 (propagated-inputs
8485 `(("python-pyflakes" ,python-pyflakes)))
8486 (home-page "https://github.com/myint/autoflake")
8487 (synopsis "Removes unused imports and unused variables")
8488 (description
8489 "@code{autoflake} removes unused imports and unused variables from Python
8490 code as reported by @code{pyflakes}.
8491
8492 By default, it only removes unused imports for modules that are part of the
8493 standard library. Removal of unused variables is also disabled by default.
8494 It also removes useless @code{pass} statements.")
8495 (license license:expat)))
8496
8497 (define-public python-mistune
8498 (package
8499 (name "python-mistune")
8500 (version "0.8.4")
8501 (source
8502 (origin
8503 (method url-fetch)
8504 (uri (pypi-uri "mistune" version))
8505 (sha256
8506 (base32
8507 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8508 (build-system python-build-system)
8509 (native-inputs
8510 `(("python-nose" ,python-nose)
8511 ("python-cython" ,python-cython)))
8512 (home-page "https://github.com/lepture/mistune")
8513 (synopsis "Markdown parser in pure Python")
8514 (description "This package provides a fast markdown parser in pure
8515 Python.")
8516 (license license:bsd-3)))
8517
8518 (define-public python2-mistune
8519 (package-with-python2 python-mistune))
8520
8521 (define-public python-markdown
8522 (package
8523 (name "python-markdown")
8524 (version "3.2.1")
8525 (source
8526 (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "Markdown" version))
8529 (sha256
8530 (base32
8531 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8532 (build-system python-build-system)
8533 (native-inputs
8534 `(("python-nose" ,python-nose)
8535 ("python-pyyaml" ,python-pyyaml)))
8536 (home-page "https://python-markdown.github.io/")
8537 (synopsis "Python implementation of Markdown")
8538 (description
8539 "This package provides a Python implementation of John Gruber's
8540 Markdown. The library features international input, various Markdown
8541 extensions, and several HTML output formats. A command line wrapper
8542 markdown_py is also provided to convert Markdown files to HTML.")
8543 (properties `((python2-variant . ,(delay python2-markdown))))
8544 (license license:bsd-3)))
8545
8546 ;; Markdown 3.2 dropped support for Python 2.
8547 (define-public python2-markdown
8548 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8549 (package/inherit
8550 base
8551 (version "3.1.1")
8552 (source (origin
8553 (method url-fetch)
8554 (uri (pypi-uri "Markdown" version))
8555 (sha256
8556 (base32
8557 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8558
8559 (define-public python-ptyprocess
8560 (package
8561 (name "python-ptyprocess")
8562 (version "0.5.2")
8563 (source
8564 (origin
8565 (method url-fetch)
8566 (uri (pypi-uri "ptyprocess" version))
8567 (sha256
8568 (base32
8569 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8570 (build-system python-build-system)
8571 (native-inputs
8572 `(("python-nose" ,python-nose)))
8573 (arguments
8574 `(#:phases
8575 (modify-phases %standard-phases
8576 (replace 'check
8577 (lambda _ (invoke "nosetests"))))))
8578 (home-page "https://github.com/pexpect/ptyprocess")
8579 (synopsis "Run a subprocess in a pseudo terminal")
8580 (description
8581 "This package provides a Python library used to launch a subprocess in a
8582 pseudo terminal (pty), and interact with both the process and its pty.")
8583 (license license:isc)))
8584
8585 (define-public python2-ptyprocess
8586 (package-with-python2 python-ptyprocess))
8587
8588 (define-public python-cram
8589 (package
8590 (name "python-cram")
8591 (version "0.7")
8592 (home-page "https://bitheap.org/cram/")
8593 (source (origin
8594 (method url-fetch)
8595 (uri (list (string-append home-page "cram-"
8596 version ".tar.gz")
8597 (pypi-uri "cram" version)))
8598 (sha256
8599 (base32
8600 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8601 (arguments
8602 '(#:phases
8603 (modify-phases %standard-phases
8604 (add-after 'unpack 'patch-source
8605 (lambda _
8606 (substitute* (find-files "cram" ".*\\.py$")
8607 ;; Replace default shell path.
8608 (("/bin/sh") (which "sh")))
8609 (substitute* (find-files "tests" ".*\\.t$")
8610 (("md5") "md5sum")
8611 (("/bin/bash") (which "bash"))
8612 (("/bin/sh") (which "sh")))
8613 (substitute* "cram/_test.py"
8614 ;; This hack works around a bug triggered by substituting
8615 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8616 ;; "cram -h", which breaks the output at 80 characters. This
8617 ;; causes the line showing the default shell to break into two
8618 ;; lines, but the test expects a single line...
8619 (("env\\['COLUMNS'\\] = '80'")
8620 "env['COLUMNS'] = '160'"))
8621
8622 (substitute* "Makefile"
8623 ;; Recent versions of python-coverage have caused the test
8624 ;; coverage to decrease (as of version 0.7). Allow that.
8625 (("--fail-under=100")
8626 "--fail-under=90"))
8627
8628 #t))
8629 (replace 'check
8630 ;; The test phase uses the built library and executable.
8631 (lambda* (#:key inputs outputs #:allow-other-keys)
8632 (add-installed-pythonpath inputs outputs)
8633 (setenv "PATH" (string-append (getenv "PATH") ":"
8634 (assoc-ref outputs "out") "/bin"))
8635 (invoke "make" "test"))))))
8636 (build-system python-build-system)
8637 (native-inputs
8638 `(("python-coverage" ,python-coverage)
8639 ("which" ,which)))
8640 (synopsis "Simple testing framework for command line applications")
8641 (description
8642 "Cram is a functional testing framework for command line applications.
8643 Cram tests look like snippets of interactive shell sessions. Cram runs each
8644 command and compares the command output in the test with the command’s actual
8645 output.")
8646 (license license:gpl2+)))
8647
8648 (define-public python2-cram
8649 (package-with-python2 python-cram))
8650
8651 (define-public python-crashtest
8652 (package
8653 (name "python-crashtest")
8654 (version "0.3.1")
8655 (source
8656 (origin
8657 (method url-fetch)
8658 (uri (pypi-uri "crashtest" version))
8659 (sha256
8660 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8661 (build-system python-build-system)
8662 (home-page "https://github.com/sdispater/crashtest")
8663 (synopsis "Manage Python errors with ease")
8664 (description
8665 "Python library that makes exceptions handling and inspection easier.")
8666 (license license:expat)))
8667
8668 (define-public python-straight-plugin
8669 (package
8670 (name "python-straight-plugin")
8671 (version "1.4.1")
8672 (source
8673 (origin
8674 (method url-fetch)
8675 (uri (pypi-uri "straight.plugin" version))
8676 (sha256
8677 (base32
8678 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8679 (build-system python-build-system)
8680 (home-page "https://github.com/ironfroggy/straight.plugin")
8681 (synopsis "Simple namespaced plugin facility")
8682 (description "Straight Plugin provides a type of plugin you can create from
8683 almost any existing Python modules, and an easy way for outside developers to
8684 add functionality and customization to your projects with their own plugins.")
8685 (license license:expat)))
8686
8687 (define-public python2-straight-plugin
8688 (package-with-python2 python-straight-plugin))
8689
8690 (define-public python-fonttools
8691 (package
8692 (name "python-fonttools")
8693 (version "4.6.0")
8694 (source (origin
8695 (method url-fetch)
8696 (uri (pypi-uri "fonttools" version ".zip"))
8697 (sha256
8698 (base32
8699 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8700 (build-system python-build-system)
8701 (native-inputs
8702 `(("unzip" ,unzip)
8703 ("python-pytest" ,python-pytest)
8704 ("python-pytest-runner" ,python-pytest-runner)))
8705 (home-page "https://github.com/fonttools/fonttools")
8706 (synopsis "Tools to manipulate font files")
8707 (description
8708 "FontTools/TTX is a library to manipulate font files from Python. It
8709 supports reading and writing of TrueType/OpenType fonts, reading and writing
8710 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8711 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8712 from an XML-based format.")
8713 (license license:expat)))
8714
8715 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8716 (define-public python2-fonttools
8717 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8718 (package/inherit
8719 base
8720 (version "3.44.0")
8721 (source (origin
8722 (method url-fetch)
8723 (uri (pypi-uri "fonttools" version ".zip"))
8724 (sha256
8725 (base32
8726 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8727
8728 (define-public python-ly
8729 (package
8730 (name "python-ly")
8731 (version "0.9.5")
8732 (source
8733 (origin
8734 (method url-fetch)
8735 (uri (pypi-uri name version))
8736 (sha256
8737 (base32
8738 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8739 (build-system python-build-system)
8740 (arguments
8741 ;; FIXME: Some tests need network access.
8742 '(#:tests? #f))
8743 (synopsis "Tool and library for manipulating LilyPond files")
8744 (description "This package provides a Python library to parse, manipulate
8745 or create documents in LilyPond format. A command line program ly is also
8746 provided that can be used to do various manipulations with LilyPond files.")
8747 (home-page "https://pypi.org/project/python-ly/")
8748 (license license:gpl2+)))
8749
8750 (define-public python-appdirs
8751 (package
8752 (name "python-appdirs")
8753 (version "1.4.3")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "appdirs" version))
8758 (sha256
8759 (base32
8760 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8761 (build-system python-build-system)
8762 (home-page "https://github.com/ActiveState/appdirs")
8763 (synopsis
8764 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8765 (description
8766 "This module provides a portable way of finding out where user data
8767 should be stored on various operating systems.")
8768 (license license:expat)))
8769
8770 (define-public python2-appdirs
8771 (package-with-python2 python-appdirs))
8772
8773 (define-public python-gorilla
8774 (package
8775 (name "python-gorilla")
8776 (version "0.3.0")
8777 (source (origin
8778 (method url-fetch)
8779 (uri (pypi-uri "gorilla" version))
8780 (sha256
8781 (base32
8782 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
8783 (build-system python-build-system)
8784 (home-page "https://github.com/christophercrouzet/gorilla")
8785 (synopsis "Convenient monkey patching with Python")
8786 (description
8787 "Gorilla is a Python library that provides a convenient approach to
8788 monkey patching. Monkey patching is the process of modifying module and
8789 class attributes at runtime with the purpose of replacing or extending
8790 third-party code.")
8791 (license license:expat)))
8792
8793 (define-public python-llfuse
8794 (package
8795 (name "python-llfuse")
8796 (version "1.3.8")
8797 (source (origin
8798 (method url-fetch)
8799 (uri (pypi-uri "llfuse" version))
8800 (sha256
8801 (base32
8802 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
8803 (build-system python-build-system)
8804 (inputs
8805 `(("fuse" ,fuse)
8806 ("attr" ,attr)))
8807 (native-inputs
8808 `(("pkg-config" ,pkg-config)))
8809 (synopsis "Python bindings for FUSE")
8810 (description
8811 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8812 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8813 (license license:lgpl2.0+)
8814 (properties `((python2-variant . ,(delay python2-llfuse))))))
8815
8816 (define-public python2-llfuse
8817 (package (inherit (package-with-python2
8818 (strip-python2-variant python-llfuse)))
8819 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8820
8821 (define-public python-msgpack
8822 (package
8823 (name "python-msgpack")
8824 (version "1.0.0")
8825 (source (origin
8826 (method url-fetch)
8827 (uri (pypi-uri "msgpack" version))
8828 (sha256
8829 (base32
8830 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8831 (build-system python-build-system)
8832 (arguments
8833 `(#:modules ((guix build utils)
8834 (guix build python-build-system)
8835 (ice-9 ftw)
8836 (srfi srfi-1)
8837 (srfi srfi-26))
8838 #:phases
8839 (modify-phases %standard-phases
8840 (replace 'check
8841 (lambda _
8842 (let ((cwd (getcwd)))
8843 (setenv "PYTHONPATH"
8844 (string-append cwd "/build/"
8845 (find (cut string-prefix? "lib" <>)
8846 (scandir (string-append cwd "/build")))
8847 ":"
8848 (getenv "PYTHONPATH")))
8849 (invoke "pytest" "-v" "test")))))))
8850 (native-inputs
8851 `(("python-pytest" ,python-pytest)))
8852 (synopsis "MessagePack (de)serializer")
8853 (description "MessagePack is a fast, compact binary serialization format,
8854 suitable for similar data to JSON. This package provides CPython bindings for
8855 reading and writing MessagePack data.")
8856 (home-page "https://pypi.org/project/msgpack/")
8857 (license license:asl2.0)))
8858
8859 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8860 ;; release 0.5. Some packages like borg still call it by the old name for now.
8861 ;; <https://bugs.gnu.org/30662>
8862 (define-public python-msgpack-transitional
8863 (package
8864 (inherit python-msgpack)
8865 (name "python-msgpack-transitional")
8866 (version "0.5.6")
8867 (source (origin
8868 (method url-fetch)
8869 (uri (pypi-uri "msgpack" version))
8870 (sha256
8871 (base32
8872 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8873 (arguments
8874 (substitute-keyword-arguments (package-arguments python-msgpack)
8875 ((#:phases phases)
8876 `(modify-phases ,phases
8877 (add-after 'unpack 'configure-transitional
8878 (lambda _
8879 ;; Keep using the old name.
8880 (substitute* "setup.py"
8881 (("TRANSITIONAL = False")
8882 "TRANSITIONAL = 1"))
8883 #t))))))))
8884
8885 (define-public python2-msgpack
8886 (package-with-python2 python-msgpack))
8887
8888 (define-public python-netaddr
8889 (package
8890 (name "python-netaddr")
8891 (version "0.7.19")
8892 (source
8893 (origin
8894 (method url-fetch)
8895 (uri (pypi-uri "netaddr" version))
8896 (sha256
8897 (base32
8898 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8899 (build-system python-build-system)
8900 (arguments `(#:tests? #f)) ;; No tests.
8901 (home-page "https://github.com/drkjam/netaddr/")
8902 (synopsis "Pythonic manipulation of network addresses")
8903 (description
8904 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8905 and MAC network addresses.")
8906 (license license:bsd-3)))
8907
8908 (define-public python2-netaddr
8909 (package-with-python2 python-netaddr))
8910
8911 (define-public python2-pyroute2
8912 (package
8913 (name "python2-pyroute2")
8914 (version "0.5.6")
8915 (source
8916 (origin
8917 (method url-fetch)
8918 (uri (pypi-uri "pyroute2" version))
8919 (sha256
8920 (base32
8921 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8922 (build-system python-build-system)
8923 (arguments
8924 `(#:python ,python-2)) ;Python 3.x is not supported
8925 (home-page "https://github.com/svinota/pyroute2")
8926 (synopsis "Python netlink library")
8927 (description
8928 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8929 Supported netlink families and protocols include:
8930 @itemize
8931 @item rtnl, network settings - addresses, routes, traffic controls
8932 @item nfnetlink - netfilter API: ipset, nftables, ...
8933 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8934 @item devlink - manage and monitor devlink-enabled hardware
8935 @item generic - generic netlink families
8936 @itemize
8937 @item nl80211 - wireless functions API (basic support)
8938 @item taskstats - extended process statistics
8939 @item acpi_events - ACPI events monitoring
8940 @item thermal_events - thermal events monitoring
8941 @item VFS_DQUOT - disk quota events monitoring
8942 @end itemize
8943 @end itemize")
8944 (license license:gpl2+)))
8945
8946 (define-public python-wrapt
8947 (package
8948 (name "python-wrapt")
8949 (version "1.11.2")
8950 (source
8951 (origin
8952 (method url-fetch)
8953 (uri (pypi-uri "wrapt" version))
8954 (sha256
8955 (base32
8956 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8957 (build-system python-build-system)
8958 (arguments
8959 ;; Tests are not included in the tarball, they are only available in the
8960 ;; git repository.
8961 `(#:tests? #f))
8962 (home-page "https://github.com/GrahamDumpleton/wrapt")
8963 (synopsis "Module for decorators, wrappers and monkey patching")
8964 (description
8965 "The aim of the wrapt module is to provide a transparent object proxy for
8966 Python, which can be used as the basis for the construction of function
8967 wrappers and decorator functions.")
8968 (license license:bsd-2)))
8969
8970 (define-public python2-wrapt
8971 (package-with-python2 python-wrapt))
8972
8973 (define-public python-commonmark
8974 (package
8975 (name "python-commonmark")
8976 (version "0.9.1")
8977 (source
8978 (origin
8979 (method url-fetch)
8980 (uri (pypi-uri "commonmark" version))
8981 (sha256
8982 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
8983 (build-system python-build-system)
8984 (arguments
8985 `(#:phases
8986 (modify-phases %standard-phases
8987 (replace 'check
8988 (lambda* (#:key inputs outputs #:allow-other-keys)
8989 (add-installed-pythonpath inputs outputs)
8990 (invoke "python" "setup.py" "test"))))))
8991 (home-page "https://github.com/readthedocs/commonmark.py")
8992 (synopsis "Python parser for the CommonMark Markdown spec")
8993 (description
8994 "This module is a pure Python port of jgm's @code{commonmark.js}, a
8995 Markdown parser and renderer for the CommonMark specification, using only
8996 native modules.")
8997 (license license:bsd-3)))
8998
8999 (define-public python-xlrd
9000 (package
9001 (name "python-xlrd")
9002 (version "1.2.0")
9003 (source (origin
9004 (method url-fetch)
9005 (uri (pypi-uri "xlrd" version))
9006 (sha256
9007 (base32
9008 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9009 (build-system python-build-system)
9010 (arguments
9011 `(#:phases
9012 (modify-phases %standard-phases
9013 ;; Some tests depend on writing a temporary file to the user's home
9014 ;; directory.
9015 (add-after 'unpack 'fix-tests
9016 (lambda _
9017 (delete-file "tests/test_open_workbook.py")
9018 #t)))))
9019 (home-page "http://www.python-excel.org/")
9020 (synopsis "Library for extracting data from Excel files")
9021 (description "This package provides a library to extract data from
9022 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9023 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9024 Unicode-aware. It is not intended as an end-user tool.")
9025 (license license:bsd-3)))
9026
9027 (define-public python2-xlrd
9028 (package-with-python2 python-xlrd))
9029
9030 (define-public python-immutables
9031 (package
9032 (name "python-immutables")
9033 (version "0.14")
9034 (source
9035 (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "immutables" version))
9038 (sha256
9039 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9040 (build-system python-build-system)
9041 (home-page "https://github.com/MagicStack/immutables")
9042 (synopsis "High-performance immutable mapping type for Python")
9043 (description
9044 "An immutable mapping type for Python. The underlying datastructure is a
9045 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9046 functional languages.")
9047 (license license:asl2.0)))
9048
9049 (define-public python-prettytable
9050 (package
9051 (name "python-prettytable")
9052 (version "0.7.2")
9053 (source
9054 (origin
9055 (method url-fetch)
9056 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9057 (sha256
9058 (base32
9059 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9060 (build-system python-build-system)
9061 (home-page "https://code.google.com/archive/p/prettytable/")
9062 (synopsis "Display tabular data in an ASCII table format")
9063 (description
9064 "A library designed to represent tabular data in visually appealing ASCII
9065 tables. PrettyTable allows for selection of which columns are to be printed,
9066 independent alignment of columns (left or right justified or centred) and
9067 printing of sub-tables by specifying a row range.")
9068 (license license:bsd-3)))
9069
9070 (define-public python2-prettytable
9071 (package-with-python2 python-prettytable))
9072
9073 (define-public python-curio
9074 (package
9075 (name "python-curio")
9076 (version "1.2")
9077 (source
9078 (origin
9079 (method url-fetch)
9080 (uri (pypi-uri "curio" version))
9081 (sha256
9082 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9083 (build-system python-build-system)
9084 (arguments
9085 `(#:phases
9086 (modify-phases %standard-phases
9087 (replace 'check
9088 (lambda* (#:key inputs outputs #:allow-other-keys)
9089 (add-installed-pythonpath inputs outputs)
9090 (invoke "pytest" "-vv" "-k"
9091 ;; Tries to open an outgoing connection.
9092 "not test_ssl_outgoing"))))))
9093 (native-inputs
9094 `(("python-pytest" ,python-pytest)))
9095 (home-page "https://github.com/dabeaz/curio")
9096 (synopsis "Coroutine-based library for concurrent Python")
9097 (description
9098 "Curio is a coroutine-based library for concurrent Python systems
9099 programming. It provides standard programming abstractions such as as
9100 tasks, sockets, files, locks, and queues.")
9101 (license license:bsd-3)))
9102
9103 (define-public python-tables
9104 (package
9105 (name "python-tables")
9106 (version "3.6.1")
9107 (source
9108 (origin
9109 (method url-fetch)
9110 (uri (pypi-uri "tables" version))
9111 (sha256
9112 (base32
9113 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9114 (modules '((guix build utils)))
9115 (snippet
9116 '(begin
9117 ;; Remove pre-compiled .pyc files from source.
9118 (for-each delete-file-recursively
9119 (find-files "." "__pycache__" #:directories? #t))
9120 (for-each delete-file (find-files "." "\\.pyc$"))
9121 #t))))
9122 (build-system python-build-system)
9123 (arguments
9124 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9125 ;; or "check", so we must override the build and check phases.
9126 #:phases
9127 (modify-phases %standard-phases
9128 (add-after 'unpack 'use-gcc
9129 (lambda _
9130 (substitute* "setup.py"
9131 (("^( +)compiler = new_compiler\\(\\)" line indent)
9132 (string-append line
9133 "\n"
9134 indent
9135 "compiler.set_executables(compiler='gcc',"
9136 "compiler_so='gcc',"
9137 "linker_exe='gcc',"
9138 "linker_so='gcc -shared')")))
9139 #t))
9140 (add-after 'unpack 'disable-tuning
9141 (lambda _
9142 (substitute* "setup.py"
9143 (("cpu_flags = .*")
9144 "cpu_flags = ['sse2']\n"))
9145 #t))
9146 (replace 'build
9147 (lambda* (#:key inputs #:allow-other-keys)
9148 (invoke "python" "setup.py" "build"
9149 (string-append "--hdf5="
9150 (assoc-ref inputs "hdf5")))))
9151 (replace 'check
9152 (lambda* (#:key inputs #:allow-other-keys)
9153 (invoke "python" "setup.py" "check"
9154 (string-append "--hdf5="
9155 (assoc-ref inputs "hdf5"))))))))
9156 (propagated-inputs
9157 `(("python-numexpr" ,python-numexpr)
9158 ("python-numpy" ,python-numpy)))
9159 (native-inputs
9160 `(("python-cython" ,python-cython)
9161 ("pkg-config" ,pkg-config)))
9162 (inputs
9163 `(("hdf5" ,hdf5-1.10)
9164 ("bzip2" ,bzip2)
9165 ("zlib" ,zlib)))
9166 (home-page "https://www.pytables.org/")
9167 (synopsis "Hierarchical datasets for Python")
9168 (description "PyTables is a package for managing hierarchical datasets and
9169 designed to efficiently cope with extremely large amounts of data.")
9170 (license license:bsd-3)))
9171
9172 (define-public python2-tables
9173 (package-with-python2 python-tables))
9174
9175 (define-public python-sniffio
9176 (package
9177 (name "python-sniffio")
9178 (version "1.1.0")
9179 (source
9180 (origin
9181 (method url-fetch)
9182 (uri (pypi-uri "sniffio" version))
9183 (sha256
9184 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9185 (build-system python-build-system)
9186 (arguments
9187 `(#:phases
9188 (modify-phases %standard-phases
9189 (replace 'check
9190 (lambda _
9191 (invoke "pytest" "-vv"))))))
9192 (native-inputs
9193 `(("python-curio" ,python-curio)
9194 ("python-pytest" ,python-pytest)
9195 ("python-pytest-cov" ,python-pytest-cov)))
9196 (home-page "https://github.com/python-trio/sniffio")
9197 (synopsis "Detect which async library a program is running under")
9198 (description "This package detects which async library a program is
9199 running under. It supports multiple async I/O packages, like Trio, and
9200 asyncio.")
9201 ;; Either license applies.
9202 (license (list license:expat license:asl2.0))))
9203
9204 (define-public python-pytest-black
9205 (package
9206 (name "python-pytest-black")
9207 (version "0.3.8")
9208 (source
9209 (origin
9210 (method url-fetch)
9211 (uri (pypi-uri "pytest-black" version))
9212 (sha256
9213 (base32
9214 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9215 (build-system python-build-system)
9216 (propagated-inputs
9217 `(("python-pytest" ,python-pytest)
9218 ("python-black" ,python-black)
9219 ("python-toml" ,python-toml)))
9220 (native-inputs
9221 `(("python-setuptools-scm" ,python-setuptools-scm)))
9222 (home-page "https://github.com/shopkeep/pytest-black")
9223 (synopsis "Pytest plugin to enable format checking with black")
9224 (description
9225 "This package provides a pytest plugin to enable format checking with the
9226 Python code formatter \"black\".")
9227 (license license:expat)))
9228
9229 (define-public python-get-version
9230 (package
9231 (name "python-get-version")
9232 (version "2.1")
9233 (source
9234 (origin
9235 (method url-fetch)
9236 (uri (pypi-uri "get_version" version))
9237 (sha256
9238 (base32
9239 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9240 (build-system python-build-system)
9241 (propagated-inputs
9242 `(("python-pygments" ,python-pygments)
9243 ("python-pytest" ,python-pytest)
9244 ("python-pytest-black" ,python-pytest-black)
9245 ("python-pytest-cov" ,python-pytest-cov)
9246 ("python-setuptools" ,python-setuptools)
9247 ("python-testpath" ,python-testpath)))
9248 (home-page "https://github.com/flying-sheep/get_version")
9249 (synopsis "Version helper in the spirit of versioneer")
9250 (description
9251 "This package provides a version helper that lets you automatically use
9252 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9253 also supports getting the version from Python source distributions or, once
9254 your package is installed, via @code{pkg_resources} (part of
9255 @code{setuptools}).")
9256 (license license:gpl3+)))
9257
9258 (define-public python-legacy-api-wrap
9259 (package
9260 (name "python-legacy-api-wrap")
9261 (version "1.2")
9262 (source
9263 (origin
9264 (method url-fetch)
9265 (uri (pypi-uri "legacy-api-wrap" version))
9266 (sha256
9267 (base32
9268 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9269 (build-system python-build-system)
9270 (propagated-inputs
9271 `(("python-get-version" ,python-get-version)
9272 ("python-pytest" ,python-pytest)
9273 ("python-pytest-black" ,python-pytest-black)
9274 ("python-pytest-cov" ,python-pytest-cov)
9275 ("python-setuptools" ,python-setuptools)))
9276 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9277 (synopsis "Legacy API wrapper")
9278 (description "This module defines a decorator to wrap legacy APIs. The
9279 primary use case is APIs defined before keyword-only parameters existed.")
9280 (license license:gpl3+)))
9281
9282 (define-public python-pyasn1
9283 (package
9284 (name "python-pyasn1")
9285 (version "0.4.8")
9286 (source
9287 (origin
9288 (method url-fetch)
9289 (uri (pypi-uri "pyasn1" version))
9290 (sha256
9291 (base32
9292 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9293 (build-system python-build-system)
9294 (home-page "http://pyasn1.sourceforge.net/")
9295 (synopsis "ASN.1 types and codecs")
9296 (description
9297 "This is an implementation of ASN.1 types and codecs in Python. It is
9298 suitable for a wide range of protocols based on the ASN.1 specification.")
9299 (license license:bsd-2)))
9300
9301 (define-public python2-pyasn1
9302 (package-with-python2 python-pyasn1))
9303
9304 (define-public python-pyasn1-modules
9305 (package
9306 (name "python-pyasn1-modules")
9307 (version "0.2.2")
9308 (source
9309 (origin
9310 (method url-fetch)
9311 (uri (pypi-uri "pyasn1-modules" version))
9312 (sha256
9313 (base32
9314 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9315 (build-system python-build-system)
9316 (propagated-inputs
9317 `(("python-pyasn1" ,python-pyasn1)))
9318 (home-page "https://sourceforge.net/projects/pyasn1/")
9319 (synopsis "ASN.1 codec implementations")
9320 (description
9321 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9322 implementations of ASN.1-based codecs and protocols.")
9323 (license license:bsd-3)))
9324
9325 (define-public python2-pyasn1-modules
9326 (package-with-python2 python-pyasn1-modules))
9327
9328 (define-public python-ipaddress
9329 (package
9330 (name "python-ipaddress")
9331 (version "1.0.22")
9332 (source (origin
9333 (method url-fetch)
9334 (uri (pypi-uri "ipaddress" version))
9335 (sha256
9336 (base32
9337 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9338 (build-system python-build-system)
9339 (home-page "https://github.com/phihag/ipaddress")
9340 (synopsis "IP address manipulation library")
9341 (description
9342 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9343 in Python. This library is used to create, poke at, and manipulate IPv4 and
9344 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9345 module to older versions of Python.")
9346 (license license:psfl)))
9347
9348 (define-public python2-ipaddress
9349 (package-with-python2 python-ipaddress))
9350
9351 (define-public python2-ipaddr
9352 (package
9353 (name "python2-ipaddr")
9354 (version "2.1.11")
9355 (source
9356 (origin
9357 (method url-fetch)
9358 (uri (pypi-uri "ipaddr" version))
9359 (sha256
9360 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9361 (build-system python-build-system)
9362 (arguments
9363 `(#:python ,python-2 ;version 2 only
9364 #:phases
9365 (modify-phases %standard-phases
9366 (replace 'check
9367 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9368 (home-page "https://github.com/google/ipaddr-py")
9369 (synopsis "IP address manipulation library")
9370 (description
9371 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9372 IPv6 addresses and networks.
9373
9374 For new implementations you may prefer to use the standard module
9375 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9376 versions of Python.")
9377 (license license:asl2.0)))
9378
9379 (define-public python-idna
9380 (package
9381 (name "python-idna")
9382 (version "2.10")
9383 (source
9384 (origin
9385 (method url-fetch)
9386 (uri (pypi-uri "idna" version))
9387 (sha256
9388 (base32
9389 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9390 (build-system python-build-system)
9391 (home-page "https://github.com/kjd/idna")
9392 (synopsis "Internationalized domain names in applications")
9393 (description
9394 "This is a library to support the Internationalised Domain Names in
9395 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9396 protocol is often referred to as “IDNA2008” and can produce different results
9397 from the earlier standard from 2003. The library is also intended to act as a
9398 suitable drop-in replacement for the “encodings.idna” module that comes with
9399 the Python standard library but currently only supports the older 2003
9400 specification.")
9401 (license license:bsd-4)))
9402
9403 (define-public python-idna-2.7
9404 (package (inherit python-idna)
9405 (version "2.7")
9406 (source (origin
9407 (method url-fetch)
9408 (uri (pypi-uri "idna" version))
9409 (sha256
9410 (base32
9411 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9412
9413
9414 (define-public python2-idna
9415 (package-with-python2 python-idna))
9416
9417 (define-public python-libsass
9418 (package
9419 (name "python-libsass")
9420 (version "0.20.1")
9421 (source
9422 (origin
9423 ;; PyPI tarball is missing some test files.
9424 (method git-fetch)
9425 (uri (git-reference
9426 (url "https://github.com/sass/libsass-python")
9427 (commit version)))
9428 (file-name (git-file-name name version))
9429 (sha256
9430 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9431 (build-system python-build-system)
9432 (arguments
9433 `(#:phases
9434 (modify-phases %standard-phases
9435 ;; Use Guix package of libsass instead of compiling from a checkout.
9436 (add-before 'build 'set-libsass
9437 (lambda _
9438 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9439 #t))
9440 (replace 'check
9441 (lambda* (#:key inputs outputs #:allow-other-keys)
9442 (add-installed-pythonpath inputs outputs)
9443 (invoke "pytest" "sasstests.py"))))))
9444 (native-inputs
9445 `(("python-pytest" ,python-pytest)
9446 ("python-werkzeug" ,python-werkzeug)))
9447 (inputs
9448 `(("libsass" ,libsass)))
9449 (propagated-inputs
9450 `(("python-six" ,python-six)))
9451 (home-page "https://sass.github.io/libsass-python/")
9452 (synopsis "Straightforward binding of libsass for Python")
9453 (description
9454 "This package provides a simple Python extension module @code{sass} which
9455 is binding LibSass.")
9456 (license license:expat)))
9457
9458 (define-public python-idna-ssl
9459 (package
9460 (name "python-idna-ssl")
9461 (version "1.0.1")
9462 (source
9463 (origin
9464 (method url-fetch)
9465 (uri (pypi-uri "idna-ssl" version))
9466 (sha256
9467 (base32
9468 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9469 (build-system python-build-system)
9470 (arguments
9471 `(#:tests? #f)) ;circular dependency with python-aiohttp
9472 (home-page "https://github.com/aio-libs/idna-ssl")
9473 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9474 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9475 domains support.")
9476 (license license:expat)))
9477
9478 (define-public python-pretend
9479 (package
9480 (name "python-pretend")
9481 (version "1.0.9")
9482 (source
9483 (origin
9484 (method url-fetch)
9485 (uri (pypi-uri "pretend" version))
9486 (sha256
9487 (base32
9488 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9489 (build-system python-build-system)
9490 (home-page "https://github.com/alex/pretend")
9491 (synopsis "Library for stubbing in Python")
9492 (description
9493 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9494 technique for writing tests. You may hear the term mixed up with mocks,
9495 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9496 responses, rather than doing any computation.")
9497 (license license:bsd-3)))
9498
9499 (define-public python2-pretend
9500 (package-with-python2 python-pretend))
9501
9502 (define-public python-pip
9503 (package
9504 (name "python-pip")
9505 (version "20.2.4")
9506 (source
9507 (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "pip" version))
9510 (sha256
9511 (base32
9512 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9513 (build-system python-build-system)
9514 (arguments
9515 '(#:tests? #f)) ; there are no tests in the pypi archive.
9516 (home-page "https://pip.pypa.io/")
9517 (synopsis "Package manager for Python software")
9518 (description
9519 "Pip is a package manager for Python software, that finds packages on the
9520 Python Package Index (PyPI).")
9521 (license license:expat)))
9522
9523 (define-public python2-pip
9524 (package-with-python2 python-pip))
9525
9526 (define-public python-tlsh
9527 (package
9528 (name "python-tlsh")
9529 (version "3.4.5")
9530 (home-page "https://github.com/trendmicro/tlsh")
9531 (source
9532 (origin
9533 (method git-fetch)
9534 (uri (git-reference
9535 (url "https://github.com/trendmicro/tlsh")
9536 (commit (string-append "v" version))))
9537 (file-name (git-file-name name version))
9538 (sha256
9539 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9540 (build-system cmake-build-system)
9541 (arguments
9542 '(#:out-of-source? #f
9543 #:phases (modify-phases %standard-phases
9544 (replace
9545 'install
9546 (lambda* (#:key outputs #:allow-other-keys)
9547 ;; Build and install the Python bindings. The underlying
9548 ;; C++ library is apparently not meant to be installed.
9549 (let ((out (assoc-ref outputs "out")))
9550 (with-directory-excursion "py_ext"
9551 (and (system* "python" "setup.py" "build")
9552 (system* "python" "setup.py" "install"
9553 (string-append "--prefix=" out))))))))))
9554 (inputs `(("python" ,python-wrapper))) ;for the bindings
9555 (synopsis "Fuzzy matching library for Python")
9556 (description
9557 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9558 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9559 value which can be used for similarity comparisons. Similar objects have
9560 similar hash values, which allows for the detection of similar objects by
9561 comparing their hash values. The byte stream should have a sufficient amount
9562 of complexity; for example, a byte stream of identical bytes will not generate
9563 a hash value.")
9564 (license license:asl2.0)))
9565
9566 (define-public python2-tlsh
9567 (package
9568 (inherit python-tlsh)
9569 (name "python2-tlsh")
9570 (inputs `(("python" ,python-2)))))
9571
9572 (define-public python-termcolor
9573 (package
9574 (name "python-termcolor")
9575 (version "1.1.0")
9576 (source
9577 (origin
9578 (method url-fetch)
9579 (uri (pypi-uri "termcolor" version))
9580 (sha256
9581 (base32
9582 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9583 (build-system python-build-system)
9584 (arguments
9585 ;; There are no tests.
9586 `(#:tests? #f))
9587 (home-page "https://pypi.org/project/termcolor/")
9588 (synopsis "ANSII Color formatting for terminal output")
9589 (description
9590 "This package provides ANSII Color formatting for output in terminals.")
9591 (license license:expat)))
9592
9593 (define-public python2-termcolor
9594 (package-with-python2 python-termcolor))
9595
9596 (define-public python-terminaltables
9597 (package
9598 (name "python-terminaltables")
9599 (version "3.1.0")
9600 (source
9601 (origin
9602 (method url-fetch)
9603 (uri (pypi-uri "terminaltables" version))
9604 (sha256
9605 (base32
9606 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9607 (build-system python-build-system)
9608 (home-page "https://github.com/Robpol86/terminaltables")
9609 (synopsis
9610 "Generate simple tables in terminals from a nested list of strings")
9611 (description
9612 "This package makes it easy to draw tables in terminal/console
9613 applications from a list of lists of strings. It supports multi-line rows.")
9614 (license license:expat)))
9615
9616 (define-public python-libarchive-c
9617 (package
9618 (name "python-libarchive-c")
9619 (version "2.9")
9620 (source (origin
9621 (method url-fetch)
9622 (uri (pypi-uri "libarchive-c" version))
9623 (sha256
9624 (base32
9625 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9626 (build-system python-build-system)
9627 (arguments
9628 '(#:phases (modify-phases %standard-phases
9629 (add-before
9630 'build 'reference-libarchive
9631 (lambda* (#:key inputs #:allow-other-keys)
9632 ;; Retain the absolute file name of libarchive.so.
9633 (let ((libarchive (assoc-ref inputs "libarchive")))
9634 (substitute* "libarchive/ffi.py"
9635 (("find_library\\('archive'\\)")
9636 (string-append "'" libarchive
9637 "/lib/libarchive.so'"))))))
9638 (replace 'check
9639 (lambda _ (invoke "pytest" "-vv"))))))
9640 (native-inputs
9641 `(("python-mock" ,python-mock)
9642 ("python-pytest" ,python-pytest)))
9643 (inputs
9644 `(("libarchive" ,libarchive)))
9645 (home-page "https://github.com/Changaco/python-libarchive-c")
9646 (synopsis "Python interface to libarchive")
9647 (description
9648 "This package provides Python bindings to libarchive, a C library to
9649 access possibly compressed archives in many different formats. It uses
9650 Python's @code{ctypes} foreign function interface (FFI).")
9651 (license license:lgpl2.0+)))
9652
9653 (define-public python2-libarchive-c
9654 (package-with-python2 python-libarchive-c))
9655
9656 (define-public python-file
9657 (package
9658 (inherit file)
9659 (name "python-file")
9660 (build-system python-build-system)
9661 (arguments
9662 '(#:tests? #f ;no tests
9663 #:configure-flags '("--single-version-externally-managed" "--root=/")
9664 #:phases (modify-phases %standard-phases
9665 (add-before 'build 'change-directory
9666 (lambda _
9667 (chdir "python")
9668 #t))
9669 (add-before 'build 'set-library-file-name
9670 (lambda* (#:key inputs #:allow-other-keys)
9671 (let ((file (assoc-ref inputs "file")))
9672 (substitute* "magic.py"
9673 (("find_library\\('magic'\\)")
9674 (string-append "'" file "/lib/libmagic.so'")))
9675 #t))))))
9676 (inputs `(("file" ,file)))
9677 (native-inputs (if (%current-target-system)
9678 `(("self" ,this-package))
9679 '()))
9680 (synopsis "Python bindings to the libmagic file type guesser")
9681 (description "This package provides Python bindings to the libmagic file
9682 type guesser.
9683
9684 Note that this module and the @code{python-magic} module both provide a
9685 @file{magic.py} file; these two modules, which are different and were
9686 developed separately, both serve the same purpose: provide Python bindings for
9687 libmagic.")))
9688
9689 (define-public python2-file
9690 (package-with-python2 python-file))
9691
9692 (define-public python-debian
9693 (package
9694 (name "python-debian")
9695 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9696 (version "0.1.36")
9697 (source
9698 (origin
9699 ;; Use git-fetch, as pypi doesn't include test suite.
9700 (method git-fetch)
9701 (uri (git-reference
9702 (url home-page)
9703 (commit version)))
9704 (file-name (git-file-name name version))
9705 (sha256
9706 (base32
9707 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9708 (build-system python-build-system)
9709 (arguments
9710 `(#:phases (modify-phases %standard-phases
9711 (add-after 'unpack 'remove-debian-specific-tests
9712 ;; python-apt, apt and dpkg are not yet available in guix,
9713 ;; and these tests heavily depend on them.
9714 (lambda _
9715 (delete-file "lib/debian/tests/test_deb822.py")
9716 (delete-file "lib/debian/tests/test_debfile.py")
9717 #t)))))
9718 (propagated-inputs
9719 `(("python-six" ,python-six)
9720 ("python-chardet" ,python-chardet)))
9721 (synopsis "Debian package related modules")
9722 (description
9723 ;; XXX: Use @enumerate instead of @itemize to work around
9724 ;; <http://bugs.gnu.org/21772>.
9725 "This package provides Python modules that abstract many formats of
9726 Debian-related files, such as:
9727
9728 @enumerate
9729 @item Debtags information;
9730 @item @file{debian/changelog} files;
9731 @item packages files, pdiffs;
9732 @item control files of single or multiple RFC822-style paragraphs---e.g.
9733 @file{debian/control}, @file{.changes}, @file{.dsc};
9734 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9735 contained files and meta-information.
9736 @end enumerate\n")
9737
9738 ;; Modules are either GPLv2+ or GPLv3+.
9739 (license license:gpl3+)))
9740
9741 (define-public python-nbformat
9742 (package
9743 (name "python-nbformat")
9744 (version "4.4.0")
9745 (source
9746 (origin
9747 (method url-fetch)
9748 (uri (pypi-uri "nbformat" version))
9749 (sha256
9750 (base32
9751 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9752 (build-system python-build-system)
9753 (arguments `(#:tests? #f)) ; no test target
9754 (propagated-inputs
9755 `(("python-ipython-genutils" ,python-ipython-genutils)
9756 ("python-jsonschema" ,python-jsonschema)
9757 ("python-jupyter-core" ,python-jupyter-core)
9758 ("python-traitlets" ,python-traitlets)))
9759 (home-page "http://jupyter.org")
9760 (synopsis "Jupyter Notebook format")
9761 (description "This package provides the reference implementation of the
9762 Jupyter Notebook format and Python APIs for working with notebooks.")
9763 (license license:bsd-3)))
9764
9765 (define-public python2-nbformat
9766 (package-with-python2 python-nbformat))
9767
9768 (define-public python-bleach
9769 (package
9770 (name "python-bleach")
9771 (version "3.1.5")
9772 (source
9773 (origin
9774 (method url-fetch)
9775 (uri (pypi-uri "bleach" version))
9776 (sha256
9777 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9778 (build-system python-build-system)
9779 (propagated-inputs
9780 `(("python-webencodings" ,python-webencodings)
9781 ("python-six" ,python-six)))
9782 (native-inputs
9783 `(("python-datrie" ,python-datrie)
9784 ("python-genshi" ,python-genshi)
9785 ("python-lxml" ,python-lxml)
9786 ("python-pytest" ,python-pytest)))
9787 (home-page "https://github.com/mozilla/bleach")
9788 (synopsis "Whitelist-based HTML-sanitizing tool")
9789 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9790 (license license:asl2.0)))
9791
9792 (define-public python2-bleach
9793 (package-with-python2 python-bleach))
9794
9795 (define-public python-entrypoints
9796 (package
9797 (name "python-entrypoints")
9798 (version "0.3")
9799 (source
9800 (origin
9801 (method url-fetch)
9802 (uri (pypi-uri "entrypoints" version))
9803 (sha256
9804 (base32
9805 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9806 (build-system python-build-system)
9807 ;; The package does not come with a setup.py file, so we have to generate
9808 ;; one ourselves.
9809 (arguments
9810 `(#:tests? #f
9811 #:phases
9812 (modify-phases %standard-phases
9813 (add-after 'unpack 'create-setup.py
9814 (lambda _
9815 (call-with-output-file "setup.py"
9816 (lambda (port)
9817 (format port "\
9818 from setuptools import setup
9819 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9820 " ,version))))))))
9821 (home-page "https://github.com/takluyver/entrypoints")
9822 (synopsis "Discover and load entry points from installed Python packages")
9823 (description "Entry points are a way for Python packages to advertise
9824 objects with some common interface. The most common examples are
9825 @code{console_scripts} entry points, which define shell commands by
9826 identifying a Python function to run. The @code{entrypoints} module contains
9827 functions to find and load entry points.")
9828 (license license:expat)))
9829
9830 (define-public python2-entrypoints
9831 (package-with-python2 python-entrypoints))
9832
9833 (define-public python-epc
9834 (package
9835 (name "python-epc")
9836 (version "0.0.5")
9837 (source
9838 (origin
9839 (method url-fetch)
9840 (uri (pypi-uri "epc" version))
9841 (sha256
9842 (base32
9843 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9844 (build-system python-build-system)
9845 (propagated-inputs
9846 `(("python-sexpdata" ,python-sexpdata)))
9847 (native-inputs
9848 `(("python-nose" ,python-nose)))
9849 (home-page "https://github.com/tkf/python-epc")
9850 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9851 (description
9852 "Python-EPC can call elisp functions from Python and Python functions
9853 from elisp.")
9854 (license license:gpl3)))
9855
9856 (define-public python-forex-python
9857 (package
9858 (name "python-forex-python")
9859 (version "1.5")
9860 (source
9861 (origin
9862 (method url-fetch)
9863 (uri (pypi-uri "forex-python" version))
9864 (sha256
9865 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9866 (build-system python-build-system)
9867 (arguments
9868 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9869 ;; repository require online data.
9870 `(#:tests? #f))
9871 (propagated-inputs
9872 `(("python-requests" ,python-requests)
9873 ("python-simplejson" ,python-simplejson)))
9874 (home-page "https://github.com/MicroPyramid/forex-python")
9875 (synopsis "Foreign exchange rates and currency conversion")
9876 (description
9877 "@code{python-forex-python} can be used to manipulate foreign
9878 exchange rates and to operate currency conversions.
9879
9880 Features:
9881 @itemize
9882 @item List all currency rates.
9883 @item BitCoin price for all currencies.
9884 @item Converting amount to BitCoins.
9885 @item Get historical rates for any day since 1999.
9886 @item Conversion rate for one currency(ex; USD to INR).
9887 @item Convert amount from one currency to other.('USD 10$' to INR).
9888 @item Currency symbols.
9889 @item Currency names.
9890 @end itemize")
9891 (license license:expat)))
9892
9893 (define-public python-simpleeval
9894 (package
9895 (name "python-simpleeval")
9896 (version "0.9.10")
9897 (source
9898 (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "simpleeval" version))
9901 (sha256
9902 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9903 (build-system python-build-system)
9904 (home-page "https://github.com/danthedeckie/simpleeval")
9905 (synopsis "Simple, safe single expression evaluator library")
9906 (description
9907 "This package provides a quick single file library for easily adding
9908 evaluatable expressions into python projects. Say you want to allow a user
9909 to set an alarm volume, which could depend on the time of day, alarm level,
9910 how many previous alarms had gone off, and if there is music playing at the
9911 time.")
9912 (license license:expat)))
9913
9914 (define-public python-nbconvert
9915 (package
9916 (name "python-nbconvert")
9917 (version "5.0.0b1")
9918 (source
9919 (origin
9920 (method url-fetch)
9921 (uri (pypi-uri "nbconvert" version))
9922 (sha256
9923 (base32
9924 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9925 (build-system python-build-system)
9926 (arguments
9927 `(;; The "bdist_egg" target is disabled by default, causing the installation
9928 ;; to fail.
9929 #:configure-flags (list "bdist_egg")
9930 ;; FIXME: 5 failures, 40 errors.
9931 #:tests? #f))
9932 ;; #:phases
9933 ;; (modify-phases %standard-phases
9934 ;; (replace 'check
9935 ;; (lambda _
9936 ;; (zero? (system* "py.test" "-v")))))
9937 (native-inputs
9938 `(("python-pytest" ,python-pytest)))
9939 (propagated-inputs
9940 `(("python-bleach" ,python-bleach)
9941 ("python-entrypoints" ,python-entrypoints)
9942 ("python-jinja2" ,python-jinja2)
9943 ("python-jupyter-core" ,python-jupyter-core)
9944 ("python-mistune" ,python-mistune)
9945 ("python-nbformat" ,python-nbformat)
9946 ("python-pygments" ,python-pygments)
9947 ("python-traitlets" ,python-traitlets)))
9948 (home-page "http://jupyter.org")
9949 (synopsis "Converting Jupyter Notebooks")
9950 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9951 notebooks to various other formats via Jinja templates. It allows you to
9952 convert an @code{.ipynb} notebook file into various static formats including:
9953
9954 @enumerate
9955 @item HTML
9956 @item LaTeX
9957 @item PDF
9958 @item Reveal JS
9959 @item Markdown (md)
9960 @item ReStructured Text (rst)
9961 @item executable script
9962 @end enumerate\n")
9963 (license license:bsd-3)))
9964
9965 (define-public python2-nbconvert
9966 (package-with-python2 python-nbconvert))
9967
9968 (define-public python-notebook
9969 (package
9970 (name "python-notebook")
9971 (version "5.7.4")
9972 (source (origin
9973 (method url-fetch)
9974 (uri (pypi-uri "notebook" version))
9975 (sha256
9976 (base32
9977 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9978 (build-system python-build-system)
9979 (arguments
9980 `(#:phases
9981 (modify-phases %standard-phases
9982 (replace 'check
9983 (lambda _
9984 ;; These tests require a browser
9985 (delete-file-recursively "notebook/tests/selenium")
9986 ;; Some tests need HOME
9987 (setenv "HOME" "/tmp")
9988 ;; This file contains "warningfilters", which are not supported
9989 ;; by this version of nose.
9990 (delete-file "setup.cfg")
9991 (with-directory-excursion "/tmp"
9992 (invoke "nosetests" "-v"))
9993 #t)))))
9994 (propagated-inputs
9995 `(("python-jupyter-core" ,python-jupyter-core)
9996 ("python-nbformat" ,python-nbformat)
9997 ("python-nbconvert" ,python-nbconvert)
9998 ("python-prometheus-client" ,python-prometheus-client)
9999 ("python-send2trash" ,python-send2trash)
10000 ("python-terminado" ,python-terminado)))
10001 (native-inputs
10002 `(("python-nose" ,python-nose)
10003 ("python-sphinx" ,python-sphinx)
10004 ("python-requests" ,python-requests)))
10005 (home-page "http://jupyter.org/")
10006 (synopsis "Web-based notebook environment for interactive computing")
10007 (description
10008 "The Jupyter HTML notebook is a web-based notebook environment for
10009 interactive computing.")
10010 (properties `((python2-variant . ,(delay python2-notebook))))
10011 (license license:bsd-3)))
10012
10013 (define-public python2-notebook
10014 (let ((base (package-with-python2
10015 (strip-python2-variant python-notebook))))
10016 (package (inherit base)
10017 (native-inputs
10018 `(("python2-mock" ,python2-mock)
10019 ,@(package-native-inputs base)))
10020 (arguments
10021 (substitute-keyword-arguments (package-arguments base)
10022 ((#:phases phases)
10023 `(modify-phases ,phases
10024 (add-before 'check 'disable-test-case
10025 ;; The test requires network access to localhost. Curiously it
10026 ;; fails with Python 2 only. Simply make the test-case return
10027 ;; immediately.
10028 (lambda _
10029 (substitute*
10030 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10031 (("formats = self.nbconvert_api") "return #")))))))))))
10032
10033 (define-public python-widgetsnbextension
10034 (package
10035 (name "python-widgetsnbextension")
10036 (version "3.5.1")
10037 (source
10038 (origin
10039 (method url-fetch)
10040 (uri (pypi-uri "widgetsnbextension" version))
10041 (sha256
10042 (base32
10043 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10044 (build-system python-build-system)
10045 (propagated-inputs
10046 `(("python-ipykernel" ,python-ipykernel)
10047 ("python-notebook" ,python-notebook)))
10048 (native-inputs
10049 `(("python-certifi" ,python-certifi)
10050 ("python-nose" ,python-nose)))
10051 (home-page "https://ipython.org")
10052 (synopsis "IPython HTML widgets for Jupyter")
10053 (description "This package provides interactive HTML widgets for Jupyter
10054 notebooks.")
10055 (license license:bsd-3)))
10056
10057 (define-public python2-widgetsnbextension
10058 (package-with-python2 python-widgetsnbextension))
10059
10060 (define-public python-ipywidgets
10061 (package
10062 (name "python-ipywidgets")
10063 (version "7.5.1")
10064 (source
10065 (origin
10066 (method url-fetch)
10067 (uri (pypi-uri "ipywidgets" version))
10068 (sha256
10069 (base32
10070 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10071 (build-system python-build-system)
10072 (propagated-inputs
10073 `(("python-ipython" ,python-ipython)
10074 ("python-traitlets" ,python-traitlets)
10075 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10076 (native-inputs
10077 `(("python-nose" ,python-nose)
10078 ("python-pytest" ,python-pytest)))
10079 (home-page "https://ipython.org")
10080 (synopsis "IPython HTML widgets for Jupyter")
10081 (description "Ipywidgets are interactive HTML widgets for Jupyter
10082 notebooks and the IPython kernel. Notebooks come alive when interactive
10083 widgets are used. Users gain control of their data and can visualize changes
10084 in the data.")
10085 (license license:bsd-3)))
10086
10087 (define-public python2-ipywidgets
10088 (package-with-python2 python-ipywidgets))
10089
10090 (define-public python-jupyter-console
10091 (package
10092 (name "python-jupyter-console")
10093 (version "6.1.0")
10094 (source
10095 (origin
10096 (method url-fetch)
10097 (uri (pypi-uri "jupyter_console" version))
10098 (sha256
10099 (base32
10100 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10101 (build-system python-build-system)
10102 (propagated-inputs
10103 `(("python-ipykernel" ,python-ipykernel)
10104 ("python-jupyter-client" ,python-jupyter-client)
10105 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10106 ("python-pygments" ,python-pygments)))
10107 (native-inputs
10108 `(("python-nose" ,python-nose)))
10109 (home-page "https://jupyter.org")
10110 (synopsis "Jupyter terminal console")
10111 (description "This package provides a terminal-based console frontend for
10112 Jupyter kernels. It also allows for console-based interaction with non-Python
10113 Jupyter kernels such as IJulia and IRKernel.")
10114 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10115 (license license:bsd-3)))
10116
10117 (define-public python2-jupyter-console
10118 (package
10119 (name "python2-jupyter-console")
10120 (version "5.2.0")
10121 (source
10122 (origin
10123 (method url-fetch)
10124 (uri (pypi-uri "jupyter_console" version))
10125 (sha256
10126 (base32
10127 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10128 (build-system python-build-system)
10129 (arguments
10130 `(#:python ,python-2
10131 #:tests? #f)) ; Tests only run in a TTY.
10132 (propagated-inputs
10133 `(("python2-ipykernel" ,python2-ipykernel)
10134 ("python2-jupyter-client" ,python2-jupyter-client)
10135 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10136 ("python2-pygments" ,python2-pygments)))
10137 (native-inputs
10138 `(("python2-nose" ,python2-nose)))
10139 (home-page "https://jupyter.org")
10140 (synopsis "Jupyter terminal console")
10141 (description "This package provides a terminal-based console frontend for
10142 Jupyter kernels. It also allows for console-based interaction with non-Python
10143 Jupyter kernels such as IJulia and IRKernel.")
10144 (license license:bsd-3)))
10145
10146 ;; The python-ipython and python-jupyter-console require each other. To get
10147 ;; the functionality in both packages working, strip down the
10148 ;; python-jupyter-console package when using it as an input to python-ipython.
10149 (define python-jupyter-console-minimal
10150 (package
10151 (inherit python-jupyter-console)
10152 (name "python-jupyter-console-minimal")
10153 (arguments
10154 (substitute-keyword-arguments
10155 (package-arguments python-jupyter-console)
10156 ((#:phases phases)
10157 `(modify-phases ,phases
10158 (add-after 'install 'delete-bin
10159 (lambda* (#:key outputs #:allow-other-keys)
10160 ;; Delete the bin files, to avoid conflicts in profiles
10161 ;; where python-ipython and python-jupyter-console are
10162 ;; both present.
10163 (delete-file-recursively
10164 (string-append
10165 (assoc-ref outputs "out") "/bin"))))))))
10166 ;; Remove the python-ipython propagated input, to avoid the cycle
10167 (propagated-inputs
10168 (alist-delete
10169 "python-ipython"
10170 (package-propagated-inputs python-jupyter-console)))))
10171
10172 (define-public python-qtconsole
10173 (package
10174 (name "python-qtconsole")
10175 (version "4.4.3")
10176 (source
10177 (origin
10178 (method url-fetch)
10179 (uri (pypi-uri "qtconsole" version))
10180 (sha256
10181 (base32
10182 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10183 (build-system python-build-system)
10184 (arguments
10185 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10186 ;; but we only have the LTS version 5.x. This means that there might be
10187 ;; runtime errors, but since this is a dependency of the Jupyter package,
10188 ;; and Jupyter can be used without the qtconsole we can overlook this for
10189 ;; now.
10190 `(#:tests? #f
10191 #:phases
10192 (modify-phases %standard-phases
10193 (add-before 'check 'pre-check
10194 (lambda _
10195 (setenv "QT_QPA_PLATFORM" "offscreen")
10196 #t)))))
10197 (propagated-inputs
10198 `(("python-ipykernel" ,python-ipykernel)
10199 ("python-ipython" ,python-ipython)))
10200 (native-inputs
10201 `(("python-pytest" ,python-pytest)))
10202 (home-page "http://jupyter.org")
10203 (synopsis "Jupyter Qt console")
10204 (description "This package provides a Qt-based console for Jupyter with
10205 support for rich media output.")
10206 (license license:bsd-3)))
10207
10208 (define-public python-jsbeautifier
10209 (package
10210 (name "python-jsbeautifier")
10211 (version "1.10.2")
10212 (home-page "https://github.com/beautify-web/js-beautify")
10213 (source (origin
10214 (method git-fetch)
10215 (uri (git-reference
10216 (url home-page)
10217 (commit (string-append "v" version))))
10218 (file-name (git-file-name name version))
10219 (sha256
10220 (base32
10221 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10222 (build-system python-build-system)
10223 (arguments
10224 `(#:phases (modify-phases %standard-phases
10225 (add-after 'unpack 'chdir
10226 (lambda _
10227 ;; The upstream Git repository contains all the code,
10228 ;; but this package only builds the python code.
10229 (chdir "python")
10230 #t))
10231 (add-after 'unpack 'patch-python-six-requirements
10232 (lambda _
10233 (substitute* "python/setup.py"
10234 (("six>=1.12.0")
10235 "six>=1.11.0"))
10236 #t)))))
10237 (propagated-inputs
10238 `(("python-editorconfig" ,python-editorconfig)
10239 ("python-six" ,python-six)))
10240 (native-inputs
10241 `(("python-pytest" ,python-pytest)))
10242 (synopsis "JavaScript unobfuscator and beautifier")
10243 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10244 popular online obfuscators.")
10245 (license license:expat)))
10246
10247 (define-public jupyter
10248 (package
10249 (name "jupyter")
10250 (version "1.0.0")
10251 (source
10252 (origin
10253 (method url-fetch)
10254 (uri (pypi-uri "jupyter" version))
10255 (sha256
10256 (base32
10257 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10258 (build-system python-build-system)
10259 (arguments '(#:tests? #f)) ; there are none.
10260 (propagated-inputs
10261 `(("python-ipykernel" ,python-ipykernel)
10262 ("python-ipywidgets" ,python-ipywidgets)
10263 ("python-jupyter-console" ,python-jupyter-console)
10264 ("python-nbconvert" ,python-nbconvert)
10265 ("python-notebook" ,python-notebook)
10266 ("python-qtconsole" ,python-qtconsole)))
10267 (native-search-paths
10268 (list (search-path-specification
10269 (variable "JUPYTER_PATH")
10270 (files '("share/jupyter")))))
10271 (home-page "https://jupyter.org")
10272 (synopsis "Web application for interactive documents")
10273 (description
10274 "The Jupyter Notebook is a web application that allows you to create and
10275 share documents that contain live code, equations, visualizations and
10276 explanatory text. Uses include: data cleaning and transformation, numerical
10277 simulation, statistical modeling, machine learning and much more.")
10278 (license license:bsd-3)))
10279
10280 (define-public python-chardet
10281 (package
10282 (name "python-chardet")
10283 (version "3.0.4")
10284 (source
10285 (origin
10286 (method url-fetch)
10287 (uri (pypi-uri "chardet" version))
10288 (sha256
10289 (base32
10290 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10291 (native-inputs
10292 `(("python-hypothesis" ,python-hypothesis)
10293 ("python-pytest" ,python-pytest)
10294 ("python-pytest-runner" ,python-pytest-runner)))
10295 (build-system python-build-system)
10296 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10297 (arguments `(#:tests? #f))
10298 (home-page "https://github.com/chardet/chardet")
10299 (synopsis "Universal encoding detector for Python 2 and 3")
10300 (description
10301 "This package provides @code{chardet}, a Python module that can
10302 automatically detect a wide range of file encodings.")
10303 (license license:lgpl2.1+)))
10304
10305 (define-public python2-chardet
10306 (package-with-python2 python-chardet))
10307
10308 (define-public python-docopt
10309 (package
10310 (name "python-docopt")
10311 (version "0.6.2")
10312 (source
10313 (origin
10314 (method git-fetch)
10315 ;; The release on PyPI does not include tests.
10316 (uri (git-reference
10317 (url "https://github.com/docopt/docopt")
10318 (commit version)))
10319 (file-name (git-file-name name version))
10320 (sha256
10321 (base32
10322 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10323 (build-system python-build-system)
10324 (native-inputs
10325 `(("python-pytest" ,python-pytest)))
10326 (arguments
10327 `(#:phases
10328 (modify-phases %standard-phases
10329 (replace 'check
10330 (lambda _ (invoke "py.test"))))))
10331 (home-page "http://docopt.org")
10332 (synopsis "Command-line interface description language for Python")
10333 (description "This library allows the user to define a command-line
10334 interface from a program's help message rather than specifying it
10335 programmatically with command-line parsers like @code{getopt} and
10336 @code{argparse}.")
10337 (license license:expat)))
10338
10339 (define-public python2-docopt
10340 (package-with-python2 python-docopt))
10341
10342 (define-public python-pythondialog
10343 (package
10344 (name "python-pythondialog")
10345 (version "3.4.0")
10346 (source
10347 (origin
10348 (method url-fetch)
10349 (uri (pypi-uri "pythondialog" version))
10350 (sha256
10351 (base32
10352 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10353 (build-system python-build-system)
10354 (arguments
10355 `(#:phases
10356 (modify-phases %standard-phases
10357 (add-after 'unpack 'patch-path
10358 (lambda* (#:key inputs #:allow-other-keys)
10359 (let* ((dialog (assoc-ref inputs "dialog")))
10360 ;; Since this library really wants to grovel the search path, we
10361 ;; must hardcode dialog's store path into it.
10362 (substitute* "dialog.py"
10363 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10364 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10365 #t))))
10366 #:tests? #f)) ; no test suite
10367 (propagated-inputs
10368 `(("dialog" ,dialog)))
10369 (home-page "http://pythondialog.sourceforge.net/")
10370 (synopsis "Python interface to the UNIX dialog utility")
10371 (description "A Python wrapper for the dialog utility. Its purpose is to
10372 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10373 This allows one to make simple text-mode user interfaces on Unix-like systems")
10374 (license license:lgpl2.1)
10375 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10376
10377 (define-public python2-pythondialog
10378 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10379 (package
10380 (inherit base)
10381 (version (package-version python-pythondialog))
10382 (source (origin
10383 (method url-fetch)
10384 (uri (pypi-uri "python2-pythondialog" version))
10385 (sha256
10386 (base32
10387 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10388
10389 (define-public python-configobj
10390 (package
10391 (name "python-configobj")
10392 (version "5.0.6")
10393 (source (origin
10394 (method url-fetch)
10395 (uri (pypi-uri "configobj" version))
10396 (sha256
10397 (base32
10398 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10399 ;; Patch setup.py so it looks for python-setuptools, which is
10400 ;; required to parse the keyword 'install_requires' in setup.py.
10401 (patches (search-patches "python-configobj-setuptools.patch"))))
10402 (build-system python-build-system)
10403 (propagated-inputs
10404 `(("python-six" ,python-six)))
10405 (synopsis "Config file reading, writing and validation")
10406 (description "ConfigObj is a simple but powerful config file reader and
10407 writer: an ini file round tripper. Its main feature is that it is very easy to
10408 use, with a straightforward programmer’s interface and a simple syntax for
10409 config files.")
10410 (home-page "https://github.com/DiffSK/configobj")
10411 (license license:bsd-3)))
10412
10413 (define-public python2-configobj
10414 (package-with-python2 python-configobj))
10415
10416 (define-public python-configargparse
10417 (package
10418 (name "python-configargparse")
10419 (version "1.2.3")
10420 (source (origin
10421 (method url-fetch)
10422 (uri (pypi-uri "ConfigArgParse" version))
10423 (sha256
10424 (base32
10425 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10426 (build-system python-build-system)
10427 (native-inputs
10428 `(("python-pyyaml" ,python-pyyaml)))
10429 (arguments
10430 `(#:phases
10431 (modify-phases %standard-phases
10432 (replace 'check
10433 (lambda _
10434 ;; Bypass setuptools-shim because one test relies on "setup.py"
10435 ;; being the first argument passed to the python call.
10436 ;;
10437 ;; NOTE: Many tests do not run because they rely on Python's
10438 ;; built-in test.test_argparse, but we remove the unit tests from
10439 ;; our Python installation.
10440 (invoke "python" "setup.py" "test"))))))
10441 (synopsis "Replacement for argparse")
10442 (description "A drop-in replacement for argparse that allows options to also
10443 be set via config files and/or environment variables.")
10444 (home-page "https://github.com/bw2/ConfigArgParse")
10445 (license license:expat)))
10446
10447 (define-public python-argparse-manpage
10448 (package
10449 (name "python-argparse-manpage")
10450 (version "1.1")
10451 (source
10452 (origin
10453 (method url-fetch)
10454 (uri (pypi-uri "argparse-manpage" version))
10455 (sha256
10456 (base32
10457 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10458 (build-system python-build-system)
10459 (home-page "https://github.com/praiskup/argparse-manpage")
10460 (synopsis "Build manual page from Python's ArgumentParser object")
10461 (description
10462 "This package provides tools to build manual pages from Python's
10463 @code{ArgumentParser} object.")
10464 (license license:asl2.0)))
10465
10466 (define-public python-contextlib2
10467 (package
10468 (name "python-contextlib2")
10469 (version "0.6.0.post1")
10470 (source
10471 (origin
10472 (method url-fetch)
10473 (uri (pypi-uri "contextlib2" version))
10474 (sha256
10475 (base32
10476 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10477 (build-system python-build-system)
10478 (home-page "https://contextlib2.readthedocs.org/")
10479 (synopsis "Tools for decorators and context managers")
10480 (description "This module is primarily a backport of the Python
10481 3.2 contextlib to earlier Python versions. Like contextlib, it
10482 provides utilities for common tasks involving decorators and context
10483 managers. It also contains additional features that are not part of
10484 the standard library.")
10485 (properties `((python2-variant . ,(delay python2-contextlib2))))
10486 (license license:psfl)))
10487
10488 (define-public python2-contextlib2
10489 (let ((base (package-with-python2
10490 (strip-python2-variant python-contextlib2))))
10491 (package
10492 (inherit base)
10493 (arguments
10494 (substitute-keyword-arguments (package-arguments base)
10495 ((#:phases phases)
10496 `(modify-phases ,phases
10497 (replace 'check
10498 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10499 (native-inputs
10500 `(("python2-unittest2" ,python2-unittest2))))))
10501
10502 ;; This package is used by python2-pytest via python2-importlib-metadata,
10503 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10504 (define-public python2-contextlib2-bootstrap
10505 (hidden-package
10506 (package/inherit
10507 python2-contextlib2
10508 (name "python2-contextlib2-bootstrap")
10509 (arguments
10510 `(#:tests? #f
10511 ,@(package-arguments python2-contextlib2)))
10512 (native-inputs '()))))
10513
10514 (define-public python-texttable
10515 (package
10516 (name "python-texttable")
10517 (version "1.6.2")
10518 (source
10519 (origin
10520 (method url-fetch)
10521 (uri (pypi-uri "texttable" version))
10522 (sha256
10523 (base32
10524 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10525 (build-system python-build-system)
10526 (arguments
10527 `(#:phases
10528 (modify-phases %standard-phases
10529 (replace 'check
10530 (lambda _ (invoke "pytest" "tests.py"))))))
10531 (native-inputs
10532 `(("python-pytest" ,python-pytest)))
10533 (home-page "https://github.com/foutaise/texttable/")
10534 (synopsis "Python module for creating simple ASCII tables")
10535 (description "Texttable is a Python module for creating simple ASCII
10536 tables.")
10537 (license license:expat)))
10538
10539 (define-public python2-texttable
10540 (package-with-python2 python-texttable))
10541
10542 (define-public python-atomicwrites
10543 (package
10544 (name "python-atomicwrites")
10545 (version "1.3.0")
10546 (source (origin
10547 (method url-fetch)
10548 (uri (pypi-uri "atomicwrites" version))
10549 (sha256
10550 (base32
10551 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10552 (build-system python-build-system)
10553 (synopsis "Atomic file writes in Python")
10554 (description "Library for atomic file writes using platform dependent tools
10555 for atomic file system operations.")
10556 (home-page "https://github.com/untitaker/python-atomicwrites")
10557 (license license:expat)))
10558
10559 (define-public python2-atomicwrites
10560 (package-with-python2 python-atomicwrites))
10561
10562 (define-public python-click-threading
10563 (package
10564 (name "python-click-threading")
10565 (version "0.4.4")
10566 (source (origin
10567 (method url-fetch)
10568 (uri (pypi-uri "click-threading" version))
10569 (sha256
10570 (base32
10571 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10572 (build-system python-build-system)
10573 (propagated-inputs
10574 `(("python-click" ,python-click)))
10575 (synopsis "Utilities for multithreading in Click")
10576 (description "This package provides utilities for multithreading in Click
10577 applications.")
10578 (home-page "https://github.com/click-contrib/click-threading")
10579 (license license:expat)))
10580
10581 (define-public python-click-log
10582 (package
10583 (name "python-click-log")
10584 (version "0.3.2")
10585 (source (origin
10586 (method url-fetch)
10587 (uri (pypi-uri "click-log" version))
10588 (sha256
10589 (base32
10590 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10591 (build-system python-build-system)
10592 (propagated-inputs
10593 `(("python-click" ,python-click)))
10594 (synopsis "Logging for click applications")
10595 (description "This package provides a Python library for logging Click
10596 applications.")
10597 (home-page "https://github.com/click-contrib/click-log")
10598 (license license:expat)))
10599
10600 (define-public python-apipkg
10601 (package
10602 (name "python-apipkg")
10603 (version "1.5")
10604 (source (origin
10605 (method url-fetch)
10606 (uri (pypi-uri "apipkg" version))
10607 (sha256
10608 (base32
10609 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10610 (build-system python-build-system)
10611 (native-inputs
10612 `(("python-pytest" ,python-pytest)
10613 ("python-setuptools-scm" ,python-setuptools-scm)))
10614 (synopsis "Namespace control and lazy-import mechanism")
10615 (description "With apipkg you can control the exported namespace of a Python
10616 package and greatly reduce the number of imports for your users. It is a small
10617 pure Python module that works on virtually all Python versions.")
10618 (home-page "https://github.com/pytest-dev/apipkg")
10619 (license license:expat)))
10620
10621 (define-public python-execnet
10622 (package
10623 (name "python-execnet")
10624 (version "1.4.1")
10625 (source (origin
10626 (method url-fetch)
10627 (uri (pypi-uri "execnet" version))
10628 (sha256
10629 (base32
10630 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10631 (build-system python-build-system)
10632 (arguments
10633 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10634 ;; The two test failures are caused by the lack of an `ssh` executable.
10635 ;; The test suite can be run with pytest after the 'install' phase.
10636 #:tests? #f))
10637 (native-inputs
10638 `(("python-pytest" ,python-pytest)
10639 ("python-setuptools-scm" ,python-setuptools-scm)))
10640 (propagated-inputs
10641 `(("python-apipkg" ,python-apipkg)))
10642 (synopsis "Rapid multi-Python deployment")
10643 (description "Execnet provides a share-nothing model with
10644 channel-send/receive communication for distributing execution across many
10645 Python interpreters across version, platform and network barriers. It has a
10646 minimal and fast API targeting the following uses:
10647 @enumerate
10648 @item distribute tasks to (many) local or remote CPUs
10649 @item write and deploy hybrid multi-process applications
10650 @item write scripts to administer multiple environments
10651 @end enumerate")
10652 (home-page "https://codespeak.net/execnet/")
10653 (license license:expat)))
10654
10655 (define-public python2-execnet
10656 (package-with-python2 python-execnet))
10657
10658 (define-public python-icalendar
10659 (package
10660 (name "python-icalendar")
10661 (version "4.0.5")
10662 (source (origin
10663 (method url-fetch)
10664 (uri (pypi-uri "icalendar" version))
10665 (sha256
10666 (base32
10667 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10668 (build-system python-build-system)
10669 (propagated-inputs
10670 `(("python-dateutil" ,python-dateutil)
10671 ("python-pytz" ,python-pytz)))
10672 (synopsis "Python library for parsing iCalendar files")
10673 (description "The icalendar package is a parser/generator of iCalendar
10674 files for use with Python.")
10675 (home-page "https://github.com/collective/icalendar")
10676 (license license:bsd-2)))
10677
10678 (define-public python-args
10679 (package
10680 (name "python-args")
10681 (version "0.1.0")
10682 (source (origin
10683 (method url-fetch)
10684 (uri (pypi-uri "args" version))
10685 (sha256
10686 (base32
10687 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10688 (build-system python-build-system)
10689 (home-page "https://github.com/kennethreitz/args")
10690 (synopsis "Command-line argument parser")
10691 (description
10692 "This library provides a Python module to parse command-line arguments.")
10693 (license license:bsd-3)))
10694
10695 (define-public python2-args
10696 (package-with-python2 python-args))
10697
10698 (define-public python-clint
10699 (package
10700 (name "python-clint")
10701 (version "0.5.1")
10702 (source (origin
10703 (method url-fetch)
10704 (uri (pypi-uri "clint" version))
10705 (sha256
10706 (base32
10707 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10708 (build-system python-build-system)
10709 (arguments
10710 '(#:phases
10711 (modify-phases %standard-phases
10712 (replace 'check
10713 (lambda _ (invoke "py.test" "-v"))))))
10714 (native-inputs
10715 `(("python-pytest" ,python-pytest)))
10716 (propagated-inputs
10717 `(("python-args" ,python-args)))
10718 (home-page "https://github.com/kennethreitz/clint")
10719 (synopsis "Command-line interface tools")
10720 (description
10721 "Clint is a Python module filled with a set of tools for developing
10722 command-line applications, including tools for colored and indented
10723 output, progress bar display, and pipes.")
10724 (license license:isc)))
10725
10726 (define-public python2-clint
10727 (package-with-python2 python-clint))
10728
10729 (define-public python-rply
10730 (package
10731 (name "python-rply")
10732 (version "0.7.5")
10733 (source (origin
10734 (method url-fetch)
10735 (uri (pypi-uri "rply" version))
10736 (sha256
10737 (base32
10738 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10739 (build-system python-build-system)
10740 (propagated-inputs
10741 `(("python-appdirs" ,python-appdirs)))
10742 (home-page "https://github.com/alex/rply")
10743 (synopsis "Parser generator for Python")
10744 (description
10745 "This package provides a pure Python based parser generator, that also
10746 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10747 with a new public API, and RPython support.")
10748 (license license:bsd-3)))
10749
10750 (define-public python2-rply
10751 (package-with-python2 python-rply))
10752
10753 (define-public python-hy
10754 (package
10755 (name "python-hy")
10756 (version "0.18.0")
10757 (source (origin
10758 (method url-fetch)
10759 (uri (pypi-uri "hy" version))
10760 (sha256
10761 (base32
10762 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10763 (build-system python-build-system)
10764 (arguments
10765 '(#:phases
10766 (modify-phases %standard-phases
10767 (add-before 'install 'set-HOME
10768 (lambda _
10769 (setenv "HOME" "/tmp") #t))
10770 (replace 'check
10771 (lambda _
10772 ;; Tests require write access to HOME.
10773 (setenv "HOME" "/tmp")
10774 (invoke "nosetests"))))))
10775 (native-inputs
10776 `(("python-coverage" ,python-coverage)
10777 ("python-nose" ,python-nose)))
10778 (propagated-inputs
10779 `(("python-astor" ,python-astor)
10780 ("python-colorama" ,python-colorama)
10781 ("python-rply" ,python-rply)
10782 ("python-funcparserlib"
10783 ,python-funcparserlib)))
10784 (home-page "http://hylang.org/")
10785 (synopsis "Lisp frontend to Python")
10786 (description
10787 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10788 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10789 Python at your fingertips, in Lisp form.")
10790 (license license:expat)))
10791
10792 (define-public python2-functools32
10793 (package
10794 (name "python2-functools32")
10795 (version "3.2.3-2")
10796 (source
10797 (origin
10798 (method url-fetch)
10799 (uri (pypi-uri "functools32" version))
10800 (sha256
10801 (base32
10802 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10803 (build-system python-build-system)
10804 (arguments
10805 `(#:python ,python-2
10806 #:tests? #f)) ; no test target
10807 (home-page "https://github.com/MiCHiLU/python-functools32")
10808 (synopsis
10809 "Backport of the functools module from Python 3.2.3")
10810 (description
10811 "This package is a backport of the @code{functools} module from Python
10812 3.2.3 for use with older versions of Python and PyPy.")
10813 (license license:expat)))
10814
10815 (define-public python2-subprocess32
10816 (package
10817 (name "python2-subprocess32")
10818 (version "3.2.7")
10819 (source (origin
10820 (method url-fetch)
10821 (uri (pypi-uri "subprocess32" version))
10822 (sha256
10823 (base32
10824 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10825 (patches
10826 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10827 (build-system python-build-system)
10828 (arguments
10829 `(#:python ,python-2
10830 ;; The test suite fails with Python > 2.7.13:
10831 ;; import test.support
10832 ;; ImportError: No module named support
10833 #:tests? #f
10834 #:phases
10835 (modify-phases %standard-phases
10836 (add-after 'unpack 'patch-/bin/sh
10837 (lambda _
10838 (substitute* '("subprocess32.py"
10839 "test_subprocess32.py")
10840 (("/bin/sh") (which "sh")))
10841 #t)))))
10842 (home-page "https://github.com/google/python-subprocess32")
10843 (synopsis "Backport of the subprocess module from Python 3.2")
10844 (description
10845 "This is a backport of the @code{subprocess} standard library module
10846 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10847 new features. On POSIX systems it is guaranteed to be reliable when used
10848 in threaded applications. It includes timeout support from Python 3.3 but
10849 otherwise matches 3.2’s API.")
10850 (license license:psfl)))
10851
10852 (define-public python2-futures
10853 (package
10854 (name "python2-futures")
10855 (version "3.2.0")
10856 (source
10857 (origin
10858 (method url-fetch)
10859 (uri (pypi-uri "futures" version))
10860 (sha256
10861 (base32
10862 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10863 (build-system python-build-system)
10864 (arguments
10865 `(#:python ,python-2
10866 #:phases
10867 (modify-phases %standard-phases
10868 (replace 'check
10869 (lambda _
10870 (invoke "python" "test_futures.py")
10871 #t)))))
10872 (home-page "https://github.com/agronholm/pythonfutures")
10873 (synopsis
10874 "Backport of the concurrent.futures package from Python 3.2")
10875 (description
10876 "The concurrent.futures module provides a high-level interface for
10877 asynchronously executing callables. This package backports the
10878 concurrent.futures package from Python 3.2")
10879 (license license:bsd-3)))
10880
10881 (define-public python-promise
10882 (package
10883 (name "python-promise")
10884 (version "0.4.2")
10885 (source
10886 (origin
10887 (method url-fetch)
10888 (uri (pypi-uri "promise" version))
10889 (sha256
10890 (base32
10891 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10892 (build-system python-build-system)
10893 ;; Tests wants python-futures, which is a python2 only program, and
10894 ;; can't be found by python-promise at test time.
10895 (arguments `(#:tests? #f))
10896 (home-page "https://github.com/syrusakbary/promise")
10897 (synopsis "Promises/A+ implementation for Python")
10898 (description
10899 "Promises/A+ implementation for Python")
10900 (properties `((python2-variant . ,(delay python2-promise))))
10901 (license license:expat)))
10902
10903 (define-public python2-promise
10904 (let ((promise (package-with-python2
10905 (strip-python2-variant python-promise))))
10906 (package (inherit promise)
10907 (arguments (substitute-keyword-arguments (package-arguments promise)
10908 ((#:tests? _) #t)))
10909 (native-inputs
10910 `(("python2-futures" ,python2-futures)
10911 ("python2-pytest" ,python2-pytest)
10912 ,@(package-native-inputs promise))))))
10913
10914 (define-public python-progressbar2
10915 (package
10916 (name "python-progressbar2")
10917 (version "3.51.3")
10918 (source
10919 (origin
10920 (method url-fetch)
10921 (uri (pypi-uri "progressbar2" version))
10922 (sha256
10923 (base32
10924 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10925 (build-system python-build-system)
10926 (propagated-inputs
10927 `(("python-six" ,python-six)
10928 ("python-utils" ,python-utils)))
10929 (native-inputs
10930 `(("python-flake8" ,python-flake8)
10931 ("python-freezegun" ,python-freezegun)
10932 ("python-pycodestyle" ,python-pycodestyle)
10933 ("python-pytest" ,python-pytest)
10934 ("python-pytest-cache" ,python-pytest-cache)
10935 ("python-pytest-cov" ,python-pytest-cov)
10936 ("python-pytest-flakes" ,python-pytest-flakes)
10937 ("python-pytest-pep8" ,python-pytest-pep8)
10938 ("python-sphinx" ,python-sphinx)))
10939 (home-page "https://github.com/WoLpH/python-progressbar")
10940 (synopsis "Text progress bar library for Python")
10941 (description
10942 "This package provides a Python progressbar library to provide
10943 visual (yet text based) progress to long running operations.")
10944 (license license:bsd-3)))
10945
10946 (define-public python-progressbar33
10947 (package
10948 (name "python-progressbar33")
10949 (version "2.4")
10950 (source
10951 (origin
10952 (method url-fetch)
10953 (uri (pypi-uri "progressbar33" version))
10954 (sha256
10955 (base32
10956 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10957 (build-system python-build-system)
10958 (home-page "https://github.com/germangh/python-progressbar")
10959 (synopsis "Text progress bar library for Python")
10960 (description
10961 "This package provides a text progress bar library for Python. This
10962 version only differs from the original @code{progressbar} package in that it
10963 uses relative package imports instead of absolute imports, which is necessary
10964 for the module to work under Python 3.3.")
10965 ;; Either or both of these licenses may be selected.
10966 (license (list license:lgpl2.1+ license:bsd-3))))
10967
10968 (define-public python-colorama
10969 (package
10970 (name "python-colorama")
10971 (version "0.4.4")
10972 (source
10973 (origin
10974 (method url-fetch)
10975 (uri (pypi-uri "colorama" version))
10976 (sha256
10977 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
10978 (build-system python-build-system)
10979 (synopsis "Colored terminal text rendering for Python")
10980 (description "Colorama is a Python library for rendering colored terminal
10981 text.")
10982 (home-page "https://pypi.org/project/colorama/")
10983 (license license:bsd-3)))
10984
10985 (define-public python2-colorama
10986 (package-with-python2 python-colorama))
10987
10988 (define-public python-moto
10989 (package
10990 (name "python-moto")
10991 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
10992 (version "1.3.16.dev134")
10993 (source (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "moto" version))
10996 (sha256
10997 (base32
10998 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
10999 (build-system python-build-system)
11000 (arguments
11001 `(#:phases (modify-phases %standard-phases
11002 (add-after 'unpack 'patch-hardcoded-executable-names
11003 (lambda _
11004 (substitute* "moto/batch/models.py"
11005 (("/bin/sh")
11006 (which "sh")))
11007 (substitute* (find-files "tests" "\\.py$")
11008 (("#!/bin/bash")
11009 (string-append "#!" (which "bash"))))
11010 #t))
11011 (replace 'check
11012 (lambda _
11013 (setenv "PYTHONPATH" (string-append "./build/lib:"
11014 (getenv "PYTHONPATH")))
11015 (invoke "pytest" "-vv" "-m" "not network"
11016 ;; These tests require Docker.
11017 "-k" "not test_terminate_job \
11018 and not test_invoke_function_from_sqs_exception"))))))
11019 (native-inputs
11020 `(("python-flask" ,python-flask)
11021 ("python-flask-cors" ,python-flask-cors)
11022 ("python-freezegun" ,python-freezegun)
11023 ("python-parameterized" ,python-parameterized)
11024 ("python-pytest" ,python-pytest)
11025 ("python-sure" ,python-sure)))
11026 (propagated-inputs
11027 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11028 ("python-boto" ,python-boto)
11029 ("python-boto3" ,python-boto3)
11030 ("python-botocore" ,python-botocore)
11031 ("python-cfn-lint" ,python-cfn-lint)
11032 ("python-cryptography" ,python-cryptography)
11033 ("python-dateutil" ,python-dateutil)
11034 ("python-docker" ,python-docker)
11035 ("python-idna" ,python-idna)
11036 ("python-jinja2" ,python-jinja2)
11037 ("python-jose" ,python-jose)
11038 ("python-jsondiff" ,python-jsondiff)
11039 ("python-mock" ,python-mock)
11040 ("python-pytz" ,python-pytz)
11041 ("python-pyyaml" ,python-pyyaml)
11042 ("python-requests" ,python-requests)
11043 ("python-responses" ,python-responses)
11044 ("python-six" ,python-six)
11045 ("python-sshpubkeys" ,python-sshpubkeys)
11046 ("python-werkzeug" ,python-werkzeug)
11047 ("python-xmltodict" ,python-xmltodict)))
11048 (home-page "https://github.com/spulec/moto")
11049 (synopsis "Mock out the boto library")
11050 (description
11051 "@code{moto} is a library designed to easily mock out the
11052 @code{boto} library.")
11053 (license license:asl2.0)))
11054
11055 (define-public python-rsa
11056 (package
11057 (name "python-rsa")
11058 (version "3.4.2")
11059 (source
11060 (origin
11061 (method url-fetch)
11062 (uri (pypi-uri "rsa" version))
11063 (sha256
11064 (base32
11065 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11066 (build-system python-build-system)
11067 (propagated-inputs
11068 `(("python-pyasn1" ,python-pyasn1)))
11069 (synopsis "Pure-Python RSA implementation")
11070 (description "Python-RSA is a pure-Python RSA implementation. It supports
11071 encryption and decryption, signing and verifying signatures, and key
11072 generation according to PKCS#1 version 1.5. It can be used as a Python
11073 library as well as on the command line.")
11074 (home-page "https://stuvel.eu/rsa")
11075 (license license:asl2.0)))
11076
11077 (define-public python2-rsa
11078 (package-with-python2 python-rsa))
11079
11080 (define-public python-pluggy
11081 (package
11082 (name "python-pluggy")
11083 (version "0.13.1")
11084 (source
11085 (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "pluggy" version))
11088 (sha256
11089 (base32
11090 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11091 (build-system python-build-system)
11092 (native-inputs
11093 `(("python-setuptools-scm" ,python-setuptools-scm)))
11094 (synopsis "Plugin and hook calling mechanism for Python")
11095 (description "Pluggy is an extraction of the plugin manager as used by
11096 Pytest but stripped of Pytest specific details.")
11097 (home-page "https://pypi.org/project/pluggy/")
11098 (properties `((python2-variant . ,(delay python2-pluggy))))
11099 (license license:expat)))
11100
11101 (define-public python2-pluggy
11102 (let ((base (package-with-python2 (strip-python2-variant
11103 python-pluggy))))
11104 (package/inherit
11105 base
11106 (propagated-inputs
11107 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11108
11109 ;; This package requires python2-importlib-metadata, but that package
11110 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11111 ;; variant to solve the circular dependency.
11112 (define-public python2-pluggy-bootstrap
11113 (hidden-package
11114 (package/inherit
11115 python2-pluggy
11116 (name "python2-pluggy-bootstrap")
11117 (arguments
11118 `(#:tests? #f
11119 ,@(package-arguments python2-pluggy)))
11120 (propagated-inputs
11121 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11122
11123 (define-public python-tox
11124 (package
11125 (name "python-tox")
11126 (version "3.20.0")
11127 (source
11128 (origin
11129 (method url-fetch)
11130 (uri (pypi-uri "tox" version))
11131 (sha256
11132 (base32
11133 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11134 (build-system python-build-system)
11135 (arguments
11136 ;; FIXME: Tests require pytest-timeout, which itself requires
11137 ;; pytest>=2.8.0 for installation.
11138 '(#:tests? #f))
11139 (propagated-inputs
11140 `(("python-filelock" ,python-filelock)
11141 ("python-packaging" ,python-packaging)
11142 ("python-pluggy" ,python-pluggy)
11143 ("python-py" ,python-py)
11144 ("python-six" ,python-six)
11145 ("python-toml" ,python-toml)
11146 ("python-virtualenv" ,python-virtualenv)))
11147 (native-inputs
11148 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11149 ("python-pytest" ,python-pytest) ; >= 2.3.5
11150 ("python-setuptools-scm" ,python-setuptools-scm)))
11151 (home-page "https://tox.readthedocs.io")
11152 (synopsis "Virtualenv-based automation of test activities")
11153 (description "Tox is a generic virtualenv management and test command line
11154 tool. It can be used to check that a package installs correctly with
11155 different Python versions and interpreters, or run tests in each type of
11156 supported environment, or act as a frontend to continuous integration
11157 servers.")
11158 (license license:expat)))
11159
11160 (define-public python2-tox
11161 (package-with-python2 python-tox))
11162
11163 (define-public python-jmespath
11164 (package
11165 (name "python-jmespath")
11166 (version "0.9.4")
11167 (source
11168 (origin
11169 (method url-fetch)
11170 (uri (pypi-uri "jmespath" version))
11171 (sha256
11172 (base32
11173 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11174 (build-system python-build-system)
11175 (native-inputs
11176 `(("python-nose" ,python-nose)))
11177 (synopsis "JSON Matching Expressions")
11178 (description "JMESPath (pronounced “james path”) is a Python library that
11179 allows one to declaratively specify how to extract elements from a JSON
11180 document.")
11181 (home-page "https://github.com/jmespath/jmespath.py")
11182 (license license:expat)))
11183
11184 (define-public python2-jmespath
11185 (package-with-python2 python-jmespath))
11186
11187 (define-public python-symengine
11188 (package
11189 (name "python-symengine")
11190 (version "0.6.1")
11191 (source
11192 (origin
11193 (method url-fetch)
11194 (uri (pypi-uri "symengine" version))
11195 (sha256
11196 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11197 (build-system python-build-system)
11198 (native-inputs
11199 `(("cmake" ,cmake)
11200 ("python-cython" ,python-cython)))
11201 (inputs
11202 `(("symengine" ,symengine)))
11203 (home-page "https://github.com/symengine/symengine.py")
11204 (synopsis "Python library providing wrappers to SymEngine")
11205 (description
11206 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11207 manipulation library.")
11208 (license license:expat)))
11209
11210 (define-public python-boto
11211 (package
11212 (name "python-boto")
11213 (version "2.49.0")
11214 (source (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "boto" version))
11217 (sha256
11218 (base32
11219 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11220 (build-system python-build-system)
11221 (arguments
11222 ;; XXX: This package is unmaintained and has problems with newer versions
11223 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11224 ;; subset of this library, so keep it around for now, but disable tests.
11225 '(#:tests? #f))
11226 (propagated-inputs
11227 `(("python-paramiko" ,python-paramiko)
11228 ("python-requests" ,python-requests)))
11229 (home-page "https://github.com/boto/boto")
11230 (synopsis "Python interfaces for Amazon Web Services")
11231 (description
11232 "This package provides various facilities for interacting with Amazon
11233 Web Services through Python.
11234
11235 This software is unmaintained, and new projects should use @code{boto3} instead.")
11236 (license license:expat)))
11237
11238 (define-public python-botocore
11239 ;; Note: When updating botocore, also make sure that boto3 and awscli
11240 ;; are compatible.
11241 (package
11242 (name "python-botocore")
11243 (version "1.19.22")
11244 (source
11245 (origin
11246 (method url-fetch)
11247 (uri (pypi-uri "botocore" version))
11248 (sha256
11249 (base32
11250 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11251 (build-system python-build-system)
11252 (arguments
11253 ;; FIXME: Many tests are failing.
11254 '(#:tests? #f))
11255 (propagated-inputs
11256 `(("python-dateutil" ,python-dateutil)
11257 ("python-jmespath" ,python-jmespath)
11258 ("python-urllib3" ,python-urllib3)))
11259 (home-page "https://github.com/boto/botocore")
11260 (synopsis "Low-level interface to AWS")
11261 (description "Botocore is a Python library that provides a low-level
11262 interface to the Amazon Web Services (AWS) API.")
11263 (license license:asl2.0)))
11264
11265 (define-public python2-botocore
11266 (package-with-python2 python-botocore))
11267
11268 (define-public python-boto3
11269 (package
11270 (name "python-boto3")
11271 (version "1.16.22")
11272 (home-page "https://github.com/boto/boto3")
11273 (source (origin
11274 (method git-fetch)
11275 (uri (git-reference (url home-page) (commit version)))
11276 (file-name (git-file-name name version))
11277 (sha256
11278 (base32
11279 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11280 (arguments
11281 `(#:phases
11282 (modify-phases %standard-phases
11283 (add-after 'unpack 'delete-network-tests
11284 ;; Deleting integration tests because they are trying to connect to AWS.
11285 (lambda _
11286 (delete-file-recursively "tests/integration")
11287 #t)))))
11288 (build-system python-build-system)
11289 (native-inputs
11290 `(("python-nose" ,python-nose)
11291 ("python-mock" ,python-mock)))
11292 (propagated-inputs
11293 `(("python-botocore" ,python-botocore)
11294 ("python-jmespath" ,python-jmespath)
11295 ("python-s3transfer" ,python-s3transfer)))
11296 (synopsis "AWS SDK for Python")
11297 (description
11298 "Boto3 is a Python library for writing programs that interact with
11299 @acronym{AWS,Amazon Web Services}.")
11300 (license license:asl2.0)))
11301
11302 (define-public python-pyfiglet
11303 (package
11304 (name "python-pyfiglet")
11305 (version "0.8.post1")
11306 (source
11307 (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "pyfiglet" version))
11310 (sha256
11311 (base32
11312 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11313 (build-system python-build-system)
11314 (home-page "https://github.com/pwaller/pyfiglet")
11315 (synopsis "Draw ASCII art big letters in Python")
11316 (description "This module lets you draw large letter from ordinary characters
11317 in pure Python.")
11318 (license license:expat)))
11319
11320 (define-public python-xdo
11321 (package
11322 (name "python-xdo")
11323 (version "0.3")
11324 (source (origin
11325 (method url-fetch)
11326 (uri (string-append
11327 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11328 "python-xdo_" version ".orig.tar.gz"))
11329 (sha256
11330 (base32
11331 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11332 (build-system python-build-system)
11333 (arguments
11334 '(#:phases
11335 (modify-phases %standard-phases
11336 (add-before 'install 'patch-libxdo-path
11337 ;; Hardcode the path of dynamically loaded libxdo library.
11338 (lambda* (#:key inputs #:allow-other-keys)
11339 (let ((libxdo (string-append
11340 (assoc-ref inputs "xdotool")
11341 "/lib/libxdo.so")))
11342 (substitute* "xdo/_xdo.py"
11343 (("find_library\\(\"xdo\"\\)")
11344 (simple-format #f "\"~a\"" libxdo)))
11345 #t))))
11346 #:tests? #f)) ; no tests provided
11347 (propagated-inputs
11348 `(("python-six" ,python-six)))
11349 (inputs
11350 `(("xdotool" ,xdotool)
11351 ("libX11" ,libx11)))
11352 (home-page "https://tracker.debian.org/pkg/python-xdo")
11353 (synopsis "Python library for simulating X11 keyboard/mouse input")
11354 (description "Provides bindings to libxdo for manipulating X11 via simulated
11355 input. (Note that this is mostly a legacy library; you may wish to look at
11356 python-xdo for newer bindings.)")
11357 (license license:bsd-3)))
11358
11359 (define-public python2-xdo
11360 (package-with-python2 python-xdo))
11361
11362 (define-public python-mako
11363 (package
11364 (name "python-mako")
11365 (version "1.1.3")
11366 (source
11367 (origin
11368 (method url-fetch)
11369 (uri (pypi-uri "Mako" version))
11370 (sha256
11371 (base32
11372 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11373 (build-system python-build-system)
11374 (arguments
11375 `(#:phases (modify-phases %standard-phases
11376 (replace 'check
11377 (lambda* (#:key tests? #:allow-other-keys)
11378 (if tests?
11379 (invoke "nosetests" "-v")
11380 (format #t "test suite not run~%"))
11381 #t)))))
11382 (propagated-inputs
11383 `(("python-markupsafe" ,python-markupsafe)))
11384 (native-inputs
11385 `(("python-mock" ,python-mock)
11386 ("python-nose" ,python-nose)))
11387 (home-page "https://www.makotemplates.org/")
11388 (synopsis "Templating language for Python")
11389 (description "Mako is a templating language for Python that compiles
11390 templates into Python modules.")
11391 (license license:expat)))
11392
11393 (define-public python2-mako
11394 (package-with-python2 python-mako))
11395
11396 (define-public python-waitress
11397 (package
11398 (name "python-waitress")
11399 (version "1.1.0")
11400 (source
11401 (origin
11402 (method url-fetch)
11403 (uri (pypi-uri "waitress" version))
11404 (patches (search-patches "python-waitress-fix-tests.patch"))
11405 (sha256
11406 (base32
11407 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11408 (build-system python-build-system)
11409 (home-page "https://github.com/Pylons/waitress")
11410 (synopsis "Waitress WSGI server")
11411 (description "Waitress is meant to be a production-quality pure-Python WSGI
11412 server with very acceptable performance.")
11413 (license license:zpl2.1)))
11414
11415 (define-public python2-waitress
11416 (package-with-python2 python-waitress))
11417
11418 (define-public python-whichcraft
11419 (package
11420 (name "python-whichcraft")
11421 (version "0.6.1")
11422 (source
11423 (origin
11424 (method url-fetch)
11425 (uri (pypi-uri "whichcraft" version))
11426 (sha256
11427 (base32
11428 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11429 (build-system python-build-system)
11430 (native-inputs
11431 `(("python-pytest" ,python-pytest)))
11432 (home-page "https://github.com/pydanny/whichcraft")
11433 (synopsis "Cross-platform cross-python shutil.which functionality")
11434 (description
11435 "This package provides a shim of the shutil.which function that's
11436 designed to work across multiple versions of Python.")
11437 (license license:bsd-3)))
11438
11439 (define-public python-cookiecutter
11440 (package
11441 (name "python-cookiecutter")
11442 (version "1.7.2")
11443 (source
11444 (origin
11445 (method url-fetch)
11446 (uri (pypi-uri "cookiecutter" version))
11447 (sha256
11448 (base32
11449 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11450 (build-system python-build-system)
11451 (native-inputs
11452 `(("python-freezegun" ,python-freezegun)
11453 ("python-pytest" ,python-pytest)
11454 ("python-pytest-catchlog" ,python-pytest-catchlog)
11455 ("python-pytest-cov" ,python-pytest-cov)
11456 ("python-pytest-mock" ,python-pytest-mock)))
11457 (propagated-inputs
11458 `(("python-binaryornot" ,python-binaryornot)
11459 ("python-click" ,python-click)
11460 ("python-future" ,python-future)
11461 ("python-jinja2" ,python-jinja2)
11462 ("python-jinja2-time" ,python-jinja2-time)
11463 ("python-poyo" ,python-poyo)
11464 ("python-requests" ,python-requests)
11465 ("python-slugify" ,python-slugify)
11466 ("python-text-unidecode" ,python-text-unidecode)
11467 ("python-whichcraft" ,python-whichcraft)))
11468 (home-page "https://github.com/cookiecutter/cookiecutter")
11469 (synopsis
11470 "Command-line utility that creates projects from project templates")
11471 (description
11472 "This package provides a command-line utility that creates projects from
11473 project templates, e.g. creating a Python package project from a Python package
11474 project template.")
11475 (license license:bsd-3)))
11476
11477 (define-public python-pyquery
11478 (package
11479 (name "python-pyquery")
11480 (version "1.2.17")
11481 (source
11482 (origin
11483 (method url-fetch)
11484 (uri (pypi-uri "pyquery" version))
11485 (sha256
11486 (base32
11487 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11488 (build-system python-build-system)
11489 (native-inputs
11490 `(("python-webob" ,python-webob)
11491 ("python-webtest" ,python-webtest)))
11492 (propagated-inputs
11493 `(("python-lxml" ,python-lxml)
11494 ("python-cssselect" ,python-cssselect)))
11495 (home-page "https://github.com/gawel/pyquery")
11496 (synopsis "Make jQuery-like queries on xml documents")
11497 (description "pyquery allows you to make jQuery queries on xml documents.
11498 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11499 fast xml and html manipulation.")
11500 (license license:bsd-3)))
11501
11502 (define-public python-anyjson
11503 (package
11504 (name "python-anyjson")
11505 (version "0.3.3")
11506 (source
11507 (origin
11508 (method url-fetch)
11509 (uri (pypi-uri "anyjson" version))
11510 (sha256
11511 (base32
11512 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11513 (build-system python-build-system)
11514 (arguments
11515 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11516 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11517 ;; whatever) so this transformation needs to be done before the tests
11518 ;; can be run. Maybe we could add a build step to transform beforehand
11519 ;; but it could be annoying/difficult.
11520 ;; We can enable tests for the Python 2 version, though, and do below.
11521 #:tests? #f))
11522 (home-page "https://bitbucket.org/runeh/anyjson/")
11523 (synopsis
11524 "Wraps best available JSON implementation in a common interface")
11525 (description
11526 "Anyjson loads whichever is the fastest JSON module installed
11527 and provides a uniform API regardless of which JSON implementation is used.")
11528 (license license:bsd-3)
11529 (properties `((python2-variant . ,(delay python2-anyjson))))))
11530
11531 (define-public python2-anyjson
11532 (let ((anyjson (package-with-python2
11533 (strip-python2-variant python-anyjson))))
11534 (package
11535 (inherit anyjson)
11536 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11537 #:tests? #t
11538 ,@(package-arguments anyjson)))
11539 (native-inputs `(("python2-nose" ,python2-nose))))))
11540
11541 (define-public python-amqp
11542 (package
11543 (name "python-amqp")
11544 (version "2.3.2")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "amqp" version))
11549 (sha256
11550 (base32
11551 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11552 (build-system python-build-system)
11553 (native-inputs
11554 `(("python-case" ,python-case)
11555 ("python-pytest-sugar" ,python-pytest-sugar)
11556 ("python-mock" ,python-mock)))
11557 (propagated-inputs
11558 `(("python-vine" ,python-vine)))
11559 (home-page "https://github.com/celery/py-amqp")
11560 (synopsis
11561 "Low-level AMQP client for Python (fork of amqplib)")
11562 (description
11563 "This is a fork of amqplib which was originally written by Barry Pederson.
11564 It is maintained by the Celery project, and used by kombu as a pure python
11565 alternative when librabbitmq is not available.")
11566 (license license:lgpl2.1+)
11567 (properties `((python2-variant . ,(delay python2-amqp))))))
11568
11569 (define-public python2-amqp
11570 (let ((amqp (package-with-python2
11571 (strip-python2-variant python-amqp))))
11572 (package
11573 (inherit amqp)
11574 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11575 ;; unmaintained. Weirdly, does not do this on the python 3
11576 ;; version?
11577 #:tests? #f
11578 ,@(package-arguments amqp))))))
11579
11580 (define-public python-txamqp
11581 (package
11582 (name "python-txamqp")
11583 (version "0.8.2")
11584 (source
11585 (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "txAMQP" version))
11588 (sha256
11589 (base32
11590 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11591 (build-system python-build-system)
11592 (propagated-inputs
11593 `(("python-six" ,python-six)
11594 ("python-twisted" ,python-twisted)))
11595 (home-page "https://github.com/txamqp/txamqp")
11596 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11597 (description
11598 "This package provides a Python library for communicating with AMQP peers
11599 and brokers using the asynchronous networking framework Twisted. It contains
11600 all the necessary code to connect, send and receive messages to/from an
11601 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11602 also includes support for using Thrift RPC over AMQP in Twisted
11603 applications.")
11604 (license license:asl2.0)))
11605
11606 (define-public python2-txamqp
11607 (package-with-python2 python-txamqp))
11608
11609 (define-public python-kombu
11610 (package
11611 (name "python-kombu")
11612 (version "4.2.2")
11613 (source
11614 (origin
11615 (method url-fetch)
11616 (uri (pypi-uri "kombu" version))
11617 (sha256
11618 (base32
11619 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11620 (build-system python-build-system)
11621 (native-inputs
11622 `(("python-mock" ,python-mock)
11623 ("python-case" ,python-case)
11624 ("python-pyro4" ,python-pyro4)
11625 ("python-pytest-sugar" ,python-pytest-sugar)
11626 ("python-pytz" ,python-pytz)))
11627 (propagated-inputs
11628 `(("python-anyjson" ,python-anyjson)
11629 ("python-amqp" ,python-amqp)
11630 ("python-redis" ,python-redis)))
11631 (home-page "https://kombu.readthedocs.io")
11632 (synopsis "Message passing library for Python")
11633 (description "The aim of Kombu is to make messaging in Python as easy as
11634 possible by providing an idiomatic high-level interface for the AMQ protocol,
11635 and also provide proven and tested solutions to common messaging problems.
11636 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11637 message orientation, queuing, routing, reliability and security, for which the
11638 RabbitMQ messaging server is the most popular implementation.")
11639 (license license:bsd-3)
11640 (properties `((python2-variant . ,(delay python2-kombu))))))
11641
11642 (define-public python2-kombu
11643 (let ((kombu (package-with-python2
11644 (strip-python2-variant python-kombu))))
11645 (package
11646 (inherit kombu)
11647 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11648 ;; It works fine on the python3 variant.
11649 #:tests? #f
11650 ,@(package-arguments kombu)))
11651 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11652 ,@(package-native-inputs kombu))))))
11653
11654 (define-public python-billiard
11655 (package
11656 (name "python-billiard")
11657 (version "3.5.0.5")
11658 (source
11659 (origin
11660 (method url-fetch)
11661 (uri (pypi-uri "billiard" version))
11662 (sha256
11663 (base32
11664 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11665 (build-system python-build-system)
11666 (native-inputs
11667 `(("python-case" ,python-case)
11668 ("python-pytest" ,python-pytest)))
11669 (home-page "https://github.com/celery/billiard")
11670 (synopsis
11671 "Python multiprocessing fork with improvements and bugfixes")
11672 (description
11673 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11674 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11675 pyprocessing package. This standalone variant is intended to be compatible with
11676 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11677 (license license:bsd-3)
11678 (properties `((python2-variant . ,(delay python2-billiard))))))
11679
11680 (define-public python2-billiard
11681 (let ((billiard (package-with-python2
11682 (strip-python2-variant python-billiard))))
11683 (package
11684 (inherit billiard)
11685 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11686 ("python2-mock" ,python2-mock)
11687 ,@(package-native-inputs billiard))))))
11688
11689 (define-public python-celery
11690 (package
11691 (name "python-celery")
11692 (version "4.2.1")
11693 (source
11694 (origin
11695 (method url-fetch)
11696 (uri (pypi-uri "celery" version))
11697 (sha256
11698 (base32
11699 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11700 (build-system python-build-system)
11701 (arguments
11702 '(;; TODO The tests fail with Python 3.7
11703 ;; https://github.com/celery/celery/issues/4849
11704 #:tests? #f
11705 #:phases
11706 (modify-phases %standard-phases
11707 (add-after 'unpack 'patch-requirements
11708 (lambda _
11709 (substitute* "requirements/test.txt"
11710 (("pytest>=3\\.0,<3\\.3")
11711 "pytest>=3.0"))
11712 #t)))))
11713 (native-inputs
11714 `(("python-case" ,python-case)
11715 ("python-pytest" ,python-pytest)))
11716 (propagated-inputs
11717 `(("python-pytz" ,python-pytz)
11718 ("python-billiard" ,python-billiard)
11719 ("python-kombu" ,python-kombu)))
11720 (home-page "https://celeryproject.org")
11721 (synopsis "Distributed Task Queue")
11722 (description "Celery is an asynchronous task queue/job queue based on
11723 distributed message passing. It is focused on real-time operation, but
11724 supports scheduling as well. The execution units, called tasks, are executed
11725 concurrently on a single or more worker servers using multiprocessing,
11726 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11727 synchronously (wait until ready).")
11728 (license license:bsd-3)
11729 (properties `((python2-variant . ,(delay python2-celery))))))
11730
11731 (define-public python2-celery
11732 (let ((celery (package-with-python2
11733 (strip-python2-variant python-celery))))
11734 (package
11735 (inherit celery)
11736 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11737 ("python2-mock" ,python2-mock)
11738 ,@(package-native-inputs celery))))))
11739
11740 (define-public python-translitcodec
11741 (package
11742 (name "python-translitcodec")
11743 (version "0.4.0")
11744 (source
11745 (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "translitcodec" version))
11748 (sha256
11749 (base32
11750 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11751 (build-system python-build-system)
11752 (arguments
11753 `(#:tests? #f)) ; no tests provided
11754 (home-page
11755 "https://github.com/claudep/translitcodec")
11756 (synopsis
11757 "Unicode to 8-bit charset transliteration codec")
11758 (description
11759 "This package contains codecs for transliterating ISO 10646 texts into
11760 best-effort representations using smaller coded character sets (ASCII,
11761 ISO 8859, etc.).")
11762 (license license:expat)))
11763
11764 (define-public python2-translitcodec
11765 (package-with-python2 python-translitcodec))
11766
11767 (define-public python-editor
11768 (package
11769 (name "python-editor")
11770 (version "1.0.4")
11771 (source
11772 (origin
11773 (method url-fetch)
11774 (uri (pypi-uri "python-editor" version))
11775 (sha256
11776 (base32
11777 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11778 (build-system python-build-system)
11779 (arguments
11780 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11781 (home-page "https://github.com/fmoo/python-editor")
11782 (synopsis "Programmatically open an editor, capture the result")
11783 (description
11784 "python-editor is a library that provides the editor module for
11785 programmatically interfacing with your system's $EDITOR.")
11786 (license license:asl2.0)))
11787
11788 (define-public python2-editor
11789 (package-with-python2 python-editor))
11790
11791 (define-public python-vobject
11792 (package
11793 (name "python-vobject")
11794 (version "0.9.6.1")
11795 (source (origin
11796 (method url-fetch)
11797 (uri (pypi-uri "vobject" version))
11798 (sha256
11799 (base32
11800 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11801 (build-system python-build-system)
11802 (arguments
11803 '(;; The test suite relies on some non-portable Windows interfaces.
11804 #:tests? #f))
11805 (propagated-inputs
11806 `(("python-dateutil" ,python-dateutil)
11807 ("python-pyicu" ,python-pyicu)))
11808 (synopsis "Parse and generate vCard and vCalendar files")
11809 (description "Vobject is intended to be a full featured Python package for
11810 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11811 are supported and well tested. vCard 3.0 files are supported, and all data
11812 should be imported, but only a few components are understood in a sophisticated
11813 way.")
11814 (home-page "https://eventable.github.io/vobject/")
11815 (license license:asl2.0)))
11816
11817 (define-public python2-vobject
11818 (package-with-python2 python-vobject))
11819
11820 (define-public python-munkres
11821 (package
11822 (name "python-munkres")
11823 (version "1.0.8")
11824 (source (origin
11825 (method url-fetch)
11826 (uri (pypi-uri "munkres" version))
11827 (sha256
11828 (base32
11829 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11830 (build-system python-build-system)
11831 (arguments
11832 '(#:tests? #f)) ; no test suite
11833 (home-page "https://software.clapper.org/munkres/")
11834 (synopsis "Implementation of the Munkres algorithm")
11835 (description "The Munkres module provides an implementation of the Munkres
11836 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11837 useful for solving the Assignment Problem.")
11838 (license license:bsd-3)))
11839
11840 (define-public python2-munkres
11841 (package-with-python2 python-munkres))
11842
11843 (define-public python-whoosh
11844 (package
11845 (name "python-whoosh")
11846 (version "2.7.4")
11847 (source
11848 (origin
11849 (method url-fetch)
11850 (uri (pypi-uri "Whoosh" version))
11851 (sha256
11852 (base32
11853 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11854 (build-system python-build-system)
11855 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11856 (native-inputs
11857 `(("python-pytest" ,python-pytest)))
11858 (home-page "https://bitbucket.org/mchaput/whoosh")
11859 (synopsis "Full text indexing, search, and spell checking library")
11860 (description
11861 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11862 checking library.")
11863 (license license:bsd-2)))
11864
11865 (define-public python2-whoosh
11866 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11867 (package (inherit whoosh)
11868 (propagated-inputs
11869 `(("python2-backport-ssl-match-hostname"
11870 ,python2-backport-ssl-match-hostname)
11871 ,@(package-propagated-inputs whoosh))))))
11872
11873 (define-public python-pathlib
11874 (package
11875 (name "python-pathlib")
11876 (version "1.0.1")
11877 (source (origin
11878 (method url-fetch)
11879 (uri (pypi-uri "pathlib" version))
11880 (sha256
11881 (base32
11882 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11883 (build-system python-build-system)
11884 ;; The tests depend on the internal "test" module, which does not provide
11885 ;; a stable interface.
11886 (arguments `(#:tests? #f))
11887 (home-page "https://pathlib.readthedocs.org/")
11888 (synopsis "Object-oriented file system paths")
11889 (description "Pathlib offers a set of classes to handle file system paths.
11890 It offers the following advantages over using string objects:
11891
11892 @enumerate
11893 @item No more cumbersome use of os and os.path functions. Everything can
11894 be done easily through operators, attribute accesses, and method calls.
11895 @item Embodies the semantics of different path types. For example,
11896 comparing Windows paths ignores casing.
11897 @item Well-defined semantics, eliminating any inconsistencies or
11898 ambiguities (forward vs. backward slashes, etc.).
11899 @end enumerate
11900
11901 Note: In Python 3.4, pathlib is now part of the standard library. For other
11902 Python versions please consider python-pathlib2 instead, which tracks the
11903 standard library module. This module (python-pathlib) isn't maintained
11904 anymore.")
11905 (license license:expat)))
11906
11907 (define-public python2-pathlib
11908 (package-with-python2 python-pathlib))
11909
11910 (define-public python2-pathlib2
11911 (package
11912 (name "python2-pathlib2")
11913 (version "2.3.5")
11914 (source (origin
11915 (method url-fetch)
11916 (uri (pypi-uri "pathlib2" version))
11917 (sha256
11918 (base32
11919 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11920 (build-system python-build-system)
11921 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11922 ;; version is 3.4 which already includes this package as part of the
11923 ;; standard library.
11924 (arguments
11925 `(#:python ,python-2))
11926 (propagated-inputs
11927 `(("python2-scandir" ,python2-scandir)
11928 ("python2-six" ,python2-six)))
11929 (home-page "https://pypi.org/project/pathlib2/")
11930 (synopsis "Object-oriented file system paths - backport of standard
11931 pathlib module")
11932 (description "The goal of pathlib2 is to provide a backport of standard
11933 pathlib module which tracks the standard library module, so all the newest
11934 features of the standard pathlib can be used also on older Python versions.
11935
11936 Pathlib offers a set of classes to handle file system paths. It offers the
11937 following advantages over using string objects:
11938
11939 @enumerate
11940 @item No more cumbersome use of os and os.path functions. Everything can
11941 be done easily through operators, attribute accesses, and method calls.
11942 @item Embodies the semantics of different path types. For example,
11943 comparing Windows paths ignores casing.
11944 @item Well-defined semantics, eliminating any inconsistencies or
11945 ambiguities (forward vs. backward slashes, etc.).
11946 @end enumerate")
11947 (license license:expat)))
11948
11949 (define-public python2-pathlib2-bootstrap
11950 (hidden-package
11951 (package
11952 (inherit python2-pathlib2)
11953 (name "python2-pathlib2-bootstrap")
11954 (propagated-inputs
11955 `(("python2-scandir" ,python2-scandir)
11956 ("python2-six" ,python2-six-bootstrap))))))
11957
11958 (define-public python-jellyfish
11959 (package
11960 (name "python-jellyfish")
11961 (version "0.5.6")
11962 (source (origin
11963 (method url-fetch)
11964 (uri (pypi-uri "jellyfish" version))
11965 (sha256
11966 (base32
11967 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11968 (build-system python-build-system)
11969 (native-inputs
11970 `(("python-pytest" ,python-pytest)))
11971 (home-page "https://github.com/jamesturk/jellyfish")
11972 (synopsis "Approximate and phonetic matching of strings")
11973 (description "Jellyfish uses a variety of string comparison and phonetic
11974 encoding algorithms to do fuzzy string matching.")
11975 (license license:bsd-2)
11976 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11977
11978 (define-public python2-jellyfish
11979 (let ((jellyfish (package-with-python2
11980 (strip-python2-variant python-jellyfish))))
11981 (package (inherit jellyfish)
11982 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11983 ,@(package-native-inputs jellyfish))))))
11984
11985 (define-public python2-unicodecsv
11986 (package
11987 (name "python2-unicodecsv")
11988 (version "0.14.1")
11989 (source (origin
11990 (method git-fetch)
11991 ;; The test suite is not included in the PyPi release.
11992 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11993 (uri (git-reference
11994 (url "https://github.com/jdunck/python-unicodecsv")
11995 (commit version)))
11996 (file-name (git-file-name name version))
11997 (sha256
11998 (base32
11999 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12000 (build-system python-build-system)
12001 (arguments
12002 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12003 #:python ,python-2))
12004 (native-inputs
12005 `(("python2-unittest2" ,python2-unittest2)))
12006 (home-page "https://github.com/jdunck/python-unicodecsv")
12007 (synopsis "Unicode CSV module for Python 2")
12008 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12009 module, adding support for Unicode strings.")
12010 (license license:bsd-2)))
12011
12012 (define-public python-rarfile
12013 (package
12014 (name "python-rarfile")
12015 (version "2.8")
12016 (source (origin
12017 (method url-fetch)
12018 (uri (pypi-uri "rarfile" version))
12019 (sha256
12020 (base32
12021 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12022 (build-system python-build-system)
12023 (arguments
12024 '(#:phases
12025 (modify-phases %standard-phases
12026 (replace 'check
12027 ;; Many tests fail, but the installation proceeds.
12028 (lambda _ (invoke "make" "-C" "test" "test"))))))
12029 (native-inputs
12030 `(("which" ,which))) ; required for tests
12031 (propagated-inputs
12032 `(("libarchive" ,libarchive)))
12033 (home-page "https://github.com/markokr/rarfile")
12034 (synopsis "RAR archive reader for Python")
12035 (description "This is Python module for RAR archive reading. The interface
12036 is made as zipfile like as possible.")
12037 (license license:isc)))
12038
12039 (define-public python2-rarfile
12040 (package-with-python2 python-rarfile))
12041
12042 (define-public python-magic
12043 (package
12044 (name "python-magic")
12045 (version "0.4.15")
12046 (source
12047 (origin
12048 (method url-fetch)
12049 (uri (pypi-uri "python-magic" version))
12050 (sha256
12051 (base32
12052 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12053 (file-name (string-append name "-" version "-checkout"))))
12054 (build-system python-build-system)
12055 (arguments
12056 ;; The tests are unreliable, so don't run them. The tests fail
12057 ;; under Python3 because they were written for Python2 and
12058 ;; contain import statements that do not work in Python3. One of
12059 ;; the tests fails under Python2 because its assertions are
12060 ;; overly stringent; it relies on comparing output strings which
12061 ;; are brittle and can change depending on the version of
12062 ;; libmagic being used and the system on which the test is
12063 ;; running. In my case, under GuixSD 0.10.0, only one test
12064 ;; failed, and it seems to have failed only because the version
12065 ;; of libmagic that is packaged in Guix outputs a slightly
12066 ;; different (but not wrong) string than the one that the test
12067 ;; expected.
12068 '(#:tests? #f
12069 #:phases (modify-phases %standard-phases
12070 ;; Replace a specific method call with a hard-coded
12071 ;; path to the necessary libmagic.so file in the
12072 ;; store. If we don't do this, then the method call
12073 ;; will fail to find the libmagic.so file, which in
12074 ;; turn will cause any application using
12075 ;; python-magic to fail.
12076 (add-before 'build 'hard-code-path-to-libmagic
12077 (lambda* (#:key inputs #:allow-other-keys)
12078 (let ((file (assoc-ref inputs "file")))
12079 (substitute* "magic.py"
12080 (("ctypes.util.find_library\\('magic'\\)")
12081 (string-append "'" file "/lib/libmagic.so'")))
12082 #t)))
12083 (add-before 'install 'disable-egg-compression
12084 (lambda _
12085 (let ((port (open-file "setup.cfg" "a")))
12086 (display "\n[easy_install]\nzip_ok = 0\n"
12087 port)
12088 (close-port port)
12089 #t))))))
12090 (inputs
12091 ;; python-magic needs to be able to find libmagic.so.
12092 `(("file" ,file)))
12093 (home-page
12094 "https://github.com/ahupp/python-magic")
12095 (synopsis
12096 "File type identification using libmagic")
12097 (description
12098 "This module uses ctypes to access the libmagic file type
12099 identification library. It makes use of the local magic database and
12100 supports both textual and MIME-type output. Note that this module and
12101 the python-file module both provide a \"magic.py\" file; these two
12102 modules, which are different and were developed separately, both serve
12103 the same purpose: to provide Python bindings for libmagic.")
12104 (license license:expat)))
12105
12106 (define-public python2-magic
12107 (package-with-python2 python-magic))
12108
12109 (define-public python2-s3cmd
12110 (package
12111 (name "python2-s3cmd")
12112 (version "1.6.1")
12113 (source
12114 (origin
12115 (method url-fetch)
12116 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12117 "s3cmd-" version ".tar.gz"))
12118 (sha256
12119 (base32
12120 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12121 (build-system python-build-system)
12122 (arguments
12123 ;; s3cmd is written for python2 only and contains no tests.
12124 `(#:python ,python-2
12125 #:tests? #f))
12126 (propagated-inputs
12127 `(("python2-dateutil" ,python2-dateutil)
12128 ;; The python-file package also provides a magic.py module.
12129 ;; This is an unfortunate state of affairs; however, s3cmd
12130 ;; fails to install if it cannot find specifically the
12131 ;; python-magic package. Thus we include it, instead of using
12132 ;; python-file. Ironically, s3cmd sometimes works better
12133 ;; without libmagic bindings at all:
12134 ;; https://github.com/s3tools/s3cmd/issues/198
12135 ("python2-magic" ,python2-magic)))
12136 (home-page "https://s3tools.org/s3cmd")
12137 (synopsis "Command line tool for S3-compatible storage services")
12138 (description
12139 "S3cmd is a command line tool for uploading, retrieving and managing data
12140 in storage services that are compatible with the Amazon Simple Storage
12141 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12142 GnuPG encryption, and more. It also supports management of Amazon's
12143 CloudFront content delivery network.")
12144 (license license:gpl2+)))
12145
12146 (define-public python-pkgconfig
12147 (package
12148 (name "python-pkgconfig")
12149 (version "1.3.1")
12150 (source
12151 (origin
12152 (method url-fetch)
12153 (uri (pypi-uri "pkgconfig" version))
12154 (sha256
12155 (base32
12156 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12157 (build-system python-build-system)
12158 (native-inputs
12159 `(("python-nose" ,python-nose)))
12160 (inputs
12161 `(("pkg-config" ,pkg-config)))
12162 (arguments
12163 `(#:phases
12164 (modify-phases %standard-phases
12165 (add-before 'build 'patch
12166 ;; Hard-code the path to pkg-config.
12167 (lambda _
12168 (substitute* "pkgconfig/pkgconfig.py"
12169 (("cmd = 'pkg-config")
12170 (string-append "cmd = '" (which "pkg-config"))))
12171 #t))
12172 (replace 'check
12173 (lambda _
12174 (invoke "nosetests" "test.py"))))))
12175 (home-page "https://github.com/matze/pkgconfig")
12176 (synopsis "Python interface for pkg-config")
12177 (description "This module provides a Python interface to pkg-config. It
12178 can be used to find all pkg-config packages, check if a package exists,
12179 check if a package meets certain version requirements, query CFLAGS and
12180 LDFLAGS and parse the output to build extensions with setup.py.")
12181 (license license:expat)))
12182
12183 (define-public python2-pkgconfig
12184 (package-with-python2 python-pkgconfig))
12185
12186 (define-public python-bz2file
12187 (package
12188 (name "python-bz2file")
12189 (version "0.98")
12190 (source
12191 (origin
12192 (method url-fetch)
12193 (uri (pypi-uri "bz2file" version))
12194 (sha256
12195 (base32
12196 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12197 (build-system python-build-system)
12198 (arguments
12199 `(#:tests? #f)) ; Tests use deprecated python modules.
12200 (home-page "https://github.com/nvawda/bz2file")
12201 (synopsis "Read and write bzip2-compressed files")
12202 (description
12203 "Bz2file is a Python library for reading and writing bzip2-compressed
12204 files. It contains a drop-in replacement for the I/O interface in the
12205 standard library's @code{bz2} module, including features from the latest
12206 development version of CPython that are not available in older releases.")
12207 (license license:asl2.0)))
12208
12209 (define-public python2-bz2file
12210 (package-with-python2 python-bz2file))
12211
12212 (define-public python-future
12213 (package
12214 (name "python-future")
12215 (version "0.17.1")
12216 (source
12217 (origin
12218 (method url-fetch)
12219 (uri (pypi-uri "future" version))
12220 (sha256
12221 (base32
12222 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12223 (build-system python-build-system)
12224 ;; Many tests connect to the network or are otherwise flawed.
12225 ;; https://github.com/PythonCharmers/python-future/issues/210
12226 (arguments
12227 `(#:tests? #f))
12228 (home-page "https://python-future.org")
12229 (synopsis "Single-source support for Python 3 and 2")
12230 (description
12231 "@code{python-future} is the missing compatibility layer between Python 2 and
12232 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12233 to support both Python 2 and Python 3 with minimal overhead.")
12234 (license license:expat)))
12235
12236 (define-public python2-future
12237 (package-with-python2 python-future))
12238
12239 (define-public python-cysignals
12240 (package
12241 (name "python-cysignals")
12242 (version "1.9.0")
12243 (source
12244 (origin
12245 (method url-fetch)
12246 (uri (pypi-uri "cysignals" version))
12247 (sha256
12248 (base32
12249 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12250 (build-system python-build-system)
12251 (native-inputs
12252 `(("python-cython" ,python-cython)
12253 ("python-sphinx" ,python-sphinx)))
12254 (inputs
12255 `(("pari-gp" ,pari-gp)))
12256 (arguments
12257 `(#:modules ((guix build python-build-system)
12258 ((guix build gnu-build-system) #:prefix gnu:)
12259 (guix build utils))
12260 ;; FIXME: Tests are executed after installation and currently fail
12261 ;; when not installing into standard locations; the author is working
12262 ;; on a fix.
12263 #:tests? #f
12264 #:phases
12265 (modify-phases %standard-phases
12266 (add-before
12267 'build 'configure
12268 (assoc-ref gnu:%standard-phases 'configure)))))
12269 (home-page
12270 "https://github.com/sagemath/cysignals")
12271 (synopsis
12272 "Handling of interrupts and signals for Cython")
12273 (description
12274 "The cysignals package provides mechanisms to handle interrupts (and
12275 other signals and errors) in Cython code, using two related approaches,
12276 for mixed Cython/Python code or external C libraries and pure Cython code,
12277 respectively.")
12278 (license license:lgpl3+)))
12279
12280 (define-public python2-cysignals
12281 (package-with-python2 python-cysignals))
12282
12283 (define-public python2-shedskin
12284 (package
12285 (name "python2-shedskin")
12286 (version "0.9.4")
12287 (source
12288 (origin
12289 (method url-fetch)
12290 (uri (string-append "https://github.com/shedskin/shedskin/"
12291 "releases/download/v" version
12292 "/shedskin-" version ".tgz"))
12293 (sha256
12294 (base32
12295 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12296 (build-system python-build-system)
12297 (arguments
12298 `(#:python ,python-2
12299 #:phases (modify-phases %standard-phases
12300 (add-after 'unpack 'fix-resulting-include-libs
12301 (lambda* (#:key inputs #:allow-other-keys)
12302 (let ((libgc (assoc-ref inputs "libgc"))
12303 (pcre (assoc-ref inputs "pcre")))
12304 (substitute* "shedskin/makefile.py"
12305 (("variable == 'CCFLAGS':[ ]*")
12306 (string-append "variable == 'CCFLAGS':\n"
12307 " line += ' -I " pcre "/include"
12308 " -I " libgc "/include'"))
12309 (("variable == 'LFLAGS':[ ]*")
12310 (string-append "variable == 'LFLAGS':\n"
12311 " line += ' -L" pcre "/lib"
12312 " -L " libgc "/lib'")))
12313 #t))))))
12314 (inputs `(("pcre" ,pcre)
12315 ("libgc" ,libgc)))
12316 (home-page "https://shedskin.github.io/")
12317 (synopsis "Experimental Python-2 to C++ Compiler")
12318 (description (string-append "This is an experimental compiler for a subset of
12319 Python. It generates C++ code and a Makefile."))
12320 (license (list license:gpl3 license:bsd-3 license:expat))))
12321
12322 (define-public python2-rope
12323 (package
12324 (name "python2-rope")
12325 (version "0.11.0")
12326 (source
12327 (origin
12328 (method url-fetch)
12329 (uri (pypi-uri "rope" version))
12330 (sha256
12331 (base32
12332 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12333 (arguments
12334 ;; Rope has only partial python3 support, see `python-rope'
12335 `(#:python ,python-2))
12336 (build-system python-build-system)
12337 (native-inputs
12338 `(("python2-unittest2" ,python2-unittest2)))
12339 (home-page "https://github.com/python-rope/rope")
12340 (synopsis "Refactoring library for Python")
12341 (description "Rope is a refactoring library for Python. It facilitates
12342 the renaming, moving and extracting of attributes, functions, modules, fields
12343 and parameters in Python 2 source code. These refactorings can also be applied
12344 to occurrences in strings and comments.")
12345 (license license:gpl2)))
12346
12347 (define-public python-rope
12348 (package
12349 (inherit python2-rope)
12350 (name "python-rope")
12351 (arguments `(#:python ,python-wrapper
12352 ;; XXX: Only partial python3 support, results in some failing
12353 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12354 #:tests? #f))
12355 (properties `((python2-variant . ,(delay python2-rope))))))
12356
12357 (define-public python-py3status
12358 (package
12359 (name "python-py3status")
12360 (version "3.21")
12361 (source
12362 (origin
12363 (method url-fetch)
12364 (uri (pypi-uri "py3status" version))
12365 (sha256
12366 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12367 (build-system python-build-system)
12368 (inputs
12369 `(("file" ,file)))
12370 (arguments
12371 '(#:phases
12372 (modify-phases %standard-phases
12373 ;; 'file' is used for detection of configuration file encoding
12374 ;; let's make link the dependency to particular input
12375 (add-before 'build 'patch-file-path
12376 (lambda* (#:key inputs #:allow-other-keys)
12377 (let ((file-path (assoc-ref inputs "file")))
12378 (substitute* "py3status/parse_config.py"
12379 (("\\[\"file\", \"-b\"")
12380 (string-append "['" file-path "/bin/file', '-b'")))
12381 #t))))
12382 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12383 (home-page "https://github.com/ultrabug/py3status")
12384 (synopsis "Extensible i3status wrapper written in Python")
12385 (description "py3status is an i3status wrapper which extends i3status
12386 functionality in a modular way, allowing you to extend your panel with your
12387 own code, responding to click events and updating clock every second.")
12388 (license license:bsd-3)))
12389
12390 (define-public python2-selectors2
12391 (package
12392 (name "python2-selectors2")
12393 (version "2.0.1")
12394 (source (origin
12395 (method url-fetch)
12396 (uri (pypi-uri "selectors2" version))
12397 (sha256
12398 (base32
12399 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12400 (build-system python-build-system)
12401 (arguments
12402 `(#:python ,python-2))
12403 (native-inputs
12404 `(("python2-mock" ,python2-mock)
12405 ("python2-psutil" ,python2-psutil)))
12406 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12407 (synopsis "Backport of the selectors module from Python 3.5+")
12408 (description
12409 "This package provides a drop-in replacement for the @code{selectors}
12410 module in Python 3.5 and later.")
12411 (license license:expat)))
12412
12413 (define-public python-tblib
12414 (package
12415 (name "python-tblib")
12416 (version "1.6.0")
12417 (source (origin
12418 (method url-fetch)
12419 (uri (pypi-uri "tblib" version))
12420 (sha256
12421 (base32
12422 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12423 (build-system python-build-system)
12424 (arguments
12425 `(#:phases
12426 (modify-phases %standard-phases
12427 (replace 'check
12428 (lambda _
12429 ;; Upstream runs tests after installation and the package itself
12430 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12431 ;; found.
12432 (setenv "PYTHONPATH"
12433 (string-append (getcwd) "/build/lib:"
12434 (getenv "PYTHONPATH")))
12435 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12436 (native-inputs
12437 `(("python-pytest" ,python-pytest)
12438 ("python-six" ,python-six)))
12439 (home-page "https://github.com/ionelmc/python-tblib")
12440 (synopsis "Traceback serialization library")
12441 (description
12442 "Traceback serialization allows you to:
12443
12444 @enumerate
12445 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12446 different processes. This allows better error handling when running code over
12447 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12448
12449 @item Parse traceback strings and raise with the parsed tracebacks.
12450 @end enumerate\n")
12451 (license license:bsd-3)))
12452
12453 (define-public python2-tblib
12454 (package-with-python2 python-tblib))
12455
12456 (define-public python-greenlet
12457 (package
12458 (name "python-greenlet")
12459 (version "0.4.16")
12460 (source (origin
12461 (method url-fetch)
12462 (uri (pypi-uri "greenlet" version))
12463 (sha256
12464 (base32
12465 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12466 (build-system python-build-system)
12467 (home-page "https://greenlet.readthedocs.io/")
12468 (synopsis "Lightweight in-process concurrent programming")
12469 (description
12470 "Greenlet package is a spin-off of Stackless, a version of CPython
12471 that supports micro-threads called \"tasklets\". Tasklets run
12472 pseudo-concurrently (typically in a single or a few OS-level threads) and
12473 are synchronized with data exchanges on \"channels\".")
12474 (license (list license:psfl license:expat))))
12475
12476 (define-public python-objgraph
12477 (package
12478 (name "python-objgraph")
12479 (version "3.4.1")
12480 (source
12481 (origin
12482 (method url-fetch)
12483 (uri (pypi-uri "objgraph" version))
12484 (sha256
12485 (base32
12486 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12487 (build-system python-build-system)
12488 (propagated-inputs
12489 `(("python-graphviz" ,python-graphviz)))
12490 (native-inputs
12491 `(("python-mock" ,python-mock)
12492 ("graphviz" ,graphviz)))
12493 (home-page "https://mg.pov.lt/objgraph/")
12494 (synopsis "Draw Python object reference graphs with graphviz")
12495 (description
12496 "This package provides tools to draw Python object reference graphs with
12497 graphviz.")
12498 (license license:expat)))
12499
12500 (define-public python2-objgraph
12501 (package-with-python2 python-objgraph))
12502
12503 (define-public python-gevent
12504 (package
12505 (name "python-gevent")
12506 (version "20.9.0")
12507 (source (origin
12508 (method url-fetch)
12509 (uri (pypi-uri "gevent" version))
12510 (sha256
12511 (base32
12512 "13aw9x6imsy3b369kfjblqiwfni69pp32m4r13n62r9k3l2lhvaz"))
12513 (modules '((guix build utils)))
12514 (snippet
12515 '(begin
12516 ;; unbunding libev and c-ares
12517 (delete-file-recursively "deps")
12518 #t))))
12519 (build-system python-build-system)
12520 (arguments
12521 `(#:modules ((ice-9 ftw)
12522 (ice-9 match)
12523 (srfi srfi-26)
12524 (guix build utils)
12525 (guix build python-build-system))
12526 #:phases (modify-phases %standard-phases
12527 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12528 (lambda _
12529 (substitute* "src/gevent/subprocess.py"
12530 (("/bin/sh") (which "sh")))
12531 (for-each (lambda (file)
12532 (substitute* file
12533 (("/bin/sh") (which "sh"))
12534 (("/bin/true") (which "true"))))
12535 (find-files "src/greentest" "\\.py$"))
12536 #t))
12537 (add-before 'build 'do-not-use-bundled-sources
12538 (lambda _
12539 (setenv "GEVENTSETUP_EMBED" "0")
12540
12541 ;; Prevent building bundled libev.
12542 (substitute* "setup.py"
12543 (("run_make=_BUILDING")
12544 "run_make=False"))
12545 #t))
12546 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12547 (lambda* (#:key inputs #:allow-other-keys)
12548 (let ((greenlet (string-append
12549 (assoc-ref inputs "python-greenlet")
12550 "/include")))
12551 (match (scandir greenlet
12552 (lambda (item)
12553 (string-prefix? "python" item)))
12554 ((python)
12555 (setenv "C_INCLUDE_PATH"
12556 (string-append greenlet "/" python ":"
12557 (or (getenv "C_INCLUDE_PATH")
12558 ""))))))
12559 #t))
12560 (add-before 'check 'pretend-to-be-CI
12561 (lambda _
12562 ;; A few tests are skipped due to network constraints or
12563 ;; get longer timeouts when running in a CI environment.
12564 ;; Piggy-back on that, as we need the same adjustments.
12565 (setenv "TRAVIS" "1")
12566 (setenv "APPVEYOR" "1")
12567 #t))
12568 (add-before 'check 'adjust-tests
12569 (lambda _
12570 (let ((disabled-tests
12571 '(;; These tests relies on networking which is
12572 ;; not available in the build container.
12573 "test__getaddrinfo_import.py"
12574 "test__server_pywsgi.py"
12575 ;; XXX: These tests borrow functionality from the
12576 ;; Python builtin 'test' module, but it is not
12577 ;; installed with the Guix Python distribution.
12578 "test_smtpd.py"
12579 "test_wsgiref.py"
12580 "test_urllib2.py"
12581 "test_thread.py"
12582 "test_threading.py"
12583 "test__threading_2.py"
12584 ;; These tests rely on KeyboardInterrupts which do not
12585 ;; work inside the build container for some reason
12586 ;; (lack of controlling terminal?).
12587 "test_subprocess.py"
12588 "test__issues461_471.py"
12589 ;; TODO: Patch out the tests that use getprotobyname, etc
12590 ;; instead of disabling all the tests from these files.
12591 "test__resolver_dnspython.py"
12592 "test__doctests.py"
12593 "test__all__.py"
12594 "test___config.py"
12595 "test__execmodules.py")))
12596 (call-with-output-file "skipped_tests.txt"
12597 (lambda (port)
12598 (format port "~a~%"
12599 (string-join disabled-tests "\n"))))
12600 #t)))
12601 (replace 'check
12602 (lambda _
12603 ;; Make sure the build directory is on PYTHONPATH.
12604 (setenv "PYTHONPATH"
12605 (string-append
12606 (getenv "PYTHONPATH") ":"
12607 (getcwd) "/build/"
12608 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12609
12610 ;; Use the build daemons configured number of workers.
12611 (setenv "NWORKERS" (number->string (parallel-job-count)))
12612
12613 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
12614 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12615 (propagated-inputs
12616 `(("python-greenlet" ,python-greenlet)
12617 ("python-objgraph" ,python-objgraph)
12618 ("python-zope.event" ,python-zope-event)
12619 ("python-zope.interface" ,python-zope-interface)))
12620 (native-inputs
12621 `(("python-six" ,python-six)
12622
12623 ;; For tests.
12624 ("python-dnspython" ,python-dnspython)
12625 ("python-psutil" ,python-psutil)))
12626 (inputs
12627 `(("c-ares" ,c-ares)
12628 ("libev" ,libev)))
12629 (home-page "https://www.gevent.org/")
12630 (synopsis "Coroutine-based network library")
12631 (description
12632 "@code{gevent} is a coroutine-based Python networking library that uses
12633 @code{greenlet} to provide a high-level synchronous API on top of the
12634 @code{libev} event loop.")
12635 (license license:expat)))
12636
12637 (define-public python-fastimport
12638 (package
12639 (name "python-fastimport")
12640 (version "0.9.8")
12641 (source
12642 (origin
12643 (method url-fetch)
12644 (uri (pypi-uri "fastimport" version))
12645 (sha256
12646 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12647 (build-system python-build-system)
12648 (home-page "https://github.com/jelmer/python-fastimport")
12649 (synopsis "VCS fastimport parser and generator in Python")
12650 (description "This package provides a parser for and generator of the Git
12651 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12652 format.")
12653 (license license:gpl2+)))
12654
12655 (define-public python2-fastimport
12656 (package-with-python2 python-fastimport))
12657
12658 (define-public python-twisted
12659 (package
12660 (name "python-twisted")
12661 (version "19.7.0")
12662 (source (origin
12663 (method url-fetch)
12664 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12665 (sha256
12666 (base32
12667 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12668 (build-system python-build-system)
12669 (arguments
12670 '(#:tests? #f)) ; FIXME: some tests fail
12671 (propagated-inputs
12672 `(("python-zope-interface" ,python-zope-interface)
12673 ("python-pyhamcrest" ,python-pyhamcrest)
12674 ("python-incremental" ,python-incremental)
12675 ("python-hyperlink" ,python-hyperlink)
12676 ("python-constantly" ,python-constantly)
12677 ("python-automat" ,python-automat)))
12678 (home-page "https://twistedmatrix.com/")
12679 (synopsis "Asynchronous networking framework written in Python")
12680 (description
12681 "Twisted is an extensible framework for Python programming, with special
12682 focus on event-based network programming and multiprotocol integration.")
12683 (license license:expat)))
12684
12685 (define-public python2-twisted
12686 (package-with-python2 python-twisted))
12687
12688 (define-public python-pika
12689 (package
12690 (name "python-pika")
12691 (version "0.12.0")
12692 (source
12693 (origin
12694 (method url-fetch)
12695 (uri (pypi-uri "pika" version))
12696 (sha256
12697 (base32
12698 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12699 (build-system python-build-system)
12700 (native-inputs
12701 `(("python-pyev" ,python-pyev)
12702 ("python-tornado" ,python-tornado)
12703 ("python-twisted" ,python-twisted)))
12704 (home-page "https://pika.readthedocs.org")
12705 (synopsis "Pure Python AMQP Client Library")
12706 (description
12707 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12708 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12709 network support library.")
12710 (license license:bsd-3)))
12711
12712 (define-public python2-pika
12713 (package-with-python2 python-pika))
12714
12715 (define-public python-ply
12716 (package
12717 (name "python-ply")
12718 (version "3.11")
12719 (source
12720 (origin
12721 (method url-fetch)
12722 (uri (pypi-uri "ply" version))
12723 (sha256
12724 (base32
12725 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12726 (build-system python-build-system)
12727 (home-page "http://www.dabeaz.com/ply/")
12728 (synopsis "Python Lex & Yacc")
12729 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12730 It uses LR parsing and does extensive error checking.")
12731 (license license:bsd-3)))
12732
12733 (define-public python-tabulate
12734 (package
12735 (name "python-tabulate")
12736 (version "0.8.7")
12737 (source (origin
12738 (method url-fetch)
12739 (uri (pypi-uri "tabulate" version))
12740 (sha256
12741 (base32
12742 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12743 (build-system python-build-system)
12744 (arguments
12745 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12746 ;; and the latest release is not tagged in the upstream repository.
12747 '(#:tests? #f))
12748 (home-page "https://bitbucket.org/astanin/python-tabulate")
12749 (synopsis "Pretty-print tabular data")
12750 (description
12751 "Tabulate is a library and command-line utility to pretty-print tabular
12752 data in Python.")
12753 (license license:expat)))
12754
12755 (define-public python2-tabulate
12756 (package-with-python2 python-tabulate))
12757
12758 (define-public python-kazoo
12759 (package
12760 (name "python-kazoo")
12761 (version "2.4.0")
12762 (source
12763 (origin
12764 (method url-fetch)
12765 (uri (pypi-uri "kazoo" version))
12766 (sha256
12767 (base32
12768 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12769 (build-system python-build-system)
12770 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12771 (propagated-inputs
12772 `(("python-six" ,python-six)))
12773 (home-page "https://kazoo.readthedocs.org")
12774 (synopsis "High-level Zookeeper client library")
12775 (description
12776 "Kazoo is a Python client library for the Apache Zookeeper distributed
12777 application service. It is designed to be easy to use and to avoid common
12778 programming errors.")
12779 (license license:asl2.0)))
12780
12781 (define-public python2-kazoo
12782 (package-with-python2 python-kazoo))
12783
12784 (define-public python-pykafka
12785 (package
12786 (name "python-pykafka")
12787 (version "2.4.0")
12788 (source (origin
12789 (method url-fetch)
12790 (uri (pypi-uri "pykafka" version))
12791 (sha256
12792 (base32
12793 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12794 (build-system python-build-system)
12795 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12796 (propagated-inputs
12797 `(("python-gevent" ,python-gevent)
12798 ("python-kazoo" ,python-kazoo)
12799 ("python-tabulate" ,python-tabulate)))
12800 (inputs
12801 `(("librdkafka" ,librdkafka)))
12802 (home-page "https://pykafka.readthedocs.io/")
12803 (synopsis "Apache Kafka client for Python")
12804 (description
12805 "PyKafka is a client for the Apache Kafka distributed messaging system.
12806 It includes Python implementations of Kafka producers and consumers, which
12807 are optionally backed by a C extension built on librdkafka.")
12808 (license license:asl2.0)))
12809
12810 (define-public python-wcwidth
12811 (package
12812 (name "python-wcwidth")
12813 (version "0.1.8")
12814 (source (origin
12815 (method url-fetch)
12816 (uri (pypi-uri "wcwidth" version))
12817 (sha256
12818 (base32
12819 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12820 (build-system python-build-system)
12821 (home-page "https://github.com/jquast/wcwidth")
12822 (synopsis "Measure number of terminal column cells of wide-character codes")
12823 (description "Wcwidth measures the number of terminal column cells of
12824 wide-character codes. It is useful for those implementing a terminal emulator,
12825 or programs that carefully produce output to be interpreted by one. It is a
12826 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12827 specified in POSIX.1-2001 and POSIX.1-2008.")
12828 (license license:expat)))
12829
12830 (define-public python2-wcwidth
12831 (package-with-python2 python-wcwidth))
12832
12833 (define-public python2-jsonrpclib
12834 (package
12835 (name "python2-jsonrpclib")
12836 (version "0.1.7")
12837 (source (origin
12838 (method url-fetch)
12839 (uri (pypi-uri "jsonrpclib" version))
12840 (sha256
12841 (base32
12842 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12843 (build-system python-build-system)
12844 (arguments
12845 `(#:tests? #f
12846 #:python ,python-2))
12847 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12848 (synopsis "Implementation of JSON-RPC specification for Python")
12849 (description
12850 "This library is an implementation of the JSON-RPC specification.
12851 It supports both the original 1.0 specification, as well as the
12852 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12853 etc.")
12854 (license license:asl2.0)))
12855
12856 (define-public python-chai
12857 (package
12858 (name "python-chai")
12859 (version "1.1.2")
12860 (source (origin
12861 (method url-fetch)
12862 (uri (pypi-uri "chai" version))
12863 (sha256
12864 (base32
12865 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12866 (build-system python-build-system)
12867 (home-page "https://github.com/agoragames/chai")
12868 (synopsis "Mocking framework for Python")
12869 (description
12870 "Chai provides an api for mocking, stubbing and spying your python
12871 objects, patterned after the Mocha library for Ruby.")
12872 (license license:bsd-3)))
12873
12874 (define-public python2-chai
12875 (package-with-python2 python-chai))
12876
12877 (define-public python-inflection
12878 (package
12879 (name "python-inflection")
12880 (version "0.3.1")
12881 (source
12882 (origin (method url-fetch)
12883 (uri (pypi-uri "inflection" version))
12884 (sha256
12885 (base32
12886 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12887 (build-system python-build-system)
12888 (native-inputs
12889 `(("python-pytest" ,python-pytest)))
12890 (home-page "https://github.com/jpvanhal/inflection")
12891 (synopsis "Python string transformation library")
12892 (description
12893 "Inflection is a string transformation library. It singularizes
12894 and pluralizes English words, and transforms strings from CamelCase to
12895 underscored string.")
12896 (license license:expat)))
12897
12898 (define-public python2-inflection
12899 (package-with-python2 python-inflection))
12900
12901 (define-public python-pylev
12902 (package
12903 (name "python-pylev")
12904 (version "1.3.0")
12905 (source (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "pylev" version))
12908 (sha256
12909 (base32
12910 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12911 (build-system python-build-system)
12912 (home-page "https://github.com/toastdriven/pylev")
12913 (synopsis "Levenshtein distance implementation in Python")
12914 (description "Pure Python Levenshtein implementation, based off the
12915 Wikipedia code samples at
12916 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12917 (license license:bsd-3)))
12918
12919 (define-public python2-pylev
12920 (package-with-python2 python-pylev))
12921
12922 (define-public python-cleo
12923 (package
12924 (name "python-cleo")
12925 (version "0.8.1")
12926 (source (origin
12927 (method url-fetch)
12928 (uri (pypi-uri "cleo" version))
12929 (sha256
12930 (base32
12931 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12932 (build-system python-build-system)
12933 (native-inputs
12934 `( ;; For testing
12935 ("python-mock" ,python-mock)
12936 ("python-pytest-mock" ,python-pytest-mock)
12937 ("python-pytest" ,python-pytest)))
12938 (propagated-inputs
12939 `(("python-backpack" ,python-backpack)
12940 ("python-clikit" ,python-clikit)
12941 ("python-pastel" ,python-pastel)
12942 ("python-pylev" ,python-pylev)))
12943 (home-page "https://github.com/sdispater/cleo")
12944 (synopsis "Command-line arguments library for Python")
12945 (description
12946 "Cleo allows you to create command-line commands with signature in
12947 docstring and colored output.")
12948 (license license:expat)))
12949
12950 (define-public python2-cleo
12951 (package-with-python2 python-cleo))
12952
12953 (define-public python-tomlkit
12954 (package
12955 (name "python-tomlkit")
12956 (version "0.7.0")
12957 (source
12958 (origin
12959 (method url-fetch)
12960 (uri (pypi-uri "tomlkit" version))
12961 (sha256
12962 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
12963 (build-system python-build-system)
12964 (native-inputs
12965 `(("python-pytest" ,python-pytest)
12966 ("python-pyyaml" ,python-pyyaml)))
12967 (home-page "https://github.com/sdispater/tomlkit")
12968 (synopsis "Style-preserving TOML library")
12969 (description
12970 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
12971 preserves all comments, indentations, whitespace and internal element ordering,
12972 and makes them accessible and editable via an intuitive API. It can also
12973 create new TOML documents from scratch using the provided helpers. Part of the
12974 implementation has been adapted, improved, and fixed from Molten.")
12975 (license license:expat)))
12976
12977 (define-public python-shellingham
12978 (package
12979 (name "python-shellingham")
12980 (version "1.3.2")
12981 (source
12982 (origin
12983 (method url-fetch)
12984 (uri (pypi-uri "shellingham" version))
12985 (sha256
12986 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12987 (build-system python-build-system)
12988 (arguments
12989 `(#:phases
12990 (modify-phases %standard-phases
12991 (add-after 'unpack 'restore-setup.py
12992 ;; setup.py will return in the next release.
12993 ;; <https://github.com/sarugaku/shellingham/issues/33>
12994 (lambda _
12995 (with-output-to-file "setup.py"
12996 (lambda _
12997 (display "from setuptools import setup\nsetup()\n")))
12998 #t)))))
12999 (home-page "https://github.com/sarugaku/shellingham")
13000 (synopsis "Tool to detect surrounding shell")
13001 (description
13002 "Shellingham detects what shell the current Python executable is
13003 running in.")
13004 (license license:isc)))
13005
13006 (define-public python-memcached
13007 (package
13008 (name "python-memcached")
13009 (version "1.59")
13010 (source
13011 (origin
13012 (method url-fetch)
13013 (uri (pypi-uri "python-memcached" version))
13014 (sha256
13015 (base32
13016 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13017 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13018 (build-system python-build-system)
13019 (propagated-inputs `(("python-six" ,python-six)))
13020 (home-page
13021 "https://github.com/linsomniac/python-memcached")
13022 (synopsis "Pure python memcached client")
13023 (description
13024 "This software is a pure Python interface to the memcached memory cache
13025 daemon. It is the client side software which allows storing values in one or
13026 more, possibly remote, memcached servers.")
13027 (license license:psfl)))
13028
13029 (define-public python-clikit
13030 (package
13031 (name "python-clikit")
13032 (version "0.6.2")
13033 (source
13034 (origin
13035 (method url-fetch)
13036 (uri (pypi-uri "clikit" version))
13037 (sha256
13038 (base32
13039 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13040 (build-system python-build-system)
13041 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13042 (propagated-inputs
13043 `(("python-crashtest" ,python-crashtest)
13044 ("python-pastel" ,python-pastel)
13045 ("python-pylev" ,python-pylev)))
13046 (home-page "https://github.com/sdispater/clikit")
13047 (synopsis "Group of utilities to build command line interfaces")
13048 (description
13049 "CliKit is a group of utilities to build testable command line
13050 interfaces.")
13051 (properties `((python2-variant . ,(delay python2-clikit))))
13052 (license license:expat)))
13053
13054 (define-public python2-clikit
13055 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13056 (package/inherit
13057 base
13058 (propagated-inputs
13059 `(("python-enum34" ,python2-enum34)
13060 ("python-typing" ,python2-typing)
13061 ,@(package-propagated-inputs base))))))
13062
13063 (define-public python-msgpack-python
13064 (package
13065 (name "python-msgpack-python")
13066 (version "0.5.6")
13067 (source
13068 (origin
13069 (method url-fetch)
13070 (uri (pypi-uri "msgpack-python" version))
13071 (sha256
13072 (base32
13073 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13074 (build-system python-build-system)
13075 (home-page "http://msgpack.org/")
13076 (synopsis "Package to deserialize messages in MessagePack binary format")
13077 (description
13078 "MessagePack is an efficient binary serialization format. It lets you
13079 exchange data among multiple languages like JSON. But it's faster and
13080 smaller. Small integers are encoded into a single byte, and typical short
13081 strings require only one extra byte in addition to the strings themselves.")
13082 (license license:asl2.0)))
13083
13084 (define-public python-cachy
13085 (package
13086 (name "python-cachy")
13087 (version "0.3.0")
13088 (source
13089 (origin
13090 (method url-fetch)
13091 (uri (pypi-uri "cachy" version))
13092 (sha256
13093 (base32
13094 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13095 (build-system python-build-system)
13096 (arguments
13097 '(#:phases
13098 (modify-phases %standard-phases
13099 (replace 'check
13100 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13101 "pytest"))))))
13102 (native-inputs
13103 `(("memcached" ,memcached)
13104 ("python-fakeredis" ,python-fakeredis)
13105 ("python-flexmock" ,python-flexmock)
13106 ("python-pifpaf" ,python-pifpaf)
13107 ("python-pytest" ,python-pytest)))
13108 (propagated-inputs
13109 `(("python-memcached" ,python-memcached)
13110 ("python-msgpack-python" ,python-msgpack-python)
13111 ("python-redis" ,python-redis)))
13112 (home-page "https://github.com/sdispater/cachy")
13113 (synopsis "Simple yet effective caching library")
13114 (description
13115 "Cachy provides a simple yet effective caching library. A simple but
13116 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13117 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13118 (license license:expat)))
13119
13120 (define-public python-poetry-core
13121 (package
13122 (name "python-poetry-core")
13123 (version "1.0.0")
13124 (source
13125 (origin
13126 (method url-fetch)
13127 (uri (pypi-uri "poetry-core" version))
13128 (sha256
13129 (base32 "1mgv276h1iphn5fqhp2sgkgd5d0c39hs33vgaf157x5ri7rlyrka"))))
13130 (build-system python-build-system)
13131 (home-page "https://github.com/python-poetry/poetry-core")
13132 (synopsis "Poetry PEP 517 build back-end")
13133 (description
13134 "The @code{poetry-core} module provides a PEP 517 build back-end
13135 implementation developed for Poetry. This project is intended to be
13136 a light weight, fully compliant, self-contained package allowing PEP 517
13137 compatible build front-ends to build Poetry managed projects.")
13138 (license license:expat)))
13139
13140 (define-public poetry
13141 (package
13142 (name "poetry")
13143 (version "1.1.4")
13144 ;; Poetry can only be built from source with Poetry.
13145 (source
13146 (origin
13147 (method url-fetch)
13148 (uri (pypi-uri "poetry" version))
13149 (sha256
13150 (base32
13151 "1a2kgfiw66fvxhlqk5qc83s6l38czfh5hcsrbiy7qq5yfc8mlsll"))))
13152 (build-system python-build-system)
13153 (arguments
13154 `(#:tests? #f ;; Pypi does not have tests.
13155 #:phases
13156 (modify-phases %standard-phases
13157 (add-before 'build 'patch-setup-py
13158 (lambda _
13159 (substitute* "setup.py"
13160 ;; Newer versions of keyring produce a package with version "0.0.0"
13161 ;; Reported upstream: <https://github.com/jaraco/keyring/issues/469>
13162 (("keyring>=21.2.0,<22.0.0") "keyring>=21.0.0,<22.0.0")
13163 ;; TODO: remove after the next release cycle,
13164 ;; when packaging has been updated.
13165 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13166 #t)))))
13167 (propagated-inputs
13168 `(("python-cachecontrol" ,python-cachecontrol)
13169 ("python-cachy" ,python-cachy)
13170 ("python-cleo" ,python-cleo)
13171 ("python-clikit" ,python-clikit)
13172 ("python-html5lib" ,python-html5lib)
13173 ("python-keyring" ,python-keyring)
13174 ("python-msgpack-transitional" ,python-msgpack-transitional)
13175 ("python-packaging" ,python-packaging)
13176 ("python-pexpect" ,python-pexpect)
13177 ("python-pip" ,python-pip)
13178 ("python-pkginfo" ,python-pkginfo)
13179 ("python-poetry-core" ,python-poetry-core)
13180 ("python-requests" ,python-requests)
13181 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13182 ("python-shellingham" ,python-shellingham)
13183 ("python-tomlkit" ,python-tomlkit)
13184 ("python-virtualenv" ,python-virtualenv)))
13185 (home-page "https://python-poetry.org")
13186 (synopsis "Python dependency management and packaging made easy")
13187 (description "Poetry is a tool for dependency management and packaging
13188 in Python. It allows you to declare the libraries your project depends on and
13189 it will manage (install/update) them for you.")
13190 (license license:expat)))
13191
13192 (define-public python-lark-parser
13193 (package
13194 (name "python-lark-parser")
13195 (version "0.9.0")
13196 (source (origin
13197 (method url-fetch)
13198 (uri (pypi-uri "lark-parser" version))
13199 (sha256
13200 (base32
13201 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13202 (build-system python-build-system)
13203 (home-page "https://github.com/lark-parser/lark")
13204 (synopsis "Multi-language parser for Python")
13205 (description
13206 "Lark is a parser built with a focus on ergonomics, performance and
13207 resilience. Lark can parse all context-free languages. That means it is
13208 capable of parsing almost any programming language out there, and to
13209 some degree most natural languages too.")
13210 (license license:expat)))
13211
13212 (define-public python-libcst
13213 (package
13214 (name "python-libcst")
13215 (version "0.3.8")
13216 (source (origin
13217 (method url-fetch)
13218 (uri (pypi-uri "libcst" version))
13219 (sha256
13220 (base32
13221 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13222 (build-system python-build-system)
13223 (arguments
13224 `(#:phases
13225 (modify-phases %standard-phases
13226 (add-after 'unpack 'remove-failing-tests
13227 (lambda _
13228 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13229 (delete-file "libcst/tests/test_fuzz.py")
13230 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13231 (delete-file "libcst/tests/test_pyre_integration.py")
13232 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13233 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13234 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13235 #t))
13236 (add-before 'check 'generate-test-data
13237 (lambda _
13238 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13239 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13240 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13241 (replace 'check
13242 (lambda _
13243 (invoke "python" "-m" "unittest")
13244 #t)))))
13245 (native-inputs
13246 `(("python-black" ,python-black)
13247 ("python-isort" ,python-isort)))
13248 (propagated-inputs
13249 `(("python-typing-extensions" ,python-typing-extensions)
13250 ("python-typing-inspect" ,python-typing-inspect)
13251 ("python-pyyaml" ,python-pyyaml)))
13252 (home-page "https://github.com/Instagram/LibCST")
13253 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13254 (description
13255 "LibCST parses Python source code as a CST tree that keeps all
13256 formatting details (comments, whitespaces, parentheses, etc). It's useful
13257 for building automated refactoring (codemod) applications and linters.
13258 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13259 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13260 naming node types and fields, LibCST creates a lossless CST that looks and
13261 feels like an AST.")
13262 (license (list license:expat
13263 ;; Some files unde libcst/_parser/ are under Python Software
13264 ;; Foundation license (see LICENSE file for details)
13265 license:psfl
13266 ;; libcst/_add_slots.py
13267 license:asl2.0))))
13268
13269 (define-public python-typing-inspect
13270 (package
13271 (name "python-typing-inspect")
13272 (version "0.6.0")
13273 (source (origin
13274 (method url-fetch)
13275 (uri (pypi-uri "typing_inspect" version))
13276 (sha256
13277 (base32
13278 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13279 (build-system python-build-system)
13280 (propagated-inputs
13281 `(("python-mypy-extensions" ,python-mypy-extensions)
13282 ("python-typing-extensions" ,python-typing-extensions)))
13283 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13284 (synopsis "API for inspection of types in the Python @code{typing} module")
13285 (description
13286 "The @code{typing_inspect} module defines experimental API for runtime
13287 inspection of types defined in the Python standard typing module.")
13288 (license license:expat)))
13289
13290 (define-public python-lazy-object-proxy
13291 (package
13292 (name "python-lazy-object-proxy")
13293 (version "1.5.1")
13294 (source (origin
13295 (method url-fetch)
13296 (uri (pypi-uri "lazy-object-proxy" version))
13297 (sha256
13298 (base32
13299 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13300 (native-inputs
13301 `(("python-setuptools-scm" ,python-setuptools-scm)))
13302 (build-system python-build-system)
13303 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13304 (synopsis "Lazy object proxy for python")
13305 (description
13306 "Lazy object proxy is an object that wraps a callable but defers the call
13307 until the object is actually required, and caches the result of said call.")
13308 (license license:bsd-2)))
13309
13310 (define-public python2-lazy-object-proxy
13311 (package-with-python2 python-lazy-object-proxy))
13312
13313 (define-public python-dnspython
13314 (package
13315 (name "python-dnspython")
13316 (version "2.0.0")
13317 (source (origin
13318 (method url-fetch)
13319 (uri (pypi-uri "dnspython" version ".zip"))
13320 (sha256
13321 (base32
13322 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13323 (build-system python-build-system)
13324 (native-inputs `(("unzip" ,unzip)))
13325 (arguments '(#:tests? #f)) ; XXX: requires internet access
13326 (home-page "https://www.dnspython.org")
13327 (synopsis "DNS toolkit for Python")
13328 (description
13329 "dnspython is a DNS toolkit for Python. It supports almost all record
13330 types. It can be used for queries, zone transfers, and dynamic updates.
13331 It supports TSIG authenticated messages and EDNS0.")
13332 (license license:expat)))
13333
13334 (define-public python-dnspython-1.16
13335 (package
13336 (inherit python-dnspython)
13337 (version "1.16.0")
13338 (source (origin
13339 (method url-fetch)
13340 (uri (string-append "http://www.dnspython.org/kits/"
13341 version "/dnspython-" version ".tar.gz"))
13342 (sha256
13343 (base32
13344 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13345 (native-inputs '())))
13346
13347 (define-public python2-dnspython-1.16
13348 (package-with-python2 python-dnspython-1.16))
13349
13350 (define-public python-py3dns
13351 (package
13352 (name "python-py3dns")
13353 (version "3.2.1")
13354 (source
13355 (origin
13356 (method url-fetch)
13357 (uri (pypi-uri "py3dns" version))
13358 (sha256
13359 (base32
13360 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13361 (build-system python-build-system)
13362 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13363 ;; removing functionality so we copy from Nix and "just don't build it".
13364 (arguments
13365 `(#:phases
13366 (modify-phases %standard-phases
13367 (add-after 'unpack 'patch-source
13368 (lambda _
13369 (substitute* "setup.py"
13370 (("import DNS") "")
13371 (("DNS.__version__") (string-append "\"" ,version "\"")))
13372 #t)))
13373 #:tests? #f)) ; Also skip the tests.
13374 (home-page "https://launchpad.net/py3dns")
13375 (synopsis "Python 3 DNS library")
13376 (description "This Python 3 module provides a DNS API for looking up DNS
13377 entries from within Python 3 modules and applications. This module is a
13378 simple, lightweight implementation.")
13379 (license license:psfl)))
13380
13381 (define-public python-email-validator
13382 (package
13383 (name "python-email-validator")
13384 (version "1.0.2")
13385 (source
13386 (origin (method url-fetch)
13387 (uri (pypi-uri "email_validator" version))
13388 (sha256
13389 (base32
13390 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13391 (build-system python-build-system)
13392 (arguments
13393 '(#:phases
13394 (modify-phases %standard-phases
13395 (add-before 'build 'use-dnspython
13396 (lambda _
13397 (substitute* "setup.py"
13398 (("dnspython3") "dnspython"))
13399 #t)))))
13400 (propagated-inputs
13401 `(("python-dnspython" ,python-dnspython)
13402 ("python-idna" ,python-idna)))
13403 (home-page "https://github.com/JoshData/python-email-validator")
13404 (synopsis "Email address validation library for Python")
13405 (description
13406 "This library validates email address syntax and deliverability.")
13407 (license license:cc0)))
13408
13409 (define-public python2-email-validator
13410 (package-with-python2 python-email-validator))
13411
13412 (define-public python-ukpostcodeparser
13413 (package
13414 (name "python-ukpostcodeparser")
13415 (version "1.0.3")
13416 (source (origin
13417 (method url-fetch)
13418 (uri (pypi-uri "UkPostcodeParser" version))
13419 (sha256
13420 (base32
13421 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13422 (build-system python-build-system)
13423 (home-page "https://github.com/hamstah/ukpostcodeparser")
13424 (synopsis "UK Postcode parser for Python")
13425 (description
13426 "This library provides the @code{parse_uk_postcode} function for
13427 parsing UK postcodes.")
13428 (license license:expat)))
13429
13430 (define-public python2-ukpostcodeparser
13431 (package-with-python2 python-ukpostcodeparser))
13432
13433 (define-public python-faker
13434 (package
13435 (name "python-faker")
13436 (version "4.0.2")
13437 (source (origin
13438 (method url-fetch)
13439 (uri (pypi-uri "Faker" version))
13440 (sha256
13441 (base32
13442 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13443 (build-system python-build-system)
13444 (arguments
13445 '(#:phases
13446 (modify-phases %standard-phases
13447 (replace 'check
13448 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13449 (native-inputs
13450 `(;; For testing
13451 ("python-freezegun" ,python-freezegun)
13452 ("python-pytest" ,python-pytest)
13453 ("python-random2" ,python-random2)
13454 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13455 ("python-validators" ,python-validators)))
13456 (propagated-inputs
13457 `(("python-dateutil" ,python-dateutil)
13458 ("python-text-unidecode" ,python-text-unidecode)))
13459 (home-page "https://github.com/joke2k/faker")
13460 (synopsis "Python package that generates fake data")
13461 (description
13462 "Faker is a Python package that generates fake data such as names,
13463 addresses, and phone numbers.")
13464 (license license:expat)
13465 (properties `((python2-variant . ,(delay python2-faker))))))
13466
13467 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13468 (define-public python2-faker
13469 (let ((base (package-with-python2 (strip-python2-variant
13470 python-faker))))
13471 (package
13472 (inherit base)
13473 (version "3.0.1")
13474 (source (origin
13475 (method url-fetch)
13476 (uri (pypi-uri "Faker" version))
13477 (sha256
13478 (base32
13479 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13480 (native-inputs
13481 `(("python-mock" ,python2-mock)
13482 ,@(package-native-inputs base)))
13483 (propagated-inputs
13484 `(("python2-ipaddress" ,python2-ipaddress)
13485 ("python2-six" ,python2-six)
13486 ,@(package-propagated-inputs base))))))
13487
13488 (define-public python-pyaml
13489 (package
13490 (name "python-pyaml")
13491 (version "18.11.0")
13492 (source (origin
13493 (method url-fetch)
13494 (uri (pypi-uri "pyaml" version))
13495 (sha256
13496 (base32
13497 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13498 (build-system python-build-system)
13499 (native-inputs
13500 `(("python-unidecode" ,python-unidecode)))
13501 (propagated-inputs
13502 `(("python-pyyaml" ,python-pyyaml)))
13503 (home-page "https://github.com/mk-fg/pretty-yaml")
13504 (synopsis "YAML pretty-print library for Python")
13505 (description
13506 "pyaml is a PyYAML based python module to produce pretty and readable
13507 YAML-serialized data.")
13508 (license license:wtfpl2)))
13509
13510 (define-public python2-pyaml
13511 (package-with-python2 python-pyaml))
13512
13513 (define-public python-backpack
13514 (package
13515 (name "python-backpack")
13516 (version "0.1")
13517 (source
13518 (origin
13519 (method url-fetch)
13520 (uri (pypi-uri "backpack" version))
13521 (sha256
13522 (base32
13523 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13524 (build-system python-build-system)
13525 (native-inputs
13526 `(("python-pytest" ,python-pytest)
13527 ("python-nose" ,python-nose)))
13528 (propagated-inputs
13529 `(("python-simplejson" ,python-simplejson)))
13530 (home-page "https://github.com/sdispater/backpack")
13531 (synopsis "Utilities for working with Python collections")
13532 (description "Backpack provides some useful utilities for working with
13533 collections of data.")
13534 (license license:expat)))
13535
13536 (define-public python2-backpack
13537 (package-with-python2 python-backpack))
13538
13539 (define-public python-prompt-toolkit
13540 (package
13541 (name "python-prompt-toolkit")
13542 (version "3.0.7")
13543 (source
13544 (origin
13545 (method url-fetch)
13546 (uri (pypi-uri "prompt_toolkit" version))
13547 (sha256
13548 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13549 (build-system python-build-system)
13550 (arguments
13551 `(#:phases
13552 (modify-phases %standard-phases
13553 (delete 'check)
13554 (add-after 'install 'post-install-check
13555 (lambda* (#:key inputs outputs #:allow-other-keys)
13556 ;; HOME is needed for the test
13557 ;; "test_pathcompleter_can_expanduser".
13558 (setenv "HOME" "/tmp")
13559 (add-installed-pythonpath inputs outputs)
13560 (invoke "py.test"))))))
13561 (propagated-inputs
13562 `(("python-wcwidth" ,python-wcwidth)))
13563 (native-inputs
13564 `(("python-pytest" ,python-pytest)))
13565 (home-page
13566 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13567 (synopsis "Library for building command line interfaces in Python")
13568 (description
13569 "Prompt-Toolkit is a library for building interactive command line
13570 interfaces in Python. It's like GNU Readline but it also features syntax
13571 highlighting while typing, out-of-the-box multi-line input editing, advanced
13572 code completion, incremental search, support for Chinese double-width
13573 characters, mouse support, and auto suggestions.")
13574 (license license:bsd-3)
13575 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13576
13577 (define-public python-prompt-toolkit-2
13578 (package (inherit python-prompt-toolkit)
13579 (name "python-prompt-toolkit")
13580 (version "2.0.7")
13581 (source
13582 (origin
13583 (method url-fetch)
13584 (uri (pypi-uri "prompt_toolkit" version))
13585 (sha256
13586 (base32
13587 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13588 (propagated-inputs
13589 `(("python-wcwidth" ,python-wcwidth)
13590 ("python-six" ,python-six)
13591 ("python-pygments" ,python-pygments)))
13592 (properties '())))
13593
13594 (define-public python2-prompt-toolkit
13595 (package-with-python2 python-prompt-toolkit-2))
13596
13597 (define-public python-prompt-toolkit-1
13598 (package (inherit python-prompt-toolkit-2)
13599 (version "1.0.15")
13600 (source
13601 (origin
13602 (method url-fetch)
13603 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13604 (sha256
13605 (base32
13606 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13607
13608 (define-public python2-prompt-toolkit-1
13609 (package-with-python2 python-prompt-toolkit-1))
13610
13611 (define-public python-jedi
13612 (package
13613 (name "python-jedi")
13614 (version "0.17.2")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "jedi" version))
13619 (sha256
13620 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13621 (build-system python-build-system)
13622 (arguments
13623 `(#:phases
13624 (modify-phases %standard-phases
13625 (replace 'check
13626 (lambda _
13627 (setenv "HOME" "/tmp")
13628 (invoke "python" "-m" "pytest" "-vv"))))))
13629 (native-inputs
13630 `(("python-pytest" ,python-pytest)
13631 ("python-docopt" ,python-docopt)))
13632 (propagated-inputs
13633 `(("python-parso" ,python-parso)))
13634 (home-page "https://github.com/davidhalter/jedi")
13635 (synopsis "Autocompletion and static analysis library for Python")
13636 (description
13637 "Jedi is a static analysis tool for Python that can be used in Integrated
13638 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13639 on a deeper level than many other static analysis frameworks for Python.
13640
13641 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13642 well.")
13643 (license license:expat)))
13644
13645 (define-public python2-jedi
13646 (package-with-python2 python-jedi))
13647
13648 (define-public ptpython
13649 (package
13650 (name "ptpython")
13651 (version "3.0.5")
13652 (source (origin
13653 (method url-fetch)
13654 (uri (pypi-uri "ptpython" version))
13655 (sha256
13656 (base32
13657 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13658 (build-system python-build-system)
13659 (arguments
13660 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13661 (propagated-inputs
13662 `(("python-appdirs" ,python-appdirs)
13663 ("python-jedi" ,python-jedi)
13664 ("python-prompt-toolkit" ,python-prompt-toolkit)
13665 ("python-pygments" ,python-pygments)))
13666 (home-page "https://github.com/jonathanslenders/ptpython")
13667 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13668 (description
13669 "ptpython is a Python read-eval-print loop with IDE-like features.
13670 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13671 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13672 etc.")
13673 (license license:bsd-3)
13674 (properties `((python2-variant . ,(delay ptpython-2))))))
13675
13676 (define-public ptpython-2
13677 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13678 (package
13679 (inherit base)
13680 (name "ptpython2"))))
13681
13682 (define-public python-stem
13683 (package
13684 (name "python-stem")
13685 (version "1.8.0")
13686 (source
13687 (origin
13688 (method url-fetch)
13689 (uri (pypi-uri "stem" version))
13690 (sha256
13691 (base32
13692 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13693 (build-system python-build-system)
13694 (arguments
13695 `(#:phases
13696 (modify-phases %standard-phases
13697 (replace 'check
13698 (lambda _
13699 (invoke "./run_tests.py" "--unit")
13700 #t)))))
13701 (native-inputs
13702 `(("python-mock" ,python-mock)
13703 ("python-pycodestyle" ,python-pycodestyle)
13704 ("python-pyflakes" ,python-pyflakes)))
13705 (home-page "https://stem.torproject.org/")
13706 (synopsis
13707 "Python controller library that allows applications to interact with Tor")
13708 (description
13709 "Stem is a Python controller library for Tor. With it you can use Tor's
13710 control protocol to script against the Tor process and read descriptor data
13711 relays publish about themselves.")
13712 (license license:lgpl3)))
13713
13714 (define-public python2-stem
13715 (package-with-python2 python-stem))
13716
13717 (define-public python-pyserial
13718 (package
13719 (name "python-pyserial")
13720 (version "3.4")
13721 (source
13722 (origin
13723 (method url-fetch)
13724 (uri (pypi-uri "pyserial" version))
13725 (sha256
13726 (base32
13727 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13728 (build-system python-build-system)
13729 (arguments
13730 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13731 ;; #:phases
13732 ;; (modify-phases %standard-phases
13733 ;; (replace 'check
13734 ;; (lambda _
13735 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13736 (home-page
13737 "https://github.com/pyserial/pyserial")
13738 (synopsis "Python Serial Port Bindings")
13739 (description "@code{pyserial} provide serial port bindings for Python. It
13740 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13741 and/or Xon/Xoff. The port is accessed in RAW mode.")
13742 (license license:bsd-3)))
13743
13744 (define-public python2-pyserial
13745 (package-with-python2 python-pyserial))
13746
13747 (define-public python-kivy
13748 (package
13749 (name "python-kivy")
13750 (version "1.10.1")
13751 (source
13752 (origin
13753 (method url-fetch)
13754 (uri (pypi-uri "Kivy" version))
13755 (file-name (string-append name "-" version ".tar.gz"))
13756 (sha256
13757 (base32
13758 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13759 (build-system python-build-system)
13760 (arguments
13761 `(#:tests? #f ; Tests require many optional packages
13762 #:phases
13763 (modify-phases %standard-phases
13764 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13765 (lambda* (#:key inputs #:allow-other-keys)
13766 (setenv "KIVY_SDL2_PATH"
13767 (string-append (assoc-ref inputs "sdl-union")
13768 "/include/SDL2"))
13769 #t)))))
13770 (native-inputs
13771 `(("pkg-config" ,pkg-config)
13772 ("python-cython" ,python-cython)))
13773 (inputs
13774 `(("gstreamer" ,gstreamer)
13775 ("mesa" ,mesa)
13776 ("sdl-union"
13777 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13778 (home-page "https://kivy.org")
13779 (synopsis
13780 "Multitouch application framework")
13781 (description
13782 "A software library for rapid development of
13783 hardware-accelerated multitouch applications.")
13784 (license license:expat)))
13785
13786 (define-public python2-kivy
13787 (package-with-python2 python-kivy))
13788
13789 (define-public python-binaryornot
13790 (package
13791 (name "python-binaryornot")
13792 (version "0.4.4")
13793 (source (origin
13794 (method url-fetch)
13795 (uri (pypi-uri "binaryornot" version))
13796 (sha256
13797 (base32
13798 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13799 (build-system python-build-system)
13800 (arguments
13801 `(#:phases
13802 (modify-phases %standard-phases
13803 (add-after 'unpack 'patch-tests
13804 (lambda _
13805 ;; TypeError: binary() got an unexpected keyword argument
13806 ;; 'average_size'.
13807 (substitute* "tests/test_check.py"
13808 (("average_size=512") ""))
13809 #t)))))
13810 (propagated-inputs
13811 `(("python-chardet" ,python-chardet)
13812 ("python-hypothesis" ,python-hypothesis)))
13813 (home-page "https://github.com/audreyr/binaryornot")
13814 (synopsis "Package to check if a file is binary or text")
13815 (description "Ultra-lightweight pure Python package to check if a file is
13816 binary or text.")
13817 (license license:bsd-3)
13818 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13819
13820 (define-public python2-binaryornot
13821 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13822 (package (inherit base)
13823 (propagated-inputs
13824 `(("python2-enum34" ,python2-enum34)
13825 ,@(package-propagated-inputs base))))))
13826
13827 (define-public python-binwalk
13828 (package
13829 (name "python-binwalk")
13830 (version "2.2.0")
13831 (source
13832 (origin
13833 (method git-fetch)
13834 (uri (git-reference
13835 (url "https://github.com/ReFirmLabs/binwalk")
13836 (commit (string-append "v" version))))
13837 (file-name (git-file-name name version))
13838 (sha256
13839 (base32
13840 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13841 (build-system python-build-system)
13842 (arguments
13843 `(#:phases
13844 (modify-phases %standard-phases
13845 (add-before 'check 'set-pythonpath
13846 (lambda _
13847 (setenv "PYTHONPATH"
13848 (string-append
13849 (getcwd) "/src/"
13850 ":" (getenv "PYTHONPATH")))
13851 (setenv "HOME" "")
13852 #t)))))
13853 (native-inputs
13854 `(("python-coverage" ,python-coverage)
13855 ("python-nose" ,python-nose)))
13856 (home-page "https://github.com/ReFirmLabs/binwalk")
13857 (synopsis "Firmware analysis tool")
13858 (description "Binwalk is a tool for analyzing, reverse engineering, and
13859 extracting firmware images")
13860 (license license:expat)))
13861
13862 (define-public python-nltk
13863 (package
13864 (name "python-nltk")
13865 (version "3.2.1")
13866 (source (origin
13867 (method url-fetch)
13868 (uri (pypi-uri "nltk" version))
13869 (sha256
13870 (base32
13871 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13872 (build-system python-build-system)
13873 (arguments
13874 '(;; The tests require some extra resources to be downloaded.
13875 ;; TODO Try packaging these resources.
13876 #:tests? #f))
13877 (home-page "http://nltk.org/")
13878 (synopsis "Natural Language Toolkit")
13879 (description "It provides interfaces to over 50 corpora and lexical
13880 resources such as WordNet, along with a suite of text processing libraries
13881 for classification, tokenization, stemming, tagging, parsing, and semantic
13882 reasoning, wrappers for natural language processing libraries.")
13883 (license license:asl2.0)))
13884
13885 (define-public python2-nltk
13886 (package-with-python2 python-nltk))
13887
13888 (define-public python-pymongo
13889 (package
13890 (name "python-pymongo")
13891 (version "3.7.2")
13892 (source (origin
13893 (method url-fetch)
13894 (uri (pypi-uri "pymongo" version))
13895 (sha256
13896 (base32
13897 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13898 (build-system python-build-system)
13899 (propagated-inputs
13900 `(("python-certifi" ,python-certifi)))
13901 (home-page "https://github.com/mongodb/mongo-python-driver")
13902 (synopsis "Python driver for MongoDB")
13903 (description "Python driver for MongoDB.")
13904 (license license:asl2.0)))
13905
13906 (define-public python2-pymongo
13907 (package-with-python2 python-pymongo))
13908
13909 (define-public python-consul
13910 (package
13911 (name "python-consul")
13912 (version "0.6.1")
13913 (source
13914 (origin
13915 (method url-fetch)
13916 (uri (pypi-uri "python-consul" version))
13917 (sha256
13918 (base32
13919 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13920 (build-system python-build-system)
13921 (arguments
13922 '(#:tests? #f)) ; The tests are not distributed
13923 (propagated-inputs
13924 `(("python-requests" ,python-requests)
13925 ("python-six" ,python-six)))
13926 (home-page "https://github.com/cablehead/python-consul")
13927 (synopsis "Python client for Consul")
13928 (description
13929 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13930 discovery, monitoring and configuration.")
13931 (license license:expat)))
13932
13933 (define-public python2-consul
13934 (package-with-python2 python-consul))
13935
13936 (define-public python-schematics
13937 (package
13938 (name "python-schematics")
13939 (version "1.1.1")
13940 (source
13941 (origin
13942 (method git-fetch)
13943 (uri (git-reference
13944 (url "https://github.com/schematics/schematics")
13945 (commit (string-append "v" version))))
13946 (file-name (git-file-name name version))
13947 (sha256
13948 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13949 (build-system python-build-system)
13950 (propagated-inputs
13951 `(("python-six" ,python-six)))
13952 (arguments
13953 ;; The tests require a bunch of not very nice packages with fixed
13954 ;; version requirements (e.g. python-coveralls).
13955 `(#:tests? #f))
13956 (home-page "https://github.com/schematics/schematics")
13957 (synopsis "Python Data Structures for Humans")
13958 (description "Python Data Structures for Humans.")
13959 (license license:bsd-3)))
13960
13961 (define-public python2-schematics
13962 (package-with-python2 python-schematics))
13963
13964 (define-public python-odfpy
13965 (package
13966 (name "python-odfpy")
13967 (version "1.4.1")
13968 (source (origin
13969 (method url-fetch)
13970 (uri (pypi-uri "odfpy" version))
13971 (sha256
13972 (base32
13973 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13974 (arguments
13975 `(#:phases
13976 (modify-phases %standard-phases
13977 (replace 'check
13978 (lambda _
13979 (setenv "PYTHONPATH" (string-append "./build/lib:"
13980 (getenv "PYTHONPATH")))
13981 (invoke "pytest" "-vv"))))))
13982 (build-system python-build-system)
13983 (native-inputs
13984 `(("python-pytest" ,python-pytest)))
13985 (propagated-inputs
13986 `(("python-defusedxml" ,python-defusedxml)))
13987 (home-page "https://github.com/eea/odfpy")
13988 (synopsis "Python API and tools to manipulate OpenDocument files")
13989 (description "Collection of libraries and utility programs written in
13990 Python to manipulate OpenDocument 1.2 files.")
13991 (license
13992 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13993 ;; number of files with other licenses.
13994 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13995
13996 (define-public python2-odfpy
13997 (package-with-python2 python-odfpy))
13998
13999 (define-public python-natsort
14000 (package
14001 (name "python-natsort")
14002 (version "7.0.1")
14003 (source (origin
14004 (method url-fetch)
14005 (uri (pypi-uri "natsort" version))
14006 (sha256
14007 (base32
14008 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14009 (build-system python-build-system)
14010 (arguments
14011 `(#:modules ((guix build utils)
14012 (guix build python-build-system)
14013 (srfi srfi-1)
14014 (srfi srfi-26)
14015 (ice-9 ftw))
14016 #:phases
14017 (modify-phases %standard-phases
14018 (add-before 'check 'set-cachedir
14019 ;; Tests require write access to $HOME by default
14020 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14021 (replace 'check
14022 (lambda _
14023 (let ((cwd (getcwd)))
14024 (setenv "PYTHONPATH"
14025 (string-append
14026 cwd "/build/"
14027 (find (cut string-prefix? "lib" <>)
14028 (scandir (string-append cwd "/build")))
14029 ":"
14030 (getenv "PYTHONPATH")))
14031 (invoke "pytest" "-v")))))))
14032 (native-inputs
14033 `(("python-hypothesis" ,python-hypothesis)
14034 ("python-pytest-cov" ,python-pytest-cov)
14035 ("python-pytest-mock" ,python-pytest-mock)
14036 ("python-pytest" ,python-pytest)))
14037 (propagated-inputs ; TODO: Add python-fastnumbers.
14038 `(("python-pyicu" ,python-pyicu)))
14039 (home-page "https://github.com/SethMMorton/natsort")
14040 (synopsis "Natural sorting for python and shell")
14041 (description
14042 "Natsort lets you apply natural sorting on lists instead of
14043 lexicographical. If you use the built-in @code{sorted} method in python
14044 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14045 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14046 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14047 identifies numbers and sorts them separately from strings. It can also sort
14048 version numbers, real numbers, mixed types and more, and comes with a shell
14049 command @command{natsort} that exposes this functionality in the command line.")
14050 (license license:expat)
14051 (properties `((python2-variant . ,(delay python2-natsort))))))
14052
14053 ;; Natsort 6.x are the last versions with support for Python 2.
14054 (define-public python2-natsort
14055 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14056 (package (inherit base)
14057 (version "6.2.1")
14058 (source (origin
14059 (method url-fetch)
14060 (uri (pypi-uri "natsort" version))
14061 (sha256
14062 (base32
14063 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14064 (native-inputs
14065 `(("python2-pathlib" ,python2-pathlib)
14066 ,@(package-native-inputs base))))))
14067
14068 (define-public glances
14069 (package
14070 (name "glances")
14071 (version "3.1.4")
14072 (source
14073 (origin
14074 (method url-fetch)
14075 (uri (pypi-uri "Glances" version))
14076 (sha256
14077 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
14078 (modules '((guix build utils)))
14079 (snippet
14080 '(begin
14081 ;; Glances phones PyPI for weekly update checks by default.
14082 ;; Disable these. The user can re-enable them if desired.
14083 (substitute* "glances/outdated.py"
14084 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14085 (string-append indentation
14086 "self.args.disable_check_update = True\n"
14087 line)))
14088 #t))))
14089 (build-system python-build-system)
14090 (propagated-inputs
14091 `(("python-future" ,python-future)
14092 ("python-psutil" ,python-psutil)))
14093 (home-page "https://github.com/nicolargo/glances")
14094 (synopsis "Cross-platform curses-based monitoring tool")
14095 (description
14096 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14097 Glances uses the PsUtil library to get information from your system. It
14098 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14099 (license license:lgpl3+)))
14100
14101 (define-public python-glances
14102 (deprecated-package "python-glances" glances))
14103
14104 (define-public python-graphql-core
14105 (package
14106 (name "python-graphql-core")
14107 (version "0.5.3")
14108 (source
14109 (origin
14110 (method url-fetch)
14111 (uri (pypi-uri "graphql-core" version))
14112 (sha256
14113 (base32
14114 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
14115 (build-system python-build-system)
14116 (arguments
14117 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14118 #:phases
14119 (modify-phases %standard-phases
14120 (add-after 'unpack 'patch-hardcoded-version
14121 (lambda _ (substitute*
14122 "setup.py"
14123 (("'gevent==1.1rc1'") "'gevent'"))
14124 #t)))))
14125 (native-inputs
14126 `(("python-gevent" ,python-gevent)
14127 ("python-mock" ,python-mock)
14128 ("python-pytest-mock" ,python-pytest-mock)))
14129 (propagated-inputs
14130 `(("python-promise" ,python-promise)
14131 ("python-six" ,python-six)))
14132 (home-page "https://github.com/graphql-python/graphql-core")
14133 (synopsis "GraphQL implementation for Python")
14134 (description
14135 "GraphQL implementation for Python. GraphQL is a data query language and
14136 runtime designed and used to request and deliver data to mobile and web apps.
14137 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14138 to Python.")
14139 (license license:expat)))
14140
14141 (define-public python2-graphql-core
14142 (package-with-python2 python-graphql-core))
14143
14144 (define-public python-graphql-relay
14145 (package
14146 (name "python-graphql-relay")
14147 (version "0.4.5")
14148 (source
14149 (origin
14150 (method url-fetch)
14151 (uri (pypi-uri "graphql-relay" version))
14152 (sha256
14153 (base32
14154 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14155 (build-system python-build-system)
14156 (arguments
14157 '(#:tests? #f)) ; The tests are not distributed
14158 (propagated-inputs
14159 `(("python-graphql-core" ,python-graphql-core)
14160 ("python-promise" ,python-promise)
14161 ("python-six" ,python-six)))
14162 (home-page "https://github.com/graphql-python/graphql-relay-py")
14163 (synopsis "Relay implementation for Python")
14164 (description
14165 "This is a library to allow the easy creation of Relay-compliant servers
14166 using the GraphQL Python reference implementation of a GraphQL server. It
14167 should be noted that the code is a exact port of the original
14168 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14169 from Facebook.")
14170 (license license:expat)))
14171
14172 (define-public python-graphene
14173 (package
14174 (name "python-graphene")
14175 (version "0.10.2")
14176 (source
14177 (origin
14178 (method url-fetch)
14179 (uri (pypi-uri "graphene" version))
14180 (sha256
14181 (base32
14182 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14183 (build-system python-build-system)
14184 (propagated-inputs
14185 `(("python-graphql-core" ,python-graphql-core)
14186 ("python-graphql-relay" ,python-graphql-relay)
14187 ("python-iso8601" ,python-iso8601)
14188 ("python-promise" ,python-promise)
14189 ("python-six" ,python-six)))
14190 (arguments
14191 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14192 (home-page "https://graphene-python.org/")
14193 (synopsis "GraphQL Framework for Python")
14194 (description
14195 "Graphene is a Python library for building GraphQL schemas/types.
14196 A GraphQL schema describes your data model, and provides a GraphQL server
14197 with an associated set of resolve methods that know how to fetch data.")
14198 (license license:expat)))
14199
14200 (define-public python-nautilus
14201 (package
14202 (name "python-nautilus")
14203 (version "0.4.9")
14204 (source
14205 (origin
14206 (method url-fetch)
14207 (uri (pypi-uri "nautilus" version))
14208 (sha256
14209 (base32
14210 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14211 (build-system python-build-system)
14212 (arguments `(#:tests? #f)) ; fails to import test modules
14213 (propagated-inputs
14214 `(("python-bcrypt" ,python-bcrypt)
14215 ("python-click" ,python-click)
14216 ("python-consul" ,python-consul)
14217 ("python-graphene" ,python-graphene)
14218 ("python-jinja2" ,python-jinja2)
14219 ("python-peewee" ,python-peewee)
14220 ("python-pika" ,python-pika)
14221 ("python-tornado" ,python-tornado)
14222 ("python-wtforms" ,python-wtforms)))
14223 (native-inputs
14224 `(("python-nose2" ,python-nose2)))
14225 (home-page "https://github.com/AlecAivazis/nautilus")
14226 (synopsis "Library for creating microservice applications")
14227 (description
14228 "Nautilus is a framework for flux based microservices that looks to
14229 provide extendible implementations of common aspects of a cloud so that you can
14230 focus on building massively scalable web applications.")
14231 (license license:expat)))
14232
14233 (define-public python-random2
14234 (package
14235 (name "python-random2")
14236 (version "1.0.1")
14237 (source (origin
14238 (method url-fetch)
14239 (uri (pypi-uri "random2" version ".zip"))
14240 (sha256
14241 (base32
14242 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14243 (build-system python-build-system)
14244 (native-inputs `(("unzip" ,unzip)))
14245 (home-page "http://pypi.python.org/pypi/random2")
14246 (synopsis "Python 3 version of the Python 2 @code{random} module")
14247 (description
14248 "This package provides a Python 3 ported version of Python 2.7’s
14249 @code{random} module. It has also been back-ported to work in Python 2.6.
14250
14251 In Python 3, the implementation of @code{randrange()} was changed, so that
14252 even with the same seed you get different sequences in Python 2 and 3.
14253
14254 This package closes that gap, allowing stable random number generation
14255 between the different Python versions.")
14256 (license license:psfl)))
14257
14258 (define-public python2-random2
14259 (package-with-python2 python-random2))
14260
14261 (define-public python-snowballstemmer
14262 (package
14263 (name "python-snowballstemmer")
14264 (version "2.0.0")
14265 (source (origin
14266 (method url-fetch)
14267 (uri (pypi-uri "snowballstemmer" version))
14268 (sha256
14269 (base32
14270 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14271 (build-system python-build-system)
14272 (arguments
14273 `(;; No tests exist
14274 #:tests? #f))
14275 (home-page "https://github.com/shibukawa/snowball_py")
14276 (synopsis "Snowball stemming library collection for Python")
14277 (description "This package provides 16 word stemmer algorithms generated
14278 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14279 English stemmer.")
14280 (license license:bsd-3)))
14281
14282 (define-public python2-snowballstemmer
14283 (package-with-python2 python-snowballstemmer))
14284
14285 (define-public python-setproctitle
14286 (package
14287 (name "python-setproctitle")
14288 (version "1.1.10")
14289 (source
14290 (origin
14291 (method url-fetch)
14292 (uri (pypi-uri "setproctitle" version))
14293 (sha256
14294 (base32
14295 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14296 (build-system python-build-system)
14297 (arguments
14298 '(#:phases
14299 (modify-phases %standard-phases
14300 (add-before 'check 'patch-Makefile
14301 ;; Stricly this is only required for the python2 variant.
14302 ;; But adding a phase in an inherited package seems to be
14303 ;; cumbersum. So we patch even for python3.
14304 (lambda _
14305 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14306 (when nose
14307 (substitute* "Makefile"
14308 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14309 (string-append nose "/bin/nosetests "))))
14310 #t)))
14311 (replace 'check
14312 (lambda _
14313 (setenv "PYTHON" (or (which "python3") (which "python")))
14314 (setenv "PYCONFIG" (if (which "python3-config")
14315 "python3-config --embed"
14316 "python-config"))
14317 (setenv "CC" "gcc")
14318 ;; No need to extend PYTHONPATH to find the built package, since
14319 ;; the Makefile will build anyway
14320 (invoke "make" "check"))))))
14321 (native-inputs
14322 `(("procps" ,procps))) ; required for tests
14323 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14324 (synopsis
14325 "Setproctitle implementation for Python to customize the process title")
14326 (description "The library allows a process to change its title (as displayed
14327 by system tools such as ps and top).
14328
14329 Changing the title is mostly useful in multi-process systems, for
14330 example when a master process is forked: changing the children's title
14331 allows identifying the task each process is busy with. The technique
14332 is used by PostgreSQL and the OpenSSH Server for example.")
14333 (license license:bsd-3)
14334 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14335
14336 (define-public python2-setproctitle
14337 (let ((base (package-with-python2
14338 (strip-python2-variant python-setproctitle))))
14339 (package
14340 (inherit base)
14341 (native-inputs `(("python2-nose" ,python2-nose)
14342 ,@(package-native-inputs base))))))
14343
14344 (define-public python-validictory
14345 (package
14346 (name "python-validictory")
14347 (version "1.0.1")
14348 (source
14349 (origin
14350 (method url-fetch)
14351 (uri (pypi-uri "validictory" version))
14352 (sha256
14353 (base32
14354 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14355 (build-system python-build-system)
14356 (arguments
14357 '(#:phases
14358 (modify-phases %standard-phases
14359 (add-after 'unpack 'bootstrap
14360 ;; Move the tests out of the package directory to avoid
14361 ;; packaging them.
14362 (lambda* _
14363 (rename-file "validictory/tests" "tests")
14364 (delete-file "tests/__init__.py")))
14365 (replace 'check
14366 (lambda _
14367 ;; Extend PYTHONPATH so the built package will be found.
14368 (setenv "PYTHONPATH"
14369 (string-append (getcwd) "/build/lib:"
14370 (getenv "PYTHONPATH")))
14371 (invoke "py.test" "-vv" ))))))
14372 (native-inputs
14373 `(("python-pytest" ,python-pytest)))
14374 (home-page
14375 "https://github.com/jamesturk/validictory")
14376 (synopsis "General purpose Python data validator")
14377 (description "It allows validation of arbitrary Python data structures.
14378
14379 The schema format is based on the JSON Schema
14380 proposal (http://json-schema.org), so combined with json the library is also
14381 useful as a validator for JSON data.")
14382 (license license:expat)))
14383
14384 (define-public python2-validictory
14385 (package-with-python2 python-validictory))
14386
14387 (define-public python-pyelftools
14388 (package
14389 (name "python-pyelftools")
14390 (version "0.25")
14391 (source
14392 (origin
14393 (method url-fetch)
14394 (uri (pypi-uri "pyelftools" version))
14395 (sha256
14396 (base32
14397 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14398 (build-system python-build-system)
14399 (arguments
14400 `(#:phases
14401 (modify-phases %standard-phases
14402 (add-before 'check 'set-pythonpath
14403 (lambda _
14404 (setenv "PYTHONPATH"
14405 (string-append
14406 (getcwd) "/test/"
14407 ":" (getenv "PYTHONPATH")))
14408 #t)))))
14409 (home-page
14410 "https://github.com/eliben/pyelftools")
14411 (synopsis
14412 "Analyze binary and library file information")
14413 (description "This Python library provides interfaces for parsing and
14414 analyzing two binary and library file formats; the Executable and Linking
14415 Format (ELF), and debugging information in the Debugging With Attributed
14416 Record Format (DWARF).")
14417 (license license:public-domain)))
14418
14419 (define-public python-pyev
14420 (package
14421 (name "python-pyev")
14422 (version "0.9.0")
14423 (source
14424 (origin
14425 (method url-fetch)
14426 (uri (pypi-uri "pyev" version))
14427 (sha256
14428 (base32
14429 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14430 (build-system python-build-system)
14431 (arguments
14432 `(#:tests? #f ; no test suite
14433 #:phases
14434 (modify-phases %standard-phases
14435 (add-after 'unpack 'patch
14436 (lambda* (#:key inputs #:allow-other-keys)
14437 (let ((libev (string-append (assoc-ref inputs "libev")
14438 "/lib/libev.so.4")))
14439 (substitute* "setup.py"
14440 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14441 (string-append "libev_dll_name = \"" libev "\"")))))))))
14442 (inputs
14443 `(("libev" ,libev)))
14444 (home-page "http://pythonhosted.org/pyev/")
14445 (synopsis "Python libev interface")
14446 (description "Pyev provides a Python interface to libev.")
14447 (license license:gpl3)))
14448
14449 (define-public python2-pyev
14450 (package-with-python2 python-pyev))
14451
14452 (define-public python-imagesize
14453 (package
14454 (name "python-imagesize")
14455 (version "1.2.0")
14456 (source
14457 (origin
14458 (method url-fetch)
14459 (uri (pypi-uri "imagesize" version))
14460 (sha256
14461 (base32
14462 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14463 (build-system python-build-system)
14464 (home-page "https://github.com/shibukawa/imagesize_py")
14465 (synopsis "Gets image size of files in various formats in Python")
14466 (description
14467 "This package allows determination of image size from
14468 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14469 (license license:expat)))
14470
14471 (define-public python2-imagesize
14472 (package-with-python2 python-imagesize))
14473
14474 (define-public python-termstyle
14475 (package
14476 (name "python-termstyle")
14477 (version "0.1.11")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (pypi-uri "termstyle" version))
14482 (sha256
14483 (base32
14484 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14485 (build-system python-build-system)
14486 (arguments
14487 '(#:phases
14488 (modify-phases %standard-phases
14489 (replace 'check
14490 (lambda _
14491 (invoke "python" "test3.py"))))))
14492 (home-page "https://github.com/gfxmonk/termstyle")
14493 (synopsis "Console text coloring for Python")
14494 (description "This package provides console text coloring for Python.")
14495 (license license:bsd-3)))
14496
14497 (define-public python-argcomplete
14498 (package
14499 (name "python-argcomplete")
14500 (version "1.11.1")
14501 (source
14502 (origin
14503 (method url-fetch)
14504 (uri (pypi-uri "argcomplete" version))
14505 (sha256
14506 (base32
14507 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14508 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14509 (build-system python-build-system)
14510 (native-inputs
14511 `(("python-coverage" ,python-coverage)
14512 ("python-flake8" ,python-flake8)
14513 ("python-pexpect" ,python-pexpect)
14514 ("python-wheel" ,python-wheel)
14515 ("tcsh" ,tcsh)
14516 ("fish" ,fish)
14517 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14518 (home-page "https://github.com/kislyuk/argcomplete")
14519 (synopsis "Shell tab completion for Python argparse")
14520 (description "argcomplete provides extensible command line tab completion
14521 of arguments and options for Python scripts using @code{argparse}. It's
14522 particularly useful for programs with many options or sub-parsers that can
14523 dynamically suggest completions; for example, when browsing resources over the
14524 network.")
14525 (license license:asl2.0)))
14526
14527 (define-public python2-argcomplete
14528 (package-with-python2 python-argcomplete))
14529
14530 (define-public python-csscompressor
14531 (package
14532 (name "python-csscompressor")
14533 (version "0.9.5")
14534 (source
14535 (origin
14536 (method url-fetch)
14537 (uri (pypi-uri "csscompressor" version))
14538 (sha256
14539 (base32
14540 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14541 (build-system python-build-system)
14542 (arguments
14543 '(#:phases
14544 (modify-phases %standard-phases
14545 (replace 'check
14546 (lambda _
14547 (invoke "py.test"))))))
14548 (native-inputs
14549 `(("python-pytest" ,python-pytest)))
14550 (home-page "https://github.com/sprymix/csscompressor")
14551 (synopsis "Python port of YUI CSS Compressor")
14552 (description
14553 "This package provides a python port of YUI CSS Compressor.")
14554 (license license:bsd-3)))
14555
14556 (define-public python-rcssmin
14557 (package
14558 (name "python-rcssmin")
14559 (version "1.0.6")
14560 (source
14561 (origin
14562 (method url-fetch)
14563 (uri (pypi-uri "rcssmin" version))
14564 (sha256
14565 (base32
14566 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14567 (build-system python-build-system)
14568 (arguments
14569 '(#:phases
14570 (modify-phases %standard-phases
14571 (replace 'check
14572 (lambda _
14573 (invoke "python" "run_tests.py" "tests"))))))
14574 (home-page "http://opensource.perlig.de/rcssmin/")
14575 (synopsis "CSS Minifier")
14576 (description "The minifier is based on the semantics of the YUI compressor,
14577 which itself is based on the rule list by Isaac Schlueter.")
14578 (license license:asl2.0)))
14579
14580 (define-public python-rjsmin
14581 (package
14582 (name "python-rjsmin")
14583 (version "1.1.0")
14584 (source
14585 (origin
14586 (method url-fetch)
14587 (uri (pypi-uri "rjsmin" version))
14588 (sha256
14589 (base32
14590 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14591 (modules '((guix build utils)))
14592 (snippet
14593 '(begin
14594 (for-each delete-file (find-files "bench" "\\.js$"))
14595 #t))))
14596 (build-system python-build-system)
14597 (arguments
14598 '(#:tests? #f ; Not all test files included.
14599 #:phases
14600 (modify-phases %standard-phases
14601 (replace 'check
14602 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14603 (add-installed-pythonpath inputs outputs)
14604 (if tests?
14605 (invoke "py.test" "-vv" "tests")
14606 #t))))))
14607 (native-inputs
14608 `(("python-pytest" ,python-pytest)))
14609 (home-page "http://opensource.perlig.de/rjsmin/")
14610 (synopsis "Javascript Minifier")
14611 (description "@code{rJSmin} is a javascript minifier written in Python. The
14612 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14613 is a re-implementation aiming for speed, so it can be used at runtime (rather
14614 than during a preprocessing step).")
14615 (license license:asl2.0)))
14616
14617 (define-public python-xopen
14618 (package
14619 (name "python-xopen")
14620 (version "0.5.0")
14621 (source
14622 (origin
14623 (method url-fetch)
14624 (uri (pypi-uri "xopen" version))
14625 (sha256
14626 (base32
14627 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14628 (build-system python-build-system)
14629 (propagated-inputs
14630 `(("python-setuptools-scm" ,python-setuptools-scm)))
14631 (home-page "https://github.com/marcelm/xopen/")
14632 (synopsis "Open compressed files transparently")
14633 (description "This module provides an @code{xopen} function that works like
14634 Python's built-in @code{open} function, but can also deal with compressed files.
14635 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14636 recognized by their file extensions. The focus is on being as efficient as
14637 possible on all supported Python versions.")
14638 (license license:expat)))
14639
14640 (define-public python2-xopen
14641 (let ((base (package-with-python2
14642 (strip-python2-variant python-xopen))))
14643 (package
14644 (inherit base)
14645 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14646 ,@(package-propagated-inputs base))))))
14647
14648 (define-public python-cheetah
14649 (package
14650 (name "python-cheetah")
14651 (version "3.2.4")
14652 (source
14653 (origin
14654 (method url-fetch)
14655 (uri (pypi-uri "Cheetah3" version))
14656 (sha256
14657 (base32
14658 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14659 (build-system python-build-system)
14660 (arguments
14661 `(#:modules ((guix build utils)
14662 (guix build python-build-system)
14663 (ice-9 ftw)
14664 (srfi srfi-1)
14665 (srfi srfi-26))
14666 #:phases (modify-phases %standard-phases
14667 (add-after 'unpack 'use-absolute-python
14668 (lambda _
14669 (substitute* "Cheetah/CheetahWrapper.py"
14670 (("#!/usr/bin/env python")
14671 (string-append "#!" (which "python"))))
14672 #t))
14673 (add-after 'unpack 'fix-tests
14674 (lambda _
14675 (substitute* "Cheetah/Tests/ImportHooks.py"
14676 (("os.path.dirname\\(__file__\\)")
14677 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14678 #t))
14679 (replace 'check
14680 (lambda _
14681 (let ((cwd (getcwd)))
14682 (setenv "PYTHONPATH"
14683 (string-append
14684 cwd "/build/"
14685 (find (cut string-prefix? "lib" <>)
14686 (scandir (string-append cwd "/build")))
14687 ":" (getenv "PYTHONPATH")))
14688 (setenv "PATH"
14689 (string-append (getenv "PATH")
14690 ":" cwd "/bin"))
14691 (setenv "TMPDIR" "/tmp")
14692
14693 (substitute* "Cheetah/Tests/Test.py"
14694 (("unittest.TextTestRunner\\(\\)")
14695 "unittest.TextTestRunner(verbosity=2)"))
14696
14697 (invoke "python" "Cheetah/Tests/Test.py")))))))
14698 (propagated-inputs
14699 `(("python-markdown" ,python-markdown))) ;optional
14700 (home-page "https://cheetahtemplate.org/")
14701 (synopsis "Template engine")
14702 (description "Cheetah is a text-based template engine and Python code
14703 generator.
14704
14705 Cheetah can be used as a standalone templating utility or referenced as
14706 a library from other Python applications. It has many potential uses,
14707 but web developers looking for a viable alternative to ASP, JSP, PHP and
14708 PSP are expected to be its principle user group.
14709
14710 Features:
14711 @enumerate
14712 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14713 text-based format.
14714 @item Cleanly separates content, graphic design, and program code.
14715 @item Blends the power and flexibility of Python with a simple template language
14716 that non-programmers can understand.
14717 @item Gives template writers full access to any Python data structure, module,
14718 function, object, or method in their templates.
14719 @item Makes code reuse easy by providing an object-orientated interface to
14720 templates that is accessible from Python code or other Cheetah templates.
14721 One template can subclass another and selectively reimplement sections of it.
14722 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14723 improve the performance of a dynamic website.
14724 @item Compiles templates into optimized, yet readable, Python code.
14725 @end enumerate")
14726 (license (license:x11-style "file://LICENSE"))))
14727
14728 (define-public python2-cheetah
14729 (package-with-python2 python-cheetah))
14730
14731 (define-public python-dulwich
14732 (package
14733 (name "python-dulwich")
14734 (version "0.19.16")
14735 (source
14736 (origin
14737 (method url-fetch)
14738 (uri (list (string-append "https://www.dulwich.io/releases/"
14739 "dulwich-" version ".tar.gz")
14740 (pypi-uri "dulwich" version)))
14741 (sha256
14742 (base32
14743 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14744 (build-system python-build-system)
14745 (arguments
14746 `(#:phases
14747 (modify-phases %standard-phases
14748 (add-before 'check 'fix-tests
14749 (lambda* (#:key inputs #:allow-other-keys)
14750 ;; The tests use Popen with a custom environment which doesn't
14751 ;; include PATH.
14752 (substitute* "dulwich/tests/compat/utils.py"
14753 (("'git'") (string-append "'"
14754 (which "git")
14755 "'")))
14756 (substitute* '("dulwich/tests/test_repository.py"
14757 "dulwich/tests/test_hooks.py")
14758 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14759 (setenv "TEST_RUNNER" "unittest")
14760 (setenv "PYTHONHASHSEED" "random")
14761 #t)))))
14762 (propagated-inputs
14763 `(("python-fastimport" ,python-fastimport)
14764 ("python-urllib3" ,python-urllib3)))
14765 (native-inputs
14766 `(("python-mock" ,python-mock)
14767 ("python-geventhttpclient" ,python-geventhttpclient)
14768 ("git" ,git)))
14769 (home-page "https://www.dulwich.io/")
14770 (synopsis "Git implementation in Python")
14771 (description "Dulwich is an implementation of the Git file formats and
14772 protocols written in pure Python.")
14773 ;; Can be used with either license.
14774 (license (list license:asl2.0 license:gpl2+))))
14775
14776 (define-public python2-dulwich
14777 (package-with-python2 python-dulwich))
14778
14779 (define-public python-pbkdf2
14780 (package
14781 (name "python-pbkdf2")
14782 (version "1.3")
14783 (source
14784 (origin
14785 (method url-fetch)
14786 (uri (pypi-uri "pbkdf2" version))
14787 (sha256
14788 (base32
14789 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14790 (build-system python-build-system)
14791 (arguments
14792 '(#:phases
14793 (modify-phases %standard-phases
14794 (replace 'check
14795 (lambda _
14796 (setenv "PYTHONPATH"
14797 (string-append (getcwd) "/build/lib:"
14798 (getenv "PYTHONPATH")))
14799 (invoke "python" "test/test_pbkdf2.py"))))))
14800 (propagated-inputs
14801 `(("python-pycrypto" ,python-pycrypto))) ; optional
14802 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14803 (synopsis "Password-based key derivation")
14804 (description "This module implements the password-based key derivation
14805 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14806
14807 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14808 is part of the RSA Public Key Cryptography Standards series. The provided
14809 implementation takes a password or a passphrase and a salt value (and
14810 optionally a iteration count, a digest module, and a MAC module) and provides
14811 a file-like object from which an arbitrarily-sized key can be read.")
14812 (license license:expat)))
14813
14814 (define-public python2-pbkdf2
14815 (package-with-python2 python-pbkdf2))
14816
14817 (define-public python-qrcode
14818 (package
14819 (name "python-qrcode")
14820 (version "6.1")
14821 (source
14822 (origin
14823 (method url-fetch)
14824 (uri (pypi-uri "qrcode" version))
14825 (sha256
14826 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14827 (build-system python-build-system)
14828 (arguments
14829 ;; FIXME: Tests require packaging 'pymaging'.
14830 '(#:tests? #f))
14831 (propagated-inputs
14832 `(("python-lxml" ,python-lxml) ; for SVG output
14833 ("python-pillow" ,python-pillow) ; for PNG output
14834 ("python-six" ,python-six)))
14835 (home-page "https://github.com/lincolnloop/python-qrcode")
14836 (synopsis "QR Code image generator")
14837 (description "This package provides a pure Python QR Code generator
14838 module. It uses the Python Imaging Library (PIL) to allow for the generation
14839 of QR Codes.
14840
14841 In addition this package provides a command line tool to generate QR codes and
14842 either write these QR codes to a file or do the output as ascii art at the
14843 console.")
14844 (license license:bsd-3)))
14845
14846 (define-public python2-qrcode
14847 (package-with-python2 python-qrcode))
14848
14849 (define-public python-rst2ansi
14850 (package
14851 (name "python-rst2ansi")
14852 (version "0.1.5")
14853 (source
14854 (origin
14855 (method url-fetch)
14856 (uri (pypi-uri "rst2ansi" version))
14857 (sha256
14858 (base32
14859 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14860 (build-system python-build-system)
14861 (propagated-inputs
14862 `(("python-docutils" ,python-docutils)))
14863 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14864 (synopsis "Convert RST to ANSI-decorated console output")
14865 (description
14866 "Python module dedicated to rendering RST (reStructuredText) documents
14867 to ansi-escaped strings suitable for display in a terminal.")
14868 (license license:expat)))
14869
14870 (define-public python-ansi2html
14871 (package
14872 (name "python-ansi2html")
14873 (version "1.2.0")
14874 (source
14875 (origin
14876 (method url-fetch)
14877 (uri (pypi-uri "ansi2html" version))
14878 (sha256
14879 (base32
14880 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14881 (build-system python-build-system)
14882 (native-inputs
14883 `(("python-mock" ,python-mock)
14884 ("python-nose" ,python-nose)))
14885 (propagated-inputs
14886 `(("python-six" ,python-six)))
14887 (home-page "https://github.com/ralphbean/ansi2html")
14888 (synopsis "Convert ANSI-decorated console output to HTML")
14889 (description
14890 "@command{ansi2html} is a Python library and command line utility for
14891 converting text with ANSI color codes to HTML or LaTeX.")
14892 (license license:gpl3+)))
14893
14894 (define-public python2-ansi2html
14895 (package-with-python2 python-ansi2html))
14896
14897 (define-public python-ddt
14898 (package
14899 (name "python-ddt")
14900 (version "1.4.1")
14901 (source
14902 (origin
14903 (method url-fetch)
14904 (uri (pypi-uri "ddt" version))
14905 (sha256
14906 (base32
14907 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
14908 (build-system python-build-system)
14909 (native-inputs
14910 `(("python-pytest" ,python-pytest)))
14911 (propagated-inputs
14912 `(("python-pyyaml" ,python-pyyaml)))
14913 (home-page "https://github.com/datadriventests/ddt")
14914 (synopsis "Data-Driven Tests")
14915 (description
14916 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14917 running it with different test data, and make it appear as multiple test
14918 cases.")
14919 (license license:expat)))
14920
14921 (define-public python-pycountry
14922 (package
14923 (name "python-pycountry")
14924 (version "18.5.26")
14925 (source
14926 (origin
14927 (method url-fetch)
14928 (uri (pypi-uri "pycountry" version))
14929 (sha256
14930 (base32
14931 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14932 (build-system python-build-system)
14933 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14934 (synopsis "ISO databases for languages, countries, currencies, etc.")
14935 (description
14936 "@code{pycountry} provides the ISO databases for the standards:
14937 @enumerate
14938 @item 639-3 (Languages)
14939 @item 3166 (Countries)
14940 @item 3166-3 (Deleted Countries)
14941 @item 3166-2 (Subdivisions of countries)
14942 @item 4217 (Currencies)
14943 @item 15924 (Scripts)
14944 @end enumerate
14945 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14946 through a Python API.")
14947 (license license:lgpl2.1+)))
14948
14949 (define-public python2-pycountry
14950 (package-with-python2 python-pycountry))
14951
14952 (define-public python-pycosat
14953 (package
14954 (name "python-pycosat")
14955 (version "0.6.3")
14956 (source
14957 (origin
14958 (method url-fetch)
14959 (uri (pypi-uri "pycosat" version ".zip"))
14960 (sha256
14961 (base32
14962 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14963 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14964 (build-system python-build-system)
14965 (native-inputs
14966 `(("unzip" ,unzip)))
14967 (home-page "https://github.com/ContinuumIO/pycosat")
14968 (synopsis "Bindings to picosat (a SAT solver)")
14969 (description
14970 "This package provides efficient Python bindings to @code{picosat} on
14971 the C level. When importing pycosat, the @code{picosat} solver becomes part
14972 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14973 Problem} (SAT) solver.")
14974 (license license:expat)))
14975
14976 (define-public python2-pycosat
14977 (package-with-python2 python-pycosat))
14978
14979 (define-public python2-ruamel.ordereddict
14980 (package
14981 (name "python2-ruamel.ordereddict")
14982 (version "0.4.9")
14983 (source
14984 (origin
14985 (method url-fetch)
14986 (uri (pypi-uri "ruamel.ordereddict" version))
14987 (sha256
14988 (base32
14989 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14990 (build-system python-build-system)
14991 (arguments
14992 `(#:python ,python-2
14993 #:phases
14994 (modify-phases %standard-phases
14995 (delete 'check)
14996 (add-after 'install 'check
14997 (lambda* (#:key inputs outputs #:allow-other-keys)
14998 (add-installed-pythonpath inputs outputs)
14999 (invoke "python" "test/testordereddict.py"))))))
15000 (home-page "https://bitbucket.org/ruamel/ordereddict")
15001 (synopsis "Version of dict that keeps keys in insertion order")
15002 (description
15003 "This is an implementation of an ordered dictionary with @dfn{Key
15004 Insertion Order} (KIO: updates of values do not affect the position of the
15005 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15006 removed and put at the back). The standard library module @code{OrderedDict},
15007 implemented later, implements a subset of @code{ordereddict} functionality.
15008 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15009 Order} (KSO, no sorting function can be specified, but a transform can be
15010 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15011 (license license:expat)))
15012
15013 (define-public python-pypeg2
15014 (package
15015 (name "python-pypeg2")
15016 (version "2.15.2")
15017 (source
15018 (origin
15019 (method url-fetch)
15020 (uri (pypi-uri "pyPEG2" version))
15021 (sha256
15022 (base32
15023 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15024 (build-system python-build-system)
15025 (propagated-inputs `(("python-lxml" ,python-lxml)))
15026 (arguments
15027 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15028 '(#:tests? #f))
15029 (home-page "https://fdik.org/pyPEG/")
15030 (synopsis "Parsering Expression Grammars in Python")
15031 (description "PyPEG is an intrinsic parser interpreter framework for
15032 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15033 parse many formal languages.")
15034 (license license:gpl2)))
15035
15036 (define-public python-incremental
15037 (package
15038 (name "python-incremental")
15039 (version "17.5.0")
15040 (source
15041 (origin
15042 (method url-fetch)
15043 (uri (pypi-uri "incremental" version))
15044 (sha256
15045 (base32
15046 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15047 (build-system python-build-system)
15048 (home-page "https://github.com/hawkowl/incremental")
15049 (synopsis "Library for versioning Python projects")
15050 (description "Incremental is a small library that versions your Python
15051 projects.")
15052 (license license:expat)))
15053
15054 (define-public python2-incremental
15055 (package-with-python2 python-incremental))
15056
15057 (define-public python-invoke
15058 (package
15059 (name "python-invoke")
15060 (home-page "https://www.pyinvoke.org/")
15061 (version "1.4.1")
15062 (source (origin
15063 (method url-fetch)
15064 (uri (pypi-uri "invoke" version))
15065 (sha256
15066 (base32
15067 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
15068 (build-system python-build-system)
15069 (arguments
15070 ;; XXX: Requires many dependencies that are not yet in Guix.
15071 `(#:tests? #f))
15072 (synopsis "Pythonic task execution")
15073 (description
15074 "Invoke is a Python task execution tool and library, drawing inspiration
15075 from various sources to arrive at a powerful and clean feature set. It is
15076 evolved from the Fabric project, but focuses on local and abstract concerns
15077 instead of servers and network commands.")
15078 (license license:bsd-3)))
15079
15080 (define-public python2-invoke
15081 (package-with-python2 python-invoke))
15082
15083 (define-public python-automat
15084 (package
15085 (name "python-automat")
15086 (version "20.2.0")
15087 (source (origin
15088 (method url-fetch)
15089 (uri (pypi-uri "Automat" version))
15090 (sha256
15091 (base32
15092 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15093 (build-system python-build-system)
15094 ;; We disable the tests because they require python-twisted, while
15095 ;; python-twisted depends on python-automat. Twisted is optional, but the
15096 ;; tests fail if it is not available. Also see
15097 ;; <https://github.com/glyph/automat/issues/71>.
15098 (arguments '(#:tests? #f))
15099 (native-inputs
15100 `(("python-m2r" ,python-m2r)
15101 ("python-setuptools-scm" ,python-setuptools-scm)
15102 ("python-graphviz" ,python-graphviz)))
15103 (propagated-inputs
15104 `(("python-six" ,python-six)
15105 ("python-attrs" ,python-attrs)))
15106 (home-page "https://github.com/glyph/Automat")
15107 (synopsis "Self-service finite-state machines")
15108 (description "Automat is a library for concise, idiomatic Python
15109 expression of finite-state automata (particularly deterministic finite-state
15110 transducers).")
15111 (license license:expat)))
15112
15113 (define-public python2-automat
15114 (package-with-python2 python-automat))
15115
15116 (define-public python-m2r
15117 (package
15118 (name "python-m2r")
15119 (version "0.2.1")
15120 (source (origin
15121 (method url-fetch)
15122 (uri (pypi-uri "m2r" version))
15123 (sha256
15124 (base32
15125 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15126 (build-system python-build-system)
15127 (propagated-inputs
15128 `(("python-docutils" ,python-docutils)
15129 ("python-mistune" ,python-mistune)))
15130 (native-inputs
15131 `(("python-pygments" ,python-pygments)
15132 ("python-mock" ,python-mock)))
15133 (home-page "https://github.com/miyakogi/m2r")
15134 (synopsis "Markdown to reStructuredText converter")
15135 (description "M2R converts a markdown file including reST markups to valid
15136 reST format.")
15137 (license license:expat)))
15138
15139 (define-public python2-m2r
15140 (package-with-python2 python-m2r))
15141
15142 (define-public python-constantly
15143 (package
15144 (name "python-constantly")
15145 (version "15.1.0")
15146 (source (origin
15147 (method url-fetch)
15148 (uri (pypi-uri "constantly" version))
15149 (sha256
15150 (base32
15151 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15152 (build-system python-build-system)
15153 (home-page "https://github.com/twisted/constantly")
15154 (synopsis "Symbolic constants in Python")
15155 (description "Constantly is a Python library that provides symbolic
15156 constant support. It includes collections and constants with text, numeric,
15157 and bit flag values.")
15158 (license license:expat)))
15159
15160 (define-public python2-constantly
15161 (package-with-python2 python-constantly))
15162
15163 (define-public python-attrs
15164 (package
15165 (name "python-attrs")
15166 (version "19.3.0")
15167 (source (origin
15168 (method url-fetch)
15169 (uri (pypi-uri "attrs" version))
15170 (sha256
15171 (base32
15172 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15173 (build-system python-build-system)
15174 (arguments
15175 `(#:modules ((guix build utils)
15176 (guix build python-build-system)
15177 (ice-9 ftw)
15178 (srfi srfi-1)
15179 (srfi srfi-26))
15180 #:phases (modify-phases %standard-phases
15181 (replace 'check
15182 (lambda _
15183 (let ((cwd (getcwd)))
15184 (setenv "PYTHONPATH"
15185 (string-append
15186 cwd "/build/"
15187 (find (cut string-prefix? "lib" <>)
15188 (scandir (string-append cwd "/build")))
15189 ":"
15190 (getenv "PYTHONPATH")))
15191 (invoke "python" "-m" "pytest")))))))
15192 (native-inputs
15193 `(("python-coverage" ,python-coverage)
15194 ("python-hypothesis" ,python-hypothesis)
15195 ("python-pympler" ,python-pympler)
15196 ("python-pytest" ,python-pytest)
15197 ("python-six" ,python-six)
15198 ("python-sphinx" ,python-sphinx)
15199 ("python-zope-interface" ,python-zope-interface)))
15200 (home-page "https://github.com/python-attrs/attrs/")
15201 (synopsis "Attributes without boilerplate")
15202 (description "@code{attrs} is a Python package with class decorators that
15203 ease the chores of implementing the most common attribute-related object
15204 protocols.")
15205 (license license:expat)))
15206
15207 (define-public python2-attrs
15208 (package-with-python2 python-attrs))
15209
15210 (define-public python-attrs-bootstrap
15211 (package
15212 (inherit python-attrs)
15213 (name "python-attrs-bootstrap")
15214 (native-inputs `())
15215 (arguments `(#:tests? #f))))
15216
15217 (define-public python2-attrs-bootstrap
15218 (package-with-python2 python-attrs-bootstrap))
15219
15220 (define-public python2-cliapp
15221 (package
15222 (name "python2-cliapp")
15223 (version "1.20180812.1")
15224 (source
15225 (origin
15226 (method url-fetch)
15227 (uri (string-append
15228 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15229 version ".tar.gz"))
15230 (sha256
15231 (base32
15232 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15233 (build-system python-build-system)
15234 (arguments
15235 `(#:python ,python-2
15236 #:phases
15237 (modify-phases %standard-phases
15238 ;; check phase needs to be run before the build phase. If not,
15239 ;; coverage-test-runner looks for tests for the built source files,
15240 ;; and fails.
15241 (delete 'check)
15242 (add-before 'build 'check
15243 (lambda _
15244 ;; Disable python3 tests
15245 (substitute* "check"
15246 (("python3") "# python3"))
15247 (invoke "./check"))))))
15248 (native-inputs
15249 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15250 ("python2-pep8" ,python2-pep8)))
15251 (propagated-inputs
15252 `(("python2-pyaml" ,python2-pyaml)))
15253 (home-page "https://liw.fi/cliapp/")
15254 (synopsis "Python framework for command line programs")
15255 (description "@code{python2-cliapp} is a python framework for
15256 command line programs. It contains the typical stuff such programs
15257 need to do, such as parsing the command line for options, and
15258 iterating over input files.")
15259 (license license:gpl2+)))
15260
15261 (define-public python2-ttystatus
15262 (package
15263 (name "python2-ttystatus")
15264 (version "0.38")
15265 (source
15266 (origin
15267 (method git-fetch)
15268 (uri (git-reference
15269 (url "http://git.liw.fi/ttystatus")
15270 ;; There are no tags after ttystatus-0.36.
15271 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15272 (sha256
15273 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15274 (file-name (git-file-name name version))))
15275 (build-system python-build-system)
15276 (native-inputs
15277 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15278 ("python2-pep8" ,python2-pep8)))
15279 (arguments
15280 `(#:python ,python-2
15281 #:phases
15282 (modify-phases %standard-phases
15283 ;; check phase needs to be run before the build phase. If not,
15284 ;; coverage-test-runner looks for tests for the built source files,
15285 ;; and fails.
15286 (delete 'check)
15287 (add-before 'build 'check
15288 (lambda _ (invoke "make" "check"))))))
15289 (home-page "https://liw.fi/ttystatus/")
15290 (synopsis "Python library for showing progress reporting and
15291 status updates on terminals")
15292 (description "@code{python2-ttystatus} is a python library for
15293 showing progress reporting and status updates on terminals, for
15294 command line programs. Output is automatically adapted to the width
15295 of the terminal: truncated if it does not fit, and resized if the
15296 terminal size changes.")
15297 (license license:gpl3+)))
15298
15299 (define-public python2-tracing
15300 (package
15301 (name "python2-tracing")
15302 (version "0.10")
15303 (source
15304 (origin
15305 (method url-fetch)
15306 (uri (string-append
15307 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15308 version ".tar.gz"))
15309 (sha256
15310 (base32
15311 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15312 (build-system python-build-system)
15313 (arguments
15314 `(#:python ,python-2))
15315 (home-page "https://liw.fi/tracing/")
15316 (synopsis "Python debug logging helper")
15317 (description "@code{python2-tracing} is a python library for
15318 logging debug messages. It provides a way to turn debugging messages
15319 on and off, based on the filename they occur in. It is much faster
15320 than using @code{logging.Filter} to accomplish the same thing, which
15321 matters when code is run in production mode. The actual logging still
15322 happens using the @code{logging} library.")
15323 (license license:gpl3+)))
15324
15325 (define-public python2-larch
15326 (package
15327 (name "python2-larch")
15328 (version "1.20151025")
15329 (source
15330 (origin
15331 (method url-fetch)
15332 (uri (string-append
15333 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15334 version ".tar.gz"))
15335 (patches (search-patches
15336 "python2-larch-coverage-4.0a6-compatibility.patch"))
15337 (sha256
15338 (base32
15339 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15340 (build-system python-build-system)
15341 (arguments
15342 `(#:python ,python-2
15343 #:phases
15344 (modify-phases %standard-phases
15345 ;; check phase needs to be run before the build phase. If not,
15346 ;; coverage-test-runner looks for tests for the built source files,
15347 ;; and fails.
15348 (delete 'check)
15349 (add-before 'build 'check
15350 (lambda _ (invoke "make" "check"))))))
15351 (native-inputs
15352 `(("cmdtest" ,cmdtest)
15353 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15354 (propagated-inputs
15355 `(("python2-tracing" ,python2-tracing)))
15356 (home-page "https://liw.fi/larch/")
15357 (synopsis "Python copy-on-write B-tree library")
15358 (description "@code{python2-larch} is an implementation of
15359 particular kind of B-tree, based on research by Ohad Rodeh. See
15360 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15361 on the data structure.
15362
15363 The distinctive feature of this B-tree is that a node is never
15364 (conceptually) modified. Instead, all updates are done by
15365 copy-on-write. This makes it easy to clone a tree, and modify only the
15366 clone, while other processes access the original tree.")
15367 (license license:gpl3+)))
15368
15369 (define-public python-astroid
15370 (package
15371 (name "python-astroid")
15372 (version "2.4.2")
15373 (source
15374 (origin
15375 (method url-fetch)
15376 (uri (pypi-uri "astroid" version))
15377 (sha256
15378 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15379 (modules '((guix build utils)))
15380 (snippet
15381 '(begin
15382 ;; Check to see if the version pinning has been removed.
15383 (substitute* "astroid/__pkginfo__.py"
15384 (("==1\\.4\\.\\*") ">=1.4.0"))
15385 #t))))
15386 (build-system python-build-system)
15387 (propagated-inputs
15388 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15389 ("python-six" ,python-six)
15390 ("python-wrapt" ,python-wrapt)))
15391 (native-inputs
15392 `(("python-dateutil" ,python-dateutil)
15393 ("python-pytest" ,python-pytest)
15394 ("python-pytest-runner" ,python-pytest-runner)))
15395 (home-page "https://github.com/PyCQA/astroid")
15396 (synopsis "Common base representation of python source code for pylint and
15397 other projects")
15398 (description "@code{python-astroid} provides a common base representation
15399 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15400
15401 It provides a compatible representation which comes from the _ast module. It
15402 rebuilds the tree generated by the builtin _ast module by recursively walking
15403 down the AST and building an extended ast. The new node classes have
15404 additional methods and attributes for different usages. They include some
15405 support for static inference and local name scopes. Furthermore, astroid
15406 builds partial trees by inspecting living objects.")
15407 (license license:lgpl2.1+)
15408 (properties `((python2-variant . ,(delay python2-astroid))))))
15409
15410 (define-public python2-astroid
15411 (let ((base (package-with-python2
15412 (strip-python2-variant python-astroid))))
15413 (package (inherit base)
15414 ;; Version 2.x removes python2 support.
15415 (version "1.6.5")
15416 (source
15417 (origin
15418 (method url-fetch)
15419 (uri (pypi-uri "astroid" version))
15420 (sha256
15421 (base32
15422 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15423 (arguments
15424 (substitute-keyword-arguments (package-arguments base)
15425 ((#:phases phases)
15426 `(modify-phases ,phases
15427 (add-after 'unpack 'remove-spurious-test
15428 (lambda _
15429 ;; https://github.com/PyCQA/astroid/issues/276
15430 (delete-file "astroid/tests/unittest_brain.py")
15431 #t))
15432 (replace 'check
15433 (lambda _
15434 (invoke"python" "-m" "unittest" "discover"
15435 "-p" "unittest*.py")))))))
15436 (native-inputs `())
15437 (propagated-inputs
15438 `(("python2-backports-functools-lru-cache"
15439 ,python2-backports-functools-lru-cache)
15440 ("python2-enum34" ,python2-enum34)
15441 ("python2-singledispatch" ,python2-singledispatch)
15442 ,@(alist-delete "python-typed-ast"
15443 (package-propagated-inputs base)))))))
15444
15445 (define-public python-isbnlib
15446 (package
15447 (name "python-isbnlib")
15448 (version "3.10.4")
15449 (source
15450 (origin
15451 (method url-fetch)
15452 (uri (pypi-uri "isbnlib" version))
15453 (sha256
15454 (base32
15455 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15456 (build-system python-build-system)
15457 (arguments '(#:tests? #f)) ; No test
15458 (home-page "https://github.com/xlcnd/isbnlib")
15459 (synopsis "Python library to work with ISBN strings")
15460 (description "@code{python-isbnlib} is a (pure) python library that provides
15461 several useful methods and functions to validate, clean, transform, hyphenate and
15462 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15463 version, is suitable to be include as a dependency in other projects.")
15464 (license license:lgpl3+)))
15465
15466 (define-public python-isort
15467 (package
15468 (name "python-isort")
15469 (version "4.3.4")
15470 (source
15471 (origin
15472 (method git-fetch)
15473 (uri (git-reference
15474 ;; Tests pass only from the Github sources
15475 (url "https://github.com/timothycrosley/isort")
15476 (commit version)))
15477 (file-name (git-file-name name version))
15478 (sha256
15479 (base32
15480 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15481 (build-system python-build-system)
15482 (native-inputs
15483 `(("python-mock" ,python-mock)
15484 ("python-pytest" ,python-pytest)))
15485 (home-page "https://github.com/timothycrosley/isort")
15486 (synopsis "Python utility/library to sort python imports")
15487 (description "@code{python-isort} is a python utility/library to sort
15488 imports alphabetically, and automatically separated into sections. It
15489 provides a command line utility, a python library and plugins for various
15490 editors.")
15491 (license license:expat)
15492 (properties `((python2-variant . ,(delay python2-isort))))))
15493
15494 (define-public python2-isort
15495 (let ((base (package-with-python2
15496 (strip-python2-variant python-isort))))
15497 (package (inherit base)
15498 (native-inputs
15499 `(("python2-futures" ,python2-futures)
15500 ,@(package-native-inputs base))))))
15501
15502 (define-public python2-backports-functools-lru-cache
15503 (package
15504 (name "python2-backports-functools-lru-cache")
15505 (version "1.6.1")
15506 (source
15507 (origin
15508 (method url-fetch)
15509 ;; only the pypi tarballs contain the necessary metadata
15510 (uri (pypi-uri "backports.functools_lru_cache" version))
15511 (sha256
15512 (base32
15513 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15514 (build-system python-build-system)
15515 (native-inputs
15516 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15517 (arguments
15518 `(#:python ,python-2))
15519 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15520 (synopsis "Backport of functools.lru_cache from Python 3.3")
15521 (description "@code{python2-backports-functools-lru-cache} is a backport
15522 of @code{functools.lru_cache} from python 3.3.")
15523 (license license:expat)))
15524
15525 (define-public python-configparser
15526 (package
15527 (name "python-configparser")
15528 (version "4.0.2")
15529 (source
15530 (origin
15531 (method url-fetch)
15532 (uri (pypi-uri "configparser" version))
15533 (sha256
15534 (base32
15535 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15536 (native-inputs
15537 `(("python-setuptools_scm" ,python-setuptools-scm)))
15538 (build-system python-build-system)
15539 (home-page "https://github.com/jaraco/configparser/")
15540 (synopsis "Backport of configparser from python 3.5")
15541 (description "@code{python-configparser} is a backport of
15542 @code{configparser} from Python 3.5 so that it can be used directly
15543 in other versions.")
15544 (license license:expat)))
15545
15546 (define-public python2-configparser
15547 (package-with-python2 python-configparser))
15548
15549 (define-public python-iniconfig
15550 (package
15551 (name "python-iniconfig")
15552 (version "1.1.1")
15553 (source
15554 (origin
15555 (method url-fetch)
15556 (uri (pypi-uri "iniconfig" version))
15557 (sha256
15558 (base32
15559 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
15560 (build-system python-build-system)
15561 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
15562 (synopsis "Simple INI-file parser")
15563 (description "The @code{iniconfig} package provides a small and simple
15564 INI-file parser module having a unique set of features; @code{iniconfig}
15565 @itemize
15566 @item maintains the order of sections and entries;
15567 @item supports multi-line values with or without line-continuations;
15568 @item supports \"#\" comments everywhere;
15569 @item raises errors with proper line-numbers;
15570 @item raises an error when two sections have the same name.
15571 @end itemize")
15572 (license license:expat)))
15573
15574 (define-public python-mamba
15575 (package
15576 (name "python-mamba")
15577 (version "0.11.2")
15578 (source (origin
15579 (method url-fetch)
15580 (uri (pypi-uri "mamba" version))
15581 (sha256
15582 (base32
15583 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
15584 (build-system python-build-system)
15585 (arguments `(#:tests? #f)) ; No test
15586 (propagated-inputs
15587 `(("python-clint" ,python-clint)
15588 ("python-coverage" ,python-coverage)))
15589 (home-page "https://nestorsalceda.com/mamba/")
15590 (synopsis "Test runner for Python")
15591 (description
15592 "Mamba is a Behaviour-Driven Development tool for Python developers.
15593 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15594 (license license:expat)))
15595
15596 (define-public python-mando
15597 (package
15598 (name "python-mando")
15599 (version "0.6.4")
15600 (source (origin
15601 (method url-fetch)
15602 (uri (pypi-uri "mando" version))
15603 (sha256
15604 (base32
15605 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15606 (build-system python-build-system)
15607 (propagated-inputs
15608 `(("python-rst2ansi" ,python-rst2ansi)
15609 ("python-six" ,python-six)))
15610 (native-inputs
15611 `(("python-pytest" ,python-pytest)))
15612 (home-page "https://mando.readthedocs.org/")
15613 (synopsis
15614 "Wrapper around argparse, allowing creation of complete CLI applications")
15615 (description
15616 "This package is a wrapper around argparse, allowing you to write complete CLI
15617 applications in seconds while maintaining all the flexibility.")
15618 (license license:expat)))
15619
15620 (define-public python2-mando
15621 (package-with-python2 python-mando))
15622
15623 (define-public python2-argparse
15624 (package
15625 (name "python2-argparse")
15626 (version "1.4.0")
15627 (source
15628 (origin
15629 (method url-fetch)
15630 (uri (pypi-uri "argparse" version))
15631 (sha256
15632 (base32
15633 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15634 (build-system python-build-system)
15635 (arguments
15636 `(#:python ,python-2))
15637 (home-page "https://github.com/ThomasWaldmann/argparse/")
15638 (synopsis "Python command-line parsing library")
15639 (description
15640 "This package is mostly for people who want to have @code{argparse} on
15641 older Pythons because it was not part of the standard library back then.")
15642 (license license:psfl)))
15643
15644 (define-public python-fudge
15645 (package
15646 (name "python-fudge")
15647 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15648 ;; package, which is currently the only use of this package.
15649 (version "0.9.6")
15650 (source
15651 (origin
15652 (method url-fetch)
15653 (uri (pypi-uri "fudge" version))
15654 (sha256
15655 (base32
15656 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15657 (build-system python-build-system)
15658 (arguments
15659 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15660 (home-page "https://github.com/fudge-py/fudge")
15661 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15662 (description
15663 "Fudge is a Python module for using fake objects (mocks and stubs) to
15664 test real ones.
15665
15666 In readable Python code, you declare the methods available on your fake object
15667 and how they should be called. Then you inject that into your application and
15668 start testing. This declarative approach means you don’t have to record and
15669 playback actions and you don’t have to inspect your fakes after running code.
15670 If the fake object was used incorrectly then you’ll see an informative
15671 exception message with a traceback that points to the culprit.")
15672 (license license:expat)))
15673
15674 (define-public python2-fudge
15675 (package-with-python2 python-fudge))
15676
15677 (define-public python-mwclient
15678 (package
15679 (name "python-mwclient")
15680 (version "0.10.1")
15681 (source
15682 (origin
15683 (method git-fetch)
15684 ;; The PyPI version wouldn't contain tests.
15685 (uri (git-reference
15686 (url "https://github.com/mwclient/mwclient")
15687 (commit (string-append "v" version))))
15688 (file-name (git-file-name name version))
15689 (sha256
15690 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15691 (build-system python-build-system)
15692 (propagated-inputs
15693 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15694 ("python-six" ,python-six)))
15695 (native-inputs
15696 `(("python-mock" ,python-mock)
15697 ("python-pytest" ,python-pytest)
15698 ("python-pytest-cov" ,python-pytest-cov)
15699 ("python-pytest-runner" ,python-pytest-runner)
15700 ("python-responses" ,python-responses)))
15701 (home-page "https://github.com/btongminh/mwclient")
15702 (synopsis "MediaWiki API client")
15703 (description "This package provides a MediaWiki API client.")
15704 (license license:expat)))
15705
15706 (define-public python2-mwclient
15707 (package-with-python2 python-mwclient))
15708
15709 (define-public python-utils
15710 (package
15711 (name "python-utils")
15712 (version "2.4.0")
15713 (source (origin
15714 (method url-fetch)
15715 (uri (pypi-uri "python-utils" version))
15716 (sha256
15717 (base32
15718 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15719 (build-system python-build-system)
15720 (arguments
15721 `(#:phases
15722 (modify-phases %standard-phases
15723 (replace 'check
15724 (lambda* (#:key inputs outputs #:allow-other-keys)
15725 (add-installed-pythonpath inputs outputs)
15726 (delete-file "pytest.ini")
15727 (invoke "pytest" "-vv"))))))
15728 (native-inputs
15729 `(("pytest-runner" ,python-pytest-runner)
15730 ("pytest" ,python-pytest)
15731 ("six" ,python-six)))
15732 (home-page "https://github.com/WoLpH/python-utils")
15733 (synopsis "Convenient utilities not included with the standard Python install")
15734 (description
15735 "Python Utils is a collection of small Python functions and classes which
15736 make common patterns shorter and easier.")
15737 (license license:bsd-2)))
15738
15739 (define-public python2-utils
15740 (package-with-python2 python-utils))
15741
15742 (define-public python-diff-match-patch
15743 (package
15744 (name "python-diff-match-patch")
15745 (version "20121119")
15746 (source
15747 (origin
15748 (method url-fetch)
15749 (uri (pypi-uri "diff-match-patch" version))
15750 (sha256
15751 (base32
15752 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15753 (build-system python-build-system)
15754 (home-page "https://code.google.com/p/google-diff-match-patch")
15755 (synopsis "Synchronize plain text")
15756 (description "Diff Match and Patch libraries offer robust algorithms to
15757 perform the operations required for synchronizing plain text.")
15758 (license license:asl2.0)))
15759
15760 (define-public python2-diff-match-patch
15761 (package-with-python2 python-diff-match-patch))
15762
15763 (define-public python-dirsync
15764 (package
15765 (name "python-dirsync")
15766 (version "2.2.5")
15767 (source
15768 (origin
15769 (method url-fetch)
15770 (uri (pypi-uri "dirsync" version))
15771 (sha256
15772 (base32
15773 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15774 (build-system python-build-system)
15775 (propagated-inputs
15776 `(("six" ,python-six)))
15777 (home-page "https://github.com/tkhyn/dirsync")
15778 (synopsis "Advanced directory tree synchronisation tool")
15779 (description "Advanced directory tree synchronisation tool.")
15780 (license license:expat)))
15781
15782 (define-public python2-dirsync
15783 (package-with-python2 python-dirsync))
15784
15785 (define-public python-levenshtein
15786 (package
15787 (name "python-levenshtein")
15788 (version "0.12.0")
15789 (source
15790 (origin
15791 (method url-fetch)
15792 (uri (pypi-uri "python-Levenshtein" version))
15793 (sha256
15794 (base32
15795 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15796 (build-system python-build-system)
15797 (home-page "https://github.com/ztane/python-Levenshtein")
15798 (synopsis "Fast computation of Levenshtein distance and string similarity")
15799 (description
15800 "The Levenshtein Python C extension module contains functions for fast computation of
15801 @enumerate
15802 @item Levenshtein (edit) distance, and edit operations
15803 @item string similarity
15804 @item approximate median strings, and generally string averaging
15805 @item string sequence and set similarity
15806 @end enumerate
15807 It supports both normal and Unicode strings.")
15808 (license license:gpl2+)))
15809
15810 (define-public python2-levenshtein
15811 (package-with-python2 python-levenshtein))
15812
15813 (define-public python-scandir
15814 (package
15815 (name "python-scandir")
15816 (version "1.10.0")
15817 (source
15818 (origin
15819 (method url-fetch)
15820 (uri (pypi-uri "scandir" version))
15821 (sha256
15822 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15823 (build-system python-build-system)
15824 (arguments
15825 `(#:phases (modify-phases %standard-phases
15826 (replace 'check
15827 (lambda _
15828 (invoke "python" "test/run_tests.py"))))))
15829 (home-page "https://github.com/benhoyt/scandir")
15830 (synopsis "Directory iteration function")
15831 (description
15832 "Directory iteration function like os.listdir(), except that instead of
15833 returning a list of bare filenames, it yields DirEntry objects that include
15834 file type and stat information along with the name. Using scandir() increases
15835 the speed of os.walk() by 2-20 times (depending on the platform and file
15836 system) by avoiding unnecessary calls to os.stat() in most cases.
15837
15838 This package is part of the Python standard library since version 3.5.")
15839 (license license:bsd-3)))
15840
15841 (define-public python2-scandir
15842 (package-with-python2 python-scandir))
15843
15844 (define-public python2-stemming
15845 (package
15846 (name "python2-stemming")
15847 (version "1.0.1")
15848 (source
15849 (origin
15850 (method url-fetch)
15851 (uri (pypi-uri "stemming" version))
15852 (sha256
15853 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15854 (build-system python-build-system)
15855 (arguments
15856 `(#:python ,python-2))
15857 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15858 (synopsis "Python implementations of various stemming algorithms")
15859 (description
15860 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15861 stemming algorithms for English. These implementations are straightforward and
15862 efficient, unlike some Python versions of the same algorithms available on the
15863 Web. This package is an extraction of the stemming code included in the Whoosh
15864 search engine.")
15865 (license license:public-domain)))
15866
15867 (define-public python-factory-boy
15868 (package
15869 (name "python-factory-boy")
15870 (version "2.8.1")
15871 (source
15872 (origin
15873 (method url-fetch)
15874 (uri (pypi-uri "factory_boy" version))
15875 (sha256
15876 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15877 (build-system python-build-system)
15878 (arguments
15879 ;; Tests are not included in the tarball.
15880 `(#:tests? #f))
15881 (propagated-inputs
15882 `(("faker" ,python-faker)))
15883 (home-page "https://github.com/benhoyt/scandir")
15884 (synopsis "Versatile test fixtures replacement")
15885 (description
15886 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15887
15888 As a fixtures replacement tool, it aims to replace static, hard to maintain
15889 fixtures with easy-to-use factories for complex object.
15890
15891 Instead of building an exhaustive test setup with every possible combination
15892 of corner cases, factory_boy allows you to use objects customized for the
15893 current test, while only declaring the test-specific fields")
15894 (license license:expat)))
15895
15896 (define-public python2-factory-boy
15897 (package-with-python2 python-factory-boy))
15898
15899 (define-public python-translate-toolkit
15900 (package
15901 (name "python-translate-toolkit")
15902 (version "2.1.0")
15903 (source
15904 (origin
15905 (method url-fetch)
15906 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15907 (sha256
15908 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15909 (build-system python-build-system)
15910 (native-inputs
15911 `(("python-pytest" ,python-pytest)
15912 ("python-sphinx" ,python-sphinx)))
15913 (propagated-inputs
15914 `(("python-babel" ,python-babel)
15915 ("python-beautifulsoup4" ,python-beautifulsoup4)
15916 ("python-chardet" ,python-chardet)
15917 ("python-diff-match-patch" ,python-diff-match-patch)
15918 ("python-levenshtein" ,python-levenshtein)
15919 ("python-lxml" ,python-lxml)
15920 ("python-six" ,python-six)
15921 ("python-vobject" ,python-vobject)
15922 ("python-pyyaml" ,python-pyyaml)))
15923 (arguments
15924 ;; TODO: tests are not run, because they end with
15925 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15926 ;; 'parse_funcs'
15927 ;; during test setup.
15928 `(#:tests? #f))
15929 (home-page "https://toolkit.translatehouse.org")
15930 (synopsis "Tools and API for translation and localization engineering")
15931 (description
15932 "Tools and API for translation and localization engineering. It contains
15933 several utilities, as well as an API for building localization tools.")
15934 (license license:gpl2+)))
15935
15936 (define-public python2-translate-toolkit
15937 (package-with-python2 python-translate-toolkit))
15938
15939 (define-public python-packaging
15940 (package
15941 (name "python-packaging")
15942 (version "20.0")
15943 (source
15944 (origin
15945 (method url-fetch)
15946 (uri (pypi-uri "packaging" version))
15947 ;; XXX: The URL in the patch file is wrong, it should be
15948 ;; <https://github.com/pypa/packaging/pull/256>.
15949 (patches (search-patches "python-packaging-test-arch.patch"))
15950 (sha256
15951 (base32
15952 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15953 (build-system python-build-system)
15954 (arguments
15955 `(#:phases (modify-phases %standard-phases
15956 (replace 'check
15957 (lambda* (#:key tests? #:allow-other-keys)
15958 (if tests?
15959 (invoke "py.test" "-vv")
15960 (format #t "test suite not run~%"))
15961 #t)))))
15962 (native-inputs
15963 `(("python-pretend" ,python-pretend)
15964 ("python-pytest" ,python-pytest)))
15965 (propagated-inputs
15966 `(("python-pyparsing" ,python-pyparsing)
15967 ("python-six" ,python-six)))
15968 (home-page "https://github.com/pypa/packaging")
15969 (synopsis "Core utilities for Python packages")
15970 (description "Packaging is a Python module for dealing with Python packages.
15971 It offers an interface for working with package versions, names, and dependency
15972 information.")
15973 ;; From 'LICENSE': This software is made available under the terms of
15974 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15975 ;; Contributions to this software is made under the terms of *both* these
15976 ;; licenses.
15977 (license (list license:asl2.0 license:bsd-2))))
15978
15979 (define-public python2-packaging
15980 (package-with-python2 python-packaging))
15981
15982 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15983 (define-public python-packaging-bootstrap
15984 (hidden-package
15985 (package/inherit
15986 python-packaging
15987 (name "python-packaging-bootstrap")
15988 (native-inputs '())
15989 (propagated-inputs
15990 `(("python-pyparsing" ,python-pyparsing)))
15991 (arguments '(#:tests? #f)))))
15992
15993 (define-public python2-packaging-bootstrap
15994 (hidden-package
15995 (package/inherit
15996 python2-packaging
15997 (name "python2-packaging-bootstrap")
15998 (native-inputs '())
15999 (propagated-inputs
16000 `(("python-pyparsing" ,python2-pyparsing)))
16001 (arguments
16002 `(#:tests? #f
16003 ,@(package-arguments python2-packaging))))))
16004
16005 (define-public python-relatorio
16006 (package
16007 (name "python-relatorio")
16008 (version "0.8.0")
16009 (source
16010 (origin
16011 (method url-fetch)
16012 (uri (pypi-uri "relatorio" version))
16013 (sha256
16014 (base32
16015 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16016 (build-system python-build-system)
16017 (propagated-inputs
16018 `(("python-lxml" ,python-lxml)
16019 ("python-genshi" ,python-genshi)))
16020 (native-inputs
16021 `(("python-magic" ,python-magic)))
16022 (home-page "https://relatorio.tryton.org/")
16023 (synopsis "Templating library able to output ODT and PDF files")
16024 (description "Relatorio is a templating library which provides a way to
16025 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16026 for more filetypes can be easily added by creating plugins for them.")
16027 (license license:gpl3+)))
16028
16029 (define-public python2-relatorio
16030 (package-with-python2 python-relatorio))
16031
16032 (define-public python-radon
16033 (package
16034 (name "python-radon")
16035 (version "4.1.0")
16036 (source
16037 (origin
16038 (method url-fetch)
16039 (uri (pypi-uri "radon" version))
16040 (sha256
16041 (base32
16042 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16043 (build-system python-build-system)
16044 (arguments
16045 `(#:phases (modify-phases %standard-phases
16046 (replace 'check
16047 (lambda _
16048 (invoke "python" "radon/tests/run.py"))))))
16049 (propagated-inputs
16050 `(("python-colorama" ,python-colorama)
16051 ("python-flake8-polyfill" ,python-flake8-polyfill)
16052 ("python-mando" ,python-mando)))
16053 (native-inputs
16054 `(("python-pytest" ,python-pytest)
16055 ("python-pytest-mock" ,python-pytest-mock)))
16056 (home-page "https://radon.readthedocs.org/")
16057 (synopsis "Code Metrics in Python")
16058 (description "Radon is a Python tool which computes various code metrics.
16059 Supported metrics are:
16060 @itemize @bullet
16061 @item raw metrics: SLOC, comment lines, blank lines, &c.
16062 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16063 @item Halstead metrics (all of them)
16064 @item the Maintainability Index (a Visual Studio metric)
16065 @end itemize")
16066 (properties `((python2-variant . ,(delay python2-radon))))
16067 (license license:expat)))
16068
16069 (define-public python2-radon
16070 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16071 (package
16072 (inherit base)
16073 (propagated-inputs
16074 `(("python-configparser" ,python2-configparser)
16075 ("python-future" ,python2-future)
16076 ,@(package-propagated-inputs base))))))
16077
16078 (define-public python-sure
16079 (package
16080 (name "python-sure")
16081 (version "1.4.11")
16082 (source
16083 (origin
16084 (method url-fetch)
16085 (uri (pypi-uri "sure" version))
16086 (sha256
16087 (base32
16088 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16089 (build-system python-build-system)
16090 (propagated-inputs
16091 `(("python-mock" ,python-mock)
16092 ("python-six" ,python-six)))
16093 (native-inputs
16094 `(("python-nose" ,python-nose)))
16095 (home-page "https://github.com/gabrielfalcao/sure")
16096 (synopsis "Automated testing library in python for python")
16097 (description
16098 "Sure is a python library that leverages a DSL for writing assertions.
16099 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16100 (license license:gpl3+)))
16101
16102 (define-public python2-sure
16103 (package-with-python2 python-sure))
16104
16105 (define-public python2-couleur
16106 ;; This package does not seem to support python3 at all, hence,
16107 ;; only the python2 variant definition is provided.
16108 (package
16109 (name "python2-couleur")
16110 (version "0.6.2")
16111 (source
16112 (origin
16113 (method url-fetch)
16114 (uri (pypi-uri "couleur" version))
16115 (sha256
16116 (base32
16117 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16118 (build-system python-build-system)
16119 (arguments
16120 `(#:python ,python-2))
16121 (home-page "https://github.com/gabrielfalcao/couleur")
16122 (synopsis
16123 "ANSI terminal tool for python, colored shell and other handy fancy features")
16124 (description
16125 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16126 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16127 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16128 ;; https://github.com/gabrielfalcao/couleur/issues/11
16129 (license license:lgpl3+)))
16130
16131 (define-public python-misaka
16132 (package
16133 (name "python-misaka")
16134 (version "2.1.1")
16135 (source
16136 (origin
16137 (method url-fetch)
16138 (uri (pypi-uri "misaka" version))
16139 (sha256
16140 (base32
16141 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16142 (build-system python-build-system)
16143 (arguments
16144 `(;; Line 37 of setup.py calls self.run_command('develop')
16145 ;; in the 'check' phase. This command seems to be trying
16146 ;; to write to
16147 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16148 ;; for which it does not have the permission to write.
16149 #:tests? #f))
16150 (propagated-inputs
16151 `(("python-cffi" ,python-cffi)))
16152 (home-page "https://github.com/FSX/misaka")
16153 (synopsis "Python binding for Hoedown")
16154 (description
16155 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16156 library written in C. It features a fast HTML renderer and functionality to make custom
16157 renderers (e.g. man pages or LaTeX).")
16158 (license license:expat)))
16159
16160 (define-public python2-misaka
16161 (package-with-python2 python-misaka))
16162
16163 (define-public python2-steadymark
16164 ;; This is forced into being a python2 only variant
16165 ;; due to its dependence on couleur that has no support
16166 ;; for python3
16167 (package
16168 (name "python2-steadymark")
16169 (version "0.7.3")
16170 (source
16171 (origin
16172 (method url-fetch)
16173 (uri (pypi-uri "steadymark" version))
16174 (sha256
16175 (base32
16176 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16177 (build-system python-build-system)
16178 (native-inputs
16179 `(("python-couleur" ,python2-couleur)
16180 ("python-sure" ,python2-sure)
16181 ("python-misaka" ,python2-misaka)))
16182 (arguments
16183 `(#:python ,python-2
16184 #:phases
16185 (modify-phases %standard-phases
16186 (add-before 'build 'patch-setup-py
16187 (lambda _
16188 ;; Update requirements from dependency==version
16189 ;; to dependency>=version
16190 (substitute* "setup.py"
16191 (("==") ">="))
16192 #t)))))
16193 (home-page "https://github.com/gabrielfalcao/steadymark")
16194 (synopsis "Markdown-based test runner for python")
16195 (description
16196 "@code{Steadymark} allows documentation to be written in github-flavoured
16197 markdown. The documentation may contain snippets of code surrounded by python
16198 code blocks and @code{Steadymark} will find these snippets and run them, making
16199 sure that there are no old malfunctional examples in the documentation examples.")
16200 (license license:expat)))
16201
16202 (define-public python-jsonpointer
16203 (package
16204 (name "python-jsonpointer")
16205 (version "1.10")
16206 (source
16207 (origin
16208 (method url-fetch)
16209 (uri (pypi-uri "jsonpointer" version))
16210 (sha256
16211 (base32
16212 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16213 (build-system python-build-system)
16214 (home-page "https://github.com/stefankoegl/python-json-pointer")
16215 (synopsis "Identify specific nodes in a JSON document")
16216 (description "@code{jsonpointer} allows you to access specific nodes
16217 by path in a JSON document (see RFC 6901).")
16218 (license license:bsd-3)))
16219
16220 (define-public python2-jsonpointer
16221 (package-with-python2 python-jsonpointer))
16222
16223 (define-public python-jsonpatch
16224 (package
16225 (name "python-jsonpatch")
16226 (version "1.16")
16227 (source
16228 (origin
16229 (method git-fetch)
16230 ;; pypi version lacks tests.js
16231 (uri (git-reference
16232 (url "https://github.com/stefankoegl/python-json-patch")
16233 (commit (string-append "v" version))))
16234 (file-name (git-file-name name version))
16235 (sha256
16236 (base32
16237 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16238 (build-system python-build-system)
16239 (propagated-inputs
16240 `(("python-jsonpointer" ,python-jsonpointer)))
16241 (home-page "https://github.com/stefankoegl/python-json-patch")
16242 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16243 (description "@code{jsonpatch} is a library and program that allows
16244 applying JSON Patches according to RFC 6902.")
16245 (license license:bsd-3)))
16246
16247 (define-public python2-jsonpatch
16248 (package-with-python2 python-jsonpatch))
16249
16250 (define-public python-jsonpatch-0.4
16251 (package (inherit python-jsonpatch)
16252 (name "python-jsonpatch")
16253 (version "0.4")
16254 (source
16255 (origin
16256 (method git-fetch)
16257 (uri (git-reference
16258 (url "https://github.com/stefankoegl/python-json-patch")
16259 (commit (string-append "v" version))))
16260 (file-name (git-file-name name version))
16261 (sha256
16262 (base32
16263 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16264
16265 (define-public python2-jsonpatch-0.4
16266 (package-with-python2 python-jsonpatch-0.4))
16267
16268 (define-public python-rfc3986
16269 (package
16270 (name "python-rfc3986")
16271 (version "1.4.0")
16272 (source (origin
16273 (method url-fetch)
16274 (uri (pypi-uri "rfc3986" version))
16275 (sha256
16276 (base32
16277 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16278 (build-system python-build-system)
16279 (arguments
16280 `(#:modules ((guix build utils)
16281 (guix build python-build-system)
16282 (ice-9 ftw)
16283 (srfi srfi-1)
16284 (srfi srfi-26))
16285 #:phases
16286 (modify-phases %standard-phases
16287 (replace 'check
16288 (lambda _
16289 (let ((cwd (getcwd)))
16290 (setenv "PYTHONPATH"
16291 (string-append cwd "/build/"
16292 (find (cut string-prefix? "lib" <>)
16293 (scandir (string-append cwd "/build")))
16294 ":"
16295 (getenv "PYTHONPATH")))
16296 (invoke "pytest" "-v")))))))
16297 (native-inputs
16298 `(("python-pytest" ,python-pytest)))
16299 (home-page "https://rfc3986.readthedocs.io/")
16300 (synopsis "Parse and validate URI references")
16301 (description
16302 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16303 validation and authority parsing. This module also supports RFC@tie{}6874
16304 which adds support for zone identifiers to IPv6 addresses.")
16305 (license license:asl2.0)))
16306
16307 (define-public python2-rfc3986
16308 (package-with-python2 python-rfc3986))
16309
16310 (define-public python-rfc3987
16311 (package
16312 (name "python-rfc3987")
16313 (version "1.3.7")
16314 (source
16315 (origin
16316 (method url-fetch)
16317 (uri (pypi-uri "rfc3987" version))
16318 (sha256
16319 (base32
16320 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16321 (build-system python-build-system)
16322 (home-page "https://pypi.org/project/rfc3987/")
16323 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16324 (description "@code{rfc3987} provides routines for parsing and
16325 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16326 (license license:gpl3+)))
16327
16328 (define-public python2-rfc3987
16329 (package-with-python2 python-rfc3987))
16330
16331 ;; The latest commit contains fixes for building with both python3 and python2.
16332 (define-public python-rfc6555
16333 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16334 (revision "1"))
16335 (package
16336 (name "python-rfc6555")
16337 (version (git-version "0.0.0" revision commit))
16338 (source (origin
16339 (method git-fetch)
16340 (uri (git-reference
16341 (url "https://github.com/sethmlarson/rfc6555")
16342 (commit commit)))
16343 (file-name (git-file-name name version))
16344 (sha256
16345 (base32
16346 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16347 (build-system python-build-system)
16348 (arguments
16349 '(#:phases
16350 (modify-phases %standard-phases
16351 (replace 'check
16352 (lambda* (#:key tests? #:allow-other-keys)
16353 (if tests?
16354 ;; Other tests require network access.
16355 (invoke "pytest" "tests/test_ipv6.py")
16356 #t))))))
16357 (native-inputs
16358 `(("python-pytest" ,python-pytest)))
16359 (home-page "https://pypi.org/project/rfc6555/")
16360 (synopsis "Python implementation of RFC 6555")
16361 (description
16362 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16363 6555. Provided with a single file and dead-simple API to allow easy vendoring
16364 and integration into other projects.")
16365 (properties `((python2-variant . ,(delay python2-rfc6555))))
16366 (license license:asl2.0))))
16367
16368 (define-public python2-rfc6555
16369 (let ((base (package-with-python2
16370 (strip-python2-variant python-rfc6555))))
16371 (package
16372 (inherit base)
16373 (propagated-inputs
16374 `(("python2-selectors2" ,python2-selectors2))))))
16375
16376 (define-public python-bagit
16377 (package
16378 (name "python-bagit")
16379 (version "1.7.0")
16380 (source
16381 (origin
16382 (method url-fetch)
16383 (uri (pypi-uri "bagit" version))
16384 (sha256
16385 (base32
16386 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16387 (build-system python-build-system)
16388 (native-inputs
16389 `(("python-setuptools-scm" ,python-setuptools-scm)
16390 ("python-coverage" ,python-coverage)
16391 ("python-mock" ,python-mock)))
16392 (home-page "https://libraryofcongress.github.io/bagit-python/")
16393 (synopsis "Create and validate BagIt packages")
16394 (description "Bagit is a Python library and command line utility for working
16395 with BagIt style packages. BagIt is a minimalist packaging format for digital
16396 preservation.")
16397 (license license:cc0)))
16398
16399 (define-public python-prov
16400 (package
16401 (name "python-prov")
16402 (version "2.0.0")
16403 (source
16404 (origin
16405 (method url-fetch)
16406 (uri (pypi-uri "prov" version))
16407 (sha256
16408 (base32
16409 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16410 (build-system python-build-system)
16411 (propagated-inputs
16412 `(("python-dateutil" ,python-dateutil)
16413 ("python-lxml" ,python-lxml)
16414 ("python-networkx" ,python-networkx)
16415 ("python-rdflib" ,python-rdflib)))
16416 (native-inputs
16417 `(("graphviz" ,graphviz)
16418 ("python-pydot" ,python-pydot)))
16419 (home-page "https://github.com/trungdong/prov")
16420 (synopsis
16421 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16422 (description
16423 "This package provides a library for W3C Provenance Data Model supporting
16424 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16425 (license license:expat)))
16426
16427 (define-public python-arcp
16428 (package
16429 (name "python-arcp")
16430 (version "0.2.1")
16431 (source
16432 (origin
16433 (method url-fetch)
16434 (uri (pypi-uri "arcp" version))
16435 (sha256
16436 (base32
16437 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16438 (build-system python-build-system)
16439 (native-inputs
16440 `(("python-pytest" ,python-pytest)))
16441 (home-page "http://arcp.readthedocs.io/")
16442 (synopsis
16443 "Archive and Package URI parser and generator")
16444 (description
16445 "@acronym{arcp, Archive and Package} provides functions for creating
16446 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16447 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16448 consume or reference hypermedia resources bundled inside a file archive or an
16449 application package, as well as to resolve URIs for archive resources within a
16450 programmatic framework. This URI scheme provides mechanisms to generate a
16451 unique base URI to represent the root of the archive, so that relative URI
16452 references in a bundled resource can be resolved within the archive without
16453 having to extract the archive content on the local file system. An arcp URI can
16454 be used for purposes of isolation (e.g. when consuming multiple archives),
16455 security constraints (avoiding \"climb out\" from the archive), or for
16456 externally identiyfing sub-resources referenced by hypermedia formats.")
16457 (license license:asl2.0)))
16458
16459 (define-public python-shellescape
16460 (package
16461 (name "python-shellescape")
16462 (version "3.8.1")
16463 (source
16464 (origin
16465 (method git-fetch)
16466 (uri (git-reference
16467 (url "https://github.com/chrissimpkins/shellescape")
16468 (commit (string-append "v" version))))
16469 (file-name (git-file-name name version))
16470 (sha256
16471 (base32
16472 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16473 (build-system python-build-system)
16474 (arguments
16475 '(#:phases
16476 (modify-phases %standard-phases
16477 (replace 'check
16478 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16479 (when tests?
16480 (add-installed-pythonpath inputs outputs)
16481 (invoke "python" "tests/test_shellescape.py"))
16482 #t)))))
16483 (native-inputs
16484 `(("python-pytest" ,python-pytest)))
16485 (home-page "https://github.com/chrissimpkins/shellescape")
16486 (synopsis
16487 "Shell escape a string to safely use it as a token in a shell command")
16488 (description
16489 "The shellescape Python module defines the @code{shellescape.quote()}
16490 function that returns a shell-escaped version of a Python string. This is a
16491 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16492 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16493 (license license:expat)))
16494
16495 (define-public python-validators
16496 (package
16497 (name "python-validators")
16498 (version "0.14.2")
16499 (source (origin
16500 (method url-fetch)
16501 (uri (pypi-uri "validators" version))
16502 (sha256
16503 (base32
16504 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16505 (build-system python-build-system)
16506 (arguments
16507 '(#:phases (modify-phases %standard-phases
16508 (replace 'check
16509 (lambda _
16510 (invoke "pytest" "-vv"))))))
16511 (propagated-inputs
16512 `(("python-decorator" ,python-decorator)
16513 ("python-six" ,python-six)))
16514 (native-inputs
16515 `(("python-flake8" ,python-flake8)
16516 ("python-isort" ,python-isort)
16517 ("python-pytest" ,python-pytest)))
16518 (home-page "https://github.com/kvesteri/validators")
16519 (synopsis "Data validation library")
16520 (description
16521 "This package contains validators for different things such as email
16522 addresses, IP addresses, URLs, hashes and more. It has been designed to
16523 be easy to use and not require defining a schema or form just to validate
16524 some input.")
16525 (license license:expat)))
16526
16527 (define-public python2-validators
16528 (package-with-python2 python-validators))
16529
16530 (define-public python-validate-email
16531 (package
16532 (name "python-validate-email")
16533 (version "1.3")
16534 (source
16535 (origin
16536 (method url-fetch)
16537 (uri (pypi-uri "validate_email" version))
16538 (sha256
16539 (base32
16540 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16541 (build-system python-build-system)
16542 (home-page "https://github.com/syrusakbary/validate_email")
16543 (synopsis "Verifies if an email address is valid and really exists")
16544 (description "@code{validate_email} can be used to verify if an email
16545 address is valid and really exists.")
16546 (license license:lgpl3+)))
16547
16548 (define-public python2-validate-email
16549 (package-with-python2 python-validate-email))
16550
16551 (define-public python-flex
16552 (package
16553 (name "python-flex")
16554 (version "6.10.0")
16555 (source
16556 (origin
16557 (method url-fetch)
16558 (uri (pypi-uri "flex" version))
16559 (sha256
16560 (base32
16561 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16562 (build-system python-build-system)
16563 (propagated-inputs
16564 `(("python-click" ,python-click)
16565 ("python-iso8601" ,python-iso8601)
16566 ("python-jsonpointer" ,python-jsonpointer)
16567 ("python-pyyaml" ,python-pyyaml)
16568 ("python-requests" ,python-requests)
16569 ("python-rfc3987" ,python-rfc3987)
16570 ("python-six" ,python-six)
16571 ("python-validate-email" ,python-validate-email)))
16572 (home-page "https://github.com/pipermerriam/flex")
16573 (synopsis "Validates Swagger schemata")
16574 (description "@code{flex} can be used to validate Swagger schemata.")
16575 (license license:bsd-3)))
16576
16577 (define-public python2-flex
16578 (package-with-python2 python-flex))
16579
16580 (define-public python-marshmallow
16581 (package
16582 (name "python-marshmallow")
16583 (version "3.9.1")
16584 (source
16585 (origin
16586 (method url-fetch)
16587 (uri (pypi-uri "marshmallow" version))
16588 (sha256
16589 (base32
16590 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16591 (build-system python-build-system)
16592 (propagated-inputs
16593 `(("python-dateutil" ,python-dateutil)
16594 ("python-simplejson" ,python-simplejson)))
16595 (native-inputs
16596 `(("python-pytest" ,python-pytest)
16597 ("python-pytz" ,python-pytz)))
16598 (home-page "https://github.com/marshmallow-code/marshmallow")
16599 (synopsis "Convert complex datatypes to and from native
16600 Python datatypes.")
16601 (description "@code{marshmallow} provides a library for converting
16602 complex datatypes to and from native Python datatypes.")
16603 (license license:expat)))
16604
16605 (define-public python-apispec
16606 (package
16607 (name "python-apispec")
16608 (version "4.0.0")
16609 (source
16610 (origin
16611 (method url-fetch)
16612 (uri (pypi-uri "apispec" version))
16613 (sha256
16614 (base32
16615 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
16616 (build-system python-build-system)
16617 (arguments
16618 '(#:phases (modify-phases %standard-phases
16619 (add-after 'unpack 'disable-prance-tests
16620 (lambda _
16621 ;; Disable validation tests since they require the
16622 ;; optional 'prance' library which is not yet in Guix.
16623 (substitute* "tests/test_ext_marshmallow_openapi.py"
16624 (("def test_openapi_tools_validate.*" all)
16625 (string-append "@pytest.mark.xfail\n" all)))))
16626 (replace 'check
16627 (lambda _
16628 (setenv "PYTHONPATH"
16629 (string-append "./build/lib:"
16630 (getenv "PYTHONPATH")))
16631 (invoke "pytest" "-vv"))))))
16632 (propagated-inputs
16633 `(("python-pyyaml" ,python-pyyaml)))
16634 (native-inputs
16635 `(("python-pytest" ,python-pytest)
16636 ("python-marshmallow" ,python-marshmallow)))
16637 (home-page "https://github.com/marshmallow-code/apispec")
16638 (synopsis "Swagger/OpenAPI specification generator")
16639 (description "@code{python-apispec} is a pluggable API specification
16640 generator. It currently supports the OpenAPI specification, formerly known
16641 as Swagger.")
16642 (license license:expat)))
16643
16644 (define-public python-flasgger
16645 (package
16646 (name "python-flasgger")
16647 (version "0.6.3")
16648 (source
16649 (origin
16650 (method git-fetch)
16651 (uri (git-reference
16652 (url "https://github.com/rochacbruno/flasgger")
16653 (commit version)))
16654 (file-name (git-file-name name version))
16655 (sha256
16656 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16657 (build-system python-build-system)
16658 (arguments
16659 `(#:phases
16660 (modify-phases %standard-phases
16661 (replace 'check
16662 (lambda* (#:key inputs outputs #:allow-other-keys)
16663 (substitute* "Makefile"
16664 (("flake8 flasgger --ignore=F403")
16665 "flake8 flasgger --ignore=E731,F403"))
16666 (setenv "PYTHONPATH" (string-append (getcwd)
16667 ":"
16668 (getenv "PYTHONPATH")))
16669 (invoke "py.test"))))))
16670 (propagated-inputs
16671 `(("python-flask" ,python-flask)
16672 ("python-pyyaml" ,python-pyyaml)
16673 ("python-jsonschema" ,python-jsonschema)
16674 ("python-mistune" ,python-mistune)
16675 ("python-six" ,python-six)))
16676 (native-inputs
16677 `(("python-decorator" ,python-decorator)
16678 ("python-flake8" ,python-flake8)
16679 ("python-flask-restful" ,python-flask-restful)
16680 ("python-flex" ,python-flex)
16681 ("python-pytest" ,python-pytest)
16682 ("python-pytest-cov" ,python-pytest-cov)
16683 ("python-marshmallow" ,python-marshmallow)
16684 ("python-apispec" ,python-apispec)))
16685 (home-page "https://github.com/rochacbruno/flasgger/")
16686 (synopsis "Extract Swagger specs from your Flask project")
16687 (description "@code{python-flasgger} allows extracting Swagger specs
16688 from your Flask project. It is a fork of Flask-Swagger.")
16689 (license license:expat)))
16690
16691 (define-public python-swagger-spec-validator
16692 (package
16693 (name "python-swagger-spec-validator")
16694 (version "2.4.3")
16695 (source
16696 (origin
16697 (method url-fetch)
16698 (uri (pypi-uri "swagger-spec-validator" version))
16699 (sha256
16700 (base32
16701 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16702 (build-system python-build-system)
16703 (propagated-inputs
16704 `(("python-jsonschema" ,python-jsonschema)
16705 ("python-pyyaml" ,python-pyyaml)
16706 ("python-six" ,python-six)))
16707 (home-page
16708 "https://github.com/Yelp/swagger_spec_validator")
16709 (synopsis "Validation of Swagger specifications")
16710 (description "@code{swagger_spec_validator} provides a library for
16711 validating Swagger API specifications.")
16712 (license license:asl2.0)))
16713
16714 (define-public python2-swagger-spec-validator
16715 (package-with-python2 python-swagger-spec-validator))
16716
16717 (define-public python-apache-libcloud
16718 (package
16719 (name "python-apache-libcloud")
16720 (version "3.1.0")
16721 (source
16722 (origin
16723 (method url-fetch)
16724 (uri (pypi-uri "apache-libcloud" version))
16725 (sha256
16726 (base32
16727 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16728 (build-system python-build-system)
16729 (arguments
16730 `(#:phases
16731 (modify-phases %standard-phases
16732 (add-after 'unpack 'patch-ssh
16733 (lambda* (#:key inputs #:allow-other-keys)
16734 (substitute* "libcloud/compute/ssh.py"
16735 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16736 "/bin/ssh" "'")))
16737 #t))
16738 (add-after 'unpack 'patch-tests
16739 (lambda _
16740 (substitute* "libcloud/test/compute/test_ssh_client.py"
16741 (("class ShellOutSSHClientTests")
16742 "@unittest.skip(\"Guix container doesn't have ssh service\")
16743 class ShellOutSSHClientTests"))
16744 #t))
16745 (add-before 'check 'copy-secret
16746 (lambda _
16747 (copy-file "libcloud/test/secrets.py-dist"
16748 "libcloud/test/secrets.py")
16749 #t)))))
16750 (inputs
16751 `(("openssh" ,openssh)))
16752 (propagated-inputs
16753 `(("python-paramiko" ,python-paramiko)
16754 ("python-requests" ,python-requests)))
16755 (native-inputs
16756 `(("python-lockfile" ,python-lockfile)
16757 ("python-mock" ,python-mock)
16758 ("python-pytest" ,python-pytest)
16759 ("python-pytest-runner" ,python-pytest-runner)
16760 ("python-requests-mock" ,python-requests-mock)))
16761 (home-page "https://libcloud.apache.org/")
16762 (synopsis "Unified Cloud API")
16763 (description "@code{libcloud} is a Python library for interacting with
16764 many of the popular cloud service providers using a unified API.")
16765 (license license:asl2.0)))
16766
16767 (define-public python2-apache-libcloud
16768 (package-with-python2 python-apache-libcloud))
16769
16770 (define-public python-smmap
16771 (package
16772 (name "python-smmap")
16773 (version "3.0.1")
16774 (source
16775 (origin
16776 (method url-fetch)
16777 (uri (pypi-uri "smmap" version))
16778 (sha256
16779 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16780 (build-system python-build-system)
16781 (native-inputs
16782 `(("python-nosexcover" ,python-nosexcover)))
16783 (home-page "https://github.com/Byron/smmap")
16784 (synopsis "Python sliding window memory map manager")
16785 (description "@code{smmap} is a pure Python implementation of a sliding
16786 window memory map manager.")
16787 (license license:bsd-3)))
16788
16789 (define-public python-smmap2
16790 (deprecated-package "python-smmap2" python-smmap))
16791
16792 (define-public python2-smmap
16793 (package-with-python2 python-smmap))
16794
16795 (define-public python2-smmap2
16796 (deprecated-package "python2-smmap2" python2-smmap))
16797
16798 (define-public python-regex
16799 (package
16800 (name "python-regex")
16801 (version "2020.6.8")
16802 (source (origin
16803 (method url-fetch)
16804 (uri (pypi-uri "regex" version))
16805 (sha256
16806 (base32
16807 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16808 (build-system python-build-system)
16809 (arguments
16810 '(#:phases
16811 (modify-phases %standard-phases
16812 (replace 'check
16813 (lambda* (#:key inputs outputs #:allow-other-keys)
16814 (add-installed-pythonpath inputs outputs)
16815 (invoke "python" "-c"
16816 "from regex.test_regex import test_main; test_main()"))))))
16817 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16818 (synopsis "Alternative regular expression module")
16819 (description "This regular expression implementation is backwards-
16820 compatible with the standard @code{re} module, but offers additional
16821 functionality like full case-folding for case-insensitive matches in Unicode.")
16822 (license license:psfl)))
16823
16824 (define-public python2-regex
16825 (package-with-python2 python-regex))
16826
16827 (define-public python-pyopengl
16828 (package
16829 (name "python-pyopengl")
16830 (version "3.1.5")
16831 (source
16832 (origin
16833 (method url-fetch)
16834 (uri (pypi-uri "PyOpenGL" version))
16835 (sha256
16836 (base32
16837 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16838 (build-system python-build-system)
16839 (inputs
16840 `(("mesa" ,mesa)
16841 ("freeglut" ,freeglut)
16842 ("glu" ,glu)))
16843 (arguments
16844 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16845 ;attribute 'OSMesa'
16846 #:phases
16847 (modify-phases %standard-phases
16848 (add-before 'build 'fix-paths
16849 (lambda* (#:key inputs outputs #:allow-other-keys)
16850 (substitute* '("OpenGL/platform/ctypesloader.py")
16851 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16852 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16853 (("'GL'")
16854 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16855 (("'GLU'")
16856 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16857 (("'glut',")
16858 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16859 (("'GLESv1_CM'")
16860 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16861 (("'GLESv2'")
16862 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16863 ;; Not providing libgle. It seems to be very old.
16864 #t)))))
16865 (home-page "http://pyopengl.sourceforge.net")
16866 (synopsis "Standard OpenGL bindings for Python")
16867 (description
16868 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16869 related APIs. The binding is created using the standard @code{ctypes}
16870 library.")
16871 (license license:bsd-3)))
16872
16873 (define-public python-pyopengl-accelerate
16874 (package
16875 (inherit python-pyopengl)
16876 (name "python-pyopengl-accelerate")
16877 (version "3.1.5")
16878 (source
16879 (origin
16880 (method url-fetch)
16881 (uri (pypi-uri "PyOpenGL-accelerate" version))
16882 (sha256
16883 (base32
16884 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16885 (inputs
16886 `(("mesa" ,mesa)
16887 ("python-numpy" ,python-numpy))) ; for cython module
16888 ; numpy_formathandler, thus not propagated
16889 (arguments
16890 `(#:tests? #f
16891 #:phases
16892 (modify-phases %standard-phases
16893 (delete 'fix-paths))))
16894 (synopsis "Acceleration code for PyOpenGL")
16895 (description
16896 "This is the Cython-coded accelerator module for PyOpenGL.")))
16897
16898 (define-public python-rencode
16899 (package
16900 (name "python-rencode")
16901 (version "1.0.5")
16902 (source
16903 (origin
16904 (method url-fetch)
16905 (uri (pypi-uri "rencode" version))
16906 (sha256
16907 (base32
16908 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16909 (build-system python-build-system)
16910 (arguments
16911 `(#:phases
16912 (modify-phases %standard-phases
16913 (add-before 'check 'delete-bogus-test
16914 ;; This test requires /home/aresch/Downloads, which is not provided by
16915 ;; the build environment.
16916 (lambda _
16917 (delete-file "rencode/t.py")
16918 #t)))))
16919 (native-inputs `(("pkg-config" ,pkg-config)
16920 ("python-cython" ,python-cython)))
16921 (home-page "https://github.com/aresch/rencode")
16922 (synopsis "Serialization of heterogeneous data structures")
16923 (description
16924 "The @code{rencode} module is a data structure serialization library,
16925 similar to @code{bencode} from the BitTorrent project. For complex,
16926 heterogeneous data structures with many small elements, r-encoding stake up
16927 significantly less space than b-encodings. This version of rencode is a
16928 complete rewrite in Cython to attempt to increase the performance over the
16929 pure Python module.")
16930 (license license:bsd-3)))
16931
16932 (define-public python2-rencode
16933 (package-with-python2 python-rencode))
16934
16935 (define-public python-xenon
16936 (package
16937 (name "python-xenon")
16938 (version "0.7.0")
16939 (source
16940 (origin
16941 (method url-fetch)
16942 (uri (pypi-uri "xenon" version))
16943 (sha256
16944 (base32
16945 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16946 (build-system python-build-system)
16947 (native-inputs
16948 `(("python-pyyaml" ,python-pyyaml)
16949 ("python-radon" ,python-radon)
16950 ("python-requests" ,python-requests)
16951 ("python-flake8" ,python-flake8)
16952 ("python-tox" ,python-tox)))
16953 (arguments
16954 `(#:tests? #f ;test suite not shipped with the PyPI archive
16955 #:phases
16956 (modify-phases %standard-phases
16957 (add-before 'build 'patch-test-requirements
16958 (lambda _
16959 ;; Remove httpretty dependency for tests.
16960 (substitute* "setup.py"
16961 (("httpretty") ""))
16962 #t)))))
16963 (home-page "https://xenon.readthedocs.org/")
16964 (synopsis "Monitor code metrics for Python on your CI server")
16965 (description
16966 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16967 Ideally, @code{xenon} is run every time code is committed. Through command
16968 line options, various thresholds can be set for the complexity of code. It
16969 will fail (i.e. it will exit with a non-zero exit code) when any of these
16970 requirements is not met.")
16971 (license license:expat)))
16972
16973 (define-public python2-xenon
16974 (package-with-python2 python-xenon))
16975
16976 (define-public python-pysocks
16977 (package
16978 (name "python-pysocks")
16979 (version "1.7.1")
16980 (source
16981 (origin
16982 (method url-fetch)
16983 (uri (pypi-uri "PySocks" version))
16984 (sha256
16985 (base32
16986 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
16987 (build-system python-build-system)
16988 (arguments `(#:tests? #f))
16989 (home-page "https://github.com/Anorov/PySocks")
16990 (synopsis "SOCKS client module")
16991 (description "@code{pysocks} is an updated and semi-actively maintained
16992 version of @code{SocksiPy} with bug fixes and extra features.")
16993 (license license:bsd-3)))
16994
16995 (define-public python2-pysocks
16996 (package-with-python2 python-pysocks))
16997
16998 (define-public python-pydiff
16999 (package
17000 (name "python-pydiff")
17001 (version "0.2")
17002 (source
17003 (origin
17004 (method url-fetch)
17005 (uri (pypi-uri "pydiff" version))
17006 (sha256
17007 (base32
17008 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17009 (build-system python-build-system)
17010 (home-page "https://github.com/myint/pydiff")
17011 (synopsis "Library to diff two Python files at the bytecode level")
17012 (description
17013 "@code{pydiff} makes it easy to look for actual code changes while
17014 ignoring formatting changes.")
17015 (license license:expat)))
17016
17017 (define-public python2-pydiff
17018 (package-with-python2 python-pydiff))
17019
17020 (define-public python-pydub
17021 (package
17022 (name "python-pydub")
17023 (version "0.24.1")
17024 (source
17025 (origin
17026 (method url-fetch)
17027 (uri (pypi-uri "pydub" version))
17028 (sha256
17029 (base32
17030 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17031 (build-system python-build-system)
17032 (arguments
17033 `(#:phases
17034 (modify-phases %standard-phases
17035 (add-after 'unpack 'fix-ffmpeg-path
17036 (lambda* (#:key inputs #:allow-other-keys)
17037 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17038 (substitute* '("pydub/utils.py")
17039 (("return \"ffmpeg\"")
17040 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17041 (("return \"ffplay\"")
17042 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17043 (("return \"ffprobe\"")
17044 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17045 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17046 #t))))))
17047 (home-page "https://pydub.com")
17048 (inputs
17049 `(("ffmpeg" ,ffmpeg)))
17050 (propagated-inputs
17051 `(("python-scipy" ,python-scipy)))
17052 (synopsis "Manipulate audio with a high level interface in Python")
17053 (description
17054 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17055 @code{ffmpeg} to open various audio formats.")
17056 (license license:expat))) ; MIT license
17057
17058 (define-public python-tqdm
17059 (package
17060 (name "python-tqdm")
17061 (version "4.43.0")
17062 (source
17063 (origin
17064 (method url-fetch)
17065 (uri (pypi-uri "tqdm" version))
17066 (sha256
17067 (base32
17068 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17069 (build-system python-build-system)
17070 (arguments
17071 '(#:phases (modify-phases %standard-phases
17072 (replace 'check
17073 (lambda* (#:key inputs outputs #:allow-other-keys)
17074 (add-installed-pythonpath inputs outputs)
17075 ;; This invokation is taken from tox.ini.
17076 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17077 "-d" "-v" "tqdm/"))))))
17078 (native-inputs
17079 `(("python-nose" ,python-nose)))
17080 (home-page "https://github.com/tqdm/tqdm")
17081 (synopsis "Fast, extensible progress meter")
17082 (description
17083 "Make loops show a progress bar on the console by just wrapping any
17084 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17085 design and layout.")
17086 (license (list license:mpl2.0 license:expat))))
17087
17088 (define-public python2-tqdm
17089 (package-with-python2 python-tqdm))
17090
17091 (define-public python-pkginfo
17092 (package
17093 (name "python-pkginfo")
17094 (version "1.4.2")
17095 (source
17096 (origin
17097 (method url-fetch)
17098 (uri (pypi-uri "pkginfo" version))
17099 (sha256
17100 (base32
17101 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
17102 (build-system python-build-system)
17103 (arguments
17104 ;; The tests are broken upstream.
17105 '(#:tests? #f))
17106 (home-page
17107 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17108 (synopsis
17109 "Query metadatdata from sdists, bdists, and installed packages")
17110 (description
17111 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17112 source distriubtion (an sdist) or a binary distribution (e.g., created by
17113 running bdist_egg). It can also query the EGG-INFO directory of an installed
17114 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17115 created by running @code{python setup.py develop}).")
17116 (license license:expat)))
17117
17118 (define-public python2-pkginfo
17119 (package-with-python2 python-pkginfo))
17120
17121 (define-public python-twine
17122 (package
17123 (name "python-twine")
17124 (version "1.15.0")
17125 (source
17126 (origin
17127 (method url-fetch)
17128 (uri (pypi-uri "twine" version))
17129 (sha256
17130 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17131 (build-system python-build-system)
17132 (propagated-inputs
17133 `(("python-tqdm" ,python-tqdm)
17134 ("python-packaging" ,python-packaging)
17135 ("python-pkginfo" ,python-pkginfo)
17136 ("python-readme-renderer" ,python-readme-renderer)
17137 ("python-requests" ,python-requests)
17138 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17139 (home-page "https://github.com/pypa/twine")
17140 (synopsis "Collection of utilities for interacting with PyPI")
17141 (description
17142 "@code{twine} currently supports registering projects and uploading
17143 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17144 their files and supports any packaging format (including wheels).")
17145 (license license:asl2.0)))
17146
17147 (define-public python2-twine
17148 (package-with-python2 python-twine))
17149
17150 (define-public python-linecache2
17151 (package
17152 (name "python-linecache2")
17153 (version "1.0.0")
17154 (source
17155 (origin
17156 (method url-fetch)
17157 (uri (pypi-uri "linecache2" version))
17158 (sha256
17159 (base32
17160 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17161 (build-system python-build-system)
17162 (arguments
17163 `(;; The tests depend on unittest2, and our version is a bit too old.
17164 #:tests? #f))
17165 (native-inputs
17166 `(("python-pbr" ,python-pbr-minimal)))
17167 (home-page
17168 "https://github.com/testing-cabal/linecache2")
17169 (synopsis "Backports of the linecache module")
17170 (description
17171 "The linecache module allows one to get any line from any file, while
17172 attempting to optimize internally, using a cache, the common case where many
17173 lines are read from a single file.")
17174 (license license:psfl)))
17175
17176 (define-public python2-linecache2
17177 (package-with-python2 python-linecache2))
17178
17179 (define-public python-traceback2
17180 (package
17181 (name "python-traceback2")
17182 (version "1.4.0")
17183 (source
17184 (origin
17185 (method url-fetch)
17186 (uri (pypi-uri "traceback2" version))
17187 (sha256
17188 (base32
17189 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17190 (build-system python-build-system)
17191 (arguments
17192 `(;; python-traceback2 and python-unittest2 depend on one another.
17193 #:tests? #f))
17194 (native-inputs
17195 `(("python-pbr" ,python-pbr-minimal)))
17196 (propagated-inputs
17197 `(("python-linecache2" ,python-linecache2)))
17198 (home-page
17199 "https://github.com/testing-cabal/traceback2")
17200 (synopsis "Backports of the traceback module")
17201 (description
17202 "This module provides a standard interface to extract, format and print
17203 stack traces of Python programs. It exactly mimics the behavior of the Python
17204 interpreter when it prints a stack trace.")
17205 (license license:psfl)))
17206
17207 (define-public python2-traceback2
17208 (package-with-python2 python-traceback2))
17209
17210 (define-public python-ratelimiter
17211 (package
17212 (name "python-ratelimiter")
17213 (version "1.2.0")
17214 (source
17215 (origin
17216 (method url-fetch)
17217 (uri (pypi-uri "ratelimiter" version))
17218 (sha256
17219 (base32
17220 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17221 (build-system python-build-system)
17222 (arguments
17223 '(#:tests? #f)) ; There are no tests in the pypi archive.
17224 (home-page "https://github.com/RazerM/ratelimiter")
17225 (synopsis "Simple rate limiting object")
17226 (description
17227 "The @code{ratelimiter} module ensures that an operation will not be
17228 executed more than a given number of times during a given period.")
17229 (license license:asl2.0)))
17230
17231 (define-public python2-ratelimiter
17232 (package-with-python2 python-ratelimiter))
17233
17234 (define-public python-dukpy
17235 (package
17236 (name "python-dukpy")
17237 (version "0.3")
17238 (source
17239 (origin
17240 (method git-fetch)
17241 (uri (git-reference
17242 (url "https://github.com/kovidgoyal/dukpy")
17243 (commit (string-append "v" version))))
17244 (file-name (git-file-name name version))
17245 (sha256
17246 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17247 (build-system python-build-system)
17248 (home-page "https://github.com/kovidgoyal/dukpy")
17249 (synopsis "Run JavaScript in python")
17250 (description
17251 "dukpy is a JavaScript runtime environment for Python using the duktape
17252 embeddable JavaScript engine.")
17253 ;; Dukpy is licensed under MIT like the embedded duktape library,
17254 ;; with 'errors.c' as GPL3.
17255 (license (list license:expat license:gpl3))))
17256
17257 (define-public python2-dukpy
17258 (package-with-python2 python-dukpy))
17259
17260 (define-public python-jsonrpclib-pelix
17261 (package
17262 (name "python-jsonrpclib-pelix")
17263 (version "0.3.2")
17264 (source
17265 (origin
17266 (method url-fetch)
17267 (uri (pypi-uri "jsonrpclib-pelix" version))
17268 (sha256
17269 (base32
17270 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17271 (build-system python-build-system)
17272 (arguments
17273 `(#:tests? #f)) ; no tests in PyPI tarball
17274 (home-page "https://github.com/tcalmant/jsonrpclib/")
17275 (synopsis "JSON-RPC 2.0 client library for Python")
17276 (description
17277 "This library implements the JSON-RPC v2.0
17278 specification (backwards-compatible) as a client library for Python. This
17279 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17280 services.")
17281 (license license:asl2.0)))
17282
17283 (define-public python2-jsonrpclib-pelix
17284 (package-with-python2 python-jsonrpclib-pelix))
17285
17286 (define-public python-setuptools-scm-git-archive
17287 (package
17288 (name "python-setuptools-scm-git-archive")
17289 (version "1.0")
17290 (source
17291 (origin
17292 (method url-fetch)
17293 (uri (pypi-uri "setuptools_scm_git_archive" version))
17294 (sha256
17295 (base32
17296 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17297 (build-system python-build-system)
17298 (native-inputs
17299 `(("python-pytest" ,python-pytest)))
17300 (propagated-inputs
17301 `(("python-setuptools-scm" ,python-setuptools-scm)))
17302 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17303 (synopsis "Setuptools_scm plugin for git archives")
17304 (description
17305 "The setuptools_scm_git_archive package is a plugin to
17306 setuptools_scm, which supports obtaining versions from git archives that
17307 belong to tagged versions.")
17308 (license license:expat)))
17309
17310 (define-public python2-setuptools-scm-git-archive
17311 (package-with-python2 python-setuptools-scm-git-archive))
17312
17313 (define-public python-setuptools-git
17314 (package
17315 (name "python-setuptools-git")
17316 (version "1.2")
17317 (source
17318 (origin
17319 (method url-fetch)
17320 (uri (pypi-uri "setuptools-git" version))
17321 (sha256
17322 (base32
17323 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17324 (build-system python-build-system)
17325 (arguments
17326 `(#:phases
17327 (modify-phases %standard-phases
17328 ;; This is needed for tests.
17329 (add-after 'unpack 'configure-git
17330 (lambda _
17331 (setenv "HOME" "/tmp")
17332 (invoke "git" "config" "--global" "user.email" "guix")
17333 (invoke "git" "config" "--global" "user.name" "guix")
17334 #t)))))
17335 (native-inputs
17336 `(("git" ,git-minimal)))
17337 (home-page "https://github.com/msabramo/setuptools-git")
17338 (synopsis "Setuptools revision control system plugin for Git")
17339 (description
17340 "This package provides a plugin for Setuptools for revision control with
17341 Git.")
17342 (license license:bsd-3)))
17343
17344 (define-public python-pyclipper
17345 (package
17346 (name "python-pyclipper")
17347 (version "1.1.0.post3")
17348 (source
17349 (origin
17350 (method url-fetch)
17351 (uri (pypi-uri "pyclipper" version ".zip"))
17352 (sha256
17353 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17354 (modules '((guix build utils)))
17355 (snippet
17356 '(begin
17357 ;; This file is generated by Cython.
17358 (delete-file "pyclipper/pyclipper.cpp") #t))))
17359 (build-system python-build-system)
17360 (arguments
17361 `(#:phases
17362 (modify-phases %standard-phases
17363 (add-before 'build 'cythonize-sources
17364 (lambda _
17365 (with-directory-excursion "pyclipper"
17366 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17367 (propagated-inputs
17368 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17369 (native-inputs
17370 `(("python-cython" ,python-cython)
17371 ("python-pytest" ,python-pytest)
17372 ("python-pytest-runner" ,python-pytest-runner)
17373 ("python-unittest2" ,python-unittest2)
17374 ("unzip" ,unzip)))
17375 (home-page "https://github.com/greginvm/pyclipper")
17376 (synopsis "Wrapper for Angus Johnson's Clipper library")
17377 (description
17378 "Pyclipper is a Cython wrapper for the C++ translation of the
17379 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17380 (license license:expat)))
17381
17382 (define-public python2-pyclipper
17383 (package-with-python2 python-pyclipper))
17384
17385 (define-public python2-booleanoperations
17386 (package
17387 (name "python2-booleanoperations")
17388 (version "0.7.1")
17389 (source
17390 (origin
17391 (method url-fetch)
17392 (uri (pypi-uri "booleanOperations" version ".zip"))
17393 (sha256
17394 (base32
17395 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17396 (build-system python-build-system)
17397 (arguments
17398 `(#:python ,python-2))
17399 (native-inputs
17400 `(("unzip" ,unzip)
17401 ("python2-pytest" ,python2-pytest)
17402 ("python2-pytest-runner" ,python2-pytest-runner)))
17403 (propagated-inputs
17404 `(("python-fonttools" ,python2-fonttools)
17405 ("python-pyclipper" ,python2-pyclipper)
17406 ("python-ufolib" ,python2-ufolib)))
17407 (home-page "https://github.com/typemytype/booleanOperations")
17408 (synopsis "Boolean operations on paths")
17409 (description
17410 "BooleanOperations provides a Python library that enables
17411 boolean operations on paths.")
17412 (license license:expat)))
17413
17414 (define-public python-tempdir
17415 (package
17416 (name "python-tempdir")
17417 (version "0.7.1")
17418 (source
17419 (origin
17420 (method url-fetch)
17421 (uri (pypi-uri "tempdir" version))
17422 (sha256
17423 (base32
17424 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17425 (build-system python-build-system)
17426 (home-page "https://pypi.org/project/tempdir/")
17427 (arguments
17428 ;; the package has no tests
17429 '(#:tests? #f))
17430 (synopsis "Python library for managing temporary directories")
17431 (description
17432 "This library manages temporary directories that are automatically
17433 deleted with all their contents when they are no longer needed. It is
17434 particularly convenient for use in tests.")
17435 (license license:expat)))
17436
17437 (define-public python2-tempdir
17438 (package-with-python2 python-tempdir))
17439
17440 (define-public python-activepapers
17441 (package
17442 (name "python-activepapers")
17443 (version "0.2.2")
17444 (source
17445 (origin
17446 (method url-fetch)
17447 (uri (pypi-uri "ActivePapers.Py" version))
17448 (sha256
17449 (base32
17450 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17451 (build-system python-build-system)
17452 (arguments
17453 `(#:modules ((ice-9 ftw)
17454 (srfi srfi-1)
17455 (guix build utils)
17456 (guix build python-build-system))
17457
17458 #:phases
17459 (modify-phases %standard-phases
17460 (add-after 'unpack 'delete-python2-code
17461 (lambda _
17462 (for-each delete-file
17463 '("lib/activepapers/builtins2.py"
17464 "lib/activepapers/standardlib2.py"
17465 "lib/activepapers/utility2.py"))))
17466 (replace 'check
17467 (lambda _
17468 ;; Deactivate the test cases that download files
17469 (setenv "NO_NETWORK_ACCESS" "1")
17470 ;; For some strange reason, some tests fail if nosetests runs all
17471 ;; test modules in a single execution. They pass if each test
17472 ;; module is run individually.
17473 (for-each (lambda (filename)
17474 (invoke "nosetests"
17475 (string-append "tests/" filename)))
17476 (scandir "tests"
17477 (lambda (filename)
17478 (string-suffix? ".py" filename)))))))))
17479 (native-inputs
17480 `(("python-tempdir" ,python-tempdir)
17481 ("python-nose" ,python-nose)))
17482 (propagated-inputs
17483 `(("python-h5py" ,python-h5py)))
17484 (home-page "https://www.activepapers.org/")
17485 (synopsis "Executable papers for scientific computing")
17486 (description
17487 "ActivePapers is a tool for working with executable papers, which
17488 combine data, code, and documentation in single-file packages,
17489 suitable for publication as supplementary material or on repositories
17490 such as figshare or Zenodo.")
17491 (properties `((python2-variant . ,(delay python2-activepapers))))
17492 (license license:bsd-3)))
17493
17494 (define-public python2-activepapers
17495 (let ((base (package-with-python2
17496 (strip-python2-variant python-activepapers))))
17497 (package
17498 (inherit base)
17499 (arguments
17500 (substitute-keyword-arguments (package-arguments base)
17501 ((#:phases phases)
17502 `(modify-phases ,phases
17503 (delete 'delete-python2-code)
17504 (add-after 'unpack 'delete-python3-code
17505 (lambda _
17506 (for-each delete-file
17507 '("lib/activepapers/builtins3.py"
17508 "lib/activepapers/standardlib3.py"
17509 "lib/activepapers/utility3.py")))))))))))
17510
17511 (define-public python-semver
17512 (package
17513 (name "python-semver")
17514 (version "2.9.0")
17515 (source
17516 (origin
17517 (method url-fetch)
17518 (uri (pypi-uri "semver" version))
17519 (sha256
17520 (base32
17521 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17522 (build-system python-build-system)
17523 (arguments
17524 `(#:phases (modify-phases %standard-phases
17525 (replace 'check
17526 (lambda _
17527 (delete-file "setup.cfg")
17528 (invoke "py.test"))))))
17529 (native-inputs
17530 `(("python-pytest" ,python-pytest)))
17531 (home-page "https://github.com/k-bx/python-semver")
17532 (synopsis "Python helper for Semantic Versioning")
17533 (description "This package provides a Python library for
17534 @url{Semantic Versioning, http://semver.org/}.")
17535 (license license:bsd-3)))
17536
17537 (define-public python2-semver
17538 (package-with-python2 python-semver))
17539
17540 (define-public python-pyro4
17541 (package
17542 (name "python-pyro4")
17543 (version "4.77")
17544 (source
17545 (origin
17546 (method url-fetch)
17547 (uri (pypi-uri "Pyro4" version))
17548 (sha256
17549 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17550 (build-system python-build-system)
17551 (arguments
17552 '(#:tests? #f)) ;FIXME: Some tests require network access.
17553 (native-inputs
17554 `(("python-cloudpickle" ,python-cloudpickle)
17555 ("python-dill" ,python-dill)
17556 ("python-msgpack" ,python-msgpack)))
17557 (propagated-inputs
17558 `(("python-serpent" ,python-serpent)))
17559 (home-page "https://pyro4.readthedocs.io")
17560 (synopsis "Distributed object middleware for Python")
17561 (description
17562 "Pyro enables you to build applications in which objects can talk to each
17563 other over the network. You can just use normal Python method calls to call
17564 objects on other machines, also known as remote procedure calls (RPC).")
17565 (license license:expat)))
17566
17567 (define-public python2-pyro
17568 (package
17569 (name "python2-pyro")
17570 (version "3.16")
17571 (source
17572 (origin
17573 (method url-fetch)
17574 (uri (pypi-uri "Pyro" version))
17575 (file-name (string-append "Pyro-" version ".tar.gz"))
17576 (sha256
17577 (base32
17578 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17579 (build-system python-build-system)
17580 (arguments
17581 ;; Pyro is not compatible with Python 3
17582 `(#:python ,python-2
17583 ;; Pyro has no test cases for automatic execution
17584 #:tests? #f))
17585 (home-page "https://pythonhosted.org/Pyro/")
17586 (synopsis "Distributed object manager for Python")
17587 (description "Pyro is a Distributed Object Technology system
17588 written in Python that is designed to be easy to use. It resembles
17589 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17590 which is a system and language independent Distributed Object Technology
17591 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17592 longer maintained. New projects should use Pyro4 instead, which
17593 is the new Pyro version that is actively developed.")
17594 (license license:expat)))
17595
17596 (define-public python2-scientific
17597 (package
17598 (name "python2-scientific")
17599 (version "2.9.4")
17600 (source
17601 (origin
17602 (method git-fetch)
17603 (uri (git-reference
17604 (url "https://github.com/khinsen/ScientificPython")
17605 (commit (string-append "rel" version))))
17606 (file-name (git-file-name name version))
17607 (sha256
17608 (base32
17609 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17610 (build-system python-build-system)
17611 (inputs
17612 `(("netcdf" ,netcdf)))
17613 (propagated-inputs
17614 `(("python-numpy" ,python2-numpy-1.8)
17615 ("python-pyro" ,python2-pyro)))
17616 (arguments
17617 ;; ScientificPython is not compatible with Python 3
17618 `(#:python ,python-2
17619 #:tests? #f ; No test suite
17620 #:phases
17621 (modify-phases %standard-phases
17622 (replace 'build
17623 (lambda* (#:key inputs #:allow-other-keys)
17624 (invoke "python" "setup.py" "build"
17625 (string-append "--netcdf_prefix="
17626 (assoc-ref inputs "netcdf"))))))))
17627 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17628 (synopsis "Python modules for scientific computing")
17629 (description "ScientificPython is a collection of Python modules that are
17630 useful for scientific computing. Most modules are rather general (Geometry,
17631 physical units, automatic derivatives, ...) whereas others are more
17632 domain-specific (e.g. netCDF and PDB support). The library is currently
17633 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17634 (license license:cecill-c)))
17635
17636 (define-public python2-mmtk
17637 (package
17638 (name "python2-mmtk")
17639 (version "2.7.12")
17640 (source
17641 (origin
17642 (method git-fetch)
17643 (uri (git-reference
17644 (url "https://github.com/khinsen/MMTK")
17645 (commit (string-append "rel" version))))
17646 (file-name (git-file-name name version))
17647 (sha256
17648 (base32
17649 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17650 (build-system python-build-system)
17651 (native-inputs
17652 `(("netcdf" ,netcdf)))
17653 (propagated-inputs
17654 `(("python-scientific" ,python2-scientific)
17655 ("python-tkinter" ,python-2 "tk")))
17656 (arguments
17657 `(#:python ,python-2
17658 #:tests? #f
17659 #:phases
17660 (modify-phases %standard-phases
17661 (add-before 'build 'includes-from-scientific
17662 (lambda* (#:key inputs #:allow-other-keys)
17663 (mkdir-p "Include/Scientific")
17664 (copy-recursively
17665 (string-append
17666 (assoc-ref inputs "python-scientific")
17667 "/include/python2.7/Scientific")
17668 "Include/Scientific"))))))
17669 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17670 (synopsis "Python library for molecular simulation")
17671 (description "MMTK is a library for molecular simulations with an emphasis
17672 on biomolecules. It provides widely used methods such as Molecular Dynamics
17673 and normal mode analysis, but also basic routines for implementing new methods
17674 for simulation and analysis. The library is currently not actively maintained
17675 and works only with Python 2 and NumPy < 1.9.")
17676 (license license:cecill-c)))
17677
17678 (define-public python-phonenumbers
17679 (package
17680 (name "python-phonenumbers")
17681 (version "8.9.1")
17682 (source
17683 (origin
17684 (method url-fetch)
17685 (uri (pypi-uri "phonenumbers" version))
17686 (sha256
17687 (base32
17688 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17689 (build-system python-build-system)
17690 (home-page
17691 "https://github.com/daviddrysdale/python-phonenumbers")
17692 (synopsis
17693 "Python library for dealing with international phone numbers")
17694 (description
17695 "This package provides a Python port of Google's libphonenumber library.")
17696 (license license:asl2.0)))
17697
17698 (define-public python2-phonenumbers
17699 (package-with-python2 python-phonenumbers))
17700
17701 (define-public python-send2trash
17702 (package
17703 (name "python-send2trash")
17704 (version "1.5.0")
17705 (source
17706 (origin (method git-fetch)
17707 ;; Source tarball on PyPI doesn't include tests.
17708 (uri (git-reference
17709 (url "https://github.com/hsoft/send2trash")
17710 (commit version)))
17711 (file-name (git-file-name name version))
17712 (sha256
17713 (base32
17714 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17715 (build-system python-build-system)
17716 (arguments
17717 '(#:phases
17718 (modify-phases %standard-phases
17719 (add-before 'check 'pre-check
17720 (lambda _
17721 (mkdir-p "/tmp/foo")
17722 (setenv "HOME" "/tmp/foo")
17723 #t)))))
17724 (home-page "https://github.com/hsoft/send2trash")
17725 (synopsis "Send files to the user's @file{~/Trash} directory")
17726 (description "This package provides a Python library to send files to the
17727 user's @file{~/Trash} directory.")
17728 (properties `((python2-variant . ,(delay python2-send2trash))))
17729 (license license:bsd-3)))
17730
17731 (define-public python2-send2trash
17732 (package
17733 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17734 (arguments
17735 (substitute-keyword-arguments (package-arguments python-send2trash)
17736 ((#:phases phases)
17737 `(modify-phases ,phases
17738 (add-before 'check 'setenv
17739 (lambda _
17740 (setenv "PYTHONPATH"
17741 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17742 #t))))))))
17743
17744 (define-public python-pyfavicon
17745 (package
17746 (name "python-pyfavicon")
17747 (version "0.1.1")
17748 (source
17749 (origin
17750 (method url-fetch)
17751 (uri (pypi-uri "pyfavicon" version))
17752 (sha256
17753 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17754 (build-system python-build-system)
17755 (arguments
17756 ;; There are no tests in the PyPI tarball and the tests from the
17757 ;; repository require online data.
17758 '(#:tests? #f))
17759 (propagated-inputs
17760 `(("python-aiohttp" ,python-aiohttp)
17761 ("python-beautifulsoup4" ,python-beautifulsoup4)
17762 ("python-pillow" ,python-pillow)))
17763 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17764 (synopsis "Async favicon fetcher")
17765 (description
17766 "@code{pyfavicon} is an async favicon fetcher.")
17767 (license license:expat)))
17768
17769 (define-public python-yapf
17770 (package
17771 (name "python-yapf")
17772 (version "0.29.0")
17773 (source
17774 (origin
17775 (method url-fetch)
17776 (uri (pypi-uri "yapf" version))
17777 (sha256
17778 (base32
17779 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17780 (build-system python-build-system)
17781 (home-page "https://github.com/google/yapf")
17782 (synopsis "Formatter for Python code")
17783 (description "YAPF is a formatter for Python code. It's based off of
17784 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17785 takes the code and reformats it to the best formatting that conforms to the
17786 style guide, even if the original code didn't violate the style guide.")
17787 (license license:asl2.0)))
17788
17789 (define-public python2-yapf
17790 (package-with-python2 python-yapf))
17791
17792 (define-public python-yq
17793 (package
17794 (name "python-yq")
17795 (version "2.11.1")
17796 (source
17797 (origin
17798 (method url-fetch)
17799 (uri (pypi-uri "yq" version))
17800 (sha256
17801 (base32
17802 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17803 (build-system python-build-system)
17804 (arguments
17805 '(#:phases
17806 (modify-phases %standard-phases
17807 (add-after 'unpack 'patch
17808 (lambda* (#:key inputs #:allow-other-keys)
17809 (substitute* "yq/__init__.py"
17810 (("Popen\\(\\[\"jq")
17811 (string-append
17812 "Popen([\""
17813 (assoc-ref inputs "jq")
17814 "/bin/jq")))
17815 #t)))))
17816 (inputs
17817 `(("python-argcomplete" ,python-argcomplete)
17818 ("python-pyyaml" ,python-pyyaml)
17819 ("python-xmltodict" ,python-xmltodict)
17820 ("jq" ,jq)))
17821 (native-inputs
17822 `(("python-coverage" ,python-coverage)
17823 ("python-flake8" ,python-flake8)
17824 ("python-wheel" ,python-wheel)))
17825 (home-page "https://github.com/kislyuk/yq")
17826 (synopsis "Command-line YAML/XML processor")
17827 (description
17828 "This package provides @command{yq} and @command{xq} for processing YAML
17829 and XML respectively. The processing is done through @command{jq}, @command{jq}
17830 filters can be used to process the data as it passes through.")
17831 (license license:asl2.0)))
17832
17833 (define-public python-gyp
17834 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17835 (revision "0"))
17836 (package
17837 (name "python-gyp")
17838 ;; Google does not release versions,
17839 ;; based on second most recent commit date.
17840 (version (git-version "0.0.0" revision commit))
17841 (source
17842 (origin
17843 ;; Google does not release tarballs,
17844 ;; git checkout is needed.
17845 (method git-fetch)
17846 (uri (git-reference
17847 (url "https://chromium.googlesource.com/external/gyp")
17848 (commit commit)))
17849 (file-name (git-file-name name version))
17850 (sha256
17851 (base32
17852 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17853 (build-system python-build-system)
17854 (home-page "https://gyp.gsrc.io/")
17855 (synopsis "GYP is a Meta-Build system")
17856 (description
17857 "GYP builds build systems for large, cross platform applications.
17858 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17859 files, and Makefiles.")
17860 (license license:bsd-3))))
17861
17862 (define-public python2-gyp
17863 (package-with-python2 python-gyp))
17864
17865 (define-public python-whatever
17866 (package
17867 (name "python-whatever")
17868 (version "0.6")
17869 (source
17870 (origin
17871 (method git-fetch)
17872 (uri (git-reference
17873 (url "https://github.com/Suor/whatever")
17874 (commit version)))
17875 (file-name (git-file-name name version))
17876 (sha256
17877 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17878 (build-system python-build-system)
17879 (arguments
17880 `(#:phases
17881 (modify-phases %standard-phases
17882 (replace 'check
17883 (lambda _
17884 (invoke "py.test"))))))
17885 (native-inputs
17886 `(("python-pytest" ,python-pytest)))
17887 (home-page "https://github.com/Suor/whatever")
17888 (synopsis "Make anonymous functions by partial application of operators")
17889 (description "@code{whatever} provides an easy way to make anonymous
17890 functions by partial application of operators.")
17891 (license license:bsd-3)))
17892
17893 (define-public python2-whatever
17894 (package-with-python2 python-whatever))
17895
17896 (define-public python-funcy
17897 (package
17898 (name "python-funcy")
17899 (version "1.11")
17900 (source
17901 (origin
17902 (method git-fetch)
17903 (uri (git-reference
17904 (url "https://github.com/Suor/funcy")
17905 (commit version)))
17906 (sha256
17907 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17908 (file-name (git-file-name name version))))
17909 (build-system python-build-system)
17910 (arguments
17911 `(#:phases
17912 (modify-phases %standard-phases
17913 (replace 'check
17914 (lambda _
17915 (invoke "py.test"))))))
17916 (native-inputs
17917 `(("python-pytest" ,python-pytest)
17918 ("python-whatever" ,python-whatever)))
17919 (home-page "https://github.com/Suor/funcy")
17920 (synopsis "Functional tools")
17921 (description "@code{funcy} is a library that provides functional tools.
17922 Examples are:
17923 @enumerate
17924 @item merge - Merges collections of the same type
17925 @item walk - Type-preserving map
17926 @item select - Selects a part of a collection
17927 @item take - Takes the first n items of a collection
17928 @item first - Takes the first item of a collection
17929 @item remove - Predicated-removes items of a collection
17930 @item concat - Concatenates two collections
17931 @item flatten - Flattens a collection with subcollections
17932 @item distinct - Returns only distinct items
17933 @item split - Predicated-splits a collection
17934 @item split_at - Splits a collection at a given item
17935 @item group_by - Groups items by group
17936 @item pairwise - Pairs off adjacent items
17937 @item partial - Partially-applies a function
17938 @item curry - Curries a function
17939 @item compose - Composes functions
17940 @item complement - Complements a predicate
17941 @item all_fn - \"all\" with predicate
17942 @end enumerate")
17943 (license license:bsd-3)))
17944
17945 (define-public python2-funcy
17946 (package-with-python2 python-funcy))
17947
17948 (define-public python-isoweek
17949 (package
17950 (name "python-isoweek")
17951 (version "1.3.3")
17952 (source
17953 (origin
17954 (method url-fetch)
17955 (uri (pypi-uri "isoweek" version))
17956 (sha256
17957 (base32
17958 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17959 (build-system python-build-system)
17960 (home-page "https://github.com/gisle/isoweek")
17961 (synopsis "Objects representing a week")
17962 (description "The @code{isoweek} module provide the class Week that
17963 implements the week definition of ISO 8601. This standard also defines
17964 a notation for identifying weeks; yyyyWww (where the W is a literal).
17965 Week instances stringify to this form.")
17966 (license license:bsd-3)))
17967
17968 (define-public python2-isoweek
17969 (package-with-python2 python-isoweek))
17970
17971 (define-public python-pyzbar
17972 (package
17973 (name "python-pyzbar")
17974 (version "0.1.8")
17975 (source
17976 (origin
17977 ;; There's no source tarball on PyPI.
17978 (method git-fetch)
17979 (uri (git-reference
17980 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17981 (commit (string-append "v" version))))
17982 (file-name (git-file-name name version))
17983 (sha256
17984 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17985 (build-system python-build-system)
17986 (arguments
17987 `(#:phases
17988 (modify-phases %standard-phases
17989 (add-after 'unpack 'remove-failing-test
17990 (lambda _
17991 ;; This tests if find_library was called once, but we remove
17992 ;; the call in the stage below to make the library find libzbar.
17993 (delete-file "pyzbar/tests/test_zbar_library.py")
17994 #t))
17995 (add-before 'build 'set-library-file-name
17996 (lambda* (#:key inputs #:allow-other-keys)
17997 (let ((libzbar (assoc-ref inputs "zbar")))
17998 (substitute* "pyzbar/zbar_library.py"
17999 (("find_library\\('zbar'\\)")
18000 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18001 #t))))))
18002 (native-inputs
18003 `(("pkg-config" ,pkg-config)
18004 ("python-numpy" ,python-numpy)
18005 ("python-pillow" ,python-pillow)))
18006 (inputs
18007 `(("zbar" ,zbar)))
18008 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18009 (synopsis "Read one-dimensional barcodes and QR codes")
18010 (description
18011 "Read one-dimensional barcodes and QR codes using the zbar library.
18012
18013 Features:
18014
18015 @itemize
18016 @item Pure python
18017 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18018 @item Decodes locations of barcodes
18019 @item No dependencies, other than the zbar library itself
18020 @end itemize")
18021 (license license:expat)))
18022
18023 (define-public python-tokenize-rt
18024 (package
18025 (name "python-tokenize-rt")
18026 (version "2.0.1")
18027 (source
18028 (origin
18029 (method url-fetch)
18030 (uri (pypi-uri "tokenize-rt" version))
18031 (sha256
18032 (base32
18033 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18034 (build-system python-build-system)
18035 (home-page "https://github.com/asottile/tokenize-rt")
18036 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18037 (description
18038 "This Python library is a wrapper around @code{tokenize} from the Python
18039 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18040 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18041 and @code{tokens_to_src} to roundtrip.")
18042 (license license:expat)))
18043
18044 (define-public python-future-fstrings
18045 (package
18046 (name "python-future-fstrings")
18047 (version "0.4.1")
18048 (source
18049 (origin
18050 (method url-fetch)
18051 (uri (pypi-uri "future_fstrings" version))
18052 (sha256
18053 (base32
18054 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18055 (build-system python-build-system)
18056 (propagated-inputs
18057 `(("python-tokenize-rt" ,python-tokenize-rt)))
18058 (home-page "https://github.com/asottile/future-fstrings")
18059 (synopsis "Backport of fstrings to Python < 3.6")
18060 (description
18061 "This package provides a UTF-8 compatible encoding
18062 @code{future_fstrings}, which performs source manipulation. It decodes the
18063 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18064 @code{f} strings.")
18065 (license license:expat)))
18066
18067 (define-public python-typed-ast
18068 (package
18069 (name "python-typed-ast")
18070 (version "1.4.0")
18071 (source
18072 (origin
18073 (method git-fetch)
18074 (uri (git-reference
18075 (url "https://github.com/python/typed_ast")
18076 (commit version)))
18077 (sha256
18078 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18079 (file-name (git-file-name name version))))
18080 (build-system python-build-system)
18081 (arguments
18082 `(#:modules ((guix build utils)
18083 (guix build python-build-system)
18084 (ice-9 ftw)
18085 (srfi srfi-1)
18086 (srfi srfi-26))
18087 #:phases
18088 (modify-phases %standard-phases
18089 (replace 'check
18090 (lambda _
18091 (let ((cwd (getcwd)))
18092 (setenv "PYTHONPATH"
18093 (string-append cwd "/build/"
18094 (find (cut string-prefix? "lib" <>)
18095 (scandir (string-append cwd "/build")))
18096 ":"
18097 (getenv "PYTHONPATH"))))
18098 (invoke "pytest")
18099 #t)))))
18100 (native-inputs `(("python-pytest" ,python-pytest)))
18101 (home-page "https://github.com/python/typed_ast")
18102 (synopsis "Fork of Python @code{ast} modules with type comment support")
18103 (description "This package provides a parser similar to the standard
18104 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18105 include PEP 484 type comments and are independent of the version of Python
18106 under which they are run. The @code{typed_ast} parsers produce the standard
18107 Python AST (plus type comments), and are both fast and correct, as they are
18108 based on the CPython 2.7 and 3.7 parsers.")
18109 ;; See the file "LICENSE" for the details.
18110 (license (list license:psfl
18111 license:asl2.0
18112 license:expat)))) ;ast27/Parser/spark.py
18113
18114 (define-public python-typing
18115 (package
18116 (name "python-typing")
18117 (version "3.7.4.3")
18118 (source
18119 (origin
18120 (method url-fetch)
18121 (uri (pypi-uri "typing" version))
18122 (sha256
18123 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18124 (build-system python-build-system)
18125 (home-page "https://docs.python.org/3/library/typing.html")
18126 (synopsis "Type hints for Python")
18127 (description "This is a backport of the standard library @code{typing}
18128 module to Python versions older than 3.5. Typing defines a standard notation
18129 for Python function and variable type annotations. The notation can be used
18130 for documenting code in a concise, standard format, and it has been designed
18131 to also be used by static and runtime type checkers, static analyzers, IDEs
18132 and other tools.")
18133 (license license:psfl)))
18134
18135 (define-public python2-typing
18136 (package-with-python2 python-typing))
18137
18138 (define-public python-typing-extensions
18139 (package
18140 (name "python-typing-extensions")
18141 (version "3.7.4.3")
18142 (source
18143 (origin
18144 (method url-fetch)
18145 (uri (pypi-uri "typing_extensions" version))
18146 (sha256
18147 (base32
18148 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18149 (build-system python-build-system)
18150 (home-page
18151 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18152 (synopsis "Experimental type hints for Python")
18153 (description
18154 "The typing_extensions module contains additional @code{typing} hints not
18155 yet present in the of the @code{typing} standard library.
18156 Included are implementations of:
18157 @enumerate
18158 @item ClassVar
18159 @item ContextManager
18160 @item Counter
18161 @item DefaultDict
18162 @item Deque
18163 @item NewType
18164 @item NoReturn
18165 @item overload
18166 @item Protocol
18167 @item runtime
18168 @item Text
18169 @item Type
18170 @item TYPE_CHECKING
18171 @item AsyncGenerator
18172 @end enumerate\n")
18173 (license license:psfl)))
18174
18175 (define-public bpython
18176 (package
18177 (name "bpython")
18178 (version "0.18")
18179 (source
18180 (origin
18181 (method url-fetch)
18182 (uri (pypi-uri "bpython" version))
18183 (sha256
18184 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
18185 (build-system python-build-system)
18186 (arguments
18187 `(#:phases
18188 (modify-phases %standard-phases
18189 (add-after 'unpack 'remove-failing-test
18190 (lambda _
18191 ;; Remove failing test. FIXME: make it pass
18192 (delete-file "bpython/test/test_args.py")
18193 #t))
18194 (add-after 'wrap 'add-aliases
18195 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18196 (lambda* (#:key outputs #:allow-other-keys)
18197 (let ((out (assoc-ref outputs "out")))
18198 (for-each
18199 (lambda (old new)
18200 (symlink old (string-append out "/bin/" new)))
18201 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18202 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18203 #t)))))
18204 (propagated-inputs
18205 `(("python-pygments" ,python-pygments)
18206 ("python-requests" ,python-requests)
18207 ("python-babel" ,python-babel) ; optional, for internationalization
18208 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
18209 ("python-greenlet" ,python-greenlet)
18210 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18211 ("python-six" ,python-six)))
18212 (native-inputs
18213 `(("python-sphinx" ,python-sphinx)
18214 ("python-mock" ,python-mock)))
18215 (home-page "https://bpython-interpreter.org/")
18216 (synopsis "Fancy interface to the Python interpreter")
18217 (description "Bpython is a fancy interface to the Python
18218 interpreter. bpython's main features are
18219
18220 @enumerate
18221 @item in-line syntax highlighting,
18222 @item readline-like autocomplete with suggestions displayed as you type,
18223 @item expected parameter list for any Python function,
18224 @item \"rewind\" function to pop the last line of code from memory and
18225 re-evaluate,
18226 @item send the code you've entered off to a pastebin,
18227 @item save the code you've entered to a file, and
18228 @item auto-indentation.
18229 @end enumerate")
18230 (license license:expat)))
18231
18232 (define-public python-pyinotify
18233 (package
18234 (name "python-pyinotify")
18235 (version "0.9.6")
18236 (source (origin
18237 (method url-fetch)
18238 (uri (pypi-uri "pyinotify" version))
18239 (sha256
18240 (base32
18241 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18242 (build-system python-build-system)
18243 (arguments `(#:tests? #f)) ;no tests
18244 (home-page "https://github.com/seb-m/pyinotify")
18245 (synopsis "Python library for monitoring inotify events")
18246 (description
18247 "@code{pyinotify} provides a Python interface for monitoring
18248 file system events on Linux.")
18249 (license license:expat)))
18250
18251 (define-public python2-pyinotify
18252 (package-with-python2 python-pyinotify))
18253
18254 ;; Ada parser uses this version.
18255 (define-public python2-quex-0.67.3
18256 (package
18257 (name "python2-quex")
18258 (version "0.67.3")
18259 (source
18260 (origin
18261 (method url-fetch)
18262 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18263 (version-major+minor version)
18264 "/quex-" version ".zip"))
18265 (sha256
18266 (base32
18267 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18268 (build-system python-build-system)
18269 (native-inputs
18270 `(("unzip" ,unzip)))
18271 (arguments
18272 `(#:python ,python-2
18273 #:tests? #f
18274 #:phases
18275 (modify-phases %standard-phases
18276 (delete 'configure)
18277 (delete 'build)
18278 (replace 'install
18279 (lambda* (#:key outputs #:allow-other-keys)
18280 (let* ((out (assoc-ref outputs "out"))
18281 (share/quex (string-append out "/share/quex"))
18282 (bin (string-append out "/bin")))
18283 (copy-recursively "." share/quex)
18284 (mkdir-p bin)
18285 (symlink (string-append share/quex "/quex-exe.py")
18286 (string-append bin "/quex"))
18287 #t))))))
18288 (native-search-paths
18289 (list (search-path-specification
18290 (variable "QUEX_PATH")
18291 (files '("share/quex")))))
18292 (home-page "http://quex.sourceforge.net/")
18293 (synopsis "Lexical analyzer generator in Python")
18294 (description "@code{quex} is a lexical analyzer generator in Python.")
18295 (license license:lgpl2.1+))) ; Non-military
18296
18297 (define-public python2-quex
18298 (package (inherit python2-quex-0.67.3)
18299 (name "python2-quex")
18300 (version "0.68.1")
18301 (source
18302 (origin
18303 (method url-fetch)
18304 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18305 (sha256
18306 (base32
18307 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18308 (file-name (string-append name "-" version ".tar.gz"))))))
18309
18310 (define-public python-more-itertools
18311 (package
18312 (name "python-more-itertools")
18313 (version "8.2.0")
18314 (source
18315 (origin
18316 (method url-fetch)
18317 (uri (pypi-uri "more-itertools" version))
18318 (sha256
18319 (base32
18320 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18321 (build-system python-build-system)
18322 (home-page "https://github.com/erikrose/more-itertools")
18323 (synopsis "More routines for operating on iterables, beyond itertools")
18324 (description "Python's built-in @code{itertools} module implements a
18325 number of iterator building blocks inspired by constructs from APL, Haskell,
18326 and SML. @code{more-itertools} includes additional building blocks for
18327 working with iterables.")
18328 (properties `((python2-variant . ,(delay python2-more-itertools))))
18329 (license license:expat)))
18330
18331 ;; The 5.x series are the last versions supporting Python 2.7.
18332 (define-public python2-more-itertools
18333 (package
18334 (inherit python-more-itertools)
18335 (name "python2-more-itertools")
18336 (version "5.0.0")
18337 (source (origin
18338 (method url-fetch)
18339 (uri (pypi-uri "more-itertools" version))
18340 (sha256
18341 (base32
18342 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18343 (arguments
18344 `(#:python ,python-2))
18345 (propagated-inputs
18346 `(("python2-six" ,python2-six-bootstrap)))))
18347
18348 (define-public python-latexcodec
18349 (package
18350 (name "python-latexcodec")
18351 (version "1.0.7")
18352 (source
18353 (origin
18354 (method url-fetch)
18355 (uri (pypi-uri "latexcodec" version))
18356 (sha256
18357 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18358 (build-system python-build-system)
18359 (inputs
18360 `(("python-six" ,python-six)))
18361 (home-page "https://readthedocs.org/projects/latexcodec/")
18362 (synopsis "Work with LaTeX code in Python")
18363 (description "Lexer and codec to work with LaTeX code in Python.")
18364 (license license:expat)))
18365
18366 (define-public python-pybtex
18367 (package
18368 (name "python-pybtex")
18369 (version "0.22.2")
18370 (source
18371 (origin
18372 (method url-fetch)
18373 (uri (pypi-uri "pybtex" version))
18374 (sha256
18375 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18376 (build-system python-build-system)
18377 (native-inputs
18378 `(("python-nose" ,python-nose)))
18379 (inputs
18380 `(("python-latexcodec" ,python-latexcodec)
18381 ("python-pyyaml" ,python-pyyaml)
18382 ("python-six" ,python-six)))
18383 (arguments
18384 `(#:test-target "nosetests"))
18385 (home-page "https://pybtex.org/")
18386 (synopsis "BibTeX-compatible bibliography processor")
18387 (description "Pybtex is a BibTeX-compatible bibliography processor written
18388 in Python. You can simply type pybtex instead of bibtex.")
18389 (license license:expat)))
18390
18391 (define-public python-onetimepass
18392 (package
18393 (name "python-onetimepass")
18394 (version "1.0.1")
18395 (source
18396 (origin
18397 (method url-fetch)
18398 (uri (pypi-uri "onetimepass" version))
18399 (sha256
18400 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18401 (build-system python-build-system)
18402 (propagated-inputs `(("python-six" ,python-six)))
18403 (home-page "https://github.com/tadeck/onetimepass/")
18404 (synopsis "One-time password library")
18405 (description "Python one-time password library for HMAC-based (HOTP) and
18406 time-based (TOTP) passwords.")
18407 (license license:expat)))
18408
18409 (define-public python-parso
18410 (package
18411 (name "python-parso")
18412 (version "0.7.1")
18413 (source
18414 (origin
18415 (method url-fetch)
18416 (uri (pypi-uri "parso" version))
18417 (sha256
18418 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18419 (native-inputs
18420 `(("python-pytest" ,python-pytest)))
18421 (build-system python-build-system)
18422 (arguments
18423 `(#:phases (modify-phases %standard-phases
18424 (replace 'check
18425 (lambda _ (invoke "pytest" "-vv"))))))
18426 (home-page "https://github.com/davidhalter/parso")
18427 (synopsis "Python Parser")
18428 (description "Parso is a Python parser that supports error recovery and
18429 round-trip parsing for different Python versions (in multiple Python versions).
18430 Parso is also able to list multiple syntax errors in your Python file.")
18431 (license license:expat)))
18432
18433 (define-public python2-parso
18434 (package-with-python2 python-parso))
18435
18436 (define-public python-async-generator
18437 (package
18438 (name "python-async-generator")
18439 (version "1.10")
18440 (source
18441 (origin
18442 (method url-fetch)
18443 (uri (pypi-uri "async_generator" version))
18444 (sha256
18445 (base32
18446 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18447 (build-system python-build-system)
18448 (native-inputs
18449 `(("python-pytest" ,python-pytest)))
18450 (home-page "https://github.com/python-trio/async_generator")
18451 (synopsis "Async generators and context managers for Python 3.5+")
18452 (description "@code{async_generator} back-ports Python 3.6's native async
18453 generators and Python 3.7's context managers into Python 3.5.")
18454 ;; Dual licensed.
18455 (license (list license:expat license:asl2.0))))
18456
18457 (define-public python-async-timeout
18458 (package
18459 (name "python-async-timeout")
18460 (version "3.0.1")
18461 (source
18462 (origin
18463 (method url-fetch)
18464 (uri (pypi-uri "async-timeout" version))
18465 (sha256
18466 (base32
18467 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18468 (build-system python-build-system)
18469 (home-page "https://github.com/aio-libs/async_timeout/")
18470 (synopsis "Timeout context manager for asyncio programs")
18471 (description "@code{async-timeout} provides a timeout timeout context
18472 manager compatible with @code{asyncio}.")
18473 (license license:asl2.0)))
18474
18475 (define-public python-glob2
18476 (package
18477 (name "python-glob2")
18478 (version "0.7")
18479 (source
18480 (origin
18481 (method git-fetch)
18482 (uri (git-reference
18483 (url "https://github.com/miracle2k/python-glob2")
18484 (commit (string-append "v" version))))
18485 (file-name (git-file-name name version))
18486 (sha256
18487 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18488 (build-system python-build-system)
18489 (home-page "https://github.com/miracle2k/python-glob2/")
18490 (synopsis "Extended Version of the python buildin glob module")
18491 (description "This is an extended version of the Python
18492 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18493 adds:
18494
18495 @itemize
18496 @item The ability to capture the text matched by glob patterns, and return
18497 those matches alongside the file names.
18498 @item A recursive @code{**} globbing syntax, akin for example to the
18499 @code{globstar} option of Bash.
18500 @item The ability to replace the file system functions used, in order to glob
18501 on virtual file systems.
18502 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18503 @end itemize
18504
18505 Glob2 currently based on the glob code from Python 3.3.1.")
18506 (license license:bsd-2)))
18507
18508 (define-public python2-glob2
18509 (package-with-python2 python-glob2))
18510
18511 (define-public python-gipc
18512 (package
18513 (name "python-gipc")
18514 (version "0.6.0")
18515 (source
18516 (origin
18517 (method url-fetch)
18518 (uri (pypi-uri "gipc" version ".zip"))
18519 (sha256
18520 (base32
18521 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18522 (build-system python-build-system)
18523 (native-inputs
18524 `(("unzip" ,unzip)))
18525 (propagated-inputs
18526 `(("python-gevent" ,python-gevent)))
18527 (home-page "https://gehrcke.de/gipc/")
18528 (synopsis "Child process management in the context of gevent")
18529 (description "Usage of Python's multiprocessing package in a
18530 gevent-powered application may raise problems. With @code{gipc},
18531 process-based child processes can safely be created anywhere within a
18532 gevent-powered application.")
18533 (license license:expat)))
18534
18535 (define-public python-beautifultable
18536 (package
18537 (name "python-beautifultable")
18538 (version "1.0.0")
18539 (source
18540 (origin
18541 (method url-fetch)
18542 (uri (pypi-uri "beautifultable" version))
18543 (sha256
18544 (base32
18545 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18546 (build-system python-build-system)
18547 (propagated-inputs
18548 `(("python-wcwidth" ,python-wcwidth)))
18549 (arguments
18550 `(#:phases
18551 (modify-phases %standard-phases
18552 (add-after 'unpack 'patch-setup.py
18553 (lambda _
18554 (substitute* "setup.py"
18555 (("setup\\(")
18556 "setup(\n test_suite=\"test\",")))))))
18557 (home-page "https://github.com/pri22296/beautifultable")
18558 (synopsis "Print ASCII tables for terminals")
18559 (description "@code{python-beautifultable} provides a class for easily
18560 printing tabular data in a visually appealing ASCII format to a terminal.
18561
18562 Features include, but are not limited to:
18563 @itemize
18564 @item Full customization of the look and feel of the table
18565 @item Row and column accessors.
18566 @item Full support for colors using ANSI sequences or any library.
18567 @item Plenty of predefined styles and option to create custom ones.
18568 @item Support for Unicode characters.
18569 @item Supports streaming table when data is slow to retrieve.
18570 @end itemize")
18571 (license license:expat)))
18572
18573 (define-public python-globber
18574 (package
18575 (name "python-globber")
18576 (version "0.2.1")
18577 (source
18578 (origin
18579 (method git-fetch)
18580 (uri (git-reference
18581 (url "https://github.com/asharov/globber")
18582 (commit version)))
18583 (file-name (git-file-name name version))
18584 (sha256
18585 (base32
18586 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18587 (build-system python-build-system)
18588 (home-page "https://github.com/asharov/globber")
18589 (synopsis "Library for string matching with glob patterns")
18590 (description
18591 "Globber is a Python library for matching file names against glob patterns.
18592 In contrast to other glob-matching libraries, it matches arbitrary strings and
18593 doesn't require the matched names to be existing files. In addition, it
18594 supports the globstar @code{**} operator to match an arbitrary number of
18595 path components.")
18596 (license license:asl2.0)))
18597
18598 (define-public python-git-hammer
18599 (package
18600 (name "python-git-hammer")
18601 (version "0.3.1")
18602 (source
18603 (origin
18604 (method git-fetch)
18605 (uri (git-reference
18606 (url "https://github.com/asharov/git-hammer")
18607 (commit version)))
18608 (file-name (git-file-name name version))
18609 (sha256
18610 (base32
18611 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18612 (build-system python-build-system)
18613 (arguments
18614 `(#:phases
18615 (modify-phases %standard-phases
18616 (add-after 'unpack 'patch-setup.py
18617 (lambda _
18618 (substitute* "setup.py"
18619 (("setup\\(")
18620 "setup(\n test_suite=\"test\",")))))))
18621 (propagated-inputs
18622 `(("python-beautifultable" ,python-beautifultable)
18623 ("python-dateutil" ,python-dateutil)
18624 ("python-gitpython" ,python-gitpython)
18625 ("python-globber" ,python-globber)
18626 ("python-matplotlib" ,python-matplotlib)
18627 ("python-sqlalchemy" ,python-sqlalchemy)
18628 ("python-sqlalchemy-utils"
18629 ,python-sqlalchemy-utils)))
18630 (home-page "https://github.com/asharov/git-hammer")
18631 (synopsis "Provide statistics for git repositories")
18632 (description
18633 "Git Hammer is a statistics tool for projects in git repositories.
18634 Its major feature is tracking the number of lines authored by each person for every
18635 commit, but it also includes some other useful statistics.")
18636 (license license:asl2.0)))
18637
18638 (define-public python-fusepy
18639 (package
18640 (name "python-fusepy")
18641 (version "2.0.4")
18642 (source
18643 (origin
18644 (method url-fetch)
18645 (uri (pypi-uri "fusepy" version))
18646 (sha256
18647 (base32
18648 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18649 (build-system python-build-system)
18650 (arguments
18651 `(#:phases
18652 (modify-phases %standard-phases
18653 (add-before 'build 'set-library-file-name
18654 (lambda* (#:key inputs #:allow-other-keys)
18655 (let ((fuse (assoc-ref inputs "fuse")))
18656 (substitute* "fuse.py"
18657 (("find_library\\('fuse'\\)")
18658 (string-append "'" fuse "/lib/libfuse.so'")))
18659 #t))))))
18660 (propagated-inputs
18661 `(("fuse" ,fuse)))
18662 (home-page "https://github.com/fusepy/fusepy")
18663 (synopsis "Simple ctypes bindings for FUSE")
18664 (description "Python module that provides a simple interface to FUSE and
18665 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18666 (license license:isc)))
18667
18668 (define-public python2-fusepy
18669 (package-with-python2 python-fusepy))
18670
18671 (define-public python-fusepyng
18672 (package
18673 (name "python-fusepyng")
18674 (version "1.0.7")
18675 (source
18676 (origin
18677 (method url-fetch)
18678 (uri (pypi-uri "fusepyng" version))
18679 (sha256
18680 (base32
18681 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18682 (build-system python-build-system)
18683 (arguments
18684 '(#:phases
18685 (modify-phases %standard-phases
18686 (add-after 'unpack 'set-libfuse-path
18687 (lambda* (#:key inputs #:allow-other-keys)
18688 (let ((fuse (assoc-ref inputs "fuse")))
18689 (substitute* "fusepyng.py"
18690 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18691 (string-append "\"" fuse "/lib/libfuse.so\""))))
18692 #t)))))
18693 (inputs
18694 `(("fuse" ,fuse)))
18695 (propagated-inputs
18696 `(("python-paramiko" ,python-paramiko)))
18697 (home-page "https://github.com/rianhunter/fusepyng")
18698 (synopsis "Simple ctypes bindings for FUSE")
18699 (description "@code{fusepyng} is a Python module that provides a simple
18700 interface to FUSE on various operating systems. It's just one file and is
18701 implemented using @code{ctypes}.")
18702 (license license:isc)))
18703
18704 (define-public python-userspacefs
18705 (package
18706 (name "python-userspacefs")
18707 (version "1.0.13")
18708 (source
18709 (origin
18710 (method url-fetch)
18711 (uri (pypi-uri "userspacefs" version))
18712 (sha256
18713 (base32
18714 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18715 (build-system python-build-system)
18716 (propagated-inputs
18717 `(("python-fusepyng" ,python-fusepyng)))
18718 (home-page "https://github.com/rianhunter/userspacefs")
18719 (synopsis "User-space file systems for Python")
18720 (description
18721 "@code{userspacefs} is a library that allows you to easily write
18722 user-space file systems in Python.")
18723 (license license:gpl3+)))
18724
18725 (define-public pybind11
18726 (package
18727 (name "pybind11")
18728 (version "2.4.3")
18729 (source (origin
18730 (method git-fetch)
18731 (uri (git-reference
18732 (url "https://github.com/pybind/pybind11")
18733 (commit (string-append "v" version))))
18734 (sha256
18735 (base32
18736 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18737 (file-name (git-file-name name version))))
18738 (build-system cmake-build-system)
18739 (native-inputs
18740 `(("python" ,python-wrapper)
18741
18742 ;; The following dependencies are used for tests.
18743 ("python-pytest" ,python-pytest)
18744 ("catch" ,catch-framework2-1)
18745 ("eigen" ,eigen)))
18746 (arguments
18747 `(#:configure-flags
18748 (list (string-append "-DCATCH_INCLUDE_DIR="
18749 (assoc-ref %build-inputs "catch")
18750 "/include/catch"))
18751
18752 #:phases (modify-phases %standard-phases
18753 (add-after 'install 'install-python
18754 (lambda* (#:key outputs #:allow-other-keys)
18755 (let ((out (assoc-ref outputs "out")))
18756 (with-directory-excursion "../source"
18757 (setenv "PYBIND11_USE_CMAKE" "yes")
18758 (invoke "python" "setup.py" "install"
18759 "--single-version-externally-managed"
18760 "--root=/"
18761 (string-append "--prefix=" out)))))))
18762
18763 #:test-target "check"))
18764 (home-page "https://github.com/pybind/pybind11/")
18765 (synopsis "Seamless operability between C++11 and Python")
18766 (description
18767 "@code{pybind11} is a lightweight header-only library that exposes C++
18768 types in Python and vice versa, mainly to create Python bindings of existing
18769 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18770 library: to minimize boilerplate code in traditional extension modules by
18771 inferring type information using compile-time introspection.")
18772 (license license:bsd-3)))
18773
18774 (define-public python-fasteners
18775 (package
18776 (name "python-fasteners")
18777 (version "0.15")
18778 (source
18779 (origin
18780 (method url-fetch)
18781 (uri (pypi-uri "fasteners" version))
18782 (sha256
18783 (base32
18784 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18785 (build-system python-build-system)
18786 (propagated-inputs
18787 `(("python-monotonic" ,python-monotonic)
18788 ("python-six" ,python-six)))
18789 (native-inputs
18790 `(("python-testtools" ,python-testtools)))
18791 (home-page "https://github.com/harlowja/fasteners")
18792 (synopsis "Python package that provides useful locks")
18793 (description
18794 "This package provides a Python program that provides following locks:
18795
18796 @itemize
18797 @item Locking decorator
18798 @item Reader-writer locks
18799 @item Inter-process locks
18800 @item Generic helpers
18801 @end itemize\n")
18802 (properties `((python2-variant . ,(delay python2-fasteners))))
18803 (license license:asl2.0)))
18804
18805 (define-public python2-fasteners
18806 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18807 (package
18808 (inherit base)
18809 (propagated-inputs
18810 `(("python2-futures" ,python2-futures)
18811 ,@(package-propagated-inputs base))))))
18812
18813 (define-public python-requests-file
18814 (package
18815 (name "python-requests-file")
18816 (version "1.4.3")
18817 (source
18818 (origin
18819 (method url-fetch)
18820 (uri (pypi-uri "requests-file" version))
18821 (sha256
18822 (base32
18823 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18824 (build-system python-build-system)
18825 (propagated-inputs
18826 `(("python-requests" ,python-requests)
18827 ("python-six" ,python-six)))
18828 (home-page
18829 "https://github.com/dashea/requests-file")
18830 (synopsis "File transport adapter for Requests")
18831 (description
18832 "Requests-File is a transport adapter for use with the Requests Python
18833 library to allow local file system access via @code{file://} URLs.")
18834 (license license:asl2.0)))
18835
18836 (define-public python2-requests-file
18837 (package-with-python2 python-requests-file))
18838
18839 (define-public python-identify
18840 (package
18841 (name "python-identify")
18842 (version "1.4.25")
18843 (source
18844 (origin
18845 ;; There are no tests in the PyPI tarball.
18846 (method git-fetch)
18847 (uri (git-reference
18848 (url "https://github.com/chriskuehl/identify")
18849 (commit (string-append "v" version))))
18850 (file-name (git-file-name name version))
18851 (sha256
18852 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18853 (build-system python-build-system)
18854 (arguments
18855 `(#:phases
18856 (modify-phases %standard-phases
18857 (replace 'check
18858 (lambda _
18859 (invoke "pytest" "-vv"))))))
18860 (native-inputs
18861 `(("python-coverage" ,python-coverage)
18862 ("python-pytest" ,python-pytest)))
18863 (propagated-inputs
18864 `(("python-editdistance" ,python-editdistance)))
18865 (home-page "https://github.com/chriskuehl/identify")
18866 (synopsis "File identification library for Python")
18867 (description
18868 "@code{identify} is a file identification library for Python. Given
18869 a file (or some information about a file), return a set of standardized tags
18870 identifying what the file is.")
18871 (license license:expat)))
18872
18873 (define-public python-tldextract
18874 (package
18875 (name "python-tldextract")
18876 (version "2.2.0")
18877 (source
18878 (origin
18879 (method url-fetch)
18880 (uri (pypi-uri "tldextract" version))
18881 (sha256
18882 (base32
18883 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18884 (build-system python-build-system)
18885 (native-inputs
18886 `(("python-pytest" ,python-pytest)
18887 ("python-responses" ,python-responses)))
18888 (propagated-inputs
18889 `(("python-idna" ,python-idna)
18890 ("python-requests" ,python-requests)
18891 ("python-requests-file" ,python-requests-file)))
18892 (home-page
18893 "https://github.com/john-kurkowski/tldextract")
18894 (synopsis
18895 "Separate the TLD from the registered domain and subdomains of a URL")
18896 (description
18897 "TLDExtract accurately separates the TLD from the registered domain and
18898 subdomains of a URL, using the Public Suffix List. By default, this includes
18899 the public ICANN TLDs and their exceptions. It can optionally support the
18900 Public Suffix List's private domains as well.")
18901 (license license:bsd-3)))
18902
18903 (define-public python2-tldextract
18904 (package-with-python2 python-tldextract))
18905
18906 (define-public python-nodeenv
18907 (package
18908 (name "python-nodeenv")
18909 (version "1.4.0")
18910 (source
18911 (origin
18912 ;; There's no tarball in PyPI.
18913 (method git-fetch)
18914 (uri (git-reference
18915 (url "https://github.com/ekalinin/nodeenv")
18916 (commit version)))
18917 (file-name (git-file-name name version))
18918 (sha256
18919 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18920 (build-system python-build-system)
18921 (arguments
18922 `(#:phases
18923 (modify-phases %standard-phases
18924 (replace 'check
18925 (lambda _
18926 ;; This test fails. It tries to open a network socket.
18927 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18928 (native-inputs
18929 `(("python-coverage" ,python-coverage)
18930 ("python-mock" ,python-mock)
18931 ("python-pytest" ,python-pytest)))
18932 (home-page "https://ekalinin.github.io/nodeenv/")
18933 (synopsis "Create isolated node.js environments")
18934 (description
18935 "Nodeenv (node.js virtual environment) is a tool to create isolated
18936 node.js environments. It creates an environment that has its own installation
18937 directories, that doesn't share libraries with other node.js virtual
18938 environments.")
18939 (license license:bsd-3)))
18940
18941 (define-public python-pynamecheap
18942 (package
18943 (name "python-pynamecheap")
18944 (version "0.0.3")
18945 (source
18946 (origin
18947 (method url-fetch)
18948 (uri (pypi-uri "PyNamecheap" version))
18949 (sha256
18950 (base32
18951 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18952 (build-system python-build-system)
18953 (propagated-inputs
18954 `(("python-requests" ,python-requests)))
18955 (home-page
18956 "https://github.com/Bemmu/PyNamecheap")
18957 (synopsis
18958 "Namecheap API client in Python")
18959 (description
18960 "PyNamecheap is a Namecheap API client in Python.")
18961 (license license:expat)))
18962
18963 (define-public python2-pynamecheap
18964 (package-with-python2 python-pynamecheap))
18965
18966 (define-public python-dns-lexicon
18967 (package
18968 (name "python-dns-lexicon")
18969 (version "2.4.0")
18970 (source
18971 (origin
18972 (method url-fetch)
18973 (uri (pypi-uri "dns-lexicon" version))
18974 (sha256
18975 (base32
18976 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18977 (build-system python-build-system)
18978 (arguments
18979 `(#:tests? #f)) ;requires internet access
18980 (propagated-inputs
18981 `(("python-future" ,python-future)
18982 ("python-pynamecheap" ,python-pynamecheap)
18983 ("python-requests" ,python-requests)
18984 ("python-tldextract" ,python-tldextract)
18985 ("python-urllib3" ,python-urllib3)))
18986 (home-page "https://github.com/AnalogJ/lexicon")
18987 (synopsis
18988 "Manipulate DNS records on various DNS providers")
18989 (description
18990 "Lexicon provides a way to manipulate DNS records on multiple DNS
18991 providers in a standardized way. It has a CLI but it can also be used as a
18992 Python library. It was designed to be used in automation, specifically with
18993 Let's Encrypt.")
18994 (license license:expat)))
18995
18996 (define-public python2-dns-lexicon
18997 (package-with-python2 python-dns-lexicon))
18998
18999 (define-public python-cfgv
19000 (package
19001 (name "python-cfgv")
19002 (version "3.1.0")
19003 (source
19004 (origin
19005 ;; There are no tests in the PyPI tarball.
19006 (method git-fetch)
19007 (uri (git-reference
19008 (url "https://github.com/asottile/cfgv")
19009 (commit (string-append "v" version))))
19010 (file-name (git-file-name name version))
19011 (sha256
19012 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19013 (build-system python-build-system)
19014 (arguments
19015 `(#:phases
19016 (modify-phases %standard-phases
19017 (replace 'check
19018 (lambda _
19019 (invoke "pytest" "-vv"))))))
19020 (native-inputs
19021 `(("python-covdefaults" ,python-covdefaults)
19022 ("python-coverage" ,python-coverage)
19023 ("python-pytest" ,python-pytest)))
19024 (home-page "https://github.com/asottile/cfgv")
19025 (synopsis "Configuration validation library")
19026 (description
19027 "This library helps to validate configuration files and produce human
19028 readable error messages.")
19029 (license license:expat)))
19030
19031 (define-public python-commandlines
19032 (package
19033 (name "python-commandlines")
19034 (version "0.4.1")
19035 (source
19036 (origin
19037 (method url-fetch)
19038 (uri (pypi-uri "commandlines" version))
19039 (sha256
19040 (base32
19041 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19042 (build-system python-build-system)
19043 (home-page "https://github.com/chrissimpkins/commandlines")
19044 (synopsis "Command line argument to object parsing library")
19045 (description
19046 "@code{Commandlines} is a Python library for command line application
19047 development that supports command line argument parsing, command string
19048 validation testing and application logic.")
19049 (license license:expat)))
19050
19051 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19052 ;; python-numba. They have a very unflexible relationship.
19053 (define-public python-numba
19054 (package
19055 (name "python-numba")
19056 (version "0.51.2")
19057 (source
19058 (origin
19059 (method url-fetch)
19060 (uri (pypi-uri "numba" version))
19061 (sha256
19062 (base32
19063 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19064 (build-system python-build-system)
19065 (arguments
19066 `(#:phases
19067 (modify-phases %standard-phases
19068 (add-after 'unpack 'disable-proprietary-features
19069 (lambda _
19070 (setenv "NUMBA_DISABLE_HSA" "1")
19071 (setenv "NUMBA_DISABLE_CUDA" "1")
19072 #t))
19073 (replace 'check
19074 (lambda* (#:key inputs outputs #:allow-other-keys)
19075 (add-installed-pythonpath inputs outputs)
19076 ;; Something is wrong with the PYTHONPATH when running the
19077 ;; tests from the build directory, as it complains about not being
19078 ;; able to import certain modules.
19079 (with-directory-excursion "/tmp"
19080 (setenv "HOME" (getcwd))
19081 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19082 (propagated-inputs
19083 `(("python-llvmlite" ,python-llvmlite)
19084 ("python-numpy" ,python-numpy)
19085 ("python-singledispatch" ,python-singledispatch)))
19086 (native-inputs ;for tests
19087 `(("python-jinja2" ,python-jinja2)
19088 ("python-pygments" ,python-pygments)))
19089 (home-page "https://numba.pydata.org")
19090 (synopsis "Compile Python code using LLVM")
19091 (description "Numba gives you the power to speed up your applications with
19092 high performance functions written directly in Python. With a few
19093 annotations, array-oriented and math-heavy Python code can be just-in-time
19094 compiled to native machine instructions, similar in performance to C, C++ and
19095 Fortran, without having to switch languages or Python interpreters.
19096
19097 Numba works by generating optimized machine code using the LLVM compiler
19098 infrastructure at import time, runtime, or statically (using the included pycc
19099 tool).")
19100 (license license:bsd-3)))
19101
19102 (define-public python-numcodecs
19103 (package
19104 (name "python-numcodecs")
19105 (version "0.6.4")
19106 (source
19107 (origin
19108 (method url-fetch)
19109 (uri (pypi-uri "numcodecs" version))
19110 (sha256
19111 (base32
19112 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19113 (build-system python-build-system)
19114 (propagated-inputs
19115 `(("python-numpy" ,python-numpy)
19116 ("python-msgpack" ,python-msgpack)))
19117 (native-inputs
19118 `(("python-pytest" ,python-pytest)
19119 ("python-setuptools-scm" ,python-setuptools-scm)))
19120 (home-page "https://github.com/zarr-developers/numcodecs")
19121 (synopsis "Buffer compression and transformation codecs")
19122 (description
19123 "This Python package provides buffer compression and transformation
19124 codecs for use in data storage and communication applications.")
19125 (license license:expat)))
19126
19127 (define-public python-asciitree
19128 (package
19129 (name "python-asciitree")
19130 (version "0.3.3")
19131 (source
19132 (origin
19133 (method url-fetch)
19134 (uri (pypi-uri "asciitree" version))
19135 (sha256
19136 (base32
19137 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19138 (build-system python-build-system)
19139 (home-page "https://github.com/mbr/asciitree")
19140 (synopsis "Draws ASCII trees")
19141 (description "This package draws tree structures using characters.")
19142 (license license:expat)))
19143
19144 (define-public python-zarr
19145 (package
19146 (name "python-zarr")
19147 (version "2.4.0")
19148 (source
19149 (origin
19150 (method url-fetch)
19151 (uri (pypi-uri "zarr" version))
19152 (sha256
19153 (base32
19154 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19155 (build-system python-build-system)
19156 (arguments
19157 `(#:phases
19158 (modify-phases %standard-phases
19159 (add-after 'unpack 'disable-service-tests
19160 (lambda _
19161 (setenv "ZARR_TEST_ABS" "0")
19162 (setenv "ZARR_TEST_MONGO" "0")
19163 (setenv "ZARR_TEST_REDIS" "0")
19164 #t))
19165 (replace 'check
19166 (lambda _
19167 (invoke "pytest" "-vv" "-k" "not lmdb")
19168 #t)))))
19169 (propagated-inputs
19170 `(("python-asciitree" ,python-asciitree)
19171 ("python-fasteners" ,python-fasteners)
19172 ("python-numcodecs" ,python-numcodecs)
19173 ("python-numpy" ,python-numpy)))
19174 (native-inputs
19175 `(("python-pytest" ,python-pytest)
19176 ("python-setuptools-scm" ,python-setuptools-scm)))
19177 (home-page "https://github.com/zarr-developers/zarr-python")
19178 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19179 (description
19180 "This package provides an implementation of chunked, compressed,
19181 N-dimensional arrays for Python.")
19182 (license license:expat)))
19183
19184 (define-public python-anndata
19185 (package
19186 (name "python-anndata")
19187 (version "0.7.1")
19188 (source
19189 (origin
19190 (method url-fetch)
19191 (uri (pypi-uri "anndata" version))
19192 (sha256
19193 (base32
19194 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19195 (build-system python-build-system)
19196 (arguments
19197 `(#:phases
19198 (modify-phases %standard-phases
19199 (add-after 'unpack 'delete-inconvenient-tests
19200 (lambda _
19201 ;; This test depends on python-scikit-learn.
19202 (delete-file "anndata/tests/test_inplace_subset.py")
19203 #t))
19204 (delete 'check)
19205 (add-after 'install 'check
19206 (lambda* (#:key inputs outputs #:allow-other-keys)
19207 (add-installed-pythonpath inputs outputs)
19208 (invoke "pytest" "-vv"))))))
19209 (propagated-inputs
19210 `(("python-h5py" ,python-h5py)
19211 ("python-importlib-metadata" ,python-importlib-metadata)
19212 ("python-natsort" ,python-natsort)
19213 ("python-numcodecs" ,python-numcodecs)
19214 ("python-packaging" ,python-packaging)
19215 ("python-pandas" ,python-pandas)
19216 ("python-scipy" ,python-scipy)
19217 ("python-zarr" ,python-zarr)))
19218 (native-inputs
19219 `(("python-joblib" ,python-joblib)
19220 ("python-pytest" ,python-pytest)
19221 ("python-setuptools-scm" ,python-setuptools-scm)))
19222 (home-page "https://github.com/theislab/anndata")
19223 (synopsis "Annotated data for data analysis pipelines")
19224 (description "Anndata is a package for simple (functional) high-level APIs
19225 for data analysis pipelines. In this context, it provides an efficient,
19226 scalable way of keeping track of data together with learned annotations and
19227 reduces the code overhead typically encountered when using a mostly
19228 object-oriented library such as @code{scikit-learn}.")
19229 (license license:bsd-3)))
19230
19231 (define-public python-dill
19232 (package
19233 (name "python-dill")
19234 (version "0.3.1.1")
19235 (source
19236 (origin
19237 (method url-fetch)
19238 (uri (pypi-uri "dill" version))
19239 (sha256
19240 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19241 (build-system python-build-system)
19242 (arguments
19243 `(#:phases
19244 (modify-phases %standard-phases
19245 (replace 'check
19246 (lambda _
19247 (with-directory-excursion "/tmp"
19248 (invoke "nosetests" "-v"))
19249 #t)))))
19250 (native-inputs
19251 `(("python-nose" ,python-nose)))
19252 (home-page "https://pypi.org/project/dill/")
19253 (synopsis "Serialize all of Python")
19254 (description "Dill extends Python's @code{pickle} module for serializing
19255 and de-serializing Python objects to the majority of the built-in Python
19256 types. Dill provides the user the same interface as the @code{pickle} module,
19257 and also includes some additional features. In addition to pickling Python
19258 objects, @code{dill} provides the ability to save the state of an interpreter
19259 session in a single command. Hence, it would be feasible to save a
19260 interpreter session, close the interpreter, ship the pickled file to another
19261 computer, open a new interpreter, unpickle the session and thus continue from
19262 the saved state of the original interpreter session.")
19263 (license license:bsd-3)))
19264
19265 (define-public python-multiprocess
19266 (package
19267 (name "python-multiprocess")
19268 (version "0.70.9")
19269 (source
19270 (origin
19271 (method url-fetch)
19272 (uri (pypi-uri "multiprocess" version))
19273 (sha256
19274 (base32
19275 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19276 (build-system python-build-system)
19277 (arguments
19278 `(#:phases
19279 (modify-phases %standard-phases
19280 (add-after 'unpack 'disable-broken-tests
19281 (lambda _
19282 ;; This test is broken as there is no keyboard interrupt.
19283 (substitute* "py3.7/multiprocess/tests/__init__.py"
19284 (("^(.*)def test_wait_result"
19285 line indent)
19286 (string-append indent
19287 "@unittest.skip(\"Disabled by Guix\")\n"
19288 line)))
19289 #t))
19290 ;; Tests must be run after installation.
19291 (delete 'check)
19292 (add-after 'install 'check
19293 (lambda* (#:key inputs outputs #:allow-other-keys)
19294 (add-installed-pythonpath inputs outputs)
19295 (invoke "python" "-m" "multiprocess.tests")
19296 #t)))))
19297 (propagated-inputs
19298 `(("python-dill" ,python-dill)))
19299 (home-page "https://pypi.org/project/multiprocess/")
19300 (synopsis "Multiprocessing and multithreading in Python")
19301 (description
19302 "This package is a fork of the multiprocessing Python package, a package
19303 which supports the spawning of processes using the API of the standard
19304 library's @code{threading} module.")
19305 (license license:bsd-3)))
19306
19307 (define-public python-toolz
19308 (package
19309 (name "python-toolz")
19310 (version "0.9.0")
19311 (source
19312 (origin
19313 (method url-fetch)
19314 (uri (pypi-uri "toolz" version))
19315 (sha256
19316 (base32
19317 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19318 (build-system python-build-system)
19319 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19320 ;; unregistered loader type"
19321 (arguments '(#:tests? #f))
19322 (home-page "https://github.com/pytoolz/toolz/")
19323 (synopsis "List processing tools and functional utilities")
19324 (description
19325 "This package provides a set of utility functions for iterators,
19326 functions, and dictionaries.")
19327 (license license:bsd-3)))
19328
19329 (define-public python2-toolz
19330 (package-with-python2 python-toolz))
19331
19332 (define-public python-cytoolz
19333 (package
19334 (name "python-cytoolz")
19335 (version "0.9.0.1")
19336 (source
19337 (origin
19338 (method url-fetch)
19339 (uri (pypi-uri "cytoolz" version))
19340 (sha256
19341 (base32
19342 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19343 (build-system python-build-system)
19344 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19345 ;; 'exceptions'"
19346 (arguments '(#:tests? #f))
19347 (propagated-inputs
19348 `(("python-toolz" ,python-toolz)))
19349 (native-inputs
19350 `(("python-cython" ,python-cython)))
19351 (home-page "https://github.com/pytoolz/cytoolz")
19352 (synopsis "High performance functional utilities")
19353 (description
19354 "The cytoolz package implements the same API as provided by toolz. The
19355 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19356 that is accessible to other projects developed in Cython.")
19357 (license license:bsd-3)))
19358
19359 (define-public python-sortedcontainers
19360 (package
19361 (name "python-sortedcontainers")
19362 (version "2.1.0")
19363 (source
19364 (origin
19365 (method url-fetch)
19366 (uri (pypi-uri "sortedcontainers" version))
19367 (sha256
19368 (base32
19369 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19370 (build-system python-build-system)
19371 (arguments
19372 ;; FIXME: Tests require many extra dependencies, and would introduce
19373 ;; a circular dependency on hypothesis, which uses this package.
19374 '(#:tests? #f))
19375 (propagated-inputs
19376 `(("python-appdirs" ,python-appdirs)
19377 ("python-distlib" ,python-distlib)
19378 ("python-filelock" ,python-filelock)
19379 ("python-six" ,python-six-bootstrap)))
19380 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19381 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19382 (description
19383 "This package provides a sorted collections library, written in
19384 pure-Python.")
19385 (license license:asl2.0)))
19386
19387 (define-public python2-sortedcontainers
19388 (package-with-python2 python-sortedcontainers))
19389
19390 (define-public python-cloudpickle
19391 (package
19392 (name "python-cloudpickle")
19393 (version "1.3.0")
19394 (source
19395 (origin
19396 (method url-fetch)
19397 (uri (pypi-uri "cloudpickle" version))
19398 (sha256
19399 (base32
19400 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19401 (build-system python-build-system)
19402 (arguments
19403 '(#:phases (modify-phases %standard-phases
19404 (add-before 'check 'do-not-override-PYTHONPATH
19405 (lambda _
19406 ;; Append to PYTHONPATH instead of overriding it so
19407 ;; that dependencies from Guix can be found.
19408 (substitute* "tests/testutils.py"
19409 (("env\\['PYTHONPATH'\\] = pythonpath")
19410 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19411 #t))
19412 (replace 'check
19413 (lambda* (#:key tests? #:allow-other-keys)
19414 (if tests?
19415 (invoke "pytest" "-s" "-vv")
19416 (format #t "test suite not run~%"))
19417 #t)))))
19418 (native-inputs
19419 `(;; For tests.
19420 ("python-psutil" ,python-psutil)
19421 ("python-pytest" ,python-pytest)
19422 ("python-tornado" ,python-tornado)))
19423 (home-page "https://github.com/cloudpipe/cloudpickle")
19424 (synopsis "Extended pickling support for Python objects")
19425 (description
19426 "Cloudpickle makes it possible to serialize Python constructs not
19427 supported by the default pickle module from the Python standard library. It
19428 is especially useful for cluster computing where Python expressions are
19429 shipped over the network to execute on remote hosts, possibly close to the
19430 data.")
19431 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19432 (license license:bsd-3)))
19433
19434 (define-public python2-cloudpickle
19435 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19436 (package
19437 (inherit base)
19438 (native-inputs
19439 `(("python-mock" ,python2-mock)
19440 ,@(package-native-inputs base)))
19441 (propagated-inputs
19442 `(("python-futures" ,python2-futures)
19443 ,@(package-propagated-inputs base))))))
19444
19445 (define-public python-locket
19446 (package
19447 (name "python-locket")
19448 (version "0.2.0")
19449 (source
19450 (origin
19451 (method url-fetch)
19452 (uri (pypi-uri "locket" version))
19453 (sha256
19454 (base32
19455 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19456 (build-system python-build-system)
19457 (home-page "https://github.com/mwilliamson/locket.py")
19458 (synopsis "File-based locks for Python")
19459 (description
19460 "Locket implements a lock that can be used by multiple processes provided
19461 they use the same path.")
19462 (license license:bsd-2)))
19463
19464 (define-public python2-locket
19465 (package-with-python2 python-locket))
19466
19467 (define-public python-blosc
19468 (package
19469 (name "python-blosc")
19470 (version "1.5.1")
19471 (source
19472 (origin
19473 (method url-fetch)
19474 (uri (pypi-uri "blosc" version))
19475 (sha256
19476 (base32
19477 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19478 (build-system python-build-system)
19479 ;; FIXME: all tests pass, but then this error is printed:
19480 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19481 (arguments '(#:tests? #f))
19482 (propagated-inputs
19483 `(("python-numpy" ,python-numpy)))
19484 (home-page "https://github.com/blosc/python-blosc")
19485 (synopsis "Python wrapper for the Blosc data compressor library")
19486 (description "Blosc is a high performance compressor optimized for binary
19487 data. It has been designed to transmit data to the processor cache faster
19488 than the traditional, non-compressed, direct memory fetch approach via a
19489 @code{memcpy()} system call.
19490
19491 Blosc works well for compressing numerical arrays that contains data with
19492 relatively low entropy, like sparse data, time series, grids with
19493 regular-spaced values, etc.
19494
19495 This Python package wraps the Blosc library.")
19496 (license license:bsd-3)))
19497
19498 (define-public python2-blosc
19499 (package-with-python2 python-blosc))
19500
19501 (define-public python-partd
19502 (package
19503 (name "python-partd")
19504 (version "0.3.9")
19505 (source
19506 (origin
19507 (method url-fetch)
19508 (uri (pypi-uri "partd" version))
19509 (sha256
19510 (base32
19511 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19512 (build-system python-build-system)
19513 (propagated-inputs
19514 `(("python-blosc" ,python-blosc)
19515 ("python-locket" ,python-locket)
19516 ("python-numpy" ,python-numpy)
19517 ("python-pandas" ,python-pandas)
19518 ("python-pyzmq" ,python-pyzmq)
19519 ("python-toolz" ,python-toolz)))
19520 (home-page "https://github.com/dask/partd/")
19521 (synopsis "Appendable key-value storage")
19522 (description "Partd stores key-value pairs. Values are raw bytes. We
19523 append on old values. Partd excels at shuffling operations.")
19524 (license license:bsd-3)))
19525
19526 (define-public python2-partd
19527 (package-with-python2 python-partd))
19528
19529 (define-public python-fsspec
19530 (package
19531 (name "python-fsspec")
19532 (version "0.6.1")
19533 (source
19534 (origin
19535 (method url-fetch)
19536 (uri (pypi-uri "fsspec" version))
19537 (sha256
19538 (base32
19539 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19540 (build-system python-build-system)
19541 (arguments '(#:tests? #f)) ; there are none
19542 (home-page "https://github.com/intake/filesystem_spec")
19543 (synopsis "File-system specification")
19544 (description "The purpose of this package is to produce a template or
19545 specification for a file-system interface, that specific implementations
19546 should follow, so that applications making use of them can rely on a common
19547 behavior and not have to worry about the specific internal implementation
19548 decisions with any given backend.")
19549 (license license:bsd-3)))
19550
19551 (define-public python-dask
19552 (package
19553 (name "python-dask")
19554 (version "2.14.0")
19555 (source
19556 (origin
19557 (method url-fetch)
19558 (uri (pypi-uri "dask" version))
19559 (sha256
19560 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19561 (build-system python-build-system)
19562 (arguments
19563 `(#:phases
19564 (modify-phases %standard-phases
19565 (add-after 'unpack 'disable-broken-tests
19566 (lambda _
19567 ;; This test is marked as xfail when pytest-xdist is used.
19568 (substitute* "dask/tests/test_threaded.py"
19569 (("def test_interrupt\\(\\)" m)
19570 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19571 m)))
19572 ;; This one fails with a type error:
19573 ;; TypeError: Already tz-aware, use tz_convert to convert.
19574 (substitute* "dask/dataframe/tests/test_shuffle.py"
19575 (("def test_set_index_timestamp\\(\\)" m)
19576 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19577 m)))
19578 #t))
19579 (replace 'check
19580 (lambda _ (invoke "pytest" "-vv"))))))
19581 (propagated-inputs
19582 `(("python-cloudpickle" ,python-cloudpickle)
19583 ("python-fsspec" ,python-fsspec)
19584 ("python-numpy" ,python-numpy)
19585 ("python-packaging" ,python-packaging)
19586 ("python-pandas" ,python-pandas)
19587 ("python-partd" ,python-partd)
19588 ("python-toolz" ,python-toolz)
19589 ("python-pyyaml" ,python-pyyaml)))
19590 (native-inputs
19591 `(("python-pytest" ,python-pytest)
19592 ("python-pytest-runner" ,python-pytest-runner)))
19593 (home-page "https://github.com/dask/dask/")
19594 (synopsis "Parallel computing with task scheduling")
19595 (description
19596 "Dask is a flexible parallel computing library for analytics. It
19597 consists of two components: dynamic task scheduling optimized for computation,
19598 and large data collections like parallel arrays, dataframes, and lists that
19599 extend common interfaces like NumPy, Pandas, or Python iterators to
19600 larger-than-memory or distributed environments. These parallel collections
19601 run on top of the dynamic task schedulers. ")
19602 (license license:bsd-3)))
19603
19604 (define-public python-ilinkedlist
19605 (package
19606 (name "python-ilinkedlist")
19607 (version "0.4.0")
19608 (source
19609 (origin
19610 (method url-fetch)
19611 (uri (pypi-uri "ilinkedlist" version))
19612 (sha256
19613 (base32
19614 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19615 (build-system python-build-system)
19616 (native-inputs `(("python-pytest" ,python-pytest)))
19617 (inputs `(("python" ,python)))
19618 (home-page "https://github.com/luther9/ilinkedlist-py")
19619 (synopsis "Immutable linked list library")
19620 (description
19621 "This is a implementation of immutable linked lists for Python. It
19622 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19623 Since a linked list is treated as immutable, it is hashable, and its length
19624 can be retrieved in constant time. Some of the terminology is inspired by
19625 LISP. It is possible to create an improper list by creating a @code{Pair}
19626 with a non-list @code{cdr}.")
19627 (license license:gpl3+)))
19628
19629 (define-public python-readlike
19630 (package
19631 (name "python-readlike")
19632 (version "0.1.3")
19633 (source
19634 (origin
19635 (method url-fetch)
19636 (uri (pypi-uri "readlike" version))
19637 (sha256
19638 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19639 (build-system python-build-system)
19640 (home-page "https://github.com/jangler/readlike")
19641 (synopsis "GNU Readline-like line editing module")
19642 (description
19643 "This Python module provides line editing functions similar to the default
19644 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19645 @code{readline} package, this one allows access to those capabilities in settings
19646 outside of a standard command-line interface. It is especially well-suited to
19647 interfacing with Urwid, due to a shared syntax for describing key inputs.
19648
19649 Currently, all stateless Readline commands are implemented. Yanking and history
19650 are not supported.")
19651 (license license:expat)))
19652
19653 (define-public python2-readlike
19654 (package-with-python2 python-readlike))
19655
19656 (define-public python-reparser
19657 (package
19658 (name "python-reparser")
19659 (version "1.4.3")
19660 (source
19661 (origin
19662 (method url-fetch)
19663 (uri (pypi-uri "ReParser" version))
19664 (sha256
19665 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19666 (build-system python-build-system)
19667 (home-page "https://github.com/xmikos/reparser")
19668 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19669 (description
19670 "This Python library provides a simple lexer/parser for inline markup based
19671 on regular expressions.")
19672 (license license:expat)))
19673
19674 (define-public python2-reparser
19675 (let ((reparser (package-with-python2
19676 (strip-python2-variant python-reparser))))
19677 (package (inherit reparser)
19678 (propagated-inputs
19679 `(("python2-enum34" ,python2-enum34)
19680 ,@(package-propagated-inputs reparser))))))
19681
19682 (define-public python-retrying
19683 (package
19684 (name "python-retrying")
19685 (version "1.3.3")
19686 (source
19687 (origin
19688 (method git-fetch)
19689 (uri (git-reference
19690 (url "https://github.com/rholder/retrying")
19691 (commit (string-append "v" version))))
19692 (file-name (git-file-name name version))
19693 (sha256
19694 (base32
19695 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19696 (build-system python-build-system)
19697 (propagated-inputs
19698 `(("python-six" ,python-six)))
19699 (home-page "https://github.com/rholder/retrying")
19700 (synopsis "Library for adding retry behavior")
19701 (description "Retrying is a general-purpose retrying library to simplify
19702 the task of adding retry behavior to just about anything.
19703
19704 Features:
19705
19706 @itemize
19707 @item Generic Decorator API.
19708 @item Specify stop condition (i.e. limit by number of attempts).
19709 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19710 @item Customize retrying on Exceptions.
19711 @item Customize retrying on expected returned result.
19712 @end itemize")
19713 (license license:asl2.0)))
19714
19715 (define-public python-precis-i18n
19716 (package
19717 (name "python-precis-i18n")
19718 (version "1.0.0")
19719 (source
19720 (origin
19721 (method url-fetch)
19722 (uri (pypi-uri "precis_i18n" version))
19723 (sha256
19724 (base32
19725 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19726 (build-system python-build-system)
19727 (home-page "https://github.com/byllyfish/precis_i18n")
19728 (synopsis "Implementation of the PRECIS framework")
19729 (description
19730 "This module implements the PRECIS Framework as described in RFC 8264,
19731 RFC 8265 and RFC 8266.")
19732 (license license:expat)))
19733
19734 (define-public python-absl-py
19735 (package
19736 (name "python-absl-py")
19737 (version "0.6.1")
19738 (source
19739 (origin
19740 (method url-fetch)
19741 (uri (pypi-uri "absl-py" version))
19742 (sha256
19743 (base32
19744 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19745 (build-system python-build-system)
19746 (propagated-inputs
19747 `(("python-six" ,python-six)))
19748 (home-page "https://github.com/abseil/abseil-py")
19749 (synopsis "Abseil Python common libraries")
19750 (description
19751 "This package provides the Abseil Python Common Libraries, a collection
19752 of Python libraries for building Python applications.")
19753 (license license:asl2.0)))
19754
19755 (define-public python-astor
19756 (package
19757 (name "python-astor")
19758 (version "0.7.1")
19759 (source
19760 (origin
19761 (method url-fetch)
19762 (uri (pypi-uri "astor" version))
19763 (sha256
19764 (base32
19765 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19766 (build-system python-build-system)
19767 ;; FIXME: There are two errors and two test failures.
19768 (arguments `(#:tests? #f))
19769 (home-page "https://github.com/berkerpeksag/astor")
19770 (synopsis "Read and write Python ASTs")
19771 (description "Astor is designed to allow easy manipulation of Python
19772 source via the Abstract Syntax Tree.")
19773 (license license:bsd-3)))
19774
19775 (define-public python2-astor
19776 (package-with-python2 python-astor))
19777
19778 (define-public python-astunparse
19779 (package
19780 (name "python-astunparse")
19781 (version "1.6.2")
19782 (source
19783 (origin
19784 (method url-fetch)
19785 (uri (pypi-uri "astunparse" version))
19786 (sha256
19787 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19788 (build-system python-build-system)
19789 (arguments '(#:tests? #f)) ; there are none
19790 (propagated-inputs
19791 `(("python-six" ,python-six)
19792 ("python-wheel" ,python-wheel)))
19793 (home-page "https://github.com/simonpercivall/astunparse")
19794 (synopsis "AST unparser for Python")
19795 (description "This package provides an AST unparser for Python. It is a
19796 factored out version of @code{unparse} found in the Python source
19797 distribution.")
19798 (license license:bsd-3)))
19799
19800 (define-public python-gast
19801 (package
19802 (name "python-gast")
19803 (version "0.3.3")
19804 (source
19805 (origin
19806 (method url-fetch)
19807 (uri (pypi-uri "gast" version))
19808 (sha256
19809 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19810 (build-system python-build-system)
19811 (propagated-inputs
19812 `(("python-astunparse" ,python-astunparse)))
19813 (home-page "https://pypi.org/project/gast/")
19814 (synopsis "Generic Python AST that abstracts the underlying Python version")
19815 (description
19816 "GAST provides a compatibility layer between the AST of various Python
19817 versions, as produced by @code{ast.parse} from the standard @code{ast}
19818 module.")
19819 (license license:bsd-3)))
19820
19821 (define-public python-wikidata
19822 (package
19823 (name "python-wikidata")
19824 (version "0.6.1")
19825 (source
19826 (origin
19827 (method url-fetch)
19828 (uri (pypi-uri "Wikidata" version))
19829 (sha256
19830 (base32
19831 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19832 (build-system python-build-system)
19833 (propagated-inputs
19834 `(("python-babel" ,python-babel)))
19835 (home-page "https://github.com/dahlia/wikidata")
19836 (synopsis "Wikidata client library")
19837 (description
19838 "This package provides a Python interface to
19839 @url{https://www.wikidata.org/, Wikidata}.")
19840 (properties '((upstream-name . "Wikidata")))
19841 (license license:gpl3+)))
19842
19843 (define-public python-doctest-ignore-unicode
19844 (package
19845 (name "python-doctest-ignore-unicode")
19846 (version "0.1.2")
19847 (source
19848 (origin
19849 (method url-fetch)
19850 (uri (pypi-uri "doctest-ignore-unicode" version))
19851 (sha256
19852 (base32
19853 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19854 (build-system python-build-system)
19855 (native-inputs
19856 `(("python-nose" ,python-nose)))
19857 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19858 (synopsis "Ignore Unicode literal prefixes in doctests")
19859 (description
19860 "This package adds support for a flag to ignore Unicode literal prefixes
19861 in doctests.")
19862 (license license:asl2.0)))
19863
19864 (define-public python-attr
19865 (package
19866 (name "python-attr")
19867 (version "0.3.1")
19868 (source
19869 (origin
19870 (method url-fetch)
19871 (uri (pypi-uri "attr" version))
19872 (sha256
19873 (base32
19874 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19875 (build-system python-build-system)
19876 (home-page "https://github.com/denis-ryzhkov/attr")
19877 (synopsis "Decorator for attributes of target function or class")
19878 (description "Simple decorator to set attributes of target function or
19879 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19880 (license license:expat)))
19881
19882 (define-public python-construct
19883 (package
19884 (name "python-construct")
19885 (version "2.10.56")
19886 (source
19887 (origin
19888 (method url-fetch)
19889 (uri (pypi-uri "construct" version))
19890 (sha256
19891 (base32
19892 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19893 (build-system python-build-system)
19894 (arguments
19895 `(#:tests? #f)) ; No tests exist.
19896 (propagated-inputs
19897 `(("python-extras" ,python-extras)
19898 ("python-arrow" ,python-arrow)
19899 ("python-numpy" ,python-numpy)
19900 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19901 (home-page "https://construct.readthedocs.io")
19902 (synopsis "Declarative and symmetrical parser and builder for binary data")
19903 (description
19904 "This package provides both simple, atomic constructs (such as
19905 integers of various sizes), as well as composite ones which allow you
19906 form hierarchical and sequential structures of increasing complexity.
19907 It features bit and byte granularity, easy debugging and testing, an
19908 easy-to-extend subclass system, and lots of primitive constructs to
19909 make your work easier.")
19910 (license license:expat)))
19911
19912 (define-public python-outcome
19913 (package
19914 (name "python-outcome")
19915 (version "1.0.1")
19916 (source
19917 (origin
19918 (method url-fetch)
19919 (uri (pypi-uri "outcome" version))
19920 (sha256
19921 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19922 (build-system python-build-system)
19923 (arguments
19924 `(#:phases
19925 (modify-phases %standard-phases
19926 (replace 'check
19927 (lambda* (#:key inputs outputs #:allow-other-keys)
19928 (add-installed-pythonpath inputs outputs)
19929 (invoke "pytest" "-vv"))))))
19930 (native-inputs
19931 `(("python-pytest" ,python-pytest)
19932 ("python-pytest-cov" ,python-pytest-cov)
19933 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19934 (propagated-inputs
19935 `(("python-async-generator" ,python-async-generator)
19936 ("python-attrs" ,python-attrs)))
19937 (home-page "https://github.com/python-trio/outcome")
19938 (synopsis "Capture the outcome of Python function calls")
19939 (description
19940 "Capture the outcome of Python function calls. Extracted from the Trio
19941 project.")
19942 ;; Either license applies.
19943 (license (list license:expat license:asl2.0))))
19944
19945 (define-public python-trio
19946 (package
19947 (name "python-trio")
19948 (version "0.17.0")
19949 (source
19950 (origin
19951 (method url-fetch)
19952 (uri (pypi-uri "trio" version))
19953 (sha256
19954 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19955 (build-system python-build-system)
19956 (arguments
19957 `(#:phases
19958 (modify-phases %standard-phases
19959 (add-before 'check 'change-home
19960 (lambda _
19961 ;; Tests require a writable home.
19962 (setenv "HOME" "/tmp")
19963 #t))
19964 (replace 'check
19965 (lambda _
19966 (invoke "pytest" "-vv" "-k"
19967 (string-append
19968 ;; This test times out.
19969 "not test_ki_protection_works"
19970 ;; Assertion errors.
19971 " and not test_guest_mode_ki"
19972 " and not test_run_in_trio_thread_ki"
19973 ;; These try to raise KeyboardInterrupt which does not work
19974 ;; in the build environment.
19975 " and not test_ki_self"
19976 " and not test_ki_wakes_us_up"
19977 ;; Failure in name resolution.
19978 " and not test_getnameinfo"
19979 " and not test_SocketType_resolve"
19980 ;; OSError: protocol not found.
19981 " and not test_getprotobyname")))))))
19982 (native-inputs
19983 `(("python-astor" ,python-astor)
19984 ("python-ipython" ,python-ipython)
19985 ("python-jedi" ,python-jedi)
19986 ("python-pylint" ,python-pylint)
19987 ("python-pyopenssl" ,python-pyopenssl)
19988 ("python-pytest" ,python-pytest)
19989 ("python-pytest-cov" ,python-pytest-cov)
19990 ("python-trustme" ,python-trustme)))
19991 (propagated-inputs
19992 `(("python-attrs" ,python-attrs)
19993 ("python-idna" ,python-idna)
19994 ("python-outcome" ,python-outcome)
19995 ("python-sniffio" ,python-sniffio)
19996 ("python-sortedcontainers"
19997 ,python-sortedcontainers)))
19998 (home-page "https://github.com/python-trio/trio")
19999 (synopsis "Friendly Python library for async concurrency and I/O")
20000 (description
20001 "Trio strives to be a production-quality, async/await-native I/O library
20002 for Python. Like all async libraries, its main purpose is to help you write
20003 programs that do multiple things at the same time with parallelized I/O.")
20004 ;; Either license applies.
20005 (license (list license:expat license:asl2.0))))
20006
20007 (define-public python-trio-typing
20008 (package
20009 (name "python-trio-typing")
20010 (version "0.5.0")
20011 (source
20012 (origin
20013 (method url-fetch)
20014 (uri (pypi-uri "trio-typing" version))
20015 (sha256
20016 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20017 (build-system python-build-system)
20018 (arguments
20019 `(#:phases
20020 (modify-phases %standard-phases
20021 (replace 'check
20022 (lambda _
20023 (invoke "pytest" "-vv"))))))
20024 (native-inputs
20025 `(("python-attrs" ,python-attrs)
20026 ("python-pytest" ,python-pytest)))
20027 (propagated-inputs
20028 `(("python-mypy" ,python-mypy)
20029 ("python-mypy-extensions"
20030 ,python-mypy-extensions)
20031 ("python-trio" ,python-trio)
20032 ("python-typing-extensions"
20033 ,python-typing-extensions)))
20034 (home-page "https://github.com/python-trio/trio-typing")
20035 (synopsis "Static type checking support for Trio and related projects")
20036 (description
20037 "This package provides:
20038
20039 @itemize
20040 @item PEP 561 typing stubs packages for the Trio project packages:
20041
20042 @itemize
20043 @item trio (@code{trio-stubs})
20044 @item outcome (@code{outcome-stubs})
20045 @item async_generator (@code{async_generator-stubs})
20046 @end itemize
20047
20048 @item A package @code{trio_typing} containing types that Trio programs often
20049 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20050 a mypy plugin that smooths over some limitations in the basic type hints.
20051 @end itemize")
20052 ;; Either license applies.
20053 (license (list license:expat license:asl2.0))))
20054
20055 (define-public python-humanize
20056 (package
20057 (name "python-humanize")
20058 (version "0.5.1")
20059 (source
20060 (origin
20061 (method url-fetch)
20062 (uri (pypi-uri "humanize" version))
20063 (sha256
20064 (base32
20065 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20066 (arguments
20067 '(#:tests? #f)) ; tests not in pypi archive
20068 (build-system python-build-system)
20069 (home-page "https://github.com/jmoiron/humanize")
20070 (synopsis "Print numerical information in a human-readable form")
20071 (description "This package provides a Python module that displays numbers
20072 and dates in \"human readable\" forms. For example, it would display
20073 \"12345591313\" as \"12.3 billion\".")
20074 (license license:expat)))
20075
20076 (define-public python-txaio
20077 (package
20078 (name "python-txaio")
20079 (version "18.8.1")
20080 (source
20081 (origin
20082 (method url-fetch)
20083 (uri (pypi-uri "txaio" version))
20084 (sha256
20085 (base32
20086 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20087 (build-system python-build-system)
20088 (propagated-inputs
20089 `(("python-twisted" ,python-twisted)
20090 ("python-six" ,python-six)))
20091 (home-page "https://github.com/crossbario/txaio")
20092 (synopsis "Compatibility layer between Python asyncio and Twisted")
20093 (description "Txaio provides a compatibility layer between the Python
20094 @code{asyncio} module and @code{Twisted}.")
20095 (license license:expat)))
20096
20097 (define-public python-toolshed
20098 (package
20099 (name "python-toolshed")
20100 (version "0.4.6")
20101 (source
20102 (origin
20103 (method url-fetch)
20104 (uri (pypi-uri "toolshed" version))
20105 (sha256
20106 (base32
20107 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20108 (build-system python-build-system)
20109 (native-inputs
20110 `(("python-nose" ,python-nose)))
20111 (home-page "https://github.com/brentp/toolshed/")
20112 (synopsis "Collection of modules and functions for working with data")
20113 (description "This is a collection of well-tested, simple modules and
20114 functions that aim to reduce boilerplate when working with data.")
20115 (license license:bsd-2)))
20116
20117 (define-public python-annoy
20118 (package
20119 (name "python-annoy")
20120 (version "1.15.1")
20121 (source
20122 (origin
20123 (method url-fetch)
20124 (uri (pypi-uri "annoy" version))
20125 (sha256
20126 (base32
20127 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20128 (build-system python-build-system)
20129 (native-inputs
20130 `(("python-nose" ,python-nose)))
20131 (home-page "https://github.com/spotify/annoy/")
20132 (synopsis "Approximate nearest neighbors library")
20133 (description
20134 "Annoy is a C++ library with Python bindings to search for points in
20135 space that are close to a given query point. It also creates large read-only
20136 file-based data structures that are @code{mmap}ped into memory so that many
20137 processes may share the same data.")
20138 (license license:asl2.0)))
20139
20140 (define-public python-croniter
20141 (package
20142 (name "python-croniter")
20143 (version "0.3.34")
20144 (source (origin
20145 (method url-fetch)
20146 (uri (pypi-uri "croniter" version))
20147 (sha256
20148 (base32
20149 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20150 (build-system python-build-system)
20151 (propagated-inputs
20152 `(("python-dateutil" ,python-dateutil)
20153 ("python-natsort" ,python-natsort)))
20154 (home-page "https://github.com/kiorky/croniter")
20155 (synopsis "Iterate datetime objects with cron-like syntax")
20156 (description
20157 "@code{croniter} provides iteration for datetime object with cron-like
20158 format.")
20159 (license license:expat)))
20160
20161 (define-public python-pylzma
20162 (package
20163 (name "python-pylzma")
20164 (version "0.5.0")
20165 (source
20166 (origin
20167 (method url-fetch)
20168 (uri (pypi-uri "pylzma" version))
20169 (sha256
20170 (base32
20171 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20172 (build-system python-build-system)
20173 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
20174 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20175 (description "This package provides Python bindings for the LZMA library
20176 by Igor Pavlov.")
20177 (license license:lgpl2.1+)))
20178
20179 (define-public python2-pylzma
20180 (package-with-python2 python-pylzma))
20181
20182 (define-public python2-zeroconf
20183 (package
20184 (name "python2-zeroconf")
20185
20186 ;; This is the last version that supports Python 2.x.
20187 (version "0.19.1")
20188 (source
20189 (origin
20190 (method url-fetch)
20191 (uri (pypi-uri "zeroconf" version))
20192 (sha256
20193 (base32
20194 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20195 (build-system python-build-system)
20196 (arguments
20197 `(#:python ,python-2
20198 #:phases
20199 (modify-phases %standard-phases
20200 (add-after 'unpack 'patch-requires
20201 (lambda* (#:key inputs #:allow-other-keys)
20202 (substitute* "setup.py"
20203 (("enum-compat")
20204 "enum34"))
20205 #t)))))
20206 (native-inputs
20207 `(("python2-six" ,python2-six)
20208 ("python2-enum32" ,python2-enum34)
20209 ("python2-netifaces" ,python2-netifaces)
20210 ("python2-typing" ,python2-typing)))
20211 (home-page "https://github.com/jstasiak/python-zeroconf")
20212 (synopsis "Pure Python mDNS service discovery")
20213 (description
20214 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20215 compatible).")
20216 (license license:lgpl2.1+)))
20217
20218 (define-public python-bsddb3
20219 (package
20220 (name "python-bsddb3")
20221 (version "6.2.6")
20222 (source
20223 (origin
20224 (method url-fetch)
20225 (uri (pypi-uri "bsddb3" version))
20226 (sha256
20227 (base32
20228 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20229 (build-system python-build-system)
20230 (inputs
20231 `(("bdb" ,bdb)))
20232 (arguments
20233 '(#:phases
20234 (modify-phases %standard-phases
20235 (add-after 'unpack 'configure-locations
20236 (lambda* (#:key inputs #:allow-other-keys)
20237 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20238 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20239 #t))
20240 (replace 'check
20241 (lambda _
20242 (invoke "python3" "test3.py" "-v"))))))
20243 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20244 (synopsis "Python bindings for Oracle Berkeley DB")
20245 (description
20246 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20247 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20248 Transaction objects, and each of these is exposed as a Python type in the
20249 bsddb3.db module. The database objects can use various access methods: btree,
20250 hash, recno, and queue. Complete support of Berkeley DB distributed
20251 transactions. Complete support for Berkeley DB Replication Manager.
20252 Complete support for Berkeley DB Base Replication. Support for RPC.")
20253 (license license:bsd-3)))
20254
20255 (define-public python-dbfread
20256 (package
20257 (name "python-dbfread")
20258 (version "2.0.7")
20259 (source (origin
20260 (method url-fetch)
20261 (uri (pypi-uri "dbfread" version))
20262 (sha256
20263 (base32
20264 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20265 (build-system python-build-system)
20266 (native-inputs
20267 `(("python-pytest" ,python-pytest)))
20268 (home-page "https://dbfread.readthedocs.io")
20269 (synopsis "Read DBF Files with Python")
20270 (description
20271 "This library reads DBF files and returns the data as native Python data
20272 types for further processing. It is primarily intended for batch jobs and
20273 one-off scripts.")
20274 (license license:expat)))
20275
20276 (define-public python-cached-property
20277 (package
20278 (name "python-cached-property")
20279 (version "1.5.1")
20280 (source
20281 (origin
20282 (method url-fetch)
20283 (uri (pypi-uri "cached-property" version))
20284 (sha256
20285 (base32
20286 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20287 (build-system python-build-system)
20288 (arguments
20289 `(#:phases
20290 (modify-phases %standard-phases
20291 ;; https://github.com/pydanny/cached-property/issues/131
20292 ;; recent versions of freezegun break one test
20293 (add-after 'unpack 'disable-broken-test
20294 (lambda _
20295 (substitute* "tests/test_cached_property.py"
20296 (("def test_threads_ttl_expiry\\(self\\)" m)
20297 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20298 " " m)))
20299 #t)))))
20300 (native-inputs
20301 `(("python-freezegun" ,python-freezegun)))
20302 (home-page
20303 "https://github.com/pydanny/cached-property")
20304 (synopsis
20305 "Decorator for caching properties in classes")
20306 (description
20307 "This package provides a decorator which makes caching
20308 time-or-computationally-expensive properties quick and easy and works in Python
20309 2 or 3.")
20310 (license license:bsd-3)))
20311
20312 (define-public python-folium
20313 (package
20314 (name "python-folium")
20315 (version "0.11.0")
20316 (source
20317 (origin
20318 (method url-fetch)
20319 (uri (pypi-uri "folium" version))
20320 (sha256
20321 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20322 (build-system python-build-system)
20323 (propagated-inputs
20324 `(("python-branca" ,python-branca)
20325 ("python-jinja2" ,python-jinja2)
20326 ("python-numpy" ,python-numpy)
20327 ("python-requests" ,python-requests)))
20328 (native-inputs
20329 `(("python-pytest" ,python-pytest)))
20330 (home-page "https://github.com/python-visualization/folium")
20331 (synopsis "Make beautiful maps with Leaflet.js & Python")
20332 (description "@code{folium} makes it easy to visualize data that’s been
20333 manipulated in Python on an interactive leaflet map. It enables both the
20334 binding of data to a map for @code{choropleth} visualizations as well as
20335 passing rich vector/raster/HTML visualizations as markers on the map.
20336
20337 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20338 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20339 supports Image, Video, GeoJSON and TopoJSON overlays.")
20340 (license license:expat)))
20341
20342 (define-public jube
20343 (package
20344 ;; This is a command-line tool, so no "python-" prefix.
20345 (name "jube")
20346 (version "2.2.2")
20347 (source (origin
20348 (method url-fetch)
20349 (uri (string-append
20350 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20351 version))
20352 (sha256
20353 (base32
20354 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20355 (file-name (string-append "jube-" version ".tar.gz"))))
20356 (build-system python-build-system)
20357 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20358 (synopsis "Benchmarking environment")
20359 (description
20360 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20361 benchmarked application, benchmark data is stored in a format that allows JUBE
20362 to deduct the desired information. This data can be parsed by automatic pre-
20363 and post-processing scripts that draw information and store it more densely
20364 for manual interpretation.")
20365 (license license:gpl3+)))
20366
20367 (define-public python-pyroutelib3
20368 (package
20369 (name "python-pyroutelib3")
20370 (version "1.3.post1")
20371 (source
20372 (origin
20373 (method url-fetch)
20374 (uri (pypi-uri "pyroutelib3" version))
20375 (sha256
20376 (base32
20377 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20378 (build-system python-build-system)
20379 (propagated-inputs
20380 `(("python-dateutil" ,python-dateutil)))
20381 (home-page "https://github.com/MKuranowski/pyroutelib3")
20382 (synopsis "Library for simple routing on OSM data")
20383 (description "Library for simple routing on OSM data")
20384 (license license:gpl3+)))
20385
20386 (define-public python-bibtexparser
20387 (package
20388 (name "python-bibtexparser")
20389 (version "1.1.0")
20390 (source
20391 (origin
20392 (method url-fetch)
20393 (uri (pypi-uri "bibtexparser" version))
20394 (sha256
20395 (base32
20396 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20397 (build-system python-build-system)
20398 (propagated-inputs
20399 `(("python-pyparsing" ,python-pyparsing)))
20400 (native-inputs
20401 `(("python-future" ,python-future)))
20402 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20403 (synopsis "Python library to parse BibTeX files")
20404 (description "BibtexParser is a Python library to parse BibTeX files.")
20405 (license (list license:bsd-3 license:lgpl3))))
20406
20407 (define-public python-distro
20408 (package
20409 (name "python-distro")
20410 (version "1.4.0")
20411 (source
20412 (origin
20413 (method url-fetch)
20414 (uri (pypi-uri "distro" version))
20415 (sha256
20416 (base32
20417 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20418 (build-system python-build-system)
20419 (native-inputs
20420 `(("python-pytest" ,python-pytest)))
20421 (home-page "https://github.com/nir0s/distro")
20422 (synopsis
20423 "OS platform information API")
20424 (description
20425 "@code{distro} provides information about the OS distribution it runs on,
20426 such as a reliable machine-readable ID, or version information.
20427
20428 It is the recommended replacement for Python's original
20429 `platform.linux_distribution` function (which will be removed in Python 3.8).
20430 @code{distro} also provides a command-line interface to output the platform
20431 information in various formats.")
20432 (license license:asl2.0)))
20433
20434 (define-public python-cairosvg
20435 (package
20436 (name "python-cairosvg")
20437 (version "2.5.0")
20438 (source
20439 (origin
20440 (method url-fetch)
20441 (uri (pypi-uri "CairoSVG" version))
20442 (sha256
20443 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
20444 (build-system python-build-system)
20445 (arguments
20446 `(#:phases
20447 (modify-phases %standard-phases
20448 (replace 'check
20449 (lambda _ (invoke "pytest"))))))
20450 (propagated-inputs
20451 `(("python-cairocffi" ,python-cairocffi)
20452 ("python-cssselect2" ,python-cssselect2)
20453 ("python-defusedxml" ,python-defusedxml)
20454 ("python-pillow" ,python-pillow)
20455 ("python-tinycss2" ,python-tinycss2)))
20456 (native-inputs
20457 `(("python-pytest-flake8" ,python-pytest-flake8)
20458 ("python-pytest-isort" ,python-pytest-isort)
20459 ("python-pytest-runner" ,python-pytest-runner)))
20460 (home-page "https://cairosvg.org/")
20461 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20462 (description "CairoSVG is a SVG converter based on Cairo. It can export
20463 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20464 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20465 parsed, the result is drawn to a Cairo surface that can be exported to
20466 qvarious formats: PDF, PostScript, PNG and even SVG.")
20467 (license license:lgpl3+)))
20468
20469 (define-public python-pyphen
20470 (package
20471 (name "python-pyphen")
20472 (version "0.10.0")
20473 (source
20474 (origin
20475 (method url-fetch)
20476 (uri (pypi-uri "Pyphen" version))
20477 (sha256
20478 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
20479 (build-system python-build-system)
20480 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20481 ;; embedded set provided by upstream - like Debian does.
20482 (home-page "https://github.com/Kozea/Pyphen")
20483 (synopsis "Pure Python module to hyphenate text")
20484 (description "Pyphen is a pure Python module to hyphenate text using
20485 existing Hunspell hyphenation dictionaries.")
20486 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20487
20488 (define-public python-intelhex
20489 (package
20490 (name "python-intelhex")
20491 (version "2.2.1")
20492 (source
20493 (origin
20494 (method url-fetch)
20495 (uri (pypi-uri "intelhex" version))
20496 (sha256
20497 (base32
20498 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20499 (build-system python-build-system)
20500 (arguments '(#:tests? #f)) ;issue with version
20501 (home-page "https://pypi.org/project/IntelHex/")
20502 (synopsis "Python library for Intel HEX files manipulations")
20503 (description "The Intel HEX file format is widely used in microprocessors
20504 and microcontrollers area (embedded systems etc.) as the de facto standard for
20505 representation of code to be programmed into microelectronic devices. This
20506 package provides an intelhex Python library to read, write, create from
20507 scratch and manipulate data from Intel HEX file format. It also includes
20508 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20509 converters and more, those based on the library itself.")
20510 (license license:bsd-3)))
20511
20512 (define-public python-pykwalify
20513 (package
20514 (name "python-pykwalify")
20515 (version "1.7.0")
20516 (source
20517 (origin
20518 (method url-fetch)
20519 (uri (pypi-uri "pykwalify" version))
20520 (sha256
20521 (base32
20522 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20523 (build-system python-build-system)
20524 (arguments '(#:tests? #f)) ;missing dependencies
20525 (propagated-inputs
20526 `(("python-dateutil" ,python-dateutil)
20527 ("python-docopt" ,python-docopt)
20528 ("python-pyyaml" ,python-pyyaml)))
20529 (home-page "https://github.com/grokzen/pykwalify")
20530 (synopsis
20531 "Python lib/cli for JSON/YAML schema validation")
20532 (description
20533 "This package provides a parser, schema validator, and data binding tool
20534 for YAML and JSON.")
20535 (license license:expat)))
20536
20537 (define-public python-dbusmock
20538 (package
20539 (name "python-dbusmock")
20540 (version "0.18.3")
20541 (source
20542 (origin
20543 (method url-fetch)
20544 (uri (pypi-uri "python-dbusmock" version))
20545 (sha256
20546 (base32
20547 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20548 (build-system python-build-system)
20549 (arguments
20550 '(#:phases
20551 (modify-phases %standard-phases
20552 (add-after 'unpack 'patch-shell-path
20553 (lambda _
20554 (substitute* "tests/test_code.py"
20555 (("/bin/bash") (which "bash")))
20556 #t)))))
20557 (native-inputs
20558 `(;; For tests.
20559 ("dbus" ,dbus) ; for dbus-daemon
20560 ("python-nose" ,python-nose)
20561 ("which" ,which)))
20562 (propagated-inputs
20563 `(("python-dbus" ,python-dbus)
20564 ("python-pygobject" ,python-pygobject)))
20565 (home-page "https://github.com/martinpitt/python-dbusmock")
20566 (synopsis "Python library for mock D-Bus objects")
20567 (description "python-dbusmock allows for the easy creation of mock objects on
20568 D-Bus. This is useful for writing tests for software which talks to D-Bus
20569 services such as upower, systemd, logind, gnome-session or others, and it is
20570 hard (or impossible without root privileges) to set the state of the real
20571 services to what you expect in your tests.")
20572 (license license:lgpl3+)))
20573
20574 (define-public python-jsonplus
20575 (package
20576 (name "python-jsonplus")
20577 (version "0.8.0")
20578 (home-page "https://github.com/randomir/jsonplus")
20579 (source (origin
20580 (method url-fetch)
20581 (uri (pypi-uri "jsonplus" version))
20582 (sha256
20583 (base32
20584 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20585 (build-system python-build-system)
20586 ;; XXX: No tests on PyPI, and the repository has no tags.
20587 (arguments '(#:tests? #f))
20588 (propagated-inputs
20589 `(("python-dateutil" ,python-dateutil)
20590 ("python-simplejson" ,python-simplejson)
20591 ("python-sortedcontainers" ,python-sortedcontainers)))
20592 (synopsis "Serialize Python types to/from JSON")
20593 (description
20594 "This package provides functionality to serialize arbitrary data types
20595 to and from JSON. Common data types are implemented and it is easy to
20596 register custom encoders and decoders.")
20597 (license license:expat)))
20598
20599 (define-public python-ujson
20600 (package
20601 (name "python-ujson")
20602 (version "4.0.1")
20603 (source
20604 (origin
20605 (method url-fetch)
20606 (uri (pypi-uri "ujson" version))
20607 (sha256
20608 (base32
20609 "1lr9lbm76y3ah1463jggwg2hjcb709mpns5f752wxxbgnd0n5kr6"))
20610 (modules '((guix build utils)))
20611 (snippet
20612 '(begin (delete-file-recursively "deps") #t))))
20613 (build-system python-build-system)
20614 (arguments
20615 `(#:phases
20616 (modify-phases %standard-phases
20617 (add-after 'unpack 'link-to-system-double-conversion
20618 (lambda* (#:key inputs #:allow-other-keys)
20619 (let ((d-c (assoc-ref inputs "double-conversion")))
20620 (substitute* "setup.py"
20621 (("./deps/double-conversion/double-conversion\"")
20622 (string-append d-c "/include/double-conversion\""))
20623 (("-lstdc++" stdc)
20624 (string-append "-L" d-c "/lib\","
20625 " \"-ldouble-conversion\","
20626 " \"" stdc)))
20627 #t)))
20628 (replace 'check
20629 (lambda* (#:key inputs outputs #:allow-other-keys)
20630 (add-installed-pythonpath inputs outputs)
20631 (invoke "pytest"))))))
20632 (native-inputs
20633 `(("double-conversion" ,double-conversion)
20634 ("python-setuptools-scm" ,python-setuptools-scm)
20635 ("python-pytest" ,python-pytest)))
20636 (home-page "https://github.com/ultrajson/ultrajson")
20637 (synopsis "Ultra fast JSON encoder and decoder for Python")
20638 (description
20639 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20640 bindings for Python 3.")
20641 (license license:bsd-3)))
20642
20643 (define-public python-iocapture
20644 ;; The latest release is more than a year older than this commit.
20645 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20646 (revision "1"))
20647 (package
20648 (name "python-iocapture")
20649 (version "0.1.2")
20650 (source
20651 (origin
20652 (method git-fetch)
20653 (uri (git-reference
20654 (url "https://github.com/oinume/iocapture")
20655 (commit commit)))
20656 (file-name (git-file-name name version))
20657 (sha256
20658 (base32
20659 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20660 (build-system python-build-system)
20661 (arguments
20662 `(#:phases
20663 (modify-phases %standard-phases
20664 (delete 'check)
20665 (add-after 'install 'check
20666 (lambda* (#:key inputs outputs #:allow-other-keys)
20667 (add-installed-pythonpath inputs outputs)
20668 (invoke "py.test" "-v" "tests")
20669 #t)))))
20670 (propagated-inputs
20671 `(("python-flexmock" ,python-flexmock)
20672 ("python-pytest" ,python-pytest)
20673 ("python-pytest-cov" ,python-pytest-cov)
20674 ("python-six" ,python-six)))
20675 (home-page "https://github.com/oinume/iocapture")
20676 (synopsis "Python capturing tool for stdout and stderr")
20677 (description
20678 "This package helps you to capture the standard out (stdout) and the
20679 standard error channel (stderr) in your program.")
20680 (license license:expat))))
20681
20682 (define-public python-argh
20683 ;; There are 21 commits since the latest release containing important
20684 ;; improvements.
20685 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20686 (revision "1"))
20687 (package
20688 (name "python-argh")
20689 (version (git-version "0.26.2" revision commit))
20690 (source
20691 (origin
20692 (method git-fetch)
20693 (uri (git-reference
20694 (url "https://github.com/neithere/argh")
20695 (commit commit)))
20696 (file-name (git-file-name name version))
20697 (sha256
20698 (base32
20699 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20700 (build-system python-build-system)
20701 (propagated-inputs
20702 `(("python-iocapture" ,python-iocapture)
20703 ("python-mock" ,python-mock)
20704 ("python-pytest" ,python-pytest)
20705 ("python-pytest-cov" ,python-pytest-cov)
20706 ("python-pytest-xdist" ,python-pytest-xdist)
20707 ("python-tox" ,python-tox)))
20708 (home-page "https://github.com/neithere/argh/")
20709 (synopsis "Argparse wrapper with natural syntax")
20710 (description
20711 "python-argh is a small library that provides several layers of
20712 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20713 always possible to declare a command with the highest possible (and least
20714 flexible) layer and then tune the behaviour with any of the lower layers
20715 including the native API of @code{python-argparse}.")
20716 (license license:lgpl3+))))
20717
20718 (define-public python-ppft
20719 (package
20720 (name "python-ppft")
20721 (version "1.6.6.1")
20722 (source
20723 (origin
20724 (method url-fetch)
20725 (uri (pypi-uri "ppft" version))
20726 (sha256
20727 (base32
20728 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20729 (build-system python-build-system)
20730 (arguments '(#:tests? #f)) ; there are none
20731 (propagated-inputs
20732 `(("python-six" ,python-six)))
20733 (home-page "https://pypi.org/project/ppft/")
20734 (synopsis "Fork of Parallel Python")
20735 (description
20736 "This package is a fork of Parallel Python. The Parallel Python
20737 module (@code{pp}) provides an easy and efficient way to create
20738 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20739 computers and clusters. It features cross-platform portability and dynamic
20740 load balancing.")
20741 (license license:bsd-3)))
20742
20743 (define-public python-pox
20744 (package
20745 (name "python-pox")
20746 (version "0.2.7")
20747 (source
20748 (origin
20749 (method url-fetch)
20750 (uri (pypi-uri "pox" version))
20751 (sha256
20752 (base32
20753 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20754 (build-system python-build-system)
20755 (arguments
20756 `(#:phases
20757 (modify-phases %standard-phases
20758 (replace 'check
20759 (lambda _
20760 (mkdir-p "/tmp/guix")
20761 (setenv "SHELL" "bash")
20762 (setenv "USERNAME" "guix")
20763 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20764 (invoke "py.test" "-vv")
20765 #t)))))
20766 (native-inputs
20767 `(("python-pytest" ,python-pytest)
20768 ("which" ,which)))
20769 (home-page "https://pypi.org/project/pox/")
20770 (synopsis "Python utilities for file system exploration and automated builds")
20771 (description
20772 "Pox provides a collection of utilities for navigating and manipulating
20773 file systems. This module is designed to facilitate some of the low-level
20774 operating system interactions that are useful when exploring a file system on a
20775 remote host. Pox provides Python equivalents of several shell commands such
20776 as @command{which} and @command{find}. These commands allow automated
20777 discovery of what has been installed on an operating system, and where the
20778 essential tools are located.")
20779 (license license:bsd-3)))
20780
20781 (define-public python-pathos
20782 (package
20783 (name "python-pathos")
20784 (version "0.2.5")
20785 (source
20786 (origin
20787 (method url-fetch)
20788 (uri (pypi-uri "pathos" version))
20789 (sha256
20790 (base32
20791 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20792 (build-system python-build-system)
20793 (arguments
20794 '(#:phases
20795 (modify-phases %standard-phases
20796 (replace 'check
20797 (lambda _
20798 (setenv "PYTHONPATH"
20799 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20800 (invoke "python" "./tests/__main__.py"))))))
20801 (propagated-inputs
20802 `(("python-dill" ,python-dill)
20803 ("python-multiprocess" ,python-multiprocess)
20804 ("python-pox" ,python-pox)
20805 ("python-ppft" ,python-ppft)))
20806 (native-inputs
20807 `(("python-pytest" ,python-pytest)))
20808 (home-page "https://pypi.org/project/pathos/")
20809 (synopsis
20810 "Parallel graph management and execution in heterogeneous computing")
20811 (description
20812 "Python-pathos is a framework for heterogeneous computing. It provides a
20813 consistent high-level interface for configuring and launching parallel
20814 computations across heterogeneous resources. Python-pathos provides configurable
20815 launchers for parallel and distributed computing, where each launcher contains
20816 the syntactic logic to configure and launch jobs in an execution environment.")
20817 (license license:bsd-3)))
20818
20819 (define-public python-flit
20820 (package
20821 (name "python-flit")
20822 (version "3.0.0")
20823 (source
20824 (origin
20825 (method url-fetch)
20826 (uri (pypi-uri "flit" version))
20827 (sha256
20828 (base32
20829 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
20830 (build-system python-build-system)
20831 (arguments
20832 `(#:tests? #f)) ; XXX: Check requires network access.
20833 (home-page "https://flit.readthedocs.io/")
20834 (synopsis
20835 "Simple packaging tool for simple packages")
20836 (description
20837 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20838 packages a single importable module or package at a time, using the import
20839 name as the name on PyPI. All subpackages and data files within a package
20840 are included automatically.")
20841 (license license:bsd-3)))
20842
20843 (define-public python-pathtools
20844 (package
20845 (name "python-pathtools")
20846 (version "0.1.2")
20847 (source
20848 (origin
20849 (method url-fetch)
20850 (uri (pypi-uri "pathtools" version))
20851 (sha256
20852 (base32
20853 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20854 (build-system python-build-system)
20855 (home-page
20856 "https://github.com/gorakhargosh/pathtools")
20857 (synopsis "Path utilities for Python")
20858 (description "Pattern matching and various utilities for file systems
20859 paths.")
20860 (license license:expat)))
20861
20862 (define-public python-fastentrypoints
20863 (package
20864 (name "python-fastentrypoints")
20865 (version "0.12")
20866 (source
20867 (origin
20868 (method url-fetch)
20869 (uri (pypi-uri "fastentrypoints" version))
20870 (sha256
20871 (base32
20872 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20873 (build-system python-build-system)
20874 (home-page
20875 "https://github.com/ninjaaron/fast-entry_points")
20876 (synopsis
20877 "Makes entry_points specified in setup.py load more quickly")
20878 (description
20879 "Using entry_points in your setup.py makes scripts that start really
20880 slowly because it imports pkg_resources. This package allows such setup
20881 scripts to load entry points more quickly.")
20882 (license license:bsd-3)))
20883
20884 (define-public python-funcparserlib
20885 (package
20886 (name "python-funcparserlib")
20887 (version "0.3.6")
20888 (source
20889 (origin
20890 (method url-fetch)
20891 (uri (pypi-uri "funcparserlib" version))
20892 (sha256
20893 (base32
20894 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20895 (native-inputs
20896 `(("python-tox" ,python-tox)))
20897 (arguments
20898 `(#:phases
20899 (modify-phases %standard-phases
20900 (replace 'check
20901 (lambda _
20902 (invoke "tox"))))))
20903 (build-system python-build-system)
20904 (home-page
20905 "https://github.com/vlasovskikh/funcparserlib")
20906 (synopsis
20907 "Recursive descent parsing library based on functional combinators")
20908 (description
20909 "This package is a recursive descent parsing library for Python based on
20910 functional combinators. Parser combinators are just higher-order functions
20911 that take parsers as their arguments and return them as result values.")
20912 (license license:expat)))
20913
20914 (define-public python-speg
20915 (package
20916 (name "python-speg")
20917 (version "0.3")
20918 (source
20919 (origin
20920 (method url-fetch)
20921 (uri (pypi-uri "speg" version ".zip"))
20922 (sha256
20923 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20924 (arguments
20925 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20926 (native-inputs
20927 `(("unzip" ,unzip)))
20928 (build-system python-build-system)
20929 (home-page "https://github.com/avakar/speg")
20930 (synopsis "PEG-based parser interpreter with memoization")
20931 (description "This package is a PEG-based parser and interpreter with
20932 memoization.")
20933 (license license:expat)))
20934
20935 (define-public python-cson
20936 (package
20937 (name "python-cson")
20938 (version "0.8")
20939 (source
20940 (origin
20941 (method url-fetch)
20942 (uri (pypi-uri "cson" version))
20943 (sha256
20944 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20945 (build-system python-build-system)
20946 (propagated-inputs
20947 `(("python-speg" ,python-speg)))
20948 (home-page "https://github.com/avakar/pycson")
20949 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20950 (description "This package is a parser for Coffeescript Object
20951 Notation (CSON).")
20952 (license license:expat)))
20953
20954 (define-public python-asynctest
20955 (package
20956 (name "python-asynctest")
20957 (version "0.13.0")
20958 (source
20959 (origin
20960 (method url-fetch)
20961 (uri (pypi-uri "asynctest" version))
20962 (sha256
20963 (base32
20964 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20965 (build-system python-build-system)
20966 (arguments
20967 '(#:phases
20968 (modify-phases %standard-phases
20969 (replace 'check
20970 (lambda _
20971 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20972 (add-after 'unpack 'disable-tests
20973 (lambda* _
20974 ;; XXX: 7 tests fail out of 220. Disable them for now.
20975 (substitute* (list "test/test_selector.py"
20976 "test/test_mock.py")
20977 (("def test_events_watched_outside_test_are_ignored")
20978 "@unittest.skip('disabled by guix')
20979 def test_events_watched_outside_test_are_ignored")
20980 (("def test_awaited_from_autospec_mock.*" line)
20981 (string-append line " return True\n"))
20982 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
20983 (string-append line " return True\n"))
20984 (("def test_patch_coroutine_with_multiple_scopes.*" line)
20985 (string-append line " return True\n"))
20986 (("def test_multiple_patches_on_coroutine.*" line)
20987 (string-append line " return True\n"))
20988 (("def test_patch_coroutine_only_when_running.*" line)
20989 (string-append line " return True\n")))
20990 #t)))))
20991 (home-page "https://github.com/Martiusweb/asynctest")
20992 (synopsis "Extension of unittest for testing asyncio libraries")
20993 (description
20994 "The package asynctest is built on top of the standard unittest module
20995 and cuts down boilerplate code when testing libraries for asyncio.")
20996 (license license:asl2.0)))
20997
20998 (define-public python-aionotify
20999 (package
21000 (name "python-aionotify")
21001 (version "0.2.0")
21002 (source
21003 (origin
21004 ;; Source tarball on PyPi lacks tests
21005 (method git-fetch)
21006 (uri (git-reference
21007 (url "https://github.com/rbarrois/aionotify")
21008 (commit (string-append "v" version))))
21009 (file-name (git-file-name name version))
21010 (sha256
21011 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21012 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21013 (build-system python-build-system)
21014 (home-page "https://github.com/rbarrois/aionotify")
21015 (synopsis "Asyncio-powered inotify library")
21016 (description
21017 "@code{aionotify} is a simple, asyncio-based inotify library.")
21018 (license license:bsd-3)))
21019
21020 (define-public python-forbiddenfruit
21021 (package
21022 (name "python-forbiddenfruit")
21023 (version "0.1.3")
21024 (source
21025 (origin
21026 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21027 (method git-fetch)
21028 (uri (git-reference
21029 (url "https://github.com/clarete/forbiddenfruit")
21030 (commit version)))
21031 (file-name (git-file-name name version))
21032 (sha256
21033 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21034 (build-system python-build-system)
21035 (arguments
21036 '(#:phases
21037 (modify-phases %standard-phases
21038 (replace 'check
21039 (lambda _
21040 (invoke "make" "SKIP_DEPS=1"))))))
21041 (native-inputs
21042 `(("python-nose" ,python-nose)
21043 ("python-coverage" ,python-coverage)))
21044 (home-page "https://github.com/clarete/forbiddenfruit")
21045 (synopsis "Patch python built-in objects")
21046 (description "This project allows Python code to extend built-in types.")
21047 (license (list license:gpl3+ license:expat))))
21048
21049 (define-public python-shouldbe
21050 (package
21051 (name "python-shouldbe")
21052 (version "0.1.2")
21053 (source
21054 (origin
21055 (method url-fetch)
21056 (uri (pypi-uri "shouldbe" version))
21057 (sha256
21058 (base32
21059 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
21060 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
21061 (build-system python-build-system)
21062 (propagated-inputs
21063 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
21064 (native-inputs
21065 `(("python-nose" ,python-nose)))
21066 (home-page "https://github.com/directxman12/should_be")
21067 (synopsis "Python Assertion Helpers inspired by Shouldly")
21068 (description
21069 "Python Assertion Helpers inspired by Shouldly.")
21070 (license license:isc)))
21071
21072 (define-public python-k5test
21073 (package
21074 (name "python-k5test")
21075 (version "0.9.2")
21076 (source
21077 (origin
21078 (method url-fetch)
21079 (uri (pypi-uri "k5test" version))
21080 (sha256
21081 (base32
21082 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21083 (build-system python-build-system)
21084 (propagated-inputs
21085 `(("python-six" ,python-six)
21086 ;; `which`, `kadmin.local` binaries called inside library
21087 ("which" ,which)
21088 ("mit-krb5" ,mit-krb5)))
21089 (native-inputs `(("mit-krb5" ,mit-krb5)))
21090 (arguments
21091 '(#:phases
21092 (modify-phases %standard-phases
21093 (add-after 'unpack 'patch-paths
21094 (lambda* _
21095 (substitute* "k5test/realm.py"
21096 (("'kadmin_local'") "'kadmin.local'")))))))
21097 (home-page "https://github.com/pythongssapi/k5test")
21098 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21099 (description
21100 "@code{k5test} is a library for setting up self-contained Kerberos 5
21101 environments, and running Python unit tests inside those environments. It is
21102 based on the file of the same name found alongside the MIT Kerberos 5 unit
21103 tests.")
21104 (license license:isc)))
21105
21106 (define-public python-gssapi
21107 (package
21108 (name "python-gssapi")
21109 (version "1.6.9")
21110 (source
21111 (origin
21112 (method url-fetch)
21113 (uri (pypi-uri "gssapi" version))
21114 (sha256
21115 (base32
21116 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
21117 (build-system python-build-system)
21118 (arguments
21119 `(#:phases
21120 (modify-phases %standard-phases
21121 ;; Work around
21122 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
21123 (add-before 'check 'disable-failing-tests
21124 (lambda _
21125 (let ((reason "Disabled failing test (see: \
21126 https://github.com/pythongssapi/python-gssapi/issues/220)."))
21127 (substitute* "gssapi/tests/test_high_level.py"
21128 ((".*def test_add_with_impersonate.*" all)
21129 (string-append all " self.skipTest('" reason "')\n")))
21130 (substitute* "gssapi/tests/test_raw.py"
21131 ((".*def test_.*impersonate_name.*" all)
21132 (string-append all " self.skipTest('" reason "')\n")))
21133 #t))))))
21134 (propagated-inputs
21135 `(("python-decorator" ,python-decorator)
21136 ("python-six" ,python-six)))
21137 (inputs
21138 `(("mit-krb5" ,mit-krb5)))
21139 ;; for tests
21140 (native-inputs
21141 `(("python-shouldbe" ,python-shouldbe)
21142 ("python-parameterized" ,python-parameterized)
21143 ("python-k5test" ,python-k5test)
21144 ("python-nose" ,python-nose)))
21145 (home-page "https://github.com/pythongssapi/python-gssapi")
21146 (synopsis "Python GSSAPI Wrapper")
21147 (description
21148 "Python-GSSAPI provides both low-level and high level wrappers around the
21149 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21150 also be usable with other GSSAPI mechanisms.")
21151 (license license:isc)))
21152
21153 (define-public python-check-manifest
21154 (package
21155 (name "python-check-manifest")
21156 (version "0.37")
21157 (source
21158 (origin
21159 (method url-fetch)
21160 (uri (pypi-uri "check-manifest" version))
21161 (sha256
21162 (base32
21163 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21164 (build-system python-build-system)
21165 (native-inputs
21166 `(("python-mock" ,python-mock)
21167 ("git" ,git)))
21168 (home-page "https://github.com/mgedmin/check-manifest")
21169 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21170 (description "Python package can include a MANIFEST.in file to help with
21171 sending package files to the Python Package Index. This package checks that
21172 file to ensure it completely and accurately describes your project.")
21173 (license license:expat)))
21174
21175 (define-public python-android-stringslib
21176 (package
21177 (name "python-android-stringslib")
21178 (version "0.1.2")
21179 (source
21180 (origin
21181 (method git-fetch)
21182 (uri (git-reference
21183 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21184 (commit (string-append "v" version))))
21185 (file-name (git-file-name name version))
21186 (sha256
21187 (base32
21188 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21189 (build-system python-build-system)
21190 (arguments
21191 `(#:tests? #f))
21192 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21193 (synopsis "Android strings.xml support")
21194 (description "Android Strings Lib provides support for android's strings.xml
21195 files. These files are used to translate strings in android apps.")
21196 (license license:expat)))
21197
21198 (define-public python-watchdog
21199 (package
21200 (name "python-watchdog")
21201 (version "0.9.0")
21202 (source
21203 (origin
21204 (method url-fetch)
21205 (uri (pypi-uri "watchdog" version))
21206 (sha256
21207 (base32
21208 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21209 (build-system python-build-system)
21210 (arguments
21211 `(#:phases
21212 (modify-phases %standard-phases
21213 (add-before 'check 'remove-failing
21214 (lambda _
21215 (delete-file "tests/test_inotify_buffer.py")
21216 (delete-file "tests/test_snapshot_diff.py")
21217 #t)))))
21218 (propagated-inputs
21219 `(("python-argh" ,python-argh)
21220 ("python-pathtools" ,python-pathtools)
21221 ("python-pyyaml" ,python-pyyaml)))
21222 (native-inputs
21223 `(("python-pytest-cov" ,python-pytest-cov)
21224 ("python-pytest-timeout" ,python-pytest-timeout)))
21225 (home-page "https://github.com/gorakhargosh/watchdog")
21226 (synopsis "File system events monitoring")
21227 (description "This package provides a way to monitor file system events
21228 such as a file modification and trigger an action. This is similar to inotify,
21229 but portable.")
21230 (license license:asl2.0)))
21231
21232 (define-public python-watchgod
21233 (package
21234 (name "python-watchgod")
21235 (version "0.6")
21236 (source
21237 (origin
21238 ;; There are no tests in the PyPI tarball.
21239 (method git-fetch)
21240 (uri (git-reference
21241 (url "https://github.com/samuelcolvin/watchgod")
21242 (commit (string-append "v" version))))
21243 (file-name (git-file-name name version))
21244 (sha256
21245 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21246 (build-system python-build-system)
21247 (arguments
21248 `(#:phases
21249 (modify-phases %standard-phases
21250 (replace 'check
21251 (lambda _
21252 (invoke "pytest" "-vv"))))))
21253 (native-inputs
21254 `(("python-coverage" ,python-coverage)
21255 ("python-docutils" ,python-docutils)
21256 ("python-flake8" ,python-flake8)
21257 ("python-isort" ,python-isort)
21258 ("python-pycodestyle" ,python-pycodestyle)
21259 ("python-pyflakes" ,python-pyflakes)
21260 ("python-pygments" ,python-pygments)
21261 ("python-pytest" ,python-pytest)
21262 ("python-pytest-cov" ,python-pytest-cov)
21263 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21264 ("python-pytest-mock" ,python-pytest-mock)
21265 ("python-pytest-sugar" ,python-pytest-sugar)
21266 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21267 (home-page "https://github.com/samuelcolvin/watchgod")
21268 (synopsis "Simple, modern file watching and code reload in Python")
21269 (description
21270 "Simple, modern file watching and code reload in Python inspired by
21271 @code{watchdog}. Among the differences are a unified approach for each
21272 operating systems and an elegant approach to concurrency using threading.")
21273 (license license:expat)))
21274
21275 (define-public python-wget
21276 (package
21277 (name "python-wget")
21278 (version "3.2")
21279 (source
21280 (origin
21281 (method url-fetch)
21282 (uri (pypi-uri "wget" version ".zip"))
21283 (sha256
21284 (base32
21285 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21286 (build-system python-build-system)
21287 (native-inputs `(("unzip" ,unzip)))
21288 (home-page "https://bitbucket.org/techtonik/python-wget/")
21289 (synopsis "Pure Python download utility")
21290 (description "The python-wget library provides an API to download files
21291 with features similar to the @command{wget} utility.")
21292 (license license:unlicense)))
21293
21294 (define-public offlate
21295 (package
21296 (name "offlate")
21297 (version "0.5")
21298 (source
21299 (origin
21300 (method git-fetch)
21301 (uri (git-reference
21302 (url "https://framagit.org/tyreunom/offlate")
21303 (commit version)))
21304 (file-name (git-file-name name version))
21305 (sha256
21306 (base32
21307 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21308 (build-system python-build-system)
21309 (arguments
21310 ;; No tests
21311 `(#:tests? #f))
21312 (propagated-inputs
21313 `(("python-android-stringslib" ,python-android-stringslib)
21314 ("python-dateutil" ,python-dateutil)
21315 ("python-gitlab" ,python-gitlab)
21316 ("python-lxml" ,python-lxml)
21317 ("python-polib" ,python-polib)
21318 ("python-pyenchant" ,python-pyenchant)
21319 ("python-pygit2" ,python-pygit2)
21320 ("python-pygithub" ,python-pygithub)
21321 ("python-pyqt" ,python-pyqt)
21322 ("python-requests" ,python-requests)
21323 ("python-ruamel.yaml" ,python-ruamel.yaml)
21324 ("python-translation-finder" ,python-translation-finder)
21325 ("python-watchdog" ,python-watchdog)))
21326 (native-inputs
21327 `(("qttools" ,qttools)))
21328 (home-page "https://framagit.org/tyreunom/offlate")
21329 (synopsis "Offline translation interface for online translation tools")
21330 (description "Offlate offers a unified interface for different translation
21331 file formats, as well as many different online translation platforms. You can
21332 use it to get work from online platforms, specialized such as the Translation
21333 Project, or not such a gitlab instance when your upstream doesn't use any
21334 dedicated platform. The tool proposes a unified interface for any format and
21335 an upload option to send your work back to the platform.")
21336 (license license:gpl3+)))
21337
21338 (define-public python-titlecase
21339 (package
21340 (name "python-titlecase")
21341 (version "0.12.0")
21342 (source
21343 (origin
21344 (method url-fetch)
21345 (uri (pypi-uri "titlecase" version))
21346 (sha256
21347 (base32
21348 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21349 (build-system python-build-system)
21350 (native-inputs
21351 `(("python-nose" ,python-nose)))
21352 (home-page "https://github.com/ppannuto/python-titlecase")
21353 (synopsis "Capitalize strings similar to book titles")
21354 (description
21355 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21356 It capitalizes (predominantly English) strings in a way that is similar to
21357 book titles, using the New York Times Manual of Style to leave certain words
21358 lowercase.")
21359 (license license:expat)))
21360
21361 (define-public python-pypng
21362 (package
21363 (name "python-pypng")
21364 (version "0.0.20")
21365 (source
21366 (origin
21367 (method url-fetch)
21368 (uri (pypi-uri "pypng" version))
21369 (sha256
21370 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21371 (build-system python-build-system)
21372 (home-page "https://github.com/drj11/pypng")
21373 (synopsis "Pure Python PNG image encoder/decoder")
21374 (description
21375 "The PyPNG module implements support for PNG images. It reads and writes
21376 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21377 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21378 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21379 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21380 A number of optional chunks can be specified (when writing) and
21381 understood (when reading): tRNS, bKGD, gAMA.
21382
21383 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21384 aim at being a replacement or competitor. Its strength lies in fine-grained
21385 extensive support of PNG features. It can also read and write Netpbm PAM
21386 files, with a focus on its use as an intermediate format for implementing
21387 custom PNG processing.")
21388 (license license:expat)))
21389
21390 (define-public python-fuzzywuzzy
21391 (package
21392 (name "python-fuzzywuzzy")
21393 (version "0.18.0")
21394 (source
21395 (origin
21396 (method url-fetch)
21397 (uri (pypi-uri "fuzzywuzzy" version))
21398 (sha256
21399 (base32
21400 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21401 (build-system python-build-system)
21402 (native-inputs
21403 `(("python-hypothesis" ,python-hypothesis)
21404 ("python-pycodestyle" ,python-pycodestyle)
21405 ("python-pytest" ,python-pytest)))
21406 (propagated-inputs
21407 `(("python-levenshtein" ,python-levenshtein)))
21408 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21409 (synopsis "Fuzzy string matching in Python")
21410 (description "Approximate string matching using
21411 @emph{Levenshtein Distance} to calculate the differences between
21412 sequences.")
21413 (license license:gpl2)))
21414
21415 (define-public python2-fuzzywuzzy
21416 (package-with-python2 python-fuzzywuzzy))
21417
21418 (define-public python-block-tracing
21419 (package
21420 (name "python-block-tracing")
21421 (version "1.0.1")
21422 (source
21423 (origin
21424 (method url-fetch)
21425 (uri (pypi-uri "block_tracing" version))
21426 (sha256
21427 (base32
21428 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21429 (build-system python-build-system)
21430 (arguments '(#:tests? #f)) ; no tests
21431 (home-page "https://github.com/rianhunter/block_tracing")
21432 (synopsis "Protect process memory")
21433 (description
21434 "@code{block_tracing} is a tiny Python library that can be used to
21435 prevent debuggers and other applications from inspecting the memory within
21436 your process.")
21437 (license license:expat)))
21438
21439 (define-public python-gcovr
21440 (package
21441 (name "python-gcovr")
21442 (version "4.2")
21443 (source
21444 (origin
21445 (method url-fetch)
21446 (uri (pypi-uri "gcovr" version))
21447 (sha256
21448 (base32
21449 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21450 (build-system python-build-system)
21451 (propagated-inputs
21452 `(("python-lxml" ,python-lxml)
21453 ("python-jinja2" ,python-jinja2)))
21454 (home-page "https://gcovr.com/")
21455 (synopsis "Utility for generating code coverage results")
21456 (description
21457 "Gcovr provides a utility for managing the use of the GNU gcov
21458 utility and generating summarized code coverage results. It is inspired
21459 by the Python coverage.py package, which provides a similar utility for
21460 Python.")
21461 (license license:bsd-3)))
21462
21463 (define-public python-owslib
21464 (package
21465 (name "python-owslib")
21466 (version "0.19.2")
21467 (source
21468 (origin
21469 (method url-fetch)
21470 (uri (pypi-uri "OWSLib" version))
21471 (sha256
21472 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21473 (build-system python-build-system)
21474 (arguments
21475 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21476 (synopsis "Interface for Open Geospatial Consortium web service")
21477 (description
21478 "OWSLib is a Python package for client programming with Open Geospatial
21479 Consortium (OGC) web service (hence OWS) interface standards, and their related
21480 content models.")
21481 (home-page "https://geopython.github.io/OWSLib/")
21482 (license license:bsd-3)))
21483
21484 (define-public python-docusign-esign
21485 (package
21486 (name "python-docusign-esign")
21487 (version "3.1.0")
21488 (source (origin
21489 (method url-fetch)
21490 (uri (pypi-uri "docusign_esign" version))
21491 (sha256
21492 (base32
21493 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21494 (build-system python-build-system)
21495 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21496 (arguments `(#:tests? #f))
21497 (propagated-inputs
21498 `(("python-certifi" ,python-certifi)
21499 ("python-six" ,python-six)
21500 ("python-dateutil" ,python-dateutil)
21501 ("python-urllib3" ,python-urllib3)
21502 ("python-pyjwt" ,python-pyjwt)
21503 ("python-cryptography" ,python-cryptography)
21504 ("python-nose" ,python-nose)))
21505 (synopsis "DocuSign Python Client")
21506 (description "The Official DocuSign Python Client Library used to interact
21507 with the eSign REST API. Send, sign, and approve documents using this client.")
21508 (home-page "https://www.docusign.com/devcenter")
21509 (license license:expat)))
21510
21511 (define-public python-xattr
21512 (package
21513 (name "python-xattr")
21514 (version "0.9.7")
21515 (source
21516 (origin
21517 (method url-fetch)
21518 (uri (pypi-uri "xattr" version))
21519 (sha256
21520 (base32
21521 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21522 (build-system python-build-system)
21523 (propagated-inputs
21524 `(("python-cffi" ,python-cffi)))
21525 (home-page "https://github.com/xattr/xattr")
21526 (synopsis
21527 "Python wrapper for extended file system attributes")
21528 (description "This package provides a Python wrapper for using extended
21529 file system attributes. Extended attributes extend the basic attributes of files
21530 and directories in the file system. They are stored as name:data pairs
21531 associated with file system objects (files, directories, symlinks, etc).")
21532 (license license:expat)))
21533
21534 (define-public python-json-logger
21535 (package
21536 (name "python-json-logger")
21537 (version "0.1.11")
21538 (source
21539 (origin
21540 (method url-fetch)
21541 (uri (pypi-uri "python-json-logger" version))
21542 (sha256
21543 (base32
21544 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21545 (build-system python-build-system)
21546 (home-page
21547 "https://github.com/madzak/python-json-logger")
21548 (synopsis "JSON log formatter in Python")
21549 (description "This library allows standard Python logging to output log data
21550 as JSON objects. With JSON we can make our logs more readable by machines and
21551 we can stop writing custom parsers for syslog-type records.")
21552 (license license:bsd-3)))
21553
21554 (define-public python-daiquiri
21555 (package
21556 (name "python-daiquiri")
21557 (version "2.1.1")
21558 (source
21559 (origin
21560 (method url-fetch)
21561 (uri (pypi-uri "daiquiri" version))
21562 (sha256
21563 (base32
21564 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21565 (build-system python-build-system)
21566 (propagated-inputs
21567 `(("python-json-logger" ,python-json-logger)))
21568 (native-inputs
21569 `(("python-mock" ,python-mock)
21570 ("python-pytest" ,python-pytest)
21571 ("python-setuptools-scm" ,python-setuptools-scm)
21572 ("python-six" ,python-six)))
21573 (home-page "https://github.com/jd/daiquiri")
21574 (synopsis
21575 "Library to configure Python logging easily")
21576 (description "The daiquiri library provides an easy way to configure
21577 logging in Python. It also provides some custom formatters and handlers.")
21578 (license license:asl2.0)))
21579
21580 (define-public python-pifpaf
21581 (package
21582 (name "python-pifpaf")
21583 (version "2.5.0")
21584 (source
21585 (origin
21586 (method url-fetch)
21587 (uri (pypi-uri "pifpaf" version))
21588 (sha256
21589 (base32
21590 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21591 (build-system python-build-system)
21592 (arguments
21593 '(#:phases
21594 (modify-phases %standard-phases
21595 (replace 'check
21596 (lambda _
21597 (invoke "python" "setup.py" "testr" "--slowest"
21598 "--testr-args=until-failure"))))))
21599 (propagated-inputs
21600 `(("python-click" ,python-click)
21601 ("python-daiquiri" ,python-daiquiri)
21602 ("python-fixtures" ,python-fixtures)
21603 ("python-jinja2" ,python-jinja2)
21604 ("python-pbr" ,python-pbr)
21605 ("python-psutil" ,python-psutil)
21606 ("python-six" ,python-six)
21607 ("python-xattr" ,python-xattr)))
21608 (native-inputs
21609 `(("python-mock" ,python-mock)
21610 ("python-os-testr" ,python-os-testr)
21611 ("python-requests" ,python-requests)
21612 ("python-testrepository" ,python-testrepository)
21613 ("python-testtools" ,python-testtools)))
21614 (home-page "https://github.com/jd/pifpaf")
21615 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21616 (description "Pifpaf is a suite of fixtures and a command-line tool that
21617 starts and stops daemons for a quick throw-away usage. This is typically
21618 useful when needing these daemons to run integration testing. It originally
21619 evolved from its precursor @code{overtest}.")
21620 (license license:asl2.0)))
21621
21622 (define-public python-pytest-check-links
21623 (package
21624 (name "python-pytest-check-links")
21625 (version "0.3.0")
21626 (source
21627 (origin
21628 (method url-fetch)
21629 ;; URI uses underscores
21630 (uri (pypi-uri "pytest_check_links" version))
21631 (sha256
21632 (base32
21633 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21634 (build-system python-build-system)
21635 (propagated-inputs
21636 `(("python-docutils" ,python-docutils)
21637 ("python-html5lib" ,python-html5lib)
21638 ("python-nbconvert" ,python-nbconvert)
21639 ("python-nbformat" ,python-nbformat)
21640 ("python-pytest" ,python-pytest)
21641 ("python-six" ,python-six)))
21642 (native-inputs
21643 `(("python-pbr-minimal" ,python-pbr-minimal)))
21644 (home-page "https://github.com/minrk/pytest-check-links")
21645 (synopsis "Check links in files")
21646 (description "This package provides a pytest plugin that checks URLs for
21647 HTML-containing files.")
21648 (license license:bsd-3)))
21649
21650 (define-public python-json5
21651 (package
21652 (name "python-json5")
21653 (version "0.8.5")
21654 (source
21655 (origin
21656 ;; sample.json5 is missing from PyPi source tarball
21657 (method git-fetch)
21658 (uri (git-reference
21659 (url "https://github.com/dpranke/pyjson5")
21660 (commit (string-append "v" version))))
21661 (file-name (git-file-name name version))
21662 (sha256
21663 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21664 (build-system python-build-system)
21665 (home-page "https://github.com/dpranke/pyjson5")
21666 (synopsis
21667 "Python implementation of the JSON5 data format")
21668 (description
21669 "JSON5 extends the JSON data interchange format to make it slightly more
21670 usable as a configuration language. This Python package implements parsing and
21671 dumping of JSON5 data structures.")
21672 (license license:asl2.0)))
21673
21674 (define-public python-frozendict
21675 (package
21676 (name "python-frozendict")
21677 (version "1.2")
21678 (source
21679 (origin
21680 (method url-fetch)
21681 (uri (pypi-uri "frozendict" version))
21682 (sha256
21683 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21684 (build-system python-build-system)
21685 (home-page "https://github.com/slezica/python-frozendict")
21686 (synopsis "Simple immutable mapping for Python")
21687 (description
21688 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21689 implements the complete mapping interface. It can be used as a drop-in
21690 replacement for dictionaries where immutability is desired.")
21691 (license license:expat)))
21692
21693 (define-public python-unpaddedbase64
21694 (package
21695 (name "python-unpaddedbase64")
21696 (version "1.1.0")
21697 (source
21698 (origin
21699 (method git-fetch)
21700 (uri (git-reference
21701 (url "https://github.com/matrix-org/python-unpaddedbase64")
21702 (commit (string-append "v" version))))
21703 (file-name (git-file-name name version))
21704 (sha256
21705 (base32
21706 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21707 (build-system python-build-system)
21708 (home-page "https://pypi.org/project/unpaddedbase64/")
21709 (synopsis "Encode and decode Base64 without “=” padding")
21710 (description
21711 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21712 using “=” characters. However this conveys no benefit so many protocols
21713 choose to use Base64 without the “=” padding.")
21714 (license license:asl2.0)))
21715
21716 (define-public python-py-cpuinfo
21717 (package
21718 (name "python-py-cpuinfo")
21719 (version "5.0.0")
21720 (source
21721 (origin
21722 (method url-fetch)
21723 (uri (pypi-uri "py-cpuinfo" version))
21724 (sha256
21725 (base32
21726 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21727 (build-system python-build-system)
21728 (home-page "https://github.com/workhorsy/py-cpuinfo")
21729 (synopsis "Get CPU info with Python")
21730 (description
21731 "This Python module returns the CPU info by using the best sources of
21732 information for your operating system.")
21733 (license license:expat)))
21734
21735 (define-public python-canonicaljson
21736 (package
21737 (name "python-canonicaljson")
21738 (version "1.4.0")
21739 (source
21740 (origin
21741 (method url-fetch)
21742 (uri (pypi-uri "canonicaljson" version))
21743 (sha256
21744 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21745 (build-system python-build-system)
21746 (propagated-inputs
21747 `(("python-six" ,python-six)
21748 ("python-frozendict" ,python-frozendict)
21749 ("python-simplejson" ,python-simplejson)))
21750 (home-page "https://github.com/matrix-org/python-canonicaljson")
21751 (synopsis "Canonical JSON")
21752 (description
21753 "Deterministically encode JSON.
21754
21755 @itemize
21756 @item Encodes objects and arrays as RFC 7159 JSON.
21757 @item Sorts object keys so that you get the same result each time.
21758 @item Has no insignificant whitespace to make the output as small as possible.
21759 @item Escapes only the characters that must be escaped, U+0000 to
21760 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21761 @item Uses the shortest escape sequence for each escaped character.
21762 @item Encodes the JSON as UTF-8.
21763 @item Can encode frozendict immutable dictionaries.
21764 @end itemize")
21765 (license license:asl2.0)))
21766
21767 (define-public python-signedjson
21768 (package
21769 (name "python-signedjson")
21770 (version "1.1.1")
21771 (source
21772 (origin
21773 (method url-fetch)
21774 (uri (pypi-uri "signedjson" version))
21775 (sha256
21776 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21777 (build-system python-build-system)
21778 (propagated-inputs
21779 `(("python-canonicaljson" ,python-canonicaljson)
21780 ("python-importlib-metadata" ,python-importlib-metadata)
21781 ("python-pynacl" ,python-pynacl)
21782 ("python-typing-extensions" ,python-typing-extensions)
21783 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21784 (native-inputs
21785 `(("python-setuptools-scm" ,python-setuptools-scm)))
21786 (home-page "https://github.com/matrix-org/python-signedjson")
21787 (synopsis "Sign JSON objects with ED25519 signatures")
21788 (description
21789 "Sign JSON objects with ED25519 signatures.
21790
21791 @itemize
21792 @item More than one entity can sign the same object.
21793 @item Each entity can sign the object with more than one key making it easier to
21794 rotate keys
21795 @item ED25519 can be replaced with a different algorithm.
21796 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21797 key.
21798 @end itemize")
21799 (license license:asl2.0)))
21800
21801 (define-public python-daemonize
21802 (package
21803 (name "python-daemonize")
21804 (version "2.5.0")
21805 (source
21806 (origin
21807 (method url-fetch)
21808 (uri (pypi-uri "daemonize" version))
21809 (sha256
21810 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21811 (build-system python-build-system)
21812 (home-page "https://github.com/thesharp/daemonize")
21813 (synopsis "Library for writing system daemons in Python")
21814 (description "Daemonize is a library for writing system daemons in Python.")
21815 (license license:expat)))
21816
21817 (define-public python-pymacaroons
21818 (package
21819 (name "python-pymacaroons")
21820 (version "0.13.0")
21821 (source
21822 (origin
21823 (method url-fetch)
21824 (uri (pypi-uri "pymacaroons" version))
21825 (sha256
21826 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21827 (build-system python-build-system)
21828 (propagated-inputs
21829 `(("python-six" ,python-six)
21830 ("python-pynacl" ,python-pynacl)))
21831 (home-page "https://github.com/ecordell/pymacaroons")
21832 (synopsis "Python Macaroon Library")
21833 (description
21834 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21835 tokens, macaroons embed caveats that define specific authorization
21836 requirements for the target service, the service that issued the root macaroon
21837 and which is capable of verifying the integrity of macaroons it receives.
21838
21839 Macaroons allow for delegation and attenuation of authorization. They are
21840 simple and fast to verify, and decouple authorization policy from the
21841 enforcement of that policy.")
21842 (license license:expat)))
21843
21844 (define-public python-ldap3
21845 (package
21846 (name "python-ldap3")
21847 (version "2.7")
21848 (home-page "https://github.com/cannatag/ldap3")
21849 (source
21850 (origin
21851 (method git-fetch)
21852 (uri (git-reference (url home-page)
21853 (commit (string-append "v" version))))
21854 (file-name (git-file-name name version))
21855 (sha256
21856 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21857 (build-system python-build-system)
21858 (arguments
21859 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21860 #:phases (modify-phases %standard-phases
21861 (replace 'check
21862 (lambda* (#:key tests? #:allow-other-keys)
21863 (when tests?
21864 (invoke "nosetests" "-s" "test"))
21865 #t)))))
21866 (native-inputs
21867 `(("python-nose" ,python-nose)))
21868 (propagated-inputs
21869 `(("python-gssapi" ,python-gssapi)
21870 ("python-pyasn1" ,python-pyasn1)))
21871 (synopsis "Python LDAP client")
21872 (description
21873 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21874 library.")
21875 (license license:lgpl3+)))
21876
21877 (define-public python-boltons
21878 (package
21879 (name "python-boltons")
21880 (version "20.0.0")
21881 (source
21882 (origin
21883 (method url-fetch)
21884 (uri (pypi-uri "boltons" version))
21885 (sha256
21886 (base32
21887 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21888 (build-system python-build-system)
21889 (home-page "https://github.com/mahmoud/boltons")
21890 (synopsis "Extensions to the Python standard library")
21891 (description
21892 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21893 as — and yet conspicuously missing from — the standard library, including:
21894
21895 @itemize
21896 @item Atomic file saving, bolted on with fileutils
21897 @item A highly-optimized OrderedMultiDict, in dictutils
21898 @item Two types of PriorityQueue, in queueutils
21899 @item Chunked and windowed iteration, in iterutils
21900 @item Recursive data structure iteration and merging, with iterutils.remap
21901 @item Exponential backoff functionality, including jitter, through
21902 iterutils.backoff
21903 @item A full-featured TracebackInfo type, for representing stack traces, in
21904 tbutils
21905 @end itemize")
21906 (license license:bsd-3)))
21907
21908 (define-public python-eliot
21909 (package
21910 (name "python-eliot")
21911 (version "1.12.0")
21912 (source
21913 (origin
21914 (method url-fetch)
21915 (uri (pypi-uri "eliot" version))
21916 (sha256
21917 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21918 (build-system python-build-system)
21919 (arguments
21920 `(#:phases
21921 (modify-phases %standard-phases
21922 (add-after 'unpack 'remove-journald-support
21923 (lambda _
21924 (for-each delete-file
21925 '("eliot/tests/test_journald.py"
21926 "eliot/journald.py"))
21927 #t))
21928 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21929 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21930 ;; be installed and these tests should pass.
21931 (lambda _
21932 (delete-file "eliot/tests/test_prettyprint.py")
21933 #t)))))
21934 (propagated-inputs
21935 `(("python-boltons" ,python-boltons)
21936 ("python-pyrsistent" ,python-pyrsistent)
21937 ("python-six" ,python-six)
21938 ("python-zope-interface" ,python-zope-interface)))
21939 (native-inputs
21940 `(("python-black" ,python-black)
21941 ("python-coverage" ,python-coverage)
21942 ("python-dask" ,python-dask)
21943 ("python-flake8" ,python-flake8)
21944 ("python-hypothesis" ,python-hypothesis)
21945 ("python-pytest" ,python-pytest)
21946 ("python-setuptools" ,python-setuptools)
21947 ("python-sphinx" ,python-sphinx)
21948 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21949 ("python-testtools" ,python-testtools)
21950 ("python-twine" ,python-twine)
21951 ("python-twisted" ,python-twisted)))
21952 (home-page "https://github.com/itamarst/eliot/")
21953 (synopsis "Eliot: the logging system that tells you why it happened")
21954 (description
21955 "@dfn{eliot} is a Python logging system that outputs causal chains of
21956 actions: actions can spawn other actions, and eventually they either succeed
21957 or fail. The resulting logs tell you the story of what your software did: what
21958 happened, and what caused it.")
21959 (license license:asl2.0)))
21960
21961 (define-public python-pem
21962 (package
21963 (name "python-pem")
21964 (version "20.1.0")
21965 (source
21966 (origin
21967 (method url-fetch)
21968 (uri (pypi-uri "pem" version))
21969 (sha256
21970 (base32
21971 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21972 (build-system python-build-system)
21973 (native-inputs
21974 `(("python-certifi" ,python-certifi)
21975 ("python-coverage" ,python-coverage)
21976 ("python-pretend" ,python-pretend)
21977 ("python-pyopenssl" ,python-pyopenssl)
21978 ("python-pytest" ,python-pytest)
21979 ("python-sphinx" ,python-sphinx)
21980 ("python-twisted" ,python-twisted)))
21981 (home-page "https://pem.readthedocs.io/")
21982 (synopsis "Easy PEM file parsing in Python")
21983 (description
21984 "This package provides a Python module for parsing and splitting PEM files.")
21985 (license license:expat)))
21986
21987 (define-public python-txsni
21988 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21989 ;; Python and OpenSSL.
21990 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21991 (revision "0"))
21992 (package
21993 (name "python-txsni")
21994 (version (git-version "0.1.9" revision commit))
21995 (home-page "https://github.com/glyph/txsni")
21996 (source
21997 (origin
21998 (method git-fetch)
21999 (uri (git-reference (url home-page) (commit commit)))
22000 (file-name (git-file-name name version))
22001 (sha256
22002 (base32
22003 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22004 (build-system python-build-system)
22005 (propagated-inputs
22006 `(("python-pyopenssl" ,python-pyopenssl)
22007 ("python-service-identity" ,python-service-identity)
22008 ("python-twisted" ,python-twisted)))
22009 (synopsis "Run TLS servers with Twisted")
22010 (description
22011 "This package provides an easy-to-use SNI endpoint for use
22012 with the Twisted web framework.")
22013 (license license:expat))))
22014
22015 (define-public python-txacme
22016 (package
22017 (name "python-txacme")
22018 (version "0.9.2")
22019 (source
22020 (origin
22021 (method url-fetch)
22022 (uri (pypi-uri "txacme" version))
22023 (sha256
22024 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22025 (build-system python-build-system)
22026 (propagated-inputs
22027 `(("python-acme" ,python-acme)
22028 ("python-attrs" ,python-attrs)
22029 ("python-eliot" ,python-eliot)
22030 ("python-josepy" ,python-josepy)
22031 ("python-pem" ,python-pem)
22032 ("python-treq" ,python-treq)
22033 ("python-twisted" ,python-twisted)
22034 ("python-txsni" ,python-txsni)))
22035 (native-inputs
22036 `(("python-fixtures" ,python-fixtures)
22037 ("python-hypothesis" ,python-hypothesis)
22038 ("python-mock" ,python-mock)
22039 ("python-service-identity"
22040 ,python-service-identity)
22041 ("python-testrepository" ,python-testrepository)
22042 ("python-testscenarios" ,python-testscenarios)
22043 ("python-testtools" ,python-testtools)))
22044 (home-page "https://github.com/twisted/txacme")
22045 (synopsis "Twisted implexmentation of the ACME protocol")
22046 (description
22047 "ACME is Automatic Certificate Management Environment, a protocol that
22048 allows clients and certificate authorities to automate verification and
22049 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22050 Certificate Authority.
22051
22052 txacme is an implementation of the protocol for Twisted, the event-driven
22053 networking engine for Python.")
22054 (license license:expat)))
22055
22056 (define-public python-pysaml2
22057 (package
22058 (name "python-pysaml2")
22059 (version "5.0.0")
22060 (source
22061 (origin
22062 (method url-fetch)
22063 (uri (pypi-uri "pysaml2" version))
22064 (sha256
22065 (base32
22066 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
22067 (build-system python-build-system)
22068 (propagated-inputs
22069 `(("python-cryptography" ,python-cryptography)
22070 ("python-dateutil" ,python-dateutil)
22071 ("python-defusedxml" ,python-defusedxml)
22072 ("python-pyopenssl" ,python-pyopenssl)
22073 ("python-pytz" ,python-pytz)
22074 ("python-requests" ,python-requests)
22075 ("python-six" ,python-six)))
22076 (home-page "https://idpy.org")
22077 (synopsis "Python implementation of SAML Version 2 Standard")
22078 (description
22079 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22080 It contains all necessary pieces for building a SAML2 service provider or
22081 an identity provider. The distribution contains examples of both.
22082
22083 This package was originally written to work in a WSGI environment, but
22084 there are extensions that allow you to use it with other frameworks.")
22085 (license license:asl2.0)))
22086
22087 (define-public python-click-plugins
22088 (package
22089 (name "python-click-plugins")
22090 (version "1.1.1")
22091 (source
22092 (origin
22093 (method url-fetch)
22094 (uri (pypi-uri "click-plugins" version))
22095 (sha256
22096 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22097 (build-system python-build-system)
22098 (native-inputs
22099 `(("python-pytest" ,python-pytest)))
22100 (propagated-inputs
22101 `(("python-click" ,python-click)))
22102 (synopsis "Extension for Click to register external CLI commands")
22103 (description "This package provides n extension module for Click to
22104 register external CLI commands via setuptools entry-points.")
22105 (home-page "https://github.com/click-contrib/click-plugins")
22106 (license license:bsd-3)))
22107
22108 (define-public python-diceware
22109 (package
22110 (name "python-diceware")
22111 (version "0.9.6")
22112 (source
22113 (origin
22114 (method url-fetch)
22115 (uri (pypi-uri "diceware" version))
22116 (sha256
22117 (base32
22118 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22119 (build-system python-build-system)
22120 (native-inputs
22121 `(("python-coverage" ,python-coverage)
22122 ("python-pytest" ,python-pytest)
22123 ("python-pytest-runner" ,python-pytest-runner)))
22124 (home-page "https://github.com/ulif/diceware/")
22125 (synopsis "Generates memorable passphrases")
22126 (description "This package generates passphrases by concatenating words
22127 randomly picked from wordlists. It supports several sources of
22128 randomness (including real life dice) and different wordlists (including
22129 cryptographically signed ones).")
22130 (license license:gpl3+)))
22131
22132 (define-public python-dictdiffer
22133 (package
22134 (name "python-dictdiffer")
22135 (version "0.8.1")
22136 (source (origin
22137 (method url-fetch)
22138 (uri (pypi-uri "dictdiffer" version))
22139 (sha256
22140 (base32
22141 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22142 (build-system python-build-system)
22143 (native-inputs
22144 `(("python-check-manifest" ,python-check-manifest)
22145 ("python-coverage" ,python-coverage)
22146 ("python-isort" ,python-isort)
22147 ("python-mock" ,python-mock)
22148 ("python-pydoctstyle" ,python-pydocstyle)
22149 ("python-pytest-cache" ,python-pytest-cache)
22150 ("python-pytest-cov" ,python-pytest-cov)
22151 ("python-pytest-pep8" ,python-pytest-pep8)
22152 ("python-pytest-runner" ,python-pytest-runner)
22153 ("python-pytest" ,python-pytest)
22154 ("python-setuptools-scm" ,python-setuptools-scm)
22155 ("python-tox" ,python-tox)))
22156 (home-page "https://github.com/inveniosoftware/dictdiffer")
22157 (synopsis "Diff and patch Python dictionary objects")
22158 (description
22159 "Dictdiffer is a Python module that helps you to diff and patch
22160 dictionaries.")
22161 (license license:expat)))
22162
22163 (define-public pyzo
22164 (package
22165 (name "pyzo")
22166 (version "4.11.2")
22167 (source
22168 (origin
22169 (method url-fetch)
22170 (uri (pypi-uri "pyzo" version))
22171 (sha256
22172 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22173 (build-system python-build-system)
22174 (arguments
22175 `(#:phases
22176 (modify-phases %standard-phases
22177 (add-before 'check 'fix-home-directory
22178 (lambda _
22179 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22180 (setenv "HOME" "/tmp")
22181 #t)))
22182 ;; Tests fail with "Uncaught Python exception: python: undefined
22183 ;; symbol: objc_getClass".
22184 #:tests? #f))
22185 (propagated-inputs
22186 `(("python-pyqt" ,python-pyqt)))
22187 (home-page "https://pyzo.org")
22188 (synopsis
22189 "Python IDE for scientific computing")
22190 (description
22191 "Pyzo is a Python IDE focused on interactivity and introspection,
22192 which makes it very suitable for scientific computing. Its practical
22193 design is aimed at simplicity and efficiency.
22194
22195 It consists of two main components, the editor and the shell, and uses
22196 a set of pluggable tools to help the programmer in various ways. Some
22197 example tools are source structure, project manager, interactive help,
22198 workspace...")
22199 (license license:bsd-2)))
22200
22201 (define-public python-osc
22202 (package
22203 (name "python-osc")
22204 (version "1.7.4")
22205 (source
22206 (origin
22207 (method url-fetch)
22208 (uri (pypi-uri "python-osc" version))
22209 (sha256
22210 (base32
22211 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22212 (build-system python-build-system)
22213 (home-page "https://github.com/attwad/python-osc")
22214 (synopsis "Open Sound Control server and client implementations")
22215 (description
22216 "@code{python-osc} is a pure Python library with no external
22217 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22218 Open Sound Control 1.0} specification.")
22219 (license license:unlicense)))
22220
22221 (define-public python-voluptuous
22222 (package
22223 (name "python-voluptuous")
22224 (version "0.11.7")
22225 (source
22226 (origin
22227 (method url-fetch)
22228 (uri (pypi-uri "voluptuous" version))
22229 (sha256
22230 (base32
22231 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22232 (build-system python-build-system)
22233 (native-inputs
22234 `(("python-nose" ,python-nose)))
22235 (home-page "https://github.com/alecthomas/voluptuous")
22236 (synopsis "Python data validation library")
22237 (description
22238 "Voluptuous is a Python data validation library. It is primarily
22239 intended for validating data coming into Python as JSON, YAML, etc.")
22240 (license license:bsd-3)))
22241
22242 (define-public python-cmd2
22243 (package
22244 (name "python-cmd2")
22245 (version "1.0.2")
22246 (source
22247 (origin
22248 (method url-fetch)
22249 (uri (pypi-uri "cmd2" version))
22250 (sha256
22251 (base32
22252 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22253 (build-system python-build-system)
22254 (propagated-inputs
22255 `(("python-attrs" ,python-attrs)
22256 ("python-colorama" ,python-colorama)
22257 ("python-pyperclip" ,python-pyperclip)
22258 ("python-wcwidth" ,python-wcwidth)))
22259 (native-inputs
22260 `(("python-codecov" ,python-codecov)
22261 ("python-coverage" ,python-coverage)
22262 ("python-doc8" ,python-doc8)
22263 ("python-flake8" ,python-flake8)
22264 ("python-invoke" ,python-invoke)
22265 ("python-mock" ,python-mock)
22266 ("python-pytest" ,python-pytest)
22267 ("python-pytest-cov" ,python-pytest-cov)
22268 ("python-pytest-mock" ,python-pytest-mock)
22269 ("python-setuptools-scm" ,python-setuptools-scm)
22270 ("python-sphinx" ,python-sphinx)
22271 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22272 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22273 ("python-tox" ,python-tox)
22274 ("python-twine" ,python-twine)
22275 ("which" ,which)))
22276 (home-page "https://github.com/python-cmd2/cmd2")
22277 (synopsis "Tool for building interactive command line applications")
22278 (description
22279 "Cmd2 is a tool for building interactive command line applications in
22280 Python. Its goal is to make it quick and easy for developers to build
22281 feature-rich and user-friendly interactive command line applications. It
22282 provides a simple API which is an extension of Python's built-in @code{cmd}
22283 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22284 make your life easier and eliminates much of the boilerplate code which would
22285 be necessary when using @code{cmd}.")
22286 (license license:expat)))
22287
22288 (define-public python-pytidylib
22289 (package
22290 (name "python-pytidylib")
22291 (version "0.3.2")
22292 (source (origin
22293 (method url-fetch)
22294 (uri (pypi-uri "pytidylib" version))
22295 (sha256
22296 (base32
22297 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22298 (build-system python-build-system)
22299 (arguments
22300 '(#:phases
22301 (modify-phases %standard-phases
22302 (add-before 'build 'qualify-libtidy
22303 (lambda* (#:key inputs #:allow-other-keys)
22304 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22305 "/lib/libtidy.so")))
22306 (substitute* "tidylib/tidy.py"
22307 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22308 (format #f "'~a'" libtidy)))
22309 #t))))))
22310 (inputs `(("tidy" ,tidy)))
22311 (home-page "https://github.com/countergram/pytidylib")
22312 (synopsis "Python wrapper for HTML Tidy library")
22313 (description
22314 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22315 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22316 (license license:expat)))
22317
22318 (define-public python2-pytidylib
22319 (package-with-python2 python-pytidylib))
22320
22321 (define-public python-mujson
22322 (package
22323 (name "python-mujson")
22324 (version "1.4")
22325 (source
22326 (origin
22327 (method url-fetch)
22328 (uri (pypi-uri "mujson" version))
22329 (sha256
22330 (base32
22331 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22332 (build-system python-build-system)
22333 (home-page "https://github.com/mattgiles/mujson")
22334 (synopsis "Use the fastest JSON functions available at import time")
22335 (description "This package selects the fastest JSON functions available
22336 at import time.")
22337 (license license:expat)))
22338
22339 (define-public python-bashlex
22340 (package
22341 (name "python-bashlex")
22342 (version "0.14")
22343 (source
22344 (origin
22345 (method url-fetch)
22346 (uri (pypi-uri "bashlex" version))
22347 (sha256
22348 (base32
22349 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22350 (build-system python-build-system)
22351 (arguments
22352 `(#:phases
22353 (modify-phases %standard-phases
22354 (add-before 'build 'pregenerate-yacc-tables
22355 (lambda _
22356 ;; parser.py caches tables, which attempts to write to site lib
22357 ;; see https://github.com/idank/bashlex/issues/51
22358 (invoke "python" "-c" "import bashlex"))))))
22359 (home-page
22360 "https://github.com/idank/bashlex")
22361 (synopsis "Python parser for bash")
22362 (description "@code{bashlex} is a Python port of the parser used
22363 internally by GNU bash.
22364
22365 For the most part it's transliterated from C, the major differences are:
22366
22367 @itemize
22368 @item it does not execute anything
22369 @item it is reentrant
22370 @item it generates a complete AST
22371 @end itemize
22372 ")
22373 (license license:gpl3+)))
22374
22375 (define-public python-jinxed
22376 (package
22377 (name "python-jinxed")
22378 (version "1.0.0")
22379 (source
22380 (origin
22381 (method url-fetch)
22382 (uri (pypi-uri "jinxed" version))
22383 (sha256
22384 (base32
22385 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22386 (build-system python-build-system)
22387 (arguments
22388 '(#:phases
22389 (modify-phases %standard-phases
22390 (add-before 'check 'set-environment-variables
22391 (lambda* (#:key inputs #:allow-other-keys)
22392 (let ((ncurses (assoc-ref inputs "ncurses")))
22393 (setenv "TERM" "LINUX")
22394 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22395 #t))))
22396 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22397 (native-inputs
22398 `(("ncurses" ,ncurses)))
22399 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22400 (synopsis "Jinxed Terminal Library")
22401 (description
22402 "Jinxed is an implementation of a subset of the Python curses library.")
22403 (license license:mpl2.0)))
22404
22405 (define-public python-blessed
22406 (package
22407 (name "python-blessed")
22408 (version "1.17.8")
22409 (source
22410 (origin
22411 (method url-fetch)
22412 (uri (pypi-uri "blessed" version))
22413 (sha256
22414 (base32
22415 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22416 (modules '((guix build utils)))
22417 (snippet
22418 '(begin
22419 ;; Don't get hung up on Windows test failures.
22420 (delete-file "blessed/win_terminal.py") #t))))
22421 (build-system python-build-system)
22422 (propagated-inputs
22423 `(("python-jinxed" ,python-jinxed)
22424 ("python-six" ,python-six)
22425 ("python-wcwidth" ,python-wcwidth)))
22426 (native-inputs
22427 `(("python-mock" ,python-mock)
22428 ("python-pytest" ,python-pytest)))
22429 (home-page "https://github.com/jquast/blessed")
22430 (synopsis "Wrapper around terminal capabilities")
22431 (description
22432 "Blessed is a thin, practical wrapper around terminal styling, screen
22433 positioning, and keyboard input.")
22434 (license license:expat)))
22435
22436 (define-public python-readme-renderer
22437 (package
22438 (name "python-readme-renderer")
22439 (version "26.0")
22440 (source
22441 (origin
22442 (method url-fetch)
22443 (uri (pypi-uri "readme_renderer" version))
22444 (sha256
22445 (base32
22446 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22447 (build-system python-build-system)
22448 (propagated-inputs
22449 `(("python-bleach" ,python-bleach)
22450 ("python-docutils" ,python-docutils)
22451 ("python-pygments" ,python-pygments)
22452 ("python-six" ,python-six)))
22453 (native-inputs
22454 `(("python-mock" ,python-mock)
22455 ("python-pytest" ,python-pytest)))
22456 (home-page "https://github.com/pypa/readme_renderer")
22457 (synopsis "Render README files in Warehouse")
22458 (description
22459 "Readme Renderer is a library that will safely render arbitrary README
22460 files into HTML. It is designed to be used in Warehouse to render the
22461 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22462 and plain text.")
22463 (license license:asl2.0)))
22464
22465 (define-public python-lazr-delegates
22466 (package
22467 (name "python-lazr-delegates")
22468 (version "2.0.4")
22469 (source
22470 (origin
22471 (method url-fetch)
22472 (uri (pypi-uri "lazr.delegates" version))
22473 (sha256
22474 (base32
22475 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22476 (build-system python-build-system)
22477 (arguments
22478 '(#:phases
22479 (modify-phases %standard-phases
22480 (replace 'check
22481 (lambda _
22482 (invoke "python" "setup.py" "nosetests"))))))
22483 (native-inputs
22484 `(("python-nose" ,python-nose)))
22485 (propagated-inputs
22486 `(("python-zope-interface" ,python-zope-interface)))
22487 (home-page "https://launchpad.net/lazr.delegates")
22488 (synopsis "Easily write objects that delegate behavior")
22489 (description
22490 "The @code{lazr.delegates} package makes it easy to write objects that
22491 delegate behavior to another object. The new object adds some property or
22492 behavior on to the other object, while still providing the underlying interface,
22493 and delegating behavior.")
22494 (license license:lgpl3)))
22495
22496 (define-public python-lazr-config
22497 (package
22498 (name "python-lazr-config")
22499 (version "2.2.2")
22500 (source
22501 (origin
22502 (method url-fetch)
22503 (uri (pypi-uri "lazr.config" version))
22504 (sha256
22505 (base32
22506 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22507 (build-system python-build-system)
22508 (arguments
22509 '(#:phases
22510 (modify-phases %standard-phases
22511 (replace 'check
22512 (lambda _
22513 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22514 (native-inputs
22515 `(("python-nose" ,python-nose)))
22516 (propagated-inputs
22517 `(("python-lazr-delegates" ,python-lazr-delegates)
22518 ("python-zope-interface" ,python-zope-interface)))
22519 (home-page "https://launchpad.net/lazr.config")
22520 (synopsis "Create configuration schemas and process and validate configurations")
22521 (description
22522 "The LAZR config system is typically used to manage process configuration.
22523 Process configuration is for saying how things change when we run systems on
22524 different machines, or under different circumstances. This system uses ini-like
22525 file format of section, keys, and values. The config file supports inheritance
22526 to minimize duplication of information across files. The format supports schema
22527 validation.")
22528 (license license:lgpl3)))
22529
22530 (define-public python-flufl-bounce
22531 (package
22532 (name "python-flufl-bounce")
22533 (version "3.0.1")
22534 (source
22535 (origin
22536 (method url-fetch)
22537 (uri (pypi-uri "flufl.bounce" version))
22538 (sha256
22539 (base32
22540 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22541 (build-system python-build-system)
22542 (propagated-inputs
22543 `(("python-atpublic" ,python-atpublic)
22544 ("python-zope-interface" ,python-zope-interface)))
22545 (native-inputs
22546 `(("python-nose2" ,python-nose2)))
22547 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22548 (synopsis "Email bounce detectors")
22549 (description "The @code{flufl.bounce} library provides a set of heuristics
22550 and an API for detecting the original bouncing email addresses from a bounce
22551 message. Many formats found in the wild are supported, as are VERP and
22552 RFC 3464.")
22553 (license (list license:asl2.0
22554 license:lgpl3)))) ; only for setup_headers.py
22555
22556 (define-public python-flufl-i18n
22557 (package
22558 (name "python-flufl-i18n")
22559 (version "3.0")
22560 (source
22561 (origin
22562 (method url-fetch)
22563 (uri (pypi-uri "flufl.i18n" version))
22564 (sha256
22565 (base32
22566 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22567 (build-system python-build-system)
22568 (propagated-inputs
22569 `(("python-atpublic" ,python-atpublic)))
22570 (home-page "https://flufli18n.readthedocs.io")
22571 (synopsis "API for Python internationalization")
22572 (description
22573 "This package provides a high-level, convenient API for managing
22574 internationalization/translation contexts in Python applications. There is a
22575 simple API for single-context applications, such as command line scripts which
22576 only need to translate into one language during the entire course of their
22577 execution. There is a more flexible, but still convenient API for multi-context
22578 applications, such as servers, which may need to switch language contexts for
22579 different tasks.")
22580 (license license:asl2.0)))
22581
22582 (define-public python-flufl-lock
22583 (package
22584 (name "python-flufl-lock")
22585 (version "4.0")
22586 (source
22587 (origin
22588 (method url-fetch)
22589 (uri (pypi-uri "flufl.lock" version))
22590 (sha256
22591 (base32
22592 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22593 (build-system python-build-system)
22594 (propagated-inputs
22595 `(("python-atpublic" ,python-atpublic)
22596 ("python-psutil" ,python-psutil)))
22597 (home-page "https://flufllock.readthedocs.io")
22598 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22599 (description
22600 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22601 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22602 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22603 and have a maximum lifetime built-in.")
22604 (license (list license:asl2.0
22605 license:lgpl3)))) ; only for setup_helpers.py
22606
22607 (define-public python-flufl-testing
22608 (package
22609 (name "python-flufl-testing")
22610 (version "0.8")
22611 (source
22612 (origin
22613 (method url-fetch)
22614 (uri (pypi-uri "flufl.testing" version))
22615 (sha256
22616 (base32
22617 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22618 (build-system python-build-system)
22619 (native-inputs
22620 `(("python-nose2" ,python-nose2)))
22621 (home-page "https://gitlab.com/warsaw/flufl.testing")
22622 (synopsis "Collection of test tool plugins")
22623 (description
22624 "This package contains a small collection of test tool plugins for
22625 @code{nose2} and @code{flake8}.")
22626 (license license:asl2.0)))
22627
22628 (define-public python-devtools
22629 (package
22630 (name "python-devtools")
22631 (version "0.6")
22632 (source
22633 (origin
22634 (method git-fetch)
22635 (uri (git-reference
22636 (url "https://github.com/samuelcolvin/python-devtools")
22637 (commit (string-append "v" version))))
22638 (file-name (git-file-name name version))
22639 (sha256
22640 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22641 (build-system python-build-system)
22642 (native-inputs
22643 `(("python-pytest" ,python-pytest)
22644 ("python-pytest-mock" ,python-pytest-mock)))
22645 (propagated-inputs
22646 `(("python-pygments" ,python-pygments)))
22647 (arguments
22648 `(#:phases (modify-phases %standard-phases
22649 (replace 'check
22650 (lambda _
22651 (invoke "pytest")
22652 #t)))))
22653 (home-page "https://github.com/samuelcolvin/python-devtools")
22654 (synopsis "Debug command and development tools")
22655 (description
22656 "This package provides a debug print command and other development tools.
22657 It adds a simple and readable way to print stuff during development.")
22658 (license license:expat)))
22659
22660 (define-public python-dateparser
22661 (package
22662 (name "python-dateparser")
22663 (version "0.7.6")
22664 (source
22665 (origin
22666 (method url-fetch)
22667 (uri (pypi-uri "dateparser" version))
22668 (sha256
22669 (base32
22670 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22671 (build-system python-build-system)
22672 (propagated-inputs
22673 `(("python-dateutil" ,python-dateutil)
22674 ("python-pytz" ,python-pytz)
22675 ("python-regex" ,python-regex)
22676 ("python-ruamel.yaml" ,python-ruamel.yaml)
22677 ("python-tzlocal" ,python-tzlocal)))
22678 (native-inputs
22679 `(("python-mock" ,python-mock)
22680 ("python-parameterized" ,python-parameterized)
22681 ("tzdata" ,tzdata-for-tests)))
22682 (arguments
22683 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22684 #:tests? #f
22685 #:phases
22686 (modify-phases %standard-phases
22687 (add-before 'check 'set-check-environment
22688 (lambda* (#:key inputs #:allow-other-keys)
22689 (setenv "TZ" "UTC")
22690 (setenv "TZDIR"
22691 (string-append (assoc-ref inputs "tzdata")
22692 "/share/zoneinfo"))
22693 #t)))))
22694 (home-page "https://github.com/scrapinghub/dateparser")
22695 (synopsis
22696 "Date parsing library designed to parse dates from HTML pages")
22697 (description
22698 "@code{python-dateparser} provides modules to easily parse localized
22699 dates in almost any string formats commonly found on web pages.")
22700 (license license:bsd-3)))
22701
22702 (define-public python-dparse
22703 (package
22704 (name "python-dparse")
22705 (version "0.5.1")
22706 (source
22707 (origin
22708 (method url-fetch)
22709 (uri (pypi-uri "dparse" version))
22710 (sha256
22711 (base32
22712 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22713 (build-system python-build-system)
22714 (native-inputs
22715 `(("python-pytest" ,python-pytest)))
22716 (propagated-inputs
22717 `(("python-packaging" ,python-packaging)
22718 ("python-pyyaml" ,python-pyyaml)
22719 ("python-toml" ,python-toml)))
22720 (home-page "https://github.com/pyupio/dparse")
22721 (synopsis "Parser for Python dependency files")
22722 (description "This package provides a parser for Python dependency files.")
22723 (license license:expat)))
22724
22725 (define-public python-dpath
22726 (package
22727 (name "python-dpath")
22728 (version "2.0.1")
22729 (source
22730 (origin
22731 (method url-fetch)
22732 (uri (pypi-uri "dpath" version))
22733 (sha256
22734 (base32
22735 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22736 (build-system python-build-system)
22737 (native-inputs
22738 `(("python-hypothesis" ,python-hypothesis)
22739 ("python-mock" ,python-mock)
22740 ("python-nose" ,python-nose)))
22741 (arguments
22742 '(#:phases
22743 (modify-phases %standard-phases
22744 (replace 'check
22745 (lambda* (#:key inputs outputs #:allow-other-keys)
22746 (add-installed-pythonpath inputs outputs)
22747 ;; This invokation is taken from tox.ini.
22748 (invoke "nosetests" "-d" "-v" "tests/"))))))
22749 (home-page "https://github.com/akesterson/dpath-python")
22750 (synopsis "Filesystem-like pathing and searching for dictionaries")
22751 (description
22752 "@code{python-dpath} is a library for accessing and searching
22753 dictionaries via /slashed/paths ala xpath.
22754
22755 Basically it lets you glob over a dictionary as if it were a filesystem. It
22756 allows you to specify globs (ala the bash eglob syntax, through some advanced
22757 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22758 facility for filtering those results.")
22759 (license license:expat)))
22760
22761 (define-public python-safety
22762 (package
22763 (name "python-safety")
22764 (version "1.9.0")
22765 (source
22766 (origin
22767 (method url-fetch)
22768 (uri (pypi-uri "safety" version))
22769 (sha256
22770 (base32
22771 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22772 (build-system python-build-system)
22773 (arguments
22774 `(#:phases
22775 (modify-phases %standard-phases
22776 (add-after 'unpack 'disable-tests
22777 (lambda _
22778 (substitute* "tests/test_safety.py"
22779 ;; requires network
22780 (("def test_check_live") "def _test_check_live"))
22781 #t)))))
22782 (propagated-inputs
22783 `(("python-click" ,python-click)
22784 ("python-dparse" ,python-dparse)
22785 ("python-packaging" ,python-packaging)
22786 ("python-requests" ,python-requests)))
22787 (home-page "https://github.com/pyupio/safety")
22788 (synopsis "Check installed dependencies for known vulnerabilities")
22789 (description "Safety checks installed dependencies for known vulnerabilities.
22790 By default it uses the open Python vulnerability database Safety DB.")
22791 (license license:expat)))
22792
22793 (define-public python-pypandoc
22794 (package
22795 (name "python-pypandoc")
22796 (version "1.5")
22797 (source
22798 (origin
22799 (method url-fetch)
22800 (uri (pypi-uri "pypandoc" version))
22801 (sha256
22802 (base32
22803 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22804 (build-system python-build-system)
22805 (inputs
22806 `(("pandoc" ,pandoc)
22807 ("pandoc-citeproc" ,pandoc-citeproc)))
22808 (propagated-inputs
22809 `(("wheel" ,python-wheel)))
22810 (native-inputs
22811 `(("texlive" ,(texlive-union (list texlive-amsfonts
22812 texlive-fonts-ec
22813 texlive-latex-hyperref
22814 texlive-latex-oberdiek
22815 texlive-lm
22816 texlive-xcolor)))))
22817 (arguments
22818 `(#:phases
22819 (modify-phases %standard-phases
22820 (add-before 'check 'disable-tests
22821 (lambda _
22822 ;; Disable test requiring network access
22823 (substitute* "tests.py"
22824 (("test_basic_conversion_from_http_url")
22825 "skip_test_basic_conversion_from_http_url"))
22826 ;; Needed by texlive-union to generate fonts
22827 (setenv "HOME" "/tmp")
22828 #t)))))
22829 (home-page "https://github.com/bebraw/pypandoc")
22830 (synopsis "Python wrapper for pandoc")
22831 (description "pypandoc is a thin Python wrapper around pandoc
22832 and pandoc-citeproc.")
22833 (license license:expat)))
22834
22835 (define-public python-rnc2rng
22836 (package
22837 (name "python-rnc2rng")
22838 (version "2.6.4")
22839 (source
22840 (origin
22841 (method url-fetch)
22842 (uri (pypi-uri "rnc2rng" version))
22843 (sha256
22844 (base32
22845 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22846 (build-system python-build-system)
22847 (propagated-inputs
22848 `(("python-rply" ,python-rply)))
22849 (arguments
22850 `(#:phases (modify-phases %standard-phases
22851 (replace 'check
22852 (lambda _
22853 (invoke "python" "test.py"))))))
22854 (home-page "https://github.com/djc/rnc2rng")
22855 (synopsis "Convert RELAX NG Compact to regular syntax")
22856 (description
22857 "This package provides the @command{rnc2rng} command-line tool as well as
22858 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22859 equivalent schemata in the XML-based default RELAX NG syntax.")
22860 (license license:expat)))
22861
22862 (define-public python-telethon
22863 (package
22864 (name "python-telethon")
22865 (version "1.17.5")
22866 (source
22867 (origin
22868 (method git-fetch)
22869 (uri (git-reference
22870 (url "https://github.com/LonamiWebs/Telethon")
22871 (commit (string-append "v" version))))
22872 (file-name (git-file-name name version))
22873 (sha256
22874 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
22875 (build-system python-build-system)
22876 (arguments
22877 '(#:phases
22878 (modify-phases %standard-phases
22879 (replace 'check
22880 (lambda* (#:key tests? #:allow-other-keys)
22881 (when tests?
22882 (invoke "py.test" "-v"))
22883 #t)))))
22884 (propagated-inputs
22885 `(("python-rsa" ,python-rsa)
22886 ("python-pyaes" ,python-pyaes)))
22887 (native-inputs
22888 `(("python-pytest" ,python-pytest)
22889 ("python-pytest-asyncio" ,python-pytest-asyncio)
22890 ("python-pytest-trio" ,python-pytest-trio)))
22891 (home-page "https://docs.telethon.dev")
22892 (synopsis "Full-featured Telegram client library for Python 3")
22893 (description "This library is designed to make it easy to write Python
22894 programs that can interact with Telegram.")
22895 (license license:expat)))
22896
22897 (define-public python-citeproc-py
22898 (package
22899 (name "python-citeproc-py")
22900 (version "0.5.1")
22901 (source
22902 (origin
22903 (method url-fetch)
22904 (uri (pypi-uri "citeproc-py" version))
22905 (sha256
22906 (base32
22907 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22908 (build-system python-build-system)
22909 (propagated-inputs
22910 `(("python-lxml" ,python-lxml)
22911 ("python-rnc2rng" ,python-rnc2rng)))
22912 (home-page
22913 "https://github.com/brechtm/citeproc-py")
22914 (synopsis "Citations and bibliography formatter")
22915 (description
22916 "Citeproc-py is a CSL processor for Python. It aims to implement the
22917 CSL 1.0.1 specification. citeproc-py can output styled citations and
22918 bibliographies in a number of different output formats. Currently supported
22919 are plain text, reStructuredText and HTML.")
22920 (license license:bsd-2)))
22921
22922 (define-public python-inform
22923 (package
22924 (name "python-inform")
22925 (version "1.23.0")
22926 (source
22927 (origin
22928 (method url-fetch)
22929 (uri (pypi-uri "inform" version))
22930 (sha256
22931 (base32
22932 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22933 (build-system python-build-system)
22934 (arguments
22935 `(#:tests? #f)) ; PyPI tarball lacks tests
22936 (native-inputs
22937 `(("python-hypothesis" ,python-hypothesis)
22938 ("python-pytest-cov" ,python-pytest-cov)
22939 ("python-pytest-runner" ,python-pytest-runner)))
22940 (propagated-inputs
22941 `(("python-arrow" ,python-arrow)
22942 ("python-six" ,python-six)))
22943 (home-page "https://inform.readthedocs.io")
22944 (synopsis "Print & logging utilities for communicating with user")
22945 (description
22946 "Inform is designed to display messages from programs that are typically run from
22947 a console. It provides a collection of ‘print’ functions that allow you to simply and
22948 cleanly print different types of messages.")
22949 (license license:gpl3+)))
22950
22951 (define-public python-nestedtext
22952 (package
22953 (name "python-nestedtext")
22954 (version "1.0.0")
22955 (source
22956 (origin
22957 (method url-fetch)
22958 (uri (pypi-uri "nestedtext" version))
22959 (sha256
22960 (base32
22961 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22962 (build-system python-build-system)
22963 (arguments
22964 `(#:tests? #f)) ; PyPI tarball lacks tests
22965 (propagated-inputs
22966 `(("python-inform" ,python-inform)))
22967 (home-page "https://nestedtext.org")
22968 (synopsis "Human readable and writable data interchange format")
22969 (description
22970 "NestedText is a file format for holding data that is to be entered, edited, or
22971 viewed by people. It allows data to be organized into a nested collection of
22972 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
22973 without the complexity and risk of YAML and without the syntatic clutter of JSON.
22974 NestedText is both simple and natural. Only a small number of concepts and rules must
22975 be kept in mind when creating it. It is easily created, modified, or viewed with
22976 a text editor and easily understood and used by both programmers and non-programmers.")
22977 (license license:expat))) ; MIT license
22978
22979 (define-public python-parallel
22980 (package
22981 (name "python-parallel")
22982 (version "1.6.4.4")
22983 (source
22984 (origin
22985 (method url-fetch)
22986 (uri (string-append
22987 "https://www.parallelpython.com/downloads/pp/pp-"
22988 version ".zip"))
22989 (sha256
22990 (base32
22991 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22992 (native-inputs
22993 `(("unzip" ,unzip)))
22994 (build-system python-build-system)
22995 (arguments '(#:tests? #f)) ; No test suite.
22996 (home-page "https://www.parallelpython.com")
22997 (synopsis "Parallel and distributed programming for Python")
22998 (description "Parallel Python module (PP) provides an easy and efficient
22999 way to create parallel-enabled applications for SMP computers and clusters.
23000 PP module features cross-platform portability and dynamic load balancing.
23001 Thus applications written with PP will parallelize efficiently even on
23002 heterogeneous and multi-platform clusters (including clusters running other
23003 applications with variable CPU loads).")
23004 (license license:bsd-3)))
23005
23006 (define-public python2-parallel
23007 (package-with-python2 python-parallel))
23008
23009 (define-public python-djvulibre
23010 (package
23011 (name "python-djvulibre")
23012 (version "0.8.5")
23013 (source
23014 (origin
23015 (method url-fetch)
23016 (uri (pypi-uri "python-djvulibre" version))
23017 (sha256
23018 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23019 (build-system python-build-system)
23020 (native-inputs
23021 `(("ghostscript" ,ghostscript)
23022 ("pkg-config" ,pkg-config)
23023 ("python-nose" ,python-nose)))
23024 (inputs
23025 `(("djvulibre" ,djvulibre)
23026 ("python-cython" ,python-cython)))
23027 (arguments
23028 `(#:phases
23029 (modify-phases %standard-phases
23030 (add-after 'unpack 'fix-tests
23031 (lambda _
23032 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23033 ;; doesn't make sense on GNU/Linux.
23034 (delete-file "djvu/dllpath.py")
23035 #t)))))
23036 (synopsis "Python bindings for DjVuLibre")
23037 (description "This is a set of Python bindings for the DjVuLibre library.")
23038 (home-page "https://jwilk.net/software/python-djvulibre")
23039 (license license:gpl2)))
23040
23041 (define-public python2-djvulibre
23042 (package-with-python2 python-djvulibre))
23043
23044 (define-public python-versioneer
23045 (package
23046 (name "python-versioneer")
23047 (version "0.19")
23048 (source
23049 (origin
23050 (method url-fetch)
23051 (uri (pypi-uri "versioneer" version))
23052 (sha256
23053 (base32
23054 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23055 (build-system python-build-system)
23056 (home-page
23057 "https://github.com/python-versioneer/python-versioneer")
23058 (synopsis
23059 "Version-string management for VCS-controlled trees")
23060 (description
23061 "@code{versioneer} is a tool for managing a recorded version number in
23062 distutils-based python projects. The goal is to remove the tedious and
23063 error-prone \"update the embedded version string\" step from your release
23064 process.")
23065 (license license:public-domain)))
23066
23067 (define-public python2-gamera
23068 (package
23069 (name "python2-gamera")
23070 (version "3.4.4")
23071 (source
23072 (origin
23073 (method url-fetch)
23074 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23075 "gamera-" version ".tar.gz"))
23076 (sha256
23077 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23078 (modules '((guix build utils)))
23079 (snippet
23080 '(begin
23081 ;; Remove bundled libraries.
23082 (for-each delete-file-recursively
23083 '("src/libpng-1.2.5"
23084 "src/libtiff"
23085 "src/zlib-1.2.8"))))))
23086 (build-system python-build-system)
23087 (inputs
23088 `(("libpng" ,libpng)
23089 ("libtiff" ,libtiff)
23090 ("python2-wxpython" ,python2-wxpython)
23091 ("zlib" ,zlib)))
23092 (arguments
23093 `(#:python ,python-2))
23094 (synopsis "Framework for building document analysis applications")
23095 (description
23096 "Gamera is a toolkit for building document image recognition systems.")
23097 (home-page "https://gamera.informatik.hsnr.de/")
23098 (license license:gpl2+)))
23099
23100 (define-public python-contextvars
23101 (package
23102 (name "python-contextvars")
23103 (version "2.4")
23104 (source
23105 (origin
23106 (method url-fetch)
23107 (uri (pypi-uri "contextvars" version))
23108 (sha256
23109 (base32
23110 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23111 (build-system python-build-system)
23112 (propagated-inputs
23113 `(("python-immutables" ,python-immutables)))
23114 (home-page
23115 "https://github.com/MagicStack/contextvars")
23116 (synopsis "PEP 567 Backport")
23117 (description "This package implements a backport of Python 3.7
23118 @code{contextvars} module (see PEP 567) for Python 3.6.")
23119 (license license:asl2.0)))
23120
23121 (define-public python-aiofiles
23122 (package
23123 (name "python-aiofiles")
23124 (version "0.5.0")
23125 (source
23126 (origin
23127 (method url-fetch)
23128 (uri (pypi-uri "aiofiles" version))
23129 (sha256
23130 (base32
23131 "1bqmv019x16qa3zah0z915cw6z4va3fjs60fk2s7vyah3gyvrrlq"))))
23132 (build-system python-build-system)
23133 (home-page "https://github.com/Tinche/aiofiles")
23134 (synopsis "File support for @code{asyncio}")
23135 (description "@code{python-aiofiles} is a library for handling local
23136 disk files in asyncio applications.")
23137 (license license:asl2.0)))
23138
23139 (define-public python-pyre-extensions
23140 (package
23141 (name "python-pyre-extensions")
23142 (version "0.0.18")
23143 (source
23144 (origin
23145 (method url-fetch)
23146 (uri (pypi-uri "pyre-extensions" version))
23147 (sha256
23148 (base32
23149 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23150 (build-system python-build-system)
23151 (propagated-inputs
23152 `(("python-typing-extensions"
23153 ,python-typing-extensions)
23154 ("python-typing-inspect" ,python-typing-inspect)))
23155 (home-page "https://pyre-check.org")
23156 (synopsis
23157 "Type system extensions for use with @code{python-pyre}")
23158 (description
23159 "@code{python-pyre-extensions} defines extensions to the standard
23160 @code{typing} module that are supported by the Pyre typechecker.")
23161 (license license:expat)))
23162
23163 (define-public python-dataclasses
23164 (package
23165 (name "python-dataclasses")
23166 (version "0.7")
23167 (source
23168 (origin
23169 (method url-fetch)
23170 (uri (pypi-uri "dataclasses" version))
23171 (sha256
23172 (base32
23173 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23174 (build-system python-build-system)
23175 (home-page
23176 "https://github.com/ericvsmith/dataclasses")
23177 (synopsis
23178 "Backport of the @code{dataclasses} module for Python 3.6")
23179 (description
23180 "This is an implementation of PEP 557, Data Classes. It is a
23181 backport of the @code{dataclasses} module for Python 3.6.")
23182 (license license:asl2.0)))
23183
23184 (define-public python-pywatchman
23185 (package
23186 (name "python-pywatchman")
23187 (version "1.4.1")
23188 (source
23189 (origin
23190 (method url-fetch)
23191 (uri (pypi-uri "pywatchman" version))
23192 (sha256
23193 (base32
23194 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23195 (build-system python-build-system)
23196 (arguments
23197 `(#:tests? #f)) ;there are none
23198 (home-page
23199 "https://facebook.github.io/watchman/")
23200 (synopsis "Watchman client for python")
23201 (description "@code{python-pywatchman} is a library to connect and
23202 query Watchman to discover file changes.")
23203 (license license:bsd-3)))