gnu: python-pygments: Update to 2.7.4 [fixes CVE-2021-27291].
[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, 2021 Eric Bavier <bavier@posteo.net>
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, 2021 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, 2021 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, 2021 Marius Bakke <marius@gnu.org>
30 ;;; Copyright © 2016, 2017, 2021 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, 2021 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016–2021 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, 2021 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, 2021 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, 2021 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 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;;
103 ;;; This file is part of GNU Guix.
104 ;;;
105 ;;; GNU Guix is free software; you can redistribute it and/or modify it
106 ;;; under the terms of the GNU General Public License as published by
107 ;;; the Free Software Foundation; either version 3 of the License, or (at
108 ;;; your option) any later version.
109 ;;;
110 ;;; GNU Guix is distributed in the hope that it will be useful, but
111 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
112 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113 ;;; GNU General Public License for more details.
114 ;;;
115 ;;; You should have received a copy of the GNU General Public License
116 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
117
118 (define-module (gnu packages python-xyz)
119 #:use-module ((guix licenses) #:prefix license:)
120 #:use-module (gnu packages)
121 #:use-module (gnu packages algebra)
122 #:use-module (gnu packages adns)
123 #:use-module (gnu packages aidc)
124 #:use-module (gnu packages attr)
125 #:use-module (gnu packages backup)
126 #:use-module (gnu packages bash)
127 #:use-module (gnu packages check)
128 #:use-module (gnu packages cmake)
129 #:use-module (gnu packages compression)
130 #:use-module (gnu packages crypto)
131 #:use-module (gnu packages databases)
132 #:use-module (gnu packages dbm)
133 #:use-module (gnu packages djvu)
134 #:use-module (gnu packages docker)
135 #:use-module (gnu packages enchant)
136 #:use-module (gnu packages file)
137 #:use-module (gnu packages fontutils)
138 #:use-module (gnu packages gcc)
139 #:use-module (gnu packages geo)
140 #:use-module (gnu packages ghostscript)
141 #:use-module (gnu packages gl)
142 #:use-module (gnu packages glib)
143 #:use-module (gnu packages gnome)
144 #:use-module (gnu packages gnupg)
145 #:use-module (gnu packages graphviz)
146 #:use-module (gnu packages graphics)
147 #:use-module (gnu packages gsasl)
148 #:use-module (gnu packages gstreamer)
149 #:use-module (gnu packages gtk)
150 #:use-module (gnu packages haskell-xyz)
151 #:use-module (gnu packages icu4c)
152 #:use-module (gnu packages image)
153 #:use-module (gnu packages imagemagick)
154 #:use-module (gnu packages kerberos)
155 #:use-module (gnu packages libevent)
156 #:use-module (gnu packages libffi)
157 #:use-module (gnu packages libidn)
158 #:use-module (gnu packages linux)
159 #:use-module (gnu packages llvm)
160 #:use-module (gnu packages man)
161 #:use-module (gnu packages markup)
162 #:use-module (gnu packages maths)
163 #:use-module (gnu packages monitoring)
164 #:use-module (gnu packages multiprecision)
165 #:use-module (gnu packages networking)
166 #:use-module (gnu packages ncurses)
167 #:use-module (gnu packages openstack)
168 #:use-module (gnu packages pcre)
169 #:use-module (gnu packages pdf)
170 #:use-module (gnu packages perl)
171 #:use-module (gnu packages photo)
172 #:use-module (gnu packages pkg-config)
173 #:use-module (gnu packages python)
174 #:use-module (gnu packages python-build)
175 #:use-module (gnu packages python-check)
176 #:use-module (gnu packages python-compression)
177 #:use-module (gnu packages python-crypto)
178 #:use-module (gnu packages python-science)
179 #:use-module (gnu packages python-web)
180 #:use-module (gnu packages qt)
181 #:use-module (gnu packages rdf)
182 #:use-module (gnu packages readline)
183 #:use-module (gnu packages sdl)
184 #:use-module (gnu packages search)
185 #:use-module (gnu packages scanner)
186 #:use-module (gnu packages shells)
187 #:use-module (gnu packages sphinx)
188 #:use-module (gnu packages ssh)
189 #:use-module (gnu packages swig)
190 #:use-module (gnu packages terminals)
191 #:use-module (gnu packages tex)
192 #:use-module (gnu packages texinfo)
193 #:use-module (gnu packages textutils)
194 #:use-module (gnu packages time)
195 #:use-module (gnu packages tls)
196 #:use-module (gnu packages version-control)
197 #:use-module (gnu packages video)
198 #:use-module (gnu packages web)
199 #:use-module (gnu packages wxwidgets)
200 #:use-module (gnu packages base)
201 #:use-module (gnu packages xml)
202 #:use-module (gnu packages xorg)
203 #:use-module (gnu packages xdisorg)
204 #:use-module (gnu packages tcl)
205 #:use-module (gnu packages bdw-gc)
206 #:use-module (gnu packages serialization)
207 #:use-module (guix packages)
208 #:use-module (guix download)
209 #:use-module (guix git-download)
210 #:use-module (guix hg-download)
211 #:use-module (guix utils)
212 #:use-module (guix build-system gnu)
213 #:use-module (guix build-system cmake)
214 #:use-module (guix build-system python)
215 #:use-module (guix build-system trivial)
216 #:use-module (srfi srfi-1)
217 #:use-module (srfi srfi-26))
218
219 (define-public python-slixmpp
220 (package
221 (name "python-slixmpp")
222 (version "1.5.2")
223 (source
224 (origin
225 (method git-fetch)
226 (uri
227 (git-reference
228 (url "https://lab.louiz.org/poezio/slixmpp.git")
229 (commit
230 (string-append "slix-" version))))
231 (file-name
232 (git-file-name name version))
233 (sha256
234 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
235 (build-system python-build-system)
236 (arguments
237 `(#:phases
238 (modify-phases %standard-phases
239 (add-after 'unpack 'patch
240 (lambda _
241 (substitute* "setup.py"
242 (("'CC', 'cc'")
243 "'CC', 'gcc'"))
244 #t)))))
245 (native-inputs
246 `(("cython" ,python-cython)
247 ("gnupg" ,gnupg)
248 ("pkg-config" ,pkg-config)))
249 (propagated-inputs
250 `(("python-aiodns" ,python-aiodns)
251 ("python-aiohttp" ,python-aiohttp)
252 ("python-pyasn1" ,python-pyasn1)
253 ("python-pyasn1-modules" ,python-pyasn1-modules)))
254 (inputs
255 `(("libidn" ,libidn)
256 ("python" ,python))) ; We are building a Python extension.
257 (synopsis "XMPP library without threads")
258 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
259 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
260 socket handling, the timers, the events dispatching) in order to remove all
261 threads.")
262 (home-page "https://lab.louiz.org/poezio/slixmpp")
263 (license license:expat)))
264
265 (define-public python-tenacity
266 (package
267 (name "python-tenacity")
268 (version "6.1.0")
269 (source (origin
270 (method url-fetch)
271 (uri (pypi-uri "tenacity" version))
272 (sha256
273 (base32
274 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
275 (build-system python-build-system)
276 (native-inputs
277 `(("python-setuptools-scm" ,python-setuptools-scm)
278 ("python-sphinx" ,python-sphinx)
279 ("python-tornado" ,python-tornado)
280 ("python-pytest" ,python-pytest)))
281 (propagated-inputs
282 `(("python-six" ,python-six)))
283 (arguments
284 `(#:phases (modify-phases %standard-phases
285 (replace 'check
286 (lambda _
287 (invoke "pytest")
288 #t)))))
289 (home-page "https://github.com/jd/tenacity")
290 (synopsis "Retrying library for python")
291 (description "Tenacity is a general-purpose python library to simplify the
292 task of adding retry behavior to just about anything.")
293 (license license:asl2.0)))
294
295 (define-public python-pytelegrambotapi
296 (package
297 (name "python-pytelegrambotapi")
298 (version "3.7.4")
299 (source
300 (origin
301 (method git-fetch)
302 (uri (git-reference
303 (url "https://github.com/eternnoir/pyTelegramBotAPI")
304 (commit version)))
305 (file-name (git-file-name name version))
306 (sha256
307 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
308 (build-system python-build-system)
309 (arguments
310 `(#:phases
311 (modify-phases %standard-phases
312 (replace 'check
313 (lambda* (#:key tests? #:allow-other-keys)
314 (when tests?
315 (with-directory-excursion "tests"
316 (invoke "py.test")))
317 #t)))))
318 (propagated-inputs
319 `(("python-requests" ,python-requests)))
320 (native-inputs
321 `(("python-pytest" ,python-pytest)))
322 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
323 (synopsis "Python Telegram bot api")
324 (description "This package provides a simple, but extensible Python
325 implementation for the Telegram Bot API.")
326 (license license:gpl2)))
327
328 (define-public python-colorlog
329 (package
330 (name "python-colorlog")
331 (version "4.1.0")
332 (source (origin
333 (method url-fetch)
334 (uri (pypi-uri "colorlog" version))
335 (sha256
336 (base32
337 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
338 (build-system python-build-system)
339 (native-inputs
340 `(("python-pytest" ,python-pytest)))
341 (arguments
342 `(#:phases (modify-phases %standard-phases
343 (replace 'check
344 (lambda _
345 ;; Extend PYTHONPATH so the built package will be found.
346 (setenv "PYTHONPATH"
347 (string-append (getcwd) "/build/lib:"
348 (getenv "PYTHONPATH")))
349 (invoke "pytest" "-p" "no:logging")
350 #t)))))
351 (home-page "https://github.com/borntyping/python-colorlog")
352 (synopsis "Log formatting with colors for python")
353 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
354 with Python's logging module that outputs records using terminal colors.")
355 (license license:expat)))
356
357 (define-public python-pyprind
358 (package
359 (name "python-pyprind")
360 (version "2.11.2")
361 (source (origin
362 (method url-fetch)
363 (uri (pypi-uri "PyPrind" version))
364 (sha256
365 (base32
366 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
367 (build-system python-build-system)
368 (propagated-inputs
369 `(("python-psutil" ,python-psutil)))
370 (home-page "https://github.com/rasbt/pyprind")
371 (synopsis "Python Progress Bar and Percent Indicator Utility")
372 (description "The PyPrind (Python Progress Indicator) module provides a
373 progress bar and a percentage indicator object that let you track the progress
374 of a loop structure or other iterative computation.")
375 (license license:bsd-3)))
376
377 (define-public python-gphoto2
378 (package
379 (name "python-gphoto2")
380 (version "2.2.1")
381 (source (origin
382 (method url-fetch)
383 (uri (pypi-uri "gphoto2" version))
384 (sha256
385 (base32
386 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
387 (build-system python-build-system)
388 (native-inputs
389 `(("pkg-config" ,pkg-config)))
390 (inputs
391 `(("libgphoto2" ,libgphoto2)))
392 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
393 (synopsis "Python interface to libgphoto2")
394 (description "@code{python-gphoto2} is a comprehensive Python interface
395 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
396 automatically generate the interface code.")
397 (license license:gpl3+)))
398
399 (define-public python-colour
400 (package
401 (name "python-colour")
402 (version "0.1.5")
403 (source (origin
404 (method url-fetch)
405 (uri (pypi-uri "colour" version))
406 (sha256
407 (base32
408 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
409 (build-system python-build-system)
410 (native-inputs
411 `(("python-d2to1" ,python-d2to1)))
412 (home-page "https://github.com/vaab/colour")
413 (synopsis "Convert and manipulate various color representations")
414 (description "Pythonic way to manipulate color representations (HSL, RVB,
415 web, X11, ...).")
416 (license license:expat)))
417
418 (define-public python-d2to1
419 (package
420 (name "python-d2to1")
421 (version "0.2.12.post1")
422 (source (origin
423 (method url-fetch)
424 (uri (pypi-uri "d2to1" version))
425 (sha256
426 (base32
427 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
428 (build-system python-build-system)
429 (native-inputs
430 `(("python-nose" ,python-nose)))
431 (home-page "https://github.com/embray/d2to1")
432 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
433 in python")
434 (description "The python package d2to1 (the d is for distutils) allows
435 using distutils2-like setup.cfg files for a package's metadata with a
436 distribute/setuptools setup.py script.")
437 (license license:bsd-2)))
438
439 (define-public python-rawkit
440 (package
441 (name "python-rawkit")
442 (version "0.6.0")
443 (source (origin
444 (method url-fetch)
445 (uri (pypi-uri "rawkit" version))
446 (sha256
447 (base32
448 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
449 (build-system python-build-system)
450 (native-inputs
451 `(("python-pytest" ,python-pytest)
452 ("python-mock" ,python-mock)))
453 (inputs
454 `(("libraw" ,libraw)))
455 (home-page "https://rawkit.readthedocs.io")
456 (synopsis "Ctypes-based LibRaw binding for Python")
457 (description "The rawkit package provides two modules: rawkit and libraw.
458 The rawkit module provides a high-level Pythonic interface for developing raw
459 photos, while the libraw module provides a CTypes based interface for
460 interacting with the low-level LibRaw C APIs.")
461 (license license:expat)))
462
463 (define-public python-easygui
464 (package
465 (name "python-easygui")
466 (version "0.98.1")
467 (source (origin
468 (method url-fetch)
469 (uri (pypi-uri "easygui" version))
470 (sha256
471 (base32
472 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
473 (build-system python-build-system)
474 (propagated-inputs
475 `(("python-tkinter" ,python "tk")))
476 (home-page "https://github.com/robertlugg/easygui")
477 (synopsis "GUI programming module for Python")
478 (description "EasyGUI is a module for very simple, very easy GUI
479 programming in Python. EasyGUI is different from other GUI generators in that
480 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
481 simple function calls.")
482 (license license:bsd-3)))
483
484 (define-public python-pymd4c
485 (package
486 (name "python-pymd4c")
487 (version "0.4.6.0b1")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (pypi-uri "pymd4c" version))
492 (sha256
493 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
494 (build-system python-build-system)
495 (inputs
496 `(("md4c" ,md4c)))
497 (native-inputs
498 `(("python-flake8" ,python-flake8)
499 ("python-pkgconfig" ,python-pkgconfig)
500 ("pkg-config" ,pkg-config)))
501 (home-page "https://github.com/dominickpastore/pymd4c")
502 (synopsis "Python bindings for MD4C")
503 (description
504 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
505 to CommonMark.")
506 (license license:expat)))
507
508 (define-public python-pymediainfo
509 (package
510 (name "python-pymediainfo")
511 (version "4.1")
512 (source
513 (origin
514 (method url-fetch)
515 (uri (pypi-uri "pymediainfo" version))
516 (sha256
517 (base32
518 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
519 (build-system python-build-system)
520 (native-inputs
521 `(("python-setuptools-scm" ,python-setuptools-scm)
522 ("python-pytest" ,python-pytest)))
523 (inputs
524 `(("libmediainfo" ,libmediainfo)))
525 (arguments
526 `(#:phases
527 (modify-phases %standard-phases
528 (add-after 'unpack 'patch-libmediainfo
529 (lambda _
530 (substitute* "pymediainfo/__init__.py"
531 (("libmediainfo.so.0")
532 (string-append (assoc-ref %build-inputs "libmediainfo")
533 "/lib/libmediainfo.so.0")))
534 #t))
535 (replace 'check
536 (lambda _
537 ;; Extend PYTHONPATH so the built package will be found.
538 (setenv "PYTHONPATH"
539 (string-append (getcwd) "/build/lib:"
540 (getenv "PYTHONPATH")))
541 ;; Skip the only failing test "test_parse_url"
542 (invoke "pytest" "-vv" "-k" "not test_parse_url")
543 #t)))))
544 (home-page
545 "https://github.com/sbraz/pymediainfo")
546 (synopsis
547 "Python wrapper for the mediainfo library")
548 (description
549 "Python wrapper for the mediainfo library to access the technical and tag
550 data for video and audio files.")
551 (license license:expat)))
552
553 (define-public python-psutil
554 (package
555 (name "python-psutil")
556 (version "5.8.0")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "psutil" version))
561 (sha256
562 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
563 (build-system python-build-system)
564 (arguments
565 ;; FIXME: some tests do not return and time out. Some tests fail because
566 ;; some processes survive kill().
567 '(#:tests? #f))
568 (home-page "https://github.com/giampaolo/psutil")
569 (synopsis "Library for retrieving information on running processes")
570 (description
571 "@code{psutil} (Python system and process utilities) is a library for
572 retrieving information on running processes and system utilization (CPU,
573 memory, disks, network) in Python. It is useful mainly for system monitoring,
574 profiling and limiting process resources and management of running processes.
575 It implements many functionalities offered by command line tools such as: ps,
576 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
577 iotop, uptime, pidof, tty, taskset, pmap.")
578 (properties `((python2-variant . ,(delay python2-psutil))))
579 (license license:bsd-3)))
580
581 (define-public python2-psutil
582 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
583 (package/inherit base
584 (propagated-inputs
585 `(("python2-enum34" ,python2-enum34) ;optional
586 ,@(package-propagated-inputs base))))))
587
588 (define-public python-shapely
589 (package
590 (name "python-shapely")
591 (version "1.7.1")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "Shapely" version))
596 (sha256
597 (base32
598 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
599 (modules '((guix build utils)))
600 (snippet
601 '(begin
602 (delete-file "shapely/speedups/_speedups.c")
603 (delete-file "shapely/vectorized/_vectorized.c")
604 #t))))
605 (build-system python-build-system)
606 (native-inputs
607 `(("python-cython" ,python-cython)
608 ("python-matplotlib" ,python-matplotlib)
609 ("python-pytest" ,python-pytest)
610 ("python-pytest-cov" ,python-pytest-cov)))
611 (inputs
612 `(("geos" ,geos)))
613 (propagated-inputs
614 `(("python-numpy" ,python-numpy)))
615 (arguments
616 `(#:phases
617 (modify-phases %standard-phases
618 (add-after 'unpack 'patch-geos-path
619 (lambda* (#:key inputs #:allow-other-keys)
620 (let ((geos (assoc-ref inputs "geos"))
621 (glibc (assoc-ref inputs ,(if (%current-target-system)
622 "cross-libc" "libc"))))
623 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
624 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
625 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
626 geos "/lib/libgeos_c.so'])"))
627 (("free = load_dll\\('c'\\)\\.free")
628 (string-append "free = load_dll('c', fallbacks=['"
629 glibc "/lib/libc.so.6']).free"))
630 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
631 (string-append "free = load_dll('c', fallbacks=['"
632 glibc "/lib/libc.so.6']).free"))))
633 #t)))))
634 (home-page "https://github.com/Toblerity/Shapely")
635 (synopsis "Library for the manipulation and analysis of geometric objects")
636 (description "Shapely is a Python package for manipulation and analysis of
637 planar geometric objects. It is based on the @code{GEOS} library.")
638 (license license:bsd-3)))
639
640 (define-public python-shortuuid
641 (package
642 (name "python-shortuuid")
643 (version "0.5.0")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (pypi-uri "shortuuid" version))
648 (sha256
649 (base32
650 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-pep8" ,python-pep8)))
654 (home-page "https://github.com/skorokithakis/shortuuid")
655 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
656 (description
657 "@code{shortuuid} is a Python library for generating concise, unambiguous
658 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
659 module and then similar looking characters are removed.")
660 (license license:bsd-3)))
661
662 (define-public python-logwrap
663 (package
664 (name "python-logwrap")
665 (version "8.2.0.post0")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "logwrap" version))
670 (sha256
671 (base32
672 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
673 (build-system python-build-system)
674 (arguments
675 `(#:tests? #f ; Tests not included in pypi release.
676 #:phases
677 (modify-phases %standard-phases
678 (replace 'check
679 (lambda* (#:key tests? #:allow-other-keys)
680 (when tests?
681 (invoke "pytest"))
682 #t)))))
683 (native-inputs
684 `(("python-cython" ,python-cython)
685 ("python-pytest" ,python-pytest)
686 ("python-setuptools-scm" ,python-setuptools-scm)
687 ("python-toml" ,python-toml)
688 ("python-wheel" ,python-wheel)))
689 (home-page "https://github.com/python-useful-helpers/logwrap")
690 (synopsis "Decorator for logging function arguments")
691 (description "This package provides a decorator to log function arguments
692 and function call return values in a human-readable way.")
693 (license license:asl2.0)))
694
695 (define-public python2-shapely
696 (package-with-python2 python-shapely))
697
698 (define-public python-clyent
699 (package
700 (name "python-clyent")
701 (version "1.2.1")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "clyent" version))
706 (sha256
707 (base32
708 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
709 (build-system python-build-system)
710 (native-inputs
711 `(("python-mock" ,python-mock)))
712 (home-page "https://github.com/Anaconda-Platform/clyent")
713 (synopsis "Command line client library")
714 (description "Clyent is a Python command line utility library. It is used
715 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
716 (license license:bsd-3)))
717
718 (define-public python2-clyent
719 (package-with-python2 python-clyent))
720
721 (define-public python-babel
722 (package
723 (name "python-babel")
724 (version "2.9.0")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "Babel" version))
729 (sha256
730 (base32
731 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
732 (build-system python-build-system)
733 (native-inputs
734 `(("python-freezegun" ,python-freezegun)
735 ("python-pytest" ,python-pytest)))
736 (propagated-inputs
737 `(("python-pytz" ,python-pytz)))
738 (arguments
739 `(#:phases (modify-phases %standard-phases
740 (replace 'check
741 (lambda _
742 (invoke "pytest" "-vv"))))))
743 (home-page "http://babel.pocoo.org/")
744 (synopsis
745 "Tools for internationalizing Python applications")
746 (description
747 "Babel is composed of two major parts:
748 - tools to build and work with gettext message catalogs
749 - a Python interface to the CLDR (Common Locale Data Repository), providing
750 access to various locale display names, localized number and date formatting,
751 etc. ")
752 (license license:bsd-3)))
753
754 (define-public python2-babel
755 (package-with-python2 python-babel))
756
757 (define-public python2-backport-ssl-match-hostname
758 (package
759 (name "python2-backport-ssl-match-hostname")
760 (version "3.5.0.1")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "backports.ssl_match_hostname" version))
765 (sha256
766 (base32
767 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:python ,python-2
771 #:tests? #f)) ; no test target
772 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
773 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
774 (description
775 "This backport brings the ssl.match_hostname() function to users of
776 earlier versions of Python. The function checks the hostname in the
777 certificate returned by the server to which a connection has been established,
778 and verifies that it matches the intended target hostname.")
779 (license license:psfl)))
780
781 (define-public python-bidict
782 (package
783 (name "python-bidict")
784 (version "0.21.2")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "bidict" version))
789 (sha256
790 (base32
791 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
792 (build-system python-build-system)
793 (native-inputs
794 `(("python-coverage" ,python-coverage)
795 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
796 ("python-pre-commit" ,python-pre-commit)
797 ("python-py" ,python-py)
798 ("python-pytest" ,python-pytest)
799 ("python-pytest-benchmark" ,python-pytest-benchmark)
800 ("python-pytest-cov" ,python-pytest-cov)
801 ("python-setuptools-scm" ,python-setuptools-scm)
802 ("python-sortedcollections" ,python-sortedcollections)
803 ("python-sortedcontainers" ,python-sortedcontainers)
804 ("python-sphinx" ,python-sphinx)
805 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
806 ("python-tox" ,python-tox)))
807 (arguments
808 `(#:phases (modify-phases %standard-phases
809 (add-after 'unpack 'relax-reqs
810 (lambda _
811 (substitute* "setup.py"
812 (("sortedcollections < 2") "sortedcollections"))
813 #t))
814 (replace 'check
815 (lambda _ (invoke "./run_tests.py"))))))
816 (home-page "https://bidict.readthedocs.io")
817 (synopsis "Bidirectional mapping library")
818 (description "The @code{bidict} library provides several data structures
819 for working with bidirectional mappings in Python.")
820 (license license:mpl2.0)))
821
822 (define-public python-bitarray
823 (package
824 (name "python-bitarray")
825 (version "1.4.0")
826 (source (origin
827 (method url-fetch)
828 (uri (pypi-uri "bitarray" version))
829 (sha256
830 (base32
831 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
832 (build-system python-build-system)
833 (home-page "https://github.com/ilanschnell/bitarray")
834 (synopsis "Efficient arrays of booleans")
835 (description "This package provides an object type which efficiently
836 represents an array of booleans. Bitarrays are sequence types and behave very
837 much like usual lists. Eight bits are represented by one byte in a contiguous
838 block of memory. The user can select between two representations:
839 little-endian and big-endian. All of the functionality is implemented in C.
840 Methods for accessing the machine representation are provided. This can be
841 useful when bit level access to binary files is required, such as portable
842 bitmap image files. Also, when dealing with compressed data which uses
843 variable bit length encoding, you may find this module useful.")
844 (license license:psfl)))
845
846 (define-public python-boolean.py
847 (package
848 (name "python-boolean.py")
849 (version "3.6")
850 (source
851 (origin
852 ;; There's no source tarball on PyPI.
853 (method git-fetch)
854 (uri (git-reference
855 (url "https://github.com/bastikr/boolean.py")
856 (commit (string-append "v" version))))
857 (file-name (git-file-name name version))
858 (sha256
859 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
860 (build-system python-build-system)
861 (home-page "https://github.com/bastikr/boolean.py")
862 (synopsis "Boolean algebra in one Python module")
863 (description
864 "This is a small Python library that implements boolean algebra.
865 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
866 @code{Symbol} class that can take on one of these two values. Calculations
867 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
868 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
869 Expressions are constructed from parsed strings or directly in Python.")
870 (license license:bsd-2)))
871
872 (define-public python-hdf4
873 (package
874 (name "python-hdf4")
875 (version "0.9")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri name version))
880 (sha256
881 (base32
882 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
883 (build-system python-build-system)
884 (native-inputs `(("nose" ,python-nose)))
885 (propagated-inputs `(("numpy" ,python-numpy)))
886 (inputs
887 `(("hdf4" ,hdf4)
888 ("libjpeg" ,libjpeg-turbo)
889 ("zlib" ,zlib)))
890 (arguments
891 `(#:phases
892 (modify-phases %standard-phases
893 (replace 'check
894 (lambda _
895 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
896 ;; on to import numpy. Somehow this works on their CI system.
897 ;; Let's just manage PYTHONPATH here instead.
898 (substitute* "runexamples.sh"
899 (("export PYTHONPATH=.*") ""))
900 (setenv "PYTHONPATH"
901 (string-append (getcwd) ":"
902 (getenv "PYTHONPATH")))
903 (invoke "./runexamples.sh")
904 (invoke "nosetests" "-v"))))))
905 (home-page "https://github.com/fhs/python-hdf4")
906 (synopsis "Python interface to the NCSA HDF4 library")
907 (description
908 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
909 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
910 NetCDF files can also be read and modified. Python-HDF4 is a fork of
911 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
912 (license license:expat)))
913
914 (define-public python2-hdf4
915 (package-with-python2 python-hdf4))
916
917 (define-public python-h5py
918 (package
919 (name "python-h5py")
920 (version "2.10.0")
921 (source
922 (origin
923 (method url-fetch)
924 (uri (pypi-uri "h5py" version))
925 (sha256
926 (base32
927 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
928 (build-system python-build-system)
929 (arguments
930 `(#:tests? #f ; no test target
931 #:phases
932 (modify-phases %standard-phases
933 (add-after 'unpack 'fix-hdf5-paths
934 (lambda* (#:key inputs #:allow-other-keys)
935 (let ((prefix (assoc-ref inputs "hdf5")))
936 (substitute* "setup_build.py"
937 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
938 (string-append "['" prefix "/lib" "']"))
939 (("'/opt/local/include', '/usr/local/include'")
940 (string-append "'" prefix "/include" "'")))
941 (substitute* "setup_configure.py"
942 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
943 (string-append "['" prefix "/lib" "']")))
944 #t))))))
945 (propagated-inputs
946 `(("python-six" ,python-six)
947 ("python-numpy" ,python-numpy)))
948 (inputs
949 `(("hdf5" ,hdf5-1.10)))
950 (native-inputs
951 `(("python-cython" ,python-cython)
952 ("python-pkgconfig" ,python-pkgconfig)
953 ("pkg-config" ,pkg-config)))
954 (home-page "https://www.h5py.org/")
955 (synopsis "Read and write HDF5 files from Python")
956 (description
957 "The h5py package provides both a high- and low-level interface to the
958 HDF5 library from Python. The low-level interface is intended to be a
959 complete wrapping of the HDF5 API, while the high-level component supports
960 access to HDF5 files, datasets and groups using established Python and NumPy
961 concepts.")
962 (license license:bsd-3)))
963
964 (define-public python2-h5py
965 (package-with-python2 python-h5py))
966
967 (define-public python-sh
968 (package
969 (name "python-sh")
970 (version "1.12.14")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "sh" version))
975 (sha256
976 (base32
977 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
978 (build-system python-build-system)
979 (arguments
980 '(#:phases
981 (modify-phases %standard-phases
982 (replace 'check
983 (lambda _
984 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
985 (setenv "HOME" "/tmp")
986 (invoke "python" "sh.py" "test"))))))
987 (native-inputs
988 `(("python-coverage" ,python-coverage)))
989 (home-page "https://github.com/amoffat/sh")
990 (synopsis "Python subprocess replacement")
991 (description "This package provides a replacement for Python's
992 @code{subprocess} feature.")
993 (license license:expat)))
994
995 (define-public python2-sh
996 (package-with-python2 python-sh))
997
998 (define-public python-cftime
999 (package
1000 (name "python-cftime")
1001 (version "1.0.4.2")
1002 (source
1003 (origin
1004 (method url-fetch)
1005 (uri (pypi-uri "cftime" version))
1006 (sha256
1007 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1008 (build-system python-build-system)
1009 (propagated-inputs
1010 `(("python-numpy" ,python-numpy)))
1011 (native-inputs
1012 `(("python-coveralls" ,python-coveralls)
1013 ("python-cython" ,python-cython)
1014 ("python-pytest-cov" ,python-pytest-cov)))
1015 (home-page "https://github.com/Unidata/cftime")
1016 (synopsis "Library for time handling")
1017 (description
1018 "This package provides time-handling functionality that used to be part
1019 of the netcdf4 package before.")
1020 ;; This package claims to include code under the GPLv3 but is released
1021 ;; under ISC.
1022 (license (list license:isc license:gpl3+))))
1023
1024 (define-public python-netcdf4
1025 (package
1026 (name "python-netcdf4")
1027 (version "1.5.3")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (pypi-uri "netCDF4" version))
1032 (sha256
1033 (base32
1034 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1035 (build-system python-build-system)
1036 (arguments
1037 '(#:phases
1038 (modify-phases %standard-phases
1039 (add-after 'unpack 'configure-locations
1040 (lambda* (#:key inputs #:allow-other-keys)
1041 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1042 #t)))))
1043 (native-inputs
1044 `(("python-cython" ,python-cython)))
1045 (propagated-inputs
1046 `(("python-numpy" ,python-numpy)
1047 ("python-cftime" ,python-cftime)))
1048 (inputs
1049 `(("netcdf" ,netcdf)
1050 ("hdf4" ,hdf4)
1051 ("hdf5" ,hdf5)))
1052 (home-page "https://github.com/Unidata/netcdf4-python")
1053 (synopsis "Python/numpy interface to the netCDF library")
1054 (description "Netcdf4-python is a Python interface to the netCDF C
1055 library. netCDF version 4 has many features not found in earlier
1056 versions of the library and is implemented on top of HDF5. This module
1057 can read and write files in both the new netCDF 4 and the old netCDF 3
1058 format, and can create files that are readable by HDF5 clients. The
1059 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1060 to users of that module.")
1061 ;; The software is mainly ISC, but includes some files covered
1062 ;; by the Expat license.
1063 (license (list license:isc license:expat))))
1064
1065 (define-public python-license-expression
1066 (package
1067 (name "python-license-expression")
1068 (version "1.2")
1069 (source
1070 (origin
1071 (method url-fetch)
1072 (uri (pypi-uri "license-expression" version))
1073 (sha256
1074 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1075 (build-system python-build-system)
1076 (propagated-inputs
1077 `(("python-boolean.py" ,python-boolean.py)))
1078 (home-page "https://github.com/nexB/license-expression")
1079 (synopsis "Apply boolean logic to license expressions")
1080 (description
1081 "This Python module defines a tiny language to evaluate and compare
1082 license expressions using boolean logic. Logical combinations of licenses can
1083 be tested for equality, containment, and equivalence. They can be normalised
1084 and simplified. It supports SPDX license expressions as well as other naming
1085 conventions and aliases in the same expression.")
1086 (license license:gpl2+)))
1087
1088 (define-public python-lockfile
1089 (package
1090 (name "python-lockfile")
1091 (version "0.12.2")
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (pypi-uri "lockfile" version))
1096 (sha256
1097 (base32
1098 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1099 (build-system python-build-system)
1100 (arguments '(#:test-target "check"))
1101 (native-inputs
1102 `(("python-pbr" ,python-pbr)))
1103 (home-page "https://launchpad.net/pylockfile")
1104 (synopsis "Platform-independent file locking module")
1105 (description
1106 "The lockfile package exports a LockFile class which provides a simple
1107 API for locking files.")
1108 (license license:expat)))
1109
1110 (define-public python-filelock
1111 (package
1112 (name "python-filelock")
1113 (version "3.0.12")
1114 (source
1115 (origin
1116 (method url-fetch)
1117 (uri (pypi-uri "filelock" version))
1118 (sha256
1119 (base32
1120 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1121 (build-system python-build-system)
1122 (home-page
1123 "https://github.com/benediktschmitt/py-filelock")
1124 (synopsis "Platform independent file lock")
1125 (description "@code{filelock} contains a single module implementing
1126 a platform independent file lock in Python, which provides a simple way of
1127 inter-process communication.")
1128 (license license:unlicense)))
1129
1130 (define-public python-semantic-version
1131 (package
1132 (name "python-semantic-version")
1133 (version "2.8.5")
1134 (source
1135 (origin
1136 (method url-fetch)
1137 (uri (pypi-uri "semantic_version" version))
1138 (sha256
1139 (base32
1140 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1141 (build-system python-build-system)
1142 (home-page "https://github.com/rbarrois/python-semanticversion")
1143 (synopsis "Semantic versioning module for Python")
1144 (description
1145 "The @code{semantic_version} class is a small library for handling
1146 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1147
1148 It can compare versions, generate a new version that represents a bump in one of
1149 the version levels, and check whether any given string is a proper semantic
1150 version identifier.")
1151 (license license:bsd-3)))
1152
1153 (define-public python2-semantic-version
1154 (package-with-python2 python-semantic-version))
1155
1156 (define-public python-serpent
1157 (package
1158 (name "python-serpent")
1159 (version "1.28")
1160 (source
1161 (origin
1162 (method url-fetch)
1163 (uri (pypi-uri "serpent" version))
1164 (sha256
1165 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1166 (build-system python-build-system)
1167 (native-inputs
1168 `(("python-attrs" ,python-attrs)
1169 ("python-pytz" ,python-pytz)))
1170 (home-page "https://github.com/irmen/Serpent")
1171 (synopsis "Serializer for literal Python expressions")
1172 (description
1173 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1174 serialization. It serializes an object tree into bytes (an utf-8 encoded
1175 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1176 to rebuild the original object tree.
1177
1178 Because only safe literals are encoded, it is safe to send serpent data to
1179 other machines, such as over the network.")
1180 (properties `((python2-variant . ,(delay python2-serpent))))
1181 (license license:expat)))
1182
1183 (define-public python2-serpent
1184 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1185 (package/inherit base
1186 (propagated-inputs
1187 `(("python-enum34" ,python2-enum34)
1188 ,@(package-propagated-inputs base))))))
1189
1190 (define-public python-setuptools
1191 (package
1192 (name "python-setuptools")
1193 (version "52.0.0")
1194 (source
1195 (origin
1196 (method url-fetch)
1197 (uri (pypi-uri "setuptools" version))
1198 (sha256
1199 (base32
1200 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1201 (modules '((guix build utils)))
1202 (snippet
1203 '(begin
1204 ;; Remove included binaries which are used to build self-extracting
1205 ;; installers for Windows.
1206 ;; TODO: Find some way to build them ourself so we can include them.
1207 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1208 #t))))
1209 (build-system python-build-system)
1210 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1211 ;; One could bootstrap with an internal untested setuptools.
1212 (arguments
1213 `(#:tests? #f))
1214 (home-page "https://pypi.org/project/setuptools/")
1215 (synopsis
1216 "Library designed to facilitate packaging Python projects")
1217 (description
1218 "Setuptools is a fully-featured, stable library designed to facilitate
1219 packaging Python projects, where packaging includes:
1220 Python package and module definitions,
1221 distribution package metadata,
1222 test hooks,
1223 project installation,
1224 platform-specific details,
1225 Python 3 support.")
1226 ;; TODO: setuptools now bundles the following libraries:
1227 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1228 (license (list license:psfl ; setuptools itself
1229 license:expat ; six, appdirs, pyparsing
1230 license:asl2.0 ; packaging is dual ASL2/BSD-2
1231 license:bsd-2))
1232 (properties `((python2-variant . ,(delay python2-setuptools))))))
1233
1234 ;; Newer versions of setuptools no longer support Python 2.
1235 (define-public python2-setuptools
1236 (package
1237 (name "python2-setuptools")
1238 (version "41.0.1")
1239 (source
1240 (origin
1241 (method url-fetch)
1242 (uri (pypi-uri "setuptools" version ".zip"))
1243 (sha256
1244 (base32
1245 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1246 (modules '((guix build utils)))
1247 (snippet
1248 '(begin
1249 ;; Remove included binaries which are used to build self-extracting
1250 ;; installers for Windows.
1251 ;; TODO: Find some way to build them ourself so we can include them.
1252 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1253 #t))))
1254 (build-system python-build-system)
1255 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1256 ;; One could bootstrap with an internal untested setuptools.
1257 (arguments
1258 `(#:tests? #f))
1259 (native-inputs
1260 `(("unzip" ,unzip)))
1261 (home-page "https://pypi.org/project/setuptools/")
1262 (synopsis
1263 "Library designed to facilitate packaging Python projects")
1264 (description
1265 "Setuptools is a fully-featured, stable library designed to facilitate
1266 packaging Python projects, where packaging includes:
1267 Python package and module definitions,
1268 distribution package metadata,
1269 test hooks,
1270 project installation,
1271 platform-specific details,
1272 Python 3 support.")
1273 ;; TODO: setuptools now bundles the following libraries:
1274 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1275 (license (list license:psfl ; setuptools itself
1276 license:expat ; six, appdirs, pyparsing
1277 license:asl2.0 ; packaging is dual ASL2/BSD-2
1278 license:bsd-2))))
1279
1280 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1281 (define-public python-setuptools-for-tensorflow
1282 (hidden-package
1283 (package
1284 (inherit python-setuptools)
1285 (version "39.1.0")
1286 (source (origin
1287 (inherit (package-source python-setuptools))
1288 (uri (pypi-uri "setuptools" version ".zip"))
1289 (sha256
1290 (base32
1291 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1292
1293 (define-public python-uniseg
1294 (package
1295 (name "python-uniseg")
1296 (version "0.7.1")
1297 (source
1298 (origin
1299 (method url-fetch)
1300 (uri (pypi-uri "uniseg" version ".zip"))
1301 (sha256
1302 (base32
1303 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1304 (build-system python-build-system)
1305 (arguments
1306 '(#:tests? #f)) ; The test suite requires network access.
1307 (native-inputs
1308 `(("unzip" ,unzip)))
1309 (home-page
1310 "https://bitbucket.org/emptypage/uniseg-python")
1311 (synopsis
1312 "Python library to determine Unicode text segmentations")
1313 (description
1314 "Uniseg is a Python package used to determine Unicode text segmentations.
1315 Supported segmentations include:
1316 @enumerate
1317 @item @dfn{Code point} (any value in the Unicode codespace)
1318 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1319 multiple Unicode code points, e.g. \"G\" + acute-accent)
1320 @item Word break
1321 @item Sentence break
1322 @item Line break
1323 @end enumerate")
1324 (license license:expat)))
1325
1326 (define-public python2-uniseg
1327 (package-with-python2 python-uniseg))
1328
1329 (define-public python-humanfriendly
1330 (package
1331 (name "python-humanfriendly")
1332 (version "8.2")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (pypi-uri "humanfriendly" version))
1337 (sha256
1338 (base32
1339 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1343 #:tests? #f))
1344 (home-page "https://humanfriendly.readthedocs.io")
1345 (synopsis "Human-friendly input and output in Python")
1346 (description
1347 "The functions and classes in @code{humanfriendly} can be used to make
1348 text interfaces more user-friendly. It includes tools to parse and format
1349 numbers, file sizes, and timespans, timers for long-running operations, menus
1350 to allow the user to choose from a list of options, and terminal interaction
1351 helpers.")
1352 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1353 (license license:expat)))
1354
1355 (define-public python2-humanfriendly
1356 (let ((base (package-with-python2
1357 (strip-python2-variant python-humanfriendly))))
1358 (package/inherit base
1359 (propagated-inputs
1360 `(("python2-monotonic" ,python2-monotonic)
1361 ,@(package-propagated-inputs base))))))
1362
1363 (define-public python-textparser
1364 (package
1365 (name "python-textparser")
1366 (version "0.23.0")
1367 (source
1368 (origin
1369 (method url-fetch)
1370 (uri (pypi-uri "textparser" version))
1371 (sha256
1372 (base32
1373 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1374 (build-system python-build-system)
1375 (home-page "https://github.com/eerimoq/textparser")
1376 (synopsis "Fast text parser for Python")
1377 (description "This library provides a text parser written in the Python
1378 language. It aims to be fast.")
1379 (license license:expat)))
1380
1381 (define-public python-aenum
1382 (package
1383 (name "python-aenum")
1384 (version "2.2.4")
1385 (source
1386 (origin
1387 (method url-fetch)
1388 (uri (pypi-uri "aenum" version))
1389 (sha256
1390 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1391 (build-system python-build-system)
1392 (arguments
1393 `(#:phases (modify-phases %standard-phases
1394 (replace 'check
1395 (lambda _
1396 (format #t "current working dir ~s~%" (getcwd))
1397 (setenv "PYTHONPATH"
1398 (string-append ".:" (getenv "PYTHONPATH")))
1399 ;; We must run the test suite module directly, as it
1400 ;; fails to define the 'tempdir' variable in scope for
1401 ;; the tests otherwise
1402 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1403 ;; issues/32/running-tests-with-python-setuppy-test).
1404 (invoke "python3" "aenum/test.py")
1405 ;; This one fails with "NameError: name
1406 ;; 'test_pickle_dump_load' is not defined" (see:
1407 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1408 ;; /error-running-the-test_v3py-test-suite).
1409 ;; (invoke "python3" "aenum/test_v3.py")
1410 #t)))))
1411 (home-page "https://bitbucket.org/stoneleaf/aenum")
1412 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1413 (description "The aenum library includes an @code{Enum} base class, a
1414 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1415 class.")
1416 (license license:bsd-3)))
1417
1418 (define-public python-can
1419 (package
1420 (name "python-can")
1421 (version "3.3.3")
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (pypi-uri "python-can" version))
1426 (sha256
1427 (base32
1428 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1429 (build-system python-build-system)
1430 (arguments
1431 `(#:phases (modify-phases %standard-phases
1432 (add-after 'unpack 'relax-version-requirements
1433 (lambda _
1434 (substitute* "setup.py"
1435 (("mock~=2\\.0") "mock")
1436 (("coverage<5") "coverage")
1437 (("pytest~=4\\.3") "pytest")
1438 (("hypothesis~=4\\.56") "hypothesis"))
1439 #t))
1440 (add-after 'unpack 'fix-broken-tests
1441 ;; The tests try to run two scripts it expects should be
1442 ;; in PATH, but they aren't at this time (see:
1443 ;; https://github.com/hardbyte/python-can/issues/805).
1444 (lambda _
1445 (substitute* "test/test_scripts.py"
1446 (("\"can_logger\\.py --help\"") "")
1447 (("\"can_player\\.py --help\"") ""))
1448 #t)))))
1449 (propagated-inputs
1450 `(("python-aenum" ,python-aenum)
1451 ("python-wrapt" ,python-wrapt)))
1452 (native-inputs
1453 `(("python-codecov" ,python-codecov)
1454 ("python-coverage" ,python-coverage)
1455 ("python-future" ,python-future)
1456 ("python-hypothesis" ,python-hypothesis)
1457 ("python-mock" ,python-mock)
1458 ("python-pyserial" ,python-pyserial)
1459 ("python-pytest" ,python-pytest)
1460 ("python-pytest-cov" ,python-pytest-cov)
1461 ("python-pytest-runner" ,python-pytest-runner)
1462 ("python-pytest-timeout" ,python-pytest-timeout)))
1463 (home-page "https://github.com/hardbyte/python-can")
1464 (synopsis "Controller Area Network (CAN) interface module for Python")
1465 (description "This package defines the @code{can} module, which provides
1466 controller area network (CAN) support for Python developers; providing common
1467 abstractions to different hardware devices, and a suite of utilities for
1468 sending and receiving messages on a CAN bus.")
1469 (license license:lgpl3+)))
1470
1471 (define-public python-caniusepython3
1472 (package
1473 (name "python-caniusepython3")
1474 (version "7.2.0")
1475 (source
1476 (origin
1477 (method url-fetch)
1478 (uri (pypi-uri "caniusepython3" version))
1479 (sha256
1480 (base32
1481 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1482 (build-system python-build-system)
1483 (arguments
1484 `(#:phases (modify-phases %standard-phases
1485 (add-after 'unpack 'relax-requirements
1486 (lambda _
1487 (substitute* "setup.py"
1488 ;; These are for compatibility with Python 2.
1489 ((".*'argparse', 'backports.functools_lru_cache',.*")
1490 ""))
1491 (substitute* "dev_requirements.txt"
1492 ((".*pylint.*") "")) ;not actually required
1493 #t))
1494 (replace 'check
1495 (lambda _
1496 (invoke "py.test" "-k" "not NetworkTests"))))))
1497 (propagated-inputs
1498 `(("python-distlib" ,python-distlib)
1499 ("python-packaging" ,python-packaging)
1500 ("python-requests" ,python-requests)))
1501 (native-inputs
1502 `(("python-mock" ,python-mock)
1503 ("python-pytest" ,python-pytest)))
1504 (home-page "https://github.com/brettcannon/caniusepython3")
1505 (synopsis "Check for Python 3-incompatible Python libraries")
1506 (description "The @command{caniusepython3} command scans your project and
1507 reports the Python 3-incompatible libraries it found. It can also be used as
1508 a library.")
1509 (license license:asl2.0)))
1510
1511 (define-public python-diskcache
1512 (package
1513 (name "python-diskcache")
1514 (version "4.1.0")
1515 (source
1516 (origin
1517 (method url-fetch)
1518 (uri (pypi-uri "diskcache" version))
1519 (sha256
1520 (base32
1521 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1522 (build-system python-build-system)
1523 (arguments
1524 `(#:tests? #f)) ;test suite not included in the release
1525 (home-page "http://www.grantjenks.com/docs/diskcache/")
1526 (synopsis "Disk and file backed cache library")
1527 (description "DiskCache is a disk and file backed persistent cache.")
1528 (license license:asl2.0)))
1529
1530 (define-public python-bitstruct
1531 (package
1532 (name "python-bitstruct")
1533 (version "8.9.0")
1534 (source
1535 (origin
1536 (method url-fetch)
1537 (uri (pypi-uri "bitstruct" version))
1538 (sha256
1539 (base32
1540 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1541 (build-system python-build-system)
1542 (home-page "https://github.com/eerimoq/bitstruct")
1543 (synopsis "Python values to and C bit field structs converter")
1544 (description "This module performs conversions between Python values and C
1545 bit field structs represented as Python byte strings. It is intended to have
1546 a similar interface as the @code{struct} module from Python, but working on
1547 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1548 (license license:expat)))
1549
1550 (define-public python-cantools
1551 (package
1552 (name "python-cantools")
1553 (version "33.1.1")
1554 (source
1555 (origin
1556 ;; We take the sources from the Git repository as the documentation is
1557 ;; not included with the PyPI archive.
1558 (method git-fetch)
1559 (uri (git-reference
1560 (url "https://github.com/eerimoq/cantools")
1561 (commit version)))
1562 (file-name (git-file-name name version))
1563 (sha256
1564 (base32
1565 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1566 (build-system python-build-system)
1567 (arguments
1568 `(#:phases
1569 (modify-phases %standard-phases
1570 (add-after 'build 'build-doc
1571 (lambda _
1572 ;; See: https://github.com/eerimoq/cantools/issues/190.
1573 (substitute* "README.rst"
1574 (("https://github.com/eerimoq/cantools/raw/master\
1575 /docs/monitor.png")
1576 "monitor.png"))
1577 (with-directory-excursion "docs"
1578 (invoke "make" "man" "info"))))
1579 (add-after 'install 'install-doc
1580 (lambda* (#:key outputs #:allow-other-keys)
1581 (let* ((out (assoc-ref outputs "out"))
1582 (info (string-append out "/share/info"))
1583 (man1 (string-append out "/share/man/man1")))
1584 (format #t "CWD: ~s~%" (getcwd))
1585 (install-file "docs/_build/texinfo/cantools.info" info)
1586 (install-file "docs/_build/man/cantools.1" man1)
1587 #t))))))
1588 (native-inputs
1589 `(("sphinx" ,python-sphinx)
1590 ("texinfo" ,texinfo)))
1591 (propagated-inputs
1592 `(("python-bitstruct" ,python-bitstruct)
1593 ("python-can" ,python-can)
1594 ("python-diskcache" ,python-diskcache)
1595 ("python-textparser" ,python-textparser)))
1596 (home-page "https://github.com/eerimoq/cantools")
1597 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1598 (description "This package includes Controller Area Network (CAN) related
1599 tools that can be used to:
1600 @itemize
1601 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1602 @item encode and decode CAN messages
1603 @item multiplex simple and extended signals
1604 @item diagnose DID encoding and decoding
1605 @item dump the CAN decoder output
1606 @item test CAN nodes
1607 @item generate C source code
1608 @item monitor the CAN bus
1609 @end itemize")
1610 (license license:expat)))
1611
1612 (define-public python-capturer
1613 (package
1614 (name "python-capturer")
1615 (version "2.4")
1616 (source
1617 (origin
1618 (method url-fetch)
1619 (uri (pypi-uri "capturer" version))
1620 (sha256
1621 (base32
1622 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1623 (build-system python-build-system)
1624 (arguments
1625 `(#:tests? #f))
1626 (propagated-inputs
1627 `(("python-humanfriendly" ,python-humanfriendly)))
1628 (home-page "https://capturer.readthedocs.io")
1629 (synopsis "Capture stdout and stderr streams of the current process")
1630 (description
1631 "The capturer package makes it easy to capture the stdout and stderr
1632 streams of the current process and subprocesses. Output can be relayed
1633 to the terminal in real time but is also available to the Python program
1634 for additional processing.")
1635 (license license:expat)))
1636
1637 (define-public python2-capturer
1638 (package-with-python2 python-capturer))
1639
1640 (define-public python-case
1641 (package
1642 (name "python-case")
1643 (version "1.5.3")
1644 (source
1645 (origin
1646 (method url-fetch)
1647 (uri (pypi-uri "case" version))
1648 (sha256
1649 (base32
1650 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1651 (build-system python-build-system)
1652 (propagated-inputs
1653 `(("python-mock" ,python-mock)
1654 ("python-nose" ,python-nose)
1655 ("python-six" ,python-six)
1656 ("python-unittest2" ,python-unittest2)))
1657 (native-inputs
1658 `(("python-coverage" ,python-coverage)))
1659 (home-page "https://github.com/celery/case")
1660 (synopsis "Unittest utilities and convenience methods")
1661 (description
1662 "The @code{case} package provides utilities on top of unittest, including
1663 some helpful Python 2 compatibility convenience methods.")
1664 (license license:bsd-3)))
1665
1666 (define-public python-verboselogs
1667 (package
1668 (name "python-verboselogs")
1669 (version "1.7")
1670 (source
1671 (origin
1672 (method url-fetch)
1673 (uri (pypi-uri "verboselogs" version))
1674 (sha256
1675 (base32
1676 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1677 (build-system python-build-system)
1678 (arguments
1679 `(#:phases
1680 (modify-phases %standard-phases
1681 (replace 'check
1682 (lambda _
1683 ;; Do not run pylint plugin test, as astroid is an old
1684 ;; unsupported version.
1685 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1686 "verboselogs/tests.py"))))))
1687 (native-inputs
1688 `(("python-mock" ,python-mock)
1689 ("python-pytest" ,python-pytest)))
1690 (home-page "https://verboselogs.readthedocs.io")
1691 (synopsis "Verbose logging level for Python's logging module")
1692 (description
1693 "The @code{verboselogs} package extends Python's @code{logging} module to
1694 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1695 (license license:expat)))
1696
1697 (define-public python2-verboselogs
1698 (package-with-python2 python-verboselogs))
1699
1700 (define-public python-coloredlogs
1701 (package
1702 (name "python-coloredlogs")
1703 (version "10.0")
1704 (source
1705 (origin
1706 (method url-fetch)
1707 (uri (pypi-uri "coloredlogs" version))
1708 (sha256
1709 (base32
1710 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1711 (build-system python-build-system)
1712 (arguments
1713 `(;Tests require some updated modules
1714 #:tests? #f))
1715 (propagated-inputs
1716 `(("python-capturer" ,python-capturer)))
1717 (home-page "https://coloredlogs.readthedocs.io")
1718 (synopsis "Colored stream handler for Python's logging module")
1719 (description
1720 "The @code{coloredlogs} package enables colored terminal output for
1721 Python's logging module. The @code{ColoredFormatter} class inherits from
1722 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1723 messages in color.")
1724 (license license:expat)))
1725
1726 (define-public python2-coloredlogs
1727 (package-with-python2 python-coloredlogs))
1728
1729 (define-public python-editorconfig
1730 (package
1731 (name "python-editorconfig")
1732 (version "0.12.2")
1733 (source
1734 (origin
1735 (method url-fetch)
1736 (uri (pypi-uri "EditorConfig" version))
1737 (sha256
1738 (base32
1739 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1740 (build-system python-build-system)
1741 (home-page "https://editorconfig.org/")
1742 (synopsis "EditorConfig bindings for python")
1743 (description "The EditorConfig project consists of a file format for
1744 defining coding styles and a collection of text editor plugins that enable
1745 editors to read the file format and adhere to defined styles. EditorConfig
1746 files are easily readable and they work nicely with version control systems.")
1747 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1748 (license (list license:bsd-2 license:psfl))))
1749
1750 (define-public dosage
1751 (package
1752 (name "dosage")
1753 (version "2.17")
1754 (source
1755 (origin
1756 (method url-fetch)
1757 (uri (pypi-uri "dosage" version))
1758 (sha256
1759 (base32
1760 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1761 (build-system python-build-system)
1762 (propagated-inputs
1763 `(("python2-backports-functools-lru-cache"
1764 ,python2-backports-functools-lru-cache)
1765 ("python2-backports-shutil-get-terminal-size"
1766 ,python2-backports-shutil-get-terminal-size)
1767 ("python-cached-property" ,python-cached-property)
1768 ("python-colorama" ,python-colorama)
1769 ("python-imagesize" ,python-imagesize)
1770 ("python-importlib-metadata" ,python-importlib-metadata)
1771 ("python-lxml" ,python-lxml)
1772 ("python-requests" ,python-requests)
1773 ("python-six" ,python-six)))
1774 (native-inputs
1775 `(("python-pytest-cov" ,python-pytest-cov)
1776 ("python-pytest-xdist" ,python-pytest-xdist)
1777 ("python-responses" ,python-responses)
1778 ("python-setuptools-scm" ,python-setuptools-scm)))
1779 (home-page "https://github.com/webcomics/dosage")
1780 (synopsis "Comic strip downloader and archiver")
1781 (description "Dosage is designed to keep a local copy of specific webcomics and other
1782 picture-based content such as Picture of the Day sites. With the @command{dosage}
1783 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1784 downloaded, or download a strip for a particular date or index, if possible.")
1785 (license license:expat)))
1786
1787 (define-public python-et-xmlfile
1788 (package
1789 (name "python-et-xmlfile")
1790 (version "1.0.1")
1791 (source
1792 (origin
1793 (method url-fetch)
1794 (uri (pypi-uri "et_xmlfile" version))
1795 (sha256
1796 (base32
1797 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1798 (build-system python-build-system)
1799 (arguments
1800 `(#:phases (modify-phases %standard-phases
1801 (replace 'check
1802 (lambda _
1803 (invoke "pytest"))))))
1804 (native-inputs
1805 `(("python-pytest" ,python-pytest)
1806 ("python-lxml" ,python-lxml))) ;used for the tests
1807 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1808 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1809 (description "This Python library is based upon the @code{xmlfile} module
1810 from @code{lxml}. It aims to provide a low memory, compatible implementation
1811 of @code{xmlfile}.")
1812 (license license:expat)))
1813
1814 (define-public python2-et-xmlfile
1815 (package-with-python2 python-et-xmlfile))
1816
1817 (define-public python-openpyxl
1818 (package
1819 (name "python-openpyxl")
1820 (version "3.0.5")
1821 (source
1822 (origin
1823 ;; We use the upstream repository, as the tests are not included in the
1824 ;; PyPI releases.
1825 (method hg-fetch)
1826 (uri (hg-reference
1827 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1828 (changeset version)))
1829 (file-name (string-append name "-" version "-checkout"))
1830 (sha256
1831 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1832 (build-system python-build-system)
1833 (arguments
1834 `(#:phases (modify-phases %standard-phases
1835 (replace 'check
1836 (lambda _
1837 (invoke "pytest"))))))
1838 (native-inputs
1839 ;; For the test suite.
1840 `(("python-lxml" ,python-lxml)
1841 ("python-pillow" ,python-pillow)
1842 ("python-pytest" ,python-pytest)))
1843 (propagated-inputs
1844 `(("python-et-xmlfile" ,python-et-xmlfile)
1845 ("python-jdcal" ,python-jdcal)))
1846 (home-page "https://openpyxl.readthedocs.io")
1847 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1848 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1849 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1850 standard.")
1851 (properties `((python2-variant . ,(delay python2-openpyxl))))
1852 (license license:expat)))
1853
1854 (define-public python2-openpyxl
1855 (let ((base (package-with-python2
1856 (strip-python2-variant python-openpyxl))))
1857 (package
1858 (inherit base)
1859 ;; This is the latest version that has python2 support
1860 (version "2.6.4")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (pypi-uri "openpyxl" version))
1865 (sha256
1866 (base32
1867 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1868 (arguments '(#:tests? #f))))) ; No test suite.
1869
1870 (define-public python-eventlet
1871 (package
1872 (name "python-eventlet")
1873 (version "0.25.1")
1874 (source
1875 (origin
1876 (method url-fetch)
1877 (uri (pypi-uri "eventlet" version))
1878 (sha256
1879 (base32
1880 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1881 (build-system python-build-system)
1882 (propagated-inputs
1883 `(("python-dnspython" ,python-dnspython)
1884 ("python-greenlet" ,python-greenlet)
1885 ("python-monotonic" ,python-monotonic)))
1886 (arguments
1887 ;; TODO: Requires unpackaged 'enum-compat'.
1888 '(#:tests? #f))
1889 (home-page "https://eventlet.net")
1890 (synopsis "Concurrent networking library for Python")
1891 (description
1892 "Eventlet is a concurrent networking library for Python that
1893 allows you to change how you run your code, not how you write it.
1894 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1895 Coroutines ensure that the developer uses a blocking style of programming
1896 that is similar to threading, but provide the benefits of non-blocking I/O.
1897 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1898 from the Python interpreter, or as a small part of a larger application.")
1899 (license license:expat)))
1900
1901 (define-public python-six
1902 (package
1903 (name "python-six")
1904 (version "1.14.0")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (pypi-uri "six" version))
1909 (sha256
1910 (base32
1911 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1912 (build-system python-build-system)
1913 (arguments
1914 `(#:phases
1915 (modify-phases %standard-phases
1916 (replace 'check
1917 (lambda _
1918 (invoke "py.test" "-v"))))))
1919 (native-inputs
1920 `(("python-pytest" ,python-pytest-bootstrap)))
1921 (home-page "https://pypi.org/project/six/")
1922 (synopsis "Python 2 and 3 compatibility utilities")
1923 (description
1924 "Six is a Python 2 and 3 compatibility library. It provides utility
1925 functions for smoothing over the differences between the Python versions with
1926 the goal of writing Python code that is compatible on both Python versions.
1927 Six supports every Python version since 2.5. It is contained in only one
1928 Python file, so it can be easily copied into your project.")
1929 (license license:x11)))
1930
1931 (define-public python2-six
1932 (package-with-python2 python-six))
1933
1934 (define-public python-six-bootstrap
1935 (package
1936 (inherit python-six)
1937 (name "python-six-bootstrap")
1938 (native-inputs `())
1939 (arguments `(#:tests? #f))))
1940
1941 (define-public python2-six-bootstrap
1942 (package-with-python2 python-six-bootstrap))
1943
1944 (define-public python-schedule
1945 (package
1946 (name "python-schedule")
1947 (version "0.4.3")
1948 (source
1949 (origin
1950 (method url-fetch)
1951 (uri (pypi-uri "schedule" version))
1952 (sha256
1953 (base32
1954 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1955 (build-system python-build-system)
1956 (native-inputs
1957 `(("python-pytest" ,python-pytest)
1958 ("python-mock" ,python-mock)))
1959 (home-page "https://github.com/dbader/schedule")
1960 (synopsis "Schedule periodic function calls in Python")
1961 (description
1962 "Schedule is an in-process scheduler for periodic jobs that uses the
1963 builder pattern for configuration. Schedule lets you run Python functions (or
1964 any other callable) periodically at pre-determined intervals using a simple,
1965 human-friendly syntax.")
1966 (license license:expat)))
1967
1968 (define-public python2-schedule
1969 (package-with-python2 python-schedule))
1970
1971 (define-public python-scour
1972 (package
1973 (name "python-scour")
1974 (version "038.1")
1975 (source
1976 (origin
1977 (method git-fetch)
1978 (uri
1979 (git-reference
1980 (url "https://github.com/scour-project/scour")
1981 (commit
1982 (string-append "v" version))))
1983 (file-name (git-file-name name version))
1984 (sha256
1985 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1986 (propagated-inputs
1987 `(("python-six" ,python-six)))
1988 (build-system python-build-system)
1989 (home-page "https://github.com/scour-project/scour")
1990 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1991 (description "The goal of Scour is to output a file that renderes
1992 identically at a fraction of the size by removing a lot of redundant
1993 information created by most SVG editors. Optimization options are typically
1994 lossless but can be tweaked for more aggressive cleaning.")
1995 (license license:asl2.0)))
1996
1997 (define-public python-mechanize
1998 (package
1999 (name "python-mechanize")
2000 (version "0.4.5")
2001 (source
2002 (origin
2003 (method url-fetch)
2004 (uri (pypi-uri "mechanize" version))
2005 (sha256
2006 (base32
2007 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2008 (build-system python-build-system)
2009 (propagated-inputs
2010 `(("python-html5lib" ,python-html5lib)))
2011 (home-page "https://github.com/python-mechanize/mechanize")
2012 (synopsis
2013 "Stateful programmatic web browsing in Python")
2014 (description
2015 "Mechanize implements stateful programmatic web browsing in Python,
2016 after Andy Lester’s Perl module WWW::Mechanize.")
2017 (license license:bsd-3)))
2018
2019 (define-public python2-mechanize
2020 (package-with-python2 python-mechanize))
2021
2022 (define-public python-simpleaudio
2023 (package
2024 (name "python-simpleaudio")
2025 (version "1.0.4")
2026 (source
2027 (origin
2028 (method url-fetch)
2029 (uri (pypi-uri "simpleaudio" version))
2030 (sha256
2031 (base32
2032 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2033 (build-system python-build-system)
2034 (arguments
2035 `(#:tests? #f))
2036 (inputs
2037 `(("alsa-lib" ,alsa-lib)))
2038 (home-page
2039 "https://github.com/hamiltron/py-simple-audio")
2040 (synopsis "Simple, asynchronous audio playback for Python 3")
2041 (description
2042 "The @code{simplaudio} package provides cross-platform, dependency-free
2043 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2044 (license license:expat))) ; MIT license
2045
2046 (define-public python-simplejson
2047 (package
2048 (name "python-simplejson")
2049 (version "3.17.0")
2050 (source
2051 (origin
2052 (method url-fetch)
2053 (uri (pypi-uri "simplejson" version))
2054 (sha256
2055 (base32
2056 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2057 (build-system python-build-system)
2058 (home-page "http://simplejson.readthedocs.org/en/latest/")
2059 (synopsis
2060 "Json library for Python")
2061 (description
2062 "JSON (JavaScript Object Notation) is a subset of JavaScript
2063 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2064 format.
2065
2066 Simplejson exposes an API familiar to users of the standard library marshal
2067 and pickle modules. It is the externally maintained version of the json
2068 library contained in Python 2.6, but maintains compatibility with Python 2.5
2069 and (currently) has significant performance advantages, even without using
2070 the optional C extension for speedups. Simplejson is also supported on
2071 Python 3.3+.")
2072 (license license:x11)))
2073
2074 (define-public python2-simplejson
2075 (package-with-python2 python-simplejson))
2076
2077
2078 (define-public python-pyicu
2079 (package
2080 (name "python-pyicu")
2081 (version "2.4.3")
2082 (source
2083 (origin
2084 (method url-fetch)
2085 (uri (pypi-uri "PyICU" version))
2086 (sha256
2087 (base32
2088 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2089 (build-system python-build-system)
2090 (inputs
2091 `(("icu4c" ,icu4c)))
2092 (native-inputs
2093 `(("python-pytest" ,python-pytest)
2094 ("python-six" ,python-six)))
2095 (home-page "https://github.com/ovalhub/pyicu")
2096 (synopsis "Python extension wrapping the ICU C++ API")
2097 (description
2098 "PyICU is a python extension wrapping the ICU C++ API.")
2099 (license license:x11)))
2100
2101 (define-public python2-pyicu
2102 (package-with-python2 python-pyicu))
2103
2104 (define-public python-dogtail
2105 (package
2106 (name "python-dogtail")
2107 (version "0.9.11")
2108 (source (origin
2109 (method url-fetch)
2110 (uri
2111 (string-append
2112 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2113 "dogtail-" version ".tar.gz"))
2114 (sha256
2115 (base32
2116 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2117 (build-system python-build-system)
2118 (arguments
2119 `(#:tests? #f ; TODO Launching dbus for the tests
2120 ; fails
2121 #:phases
2122 (modify-phases %standard-phases
2123 (replace 'check
2124 (lambda* (#:key tests? #:allow-other-keys)
2125 (when tests?
2126 (system "Xvfb :1 &")
2127 (setenv "DISPLAY" ":1")
2128 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2129 #t)))))
2130 (propagated-inputs
2131 `(("python-pygobject" ,python-pygobject)
2132 ("python-pycairo" ,python-pycairo)
2133 ("python-pyatspi" ,python-pyatspi)))
2134 (native-inputs
2135 `(("python-nose" ,python-nose)
2136 ("gtk+" ,gtk+)
2137 ("xvfb" ,xorg-server)
2138 ("dbus" ,dbus)
2139 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2140 ("gobject-introspection" ,gobject-introspection)))
2141 (home-page "https://gitlab.com/dogtail/dogtail/")
2142 (synopsis "GUI test tool and automation framework written in Python")
2143 (description
2144 "Dogtail is a GUI test tool and automation framework written in Python.
2145 It uses Accessibility (a11y) technologies to communicate with desktop
2146 applications. dogtail scripts are written in Python and executed like any
2147 other Python program.")
2148 (license license:gpl2+)))
2149
2150 (define-public python2-dogtail
2151 (package-with-python2 python-dogtail))
2152
2153 (define-public python-empy
2154 (package
2155 (name "python-empy")
2156 (version "3.3.3")
2157 (source (origin
2158 (method url-fetch)
2159 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2160 version ".tar.gz"))
2161 (sha256
2162 (base32
2163 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2164 (build-system python-build-system)
2165 (arguments
2166 `(#:tests? #f)) ; python2 only
2167 (home-page "http://www.alcyone.com/software/empy/")
2168 (synopsis "Templating system for Python")
2169 (description
2170 "EmPy is a system for embedding Python expressions and statements in
2171 template text; it takes an EmPy source file, processes it, and produces
2172 output. This is accomplished via expansions, which are special signals to the
2173 EmPy system and are set off by a special prefix (by default the at sign, @@).
2174 EmPy can expand arbitrary Python expressions and statements in this way, as
2175 well as a variety of special forms. Textual data not explicitly delimited in
2176 this way is sent unaffected to the output, allowing Python to be used in
2177 effect as a markup language. Also supported are callbacks via hooks,
2178 recording and playback via diversions, and dynamic, chainable filters. The
2179 system is highly configurable via command line options and embedded
2180 commands.")
2181 (license license:lgpl2.1+)))
2182
2183 (define-public python2-empy
2184 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2185 (package/inherit base
2186 (arguments `(,@(package-arguments base)
2187 #:tests? #t)))))
2188
2189 (define-public python2-element-tree
2190 (package
2191 (name "python2-element-tree")
2192 (version "1.2.6")
2193 (source (origin
2194 (method url-fetch)
2195 (uri (string-append
2196 "http://effbot.org/media/downloads/elementtree-"
2197 version "-20050316.tar.gz"))
2198 (sha256
2199 (base32
2200 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2201 (build-system python-build-system)
2202 (arguments
2203 `(#:python ,python-2 ; seems to be part of Python 3
2204 #:tests? #f)) ; no 'test' sub-command
2205 (synopsis "Toolkit for XML processing in Python")
2206 (description
2207 "ElementTree is a Python library supporting lightweight XML processing.")
2208 (home-page "https://effbot.org/zone/element-index.htm")
2209 (license (license:x11-style
2210 "http://docs.python.org/2/license.html"
2211 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2212
2213 (define-public python2-pybugz
2214 (package
2215 (name "python2-pybugz")
2216 (version "0.6.11")
2217 (source (origin
2218 (method url-fetch)
2219 (uri (string-append
2220 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2221 version ".tar.gz"))
2222 (sha256
2223 (base32
2224 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2225 (patches (search-patches "pybugz-stty.patch"
2226 "pybugz-encode-error.patch"))))
2227 (build-system python-build-system)
2228 (arguments
2229 `(#:python ,python-2 ; SyntaxError with Python 3
2230 #:tests? #f)) ; no 'test' sub-command
2231 (propagated-inputs
2232 `(("element-tree" ,python2-element-tree)))
2233 (synopsis "Python and command-line interface to Bugzilla")
2234 (description
2235 "PyBugz is a Python library and command-line tool to query the Bugzilla
2236 bug tracking system. It is meant as an aid to speed up interaction with the
2237 bug tracker.")
2238 (home-page "http://www.liquidx.net/pybugz/")
2239 (license license:gpl2)))
2240
2241 (define-public python2-enum
2242 (package
2243 (name "python2-enum")
2244 (version "0.4.6")
2245 (source (origin
2246 (method url-fetch)
2247 (uri (pypi-uri "enum" version))
2248 (sha256
2249 (base32
2250 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2251 (build-system python-build-system)
2252 (arguments
2253 `(#:python ,python-2))
2254 (home-page "https://pypi.org/project/enum/")
2255 (synopsis "Robust enumerated type support in Python")
2256 (description
2257 "This provides a module for robust enumerations in Python. It has
2258 been superseded by the Python standard library and is provided only for
2259 compatibility.")
2260 ;; Choice of either license.
2261 (license (list license:gpl3+ license:psfl))))
2262
2263 (define-public python-enum34
2264 (package
2265 (name "python-enum34")
2266 (version "1.1.6")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (pypi-uri "enum34" version))
2271 (sha256
2272 (base32
2273 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2274 (build-system python-build-system)
2275 (home-page "https://pypi.org/project/enum34/")
2276 (synopsis "Backported Python 3.4 Enum")
2277 (description
2278 "Enum34 is the new Python stdlib enum module available in Python 3.4
2279 backported for previous versions of Python from 2.4 to 3.3.")
2280 (license license:bsd-3)))
2281
2282 (define-public python2-enum34
2283 (package-with-python2 python-enum34))
2284
2285 (define-public python-parse-type
2286 (package
2287 (name "python-parse-type")
2288 (version "0.4.2")
2289 (source
2290 (origin
2291 (method url-fetch)
2292 (uri (pypi-uri "parse_type" version))
2293 (sha256
2294 (base32
2295 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2296 (build-system python-build-system)
2297 (propagated-inputs
2298 `(("python-six" ,python-six)
2299 ("python-parse" ,python-parse)))
2300 (native-inputs
2301 `(("python-pytest" ,python-pytest)
2302 ("python-pytest-runner" ,python-pytest-runner)))
2303 (home-page "https://github.com/jenisys/parse_type")
2304 (synopsis "Extended parse module")
2305 (description
2306 "Parse_type extends the python parse module.")
2307 (properties
2308 `((python2-variant . ,(delay python2-parse-type))))
2309 (license license:bsd-3)))
2310
2311 (define-public python2-parse-type
2312 (let ((base (package-with-python2
2313 (strip-python2-variant python-parse-type))))
2314 (package/inherit base
2315 (propagated-inputs
2316 `(("python2-enum34" ,python2-enum34)
2317 ,@(package-propagated-inputs base))))))
2318
2319 (define-public python-parse
2320 (package
2321 (name "python-parse")
2322 (version "1.18.0")
2323 (source
2324 (origin
2325 (method url-fetch)
2326 (uri (pypi-uri "parse" version))
2327 (sha256
2328 (base32
2329 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2330 (build-system python-build-system)
2331 (arguments
2332 `(#:phases
2333 (modify-phases %standard-phases
2334 (replace 'check
2335 (lambda _ (invoke "python" "test_parse.py"))))))
2336 (home-page "https://github.com/r1chardj0n3s/parse")
2337 (synopsis "Parse strings")
2338 (description
2339 "Parse strings using a specification based on the Python @code{format()}
2340 syntax.")
2341 (license license:x11)))
2342
2343 (define-public python-polib
2344 (package
2345 (name "python-polib")
2346 (version "1.1.0")
2347 (source (origin
2348 (method url-fetch)
2349 (uri (pypi-uri "polib" version))
2350 (sha256
2351 (base32
2352 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2353 (build-system python-build-system)
2354 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2355 (synopsis "Manipulate, create and modify gettext files")
2356 (description "Polib can manipulate any gettext format (po, pot and mo)
2357 files. It can be used to create po files from scratch or to modify
2358 existing ones.")
2359 (license license:expat)))
2360
2361 (define-public python2-polib
2362 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2363 (package/inherit base
2364 (arguments `(,@(package-arguments base)
2365 ;; Tests don't work with python2.
2366 #:tests? #f)))))
2367
2368 (define-public python-poyo
2369 (package
2370 (name "python-poyo")
2371 (version "0.5.0")
2372 (source
2373 (origin
2374 (method url-fetch)
2375 (uri (pypi-uri "poyo" version))
2376 (sha256
2377 (base32
2378 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2379 (build-system python-build-system)
2380 (home-page "https://github.com/hackebrot/poyo")
2381 (synopsis "Lightweight YAML Parser for Python")
2382 (description
2383 "This package provides a lightweight YAML Parser for Python. It supports
2384 only a chosen subset of the YAML format that is required to parse cookiecutter
2385 user configuration files. It does not have support for serializing into YAML
2386 and is not compatible with JSON.")
2387 (license license:expat)))
2388
2389 (define-public scons
2390 (package
2391 (name "scons")
2392 (version "3.0.4")
2393 (source (origin
2394 (method git-fetch)
2395 (uri (git-reference
2396 (url "https://github.com/SCons/scons")
2397 (commit version)))
2398 (file-name (git-file-name name version))
2399 (sha256
2400 (base32
2401 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2402 (build-system python-build-system)
2403 (arguments
2404 `(#:use-setuptools? #f ; still relies on distutils
2405 #:tests? #f ; no 'python setup.py test' command
2406 #:phases
2407 (modify-phases %standard-phases
2408 (add-before 'build 'bootstrap
2409 (lambda _
2410 (substitute* "src/engine/SCons/compat/__init__.py"
2411 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2412 "sys.modules[new] = __import__(old)"))
2413 (substitute* "src/engine/SCons/Platform/__init__.py"
2414 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2415 "mod = __import__(full_name)"))
2416 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2417 (chdir "build/scons")
2418 #t)))))
2419 (home-page "https://scons.org/")
2420 (synopsis "Software construction tool written in Python")
2421 (description
2422 "SCons is a software construction tool. Think of SCons as an improved,
2423 cross-platform substitute for the classic Make utility with integrated
2424 functionality similar to autoconf/automake and compiler caches such as ccache.
2425 In short, SCons is an easier, more reliable and faster way to build
2426 software.")
2427 (license license:x11)))
2428
2429 (define-public scons-python2
2430 (package
2431 (inherit (package-with-python2 scons))
2432 (name "scons-python2")))
2433
2434 (define-public python-extension-helpers
2435 (package
2436 (name "python-extension-helpers")
2437 (version "0.1")
2438 (source
2439 (origin
2440 (method url-fetch)
2441 (uri (pypi-uri "extension-helpers" version))
2442 (sha256
2443 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2444 (build-system python-build-system)
2445 (native-inputs
2446 `(("coverage" ,python-coverage)
2447 ("pytest" ,python-pytest-astropy)
2448 ("pytest-cov" ,python-pytest-cov)
2449 ("setuptools-scm" ,python-setuptools-scm)))
2450 (home-page "https://github.com/astropy/astropy-helpers")
2451 (synopsis
2452 "Utilities for building and installing packages in the Astropy ecosystem")
2453 (description
2454 "The extension-helpers package includes many build, installation, and
2455 documentation-related tools used by the Astropy project.")
2456 (license license:bsd-3)))
2457
2458 (define-public python-extras
2459 (package
2460 (name "python-extras")
2461 (version "1.0.0")
2462 (source
2463 (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "extras" version))
2466 (sha256
2467 (base32
2468 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2469 (build-system python-build-system)
2470 (arguments
2471 ;; FIXME: Circular dependency on testtools.
2472 '(#:tests? #f))
2473 (home-page "https://github.com/testing-cabal/extras")
2474 (synopsis "Useful extensions to the Python standard library")
2475 (description
2476 "Extras is a set of extensions to the Python standard library.")
2477 (license license:expat)))
2478
2479 (define-public python2-extras
2480 (package-with-python2 python-extras))
2481
2482 (define-public python-mimeparse
2483 (package
2484 (name "python-mimeparse")
2485 (version "1.6.0")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "python-mimeparse" version))
2490 (sha256
2491 (base32
2492 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2493 (build-system python-build-system)
2494 (arguments
2495 '(#:phases
2496 (modify-phases %standard-phases
2497 (replace 'check
2498 (lambda _
2499 (invoke "./mimeparse_test.py"))))))
2500 (home-page
2501 "https://github.com/dbtsai/python-mimeparse")
2502 (synopsis "Python library for parsing MIME types")
2503 (description
2504 "Mimeparse provides basic functions for parsing MIME type names and
2505 matching them against a list of media-ranges.")
2506 (license license:expat)))
2507
2508 (define-public python2-mimeparse
2509 (package-with-python2 python-mimeparse))
2510
2511 (define-public python-miniboa
2512 (package
2513 (name "python-miniboa")
2514 (version "1.0.7")
2515 (source
2516 (origin
2517 (method url-fetch)
2518 (uri (pypi-uri "miniboa" version))
2519 (sha256
2520 (base32
2521 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2522 (build-system python-build-system)
2523 (home-page "https://github.com/shmup/miniboa")
2524 (synopsis "Simple, single-threaded Telnet server")
2525 (description
2526 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2527 server.")
2528 (license license:asl2.0)))
2529
2530 (define-public python2-miniboa
2531 (package-with-python2 python-miniboa))
2532
2533 (define-public python-pafy
2534 (package
2535 (name "python-pafy")
2536 (version "0.5.3.1")
2537 (source
2538 (origin
2539 (method url-fetch)
2540 (uri (pypi-uri "pafy" version))
2541 (sha256
2542 (base32
2543 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2544 (build-system python-build-system)
2545 (arguments
2546 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2547 (propagated-inputs
2548 ;; Youtube-dl is a python package which is imported in the file
2549 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2550 `(("youtube-dl" ,youtube-dl)))
2551 (home-page "https://np1.github.io/pafy/")
2552 (synopsis "Retrieve YouTube content and metadata")
2553 (description
2554 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2555 (license license:lgpl3+)))
2556
2557 (define-public python2-funcsigs
2558 (package
2559 (name "python2-funcsigs")
2560 (version "1.0.2")
2561 (source (origin
2562 (method url-fetch)
2563 (uri (pypi-uri "funcsigs" version))
2564 (sha256
2565 (base32
2566 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2567 (build-system python-build-system)
2568 (arguments
2569 `(#:python ,python-2))
2570 (native-inputs
2571 `(("python2-unittest2" ,python2-unittest2)))
2572 (home-page "http://funcsigs.readthedocs.org")
2573 (synopsis "Python function signatures from PEP362")
2574 (description
2575 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2576 (license license:asl2.0)))
2577
2578 (define-public python2-funcsigs-bootstrap
2579 (package
2580 (inherit python2-funcsigs)
2581 (name "python2-funcsigs-bootstrap")
2582 (native-inputs `())
2583 (arguments
2584 `(#:tests? #f
2585 ,@(package-arguments python2-funcsigs)))))
2586
2587 (define-public python-py
2588 (package
2589 (name "python-py")
2590 (version "1.8.1")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "py" version))
2595 (sha256
2596 (base32
2597 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2598 (build-system python-build-system)
2599 (arguments
2600 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2601 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2602 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2603 ;; Is this module globally installed?"
2604 '(#:tests? #f))
2605 (native-inputs
2606 `(("python-setuptools-scm" ,python-setuptools-scm)))
2607 (home-page "https://github.com/pytest-dev/py")
2608 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2609 (description
2610 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2611 code introspection, and logging.")
2612 (license license:expat)))
2613
2614 (define-public python-py-next
2615 (package
2616 (inherit python-py)
2617 (version "1.9.0")
2618 (source
2619 (origin
2620 (method url-fetch)
2621 (uri (pypi-uri "py" version))
2622 (sha256
2623 (base32
2624 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2625
2626 (define-public python2-py
2627 (package-with-python2 python-py))
2628
2629 ;; Recent versions of python-fixtures and python-testrepository need
2630 ;; python-pbr for packaging, which itself needs these two packages for
2631 ;; testing.
2632 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2633 ;; same source, just without any test dependencies and with tests disabled.
2634 ;; python-pbr-minmal is then used to package python-fixtures and
2635 ;; python-testrepository.
2636 ;; Strictly speaking we currently could remove the test-requirements from the
2637 ;; normal python-pbr package (and save this package) since test are disabled
2638 ;; there anyway. But this may change in future.
2639 (define-public python-pbr-minimal
2640 (package
2641 (name "python-pbr-minimal")
2642 (version "3.0.1")
2643 (source
2644 (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "pbr" version))
2647 (sha256
2648 (base32
2649 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2650 (build-system python-build-system)
2651 (arguments
2652 `(#:tests? #f))
2653 (home-page "https://docs.openstack.org/pbr/latest/")
2654 (synopsis "Minimal build of python-pbr used for bootstrapping")
2655 (description
2656 "Used only for bootstrapping python2-pbr, you should not need this.")
2657 (license license:asl2.0)))
2658
2659 (define-public python-pbr
2660 (package
2661 (inherit python-pbr-minimal)
2662 (name "python-pbr")
2663 (arguments
2664 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2665 (propagated-inputs
2666 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2667 (native-inputs
2668 `(("python-fixtures" ,python-fixtures-bootstrap)
2669 ;; discover, coverage, hacking, subunit
2670 ("python-mock" ,python-mock)
2671 ("python-six" ,python-six)
2672 ("python-sphinx" ,python-sphinx)
2673 ("python-testrepository" ,python-testrepository-bootstrap)
2674 ("python-testresources" ,python-testresources-bootstrap)
2675 ("python-testscenarios" ,python-testscenarios-bootstrap)
2676 ("python-testtools" ,python-testtools-bootstrap)
2677 ("python-virtualenv" ,python-virtualenv)))
2678 (synopsis "Enhance the default behavior of Python’s setuptools")
2679 (description
2680 "Python Build Reasonableness (PBR) is a library that injects some useful
2681 and sensible default behaviors into your setuptools run. It will set
2682 versions, process requirements files and generate AUTHORS and ChangeLog file
2683 from git information.
2684 ")))
2685
2686 (define-public python-pyrsistent
2687 (package
2688 (name "python-pyrsistent")
2689 (version "0.16.0")
2690 (home-page "https://github.com/tobgu/pyrsistent")
2691 (source (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "pyrsistent" version))
2694 (sha256
2695 (base32
2696 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2697 (build-system python-build-system)
2698 (arguments
2699 '(#:phases (modify-phases %standard-phases
2700 ;; The package works fine with newer Pytest and Hypothesis, but
2701 ;; has pinned older versions to stay compatible with Python 2.
2702 (add-before 'check 'loosen-pytest-requirement
2703 (lambda _
2704 (substitute* "setup.py"
2705 (("pytest<5") "pytest")
2706 (("hypothesis<5") "hypothesis"))
2707 #t)))))
2708 (native-inputs
2709 `(("python-hypothesis" ,python-hypothesis)
2710 ("python-pytest" ,python-pytest)
2711 ("python-pytest-runner" ,python-pytest-runner)))
2712 (propagated-inputs
2713 `(("python-six" ,python-six)))
2714 (synopsis "Persistent data structures for Python")
2715 (description
2716 "Pyrsistent is a number of persistent collections (by some referred to as
2717 functional data structures). Persistent in the sense that they are immutable.
2718
2719 All methods on a data structure that would normally mutate it instead return a
2720 new copy of the structure containing the requested updates. The original
2721 structure is left untouched.")
2722 (license license:expat)))
2723
2724 (define-public python2-pyrsistent
2725 (package-with-python2 python-pyrsistent))
2726
2727 (define-public python-exif-read
2728 (package
2729 (name "python-exif-read")
2730 (version "2.1.2")
2731 (source (origin
2732 (method url-fetch)
2733 (uri (pypi-uri "ExifRead" version))
2734 (sha256
2735 (base32
2736 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2737 (build-system python-build-system)
2738 (arguments `(#:tests? #f)) ; no tests
2739 (home-page "https://github.com/ianare/exif-py")
2740 (synopsis "Python library to extract EXIF data from image files")
2741 (description
2742 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2743 files.")
2744 (license license:bsd-3)))
2745
2746 (define-public python2-exif-read
2747 (package-with-python2 python-exif-read))
2748
2749 (define-public python-pyld
2750 (package
2751 (name "python-pyld")
2752 (version "1.0.5")
2753 (source (origin
2754 (method url-fetch)
2755 (uri (pypi-uri "PyLD" version))
2756 (sha256
2757 (base32
2758 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2759 (build-system python-build-system)
2760 (home-page "https://github.com/digitalbazaar/pyld")
2761 (synopsis "Python implementation of the JSON-LD specification")
2762 (description
2763 "PyLD is an implementation of the JSON-LD specification.")
2764 (license license:bsd-3)))
2765
2766 (define-public python2-pyld
2767 (package-with-python2 python-pyld))
2768
2769 (define-public python-cli-helpers
2770 (package
2771 (name "python-cli-helpers")
2772 (version "2.0.1")
2773 (source
2774 (origin
2775 ;; There's no source tarball on PyPI.
2776 (method git-fetch)
2777 (uri (git-reference
2778 (url "https://github.com/dbcli/cli_helpers")
2779 (commit (string-append "v" version))))
2780 (file-name (git-file-name name version))
2781 (sha256
2782 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2783 (build-system python-build-system)
2784 (native-inputs
2785 `(("python-pytest" ,python-pytest)))
2786 (propagated-inputs
2787 `(("python-wcwidth" ,python-wcwidth)
2788 ("python-configobj" ,python-configobj)
2789 ("python-tabulate" ,python-tabulate)
2790 ("python-terminaltables" ,python-terminaltables)))
2791 (home-page "https://github.com/dbcli/cli_helpers")
2792 (synopsis "Helpers for building command-line apps")
2793 (description
2794 "CLI Helpers is a Python package that makes it easy to perform common
2795 tasks when building command-line apps. It's a helper library for command-line
2796 interfaces.")
2797 (license license:bsd-3)))
2798
2799 (define-public python-click
2800 (package
2801 (name "python-click")
2802 (version "7.1.2")
2803 (source
2804 (origin
2805 (method url-fetch)
2806 (uri (pypi-uri "click" version))
2807 (sha256
2808 (base32
2809 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2810 (build-system python-build-system)
2811 (arguments
2812 `(#:phases
2813 (modify-phases %standard-phases
2814 (add-after 'unpack 'fix-paths
2815 (lambda* (#:key inputs #:allow-other-keys)
2816 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2817 "cross-libc" "libc"))))
2818 (substitute* "src/click/_unicodefun.py"
2819 (("'locale'")
2820 (string-append "'" glibc "/bin/locale'"))))
2821 #t))
2822 (replace 'check
2823 (lambda _
2824 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2825 (invoke "python" "-m" "pytest"))))))
2826 (native-inputs
2827 `(("python-pytest" ,python-pytest)))
2828 (home-page "https://palletsprojects.com/p/click/")
2829 (synopsis "Command line library for Python")
2830 (description
2831 "Click is a Python package for creating command line interfaces in a
2832 composable way with as little code as necessary. Its name stands for
2833 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2834 with sensible defaults out of the box.")
2835 (license license:bsd-3)))
2836
2837 (define-public python2-click
2838 (package-with-python2 python-click))
2839
2840 (define-public python-click-5
2841 (package (inherit python-click)
2842 (name "python-click")
2843 (version "5.1")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "click" version))
2848 (sha256
2849 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2850 (arguments `())))
2851
2852 (define-public python-vcversioner
2853 (package
2854 (name "python-vcversioner")
2855 (version "2.16.0.0")
2856 (source
2857 (origin
2858 (method url-fetch)
2859 (uri (pypi-uri "vcversioner" version))
2860 (sha256
2861 (base32
2862 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2863 (build-system python-build-system)
2864 (synopsis "Python library for version number discovery")
2865 (description "Vcversioner is a Python library that inspects tagging
2866 information in a variety of version control systems in order to discover
2867 version numbers.")
2868 (home-page "https://github.com/habnabit/vcversioner")
2869 (license license:isc)))
2870
2871 (define-public python2-vcversioner
2872 (package-with-python2 python-vcversioner))
2873
2874 (define-public python-jdcal
2875 (package
2876 (name "python-jdcal")
2877 (version "1.4")
2878 (source
2879 (origin
2880 (method url-fetch)
2881 (uri (pypi-uri "jdcal" version))
2882 (sha256
2883 (base32
2884 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2885 (build-system python-build-system)
2886 (arguments
2887 `(#:phases (modify-phases %standard-phases
2888 (replace 'check
2889 (lambda _
2890 (invoke "pytest"))))))
2891 (native-inputs
2892 `(("python-pytest" ,python-pytest)))
2893 (home-page "https://github.com/phn/jdcal")
2894 (synopsis "Functions to convert between Julian dates Gregorian dates")
2895 (description "This Python library provides functions for converting
2896 between Julian dates and Gregorian dates.")
2897 (license license:bsd-2)))
2898
2899 (define-public python2-jdcal
2900 (package-with-python2 python-jdcal))
2901
2902 (define-public python-jsondiff
2903 (package
2904 (name "python-jsondiff")
2905 (version "1.2.0")
2906 (source
2907 (origin
2908 (method url-fetch)
2909 (uri (pypi-uri "jsondiff" version))
2910 (sha256
2911 (base32
2912 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2913 (build-system python-build-system)
2914 (native-inputs
2915 `(("python-nose" ,python-nose)
2916 ("python-nose-random" ,python-nose-random)))
2917 (home-page
2918 "https://github.com/fzumstein/jsondiff")
2919 (synopsis "Compare JSON and JSON-like structures in Python")
2920 (description "@code{jsondiff} is a Python library which lets you
2921 compare, diff, and patch JSON and JSON-like structures in Python.")
2922 (license license:expat)))
2923
2924 (define-public python-jsonschema
2925 (package
2926 (name "python-jsonschema")
2927 (version "3.2.0")
2928 (source (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "jsonschema" version))
2931 (sha256
2932 (base32
2933 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2934 (build-system python-build-system)
2935 (arguments
2936 '(#:phases
2937 (modify-phases %standard-phases
2938 (replace 'check
2939 (lambda* (#:key inputs outputs #:allow-other-keys)
2940 (add-installed-pythonpath inputs outputs)
2941 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2942 (invoke "trial" "jsonschema"))))))
2943 (native-inputs
2944 `(("python-setuptools_scm" ,python-setuptools-scm)
2945 ("python-twisted" ,python-twisted)))
2946 (propagated-inputs
2947 `(("python-attrs" ,python-attrs)
2948 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2949 ("python-pyrsistent" ,python-pyrsistent)
2950 ("python-six" ,python-six)))
2951 (home-page "https://github.com/Julian/jsonschema")
2952 (synopsis "Implementation of JSON Schema for Python")
2953 (description
2954 "Jsonschema is an implementation of JSON Schema for Python.")
2955 (license license:expat)
2956 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2957
2958 (define-public python2-jsonschema
2959 (let ((jsonschema (package-with-python2
2960 (strip-python2-variant python-jsonschema))))
2961 (package/inherit jsonschema
2962 (propagated-inputs
2963 `(("python2-functools32" ,python2-functools32)
2964 ,@(package-propagated-inputs jsonschema))))))
2965
2966 (define-public python-schema
2967 (package
2968 (name "python-schema")
2969 (version "0.6.6")
2970 (source
2971 (origin
2972 (method url-fetch)
2973 (uri (pypi-uri "schema" version))
2974 (sha256
2975 (base32
2976 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2977 (build-system python-build-system)
2978 (native-inputs
2979 `(("python-pytest" ,python-pytest)))
2980 (home-page "https://github.com/keleshev/schema")
2981 (synopsis "Simple data validation library")
2982 (description
2983 "@code{python-schema} is a library for validating Python data
2984 structures, such as those obtained from config-files, forms, external
2985 services or command-line parsing, converted from JSON/YAML (or
2986 something else) to Python data-types.")
2987 (license license:psfl)))
2988
2989 (define-public python2-schema
2990 (package-with-python2 python-schema))
2991
2992 (define-public python-schema-0.5
2993 (package (inherit python-schema)
2994 (version "0.5.0")
2995 (source
2996 (origin
2997 (method url-fetch)
2998 (uri (pypi-uri "schema" version))
2999 (sha256
3000 (base32
3001 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3002
3003 (define-public python2-schema-0.5
3004 (package-with-python2 python-schema-0.5))
3005
3006 (define-public python-kitchen
3007 (package
3008 (name "python-kitchen")
3009 (version "1.2.5")
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (pypi-uri "kitchen" version))
3014 (sha256
3015 (base32
3016 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3017 (build-system python-build-system)
3018 (propagated-inputs
3019 `(("python-chardet" ,python-chardet)))
3020 (home-page "https://github.com/fedora-infra/kitchen")
3021 (synopsis "Python API for snippets")
3022 (description "@code{kitchen} module provides a python API for all sorts of
3023 little useful snippets of code that everybody ends up writing for their projects
3024 but never seem big enough to build an independent release. Use kitchen and stop
3025 cutting and pasting that code over and over.")
3026 (license (list license:lgpl2.1+
3027 ;; subprocess.py, test_subprocess.py,
3028 ;; kitchen/pycompat25/defaultdict.py:
3029 license:psfl))))
3030
3031 (define-public python2-kitchen
3032 (package-with-python2 python-kitchen))
3033
3034 (define-public python-unidecode
3035 (package
3036 (name "python-unidecode")
3037 (version "1.1.1")
3038 (source (origin
3039 (method url-fetch)
3040 (uri (pypi-uri "Unidecode" version))
3041 (sha256
3042 (base32
3043 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3044 (build-system python-build-system)
3045 (home-page "https://pypi.org/project/Unidecode/")
3046 (synopsis "ASCII transliterations of Unicode text")
3047 (description
3048 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3049 useful when integrating with legacy code that doesn't support Unicode, or for
3050 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3051 machine identifiers from human-readable Unicode strings that should still be
3052 somewhat intelligible.")
3053 (license license:gpl2+)))
3054
3055 (define-public python2-unidecode
3056 (package-with-python2 python-unidecode))
3057
3058 (define-public python-text-unidecode
3059 (package
3060 (name "python-text-unidecode")
3061 (version "1.3")
3062 (source (origin
3063 (method url-fetch)
3064 (uri (pypi-uri "text-unidecode" version))
3065 (sha256
3066 (base32
3067 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3068 (build-system python-build-system)
3069 (arguments
3070 '(#:phases (modify-phases %standard-phases
3071 (replace 'check
3072 (lambda _
3073 (setenv "PYTHONPATH"
3074 (string-append "./build/lib:"
3075 (getenv "PYTHONPATH")))
3076 (invoke "pytest" "-vv"))))))
3077 (native-inputs
3078 `(("python-pytest" ,python-pytest)))
3079 (home-page "https://github.com/kmike/text-unidecode/")
3080 (synopsis "Decode Unicode data")
3081 (description
3082 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3083 Perl library. It can create ASCII representations of Unicode data. In general
3084 users should prefer the @code{python-unidecode} package which offers better
3085 memory usage and transliteration quality.")
3086 ;; The user can choose either license.
3087 (license (list license:clarified-artistic license:gpl2+))))
3088
3089 (define-public python2-text-unidecode
3090 (package-with-python2 python-text-unidecode))
3091
3092 (define-public python-pyjwt
3093 (package
3094 (name "python-pyjwt")
3095 (version "1.7.1")
3096 (source
3097 (origin
3098 (method url-fetch)
3099 (uri (pypi-uri "PyJWT" version))
3100 (sha256
3101 (base32
3102 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3103 (modules '((guix build utils)))
3104 (snippet
3105 '(begin
3106 (for-each delete-file-recursively
3107 (find-files "." "\\.pyc$"))
3108 #t))))
3109 (build-system python-build-system)
3110 (arguments
3111 '(#:phases (modify-phases %standard-phases
3112 (replace 'check
3113 (lambda _
3114 ;; Mimic upstream commit 3a20892442b34c7 to get
3115 ;; rid of dependency on pytest-runner < 5.0.
3116 ;; Remove substitution for PyJWT > 1.7.1.
3117 (substitute* "setup.py"
3118 ((".*pytest-runner.*")
3119 ""))
3120 (invoke "pytest" "-vv"))))))
3121 (native-inputs
3122 `(("python-pytest" ,python-pytest)
3123 ("python-pytest-cov" ,python-pytest-cov)))
3124 (home-page "https://github.com/progrium/pyjwt")
3125 (synopsis "JSON Web Token implementation in Python")
3126 (description
3127 "PyJWT is a JSON Web Token implementation written in Python.")
3128 (license license:expat)))
3129
3130 (define-public python2-pyjwt
3131 (package-with-python2 python-pyjwt))
3132
3133 (define-public python-pykka
3134 (package
3135 (name "python-pykka")
3136 (version "1.2.1")
3137 (source
3138 (origin
3139 (method url-fetch)
3140 (uri (pypi-uri "Pykka" version))
3141 (sha256
3142 (base32
3143 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3144 (build-system python-build-system)
3145 (native-inputs
3146 `(("python-mock" ,python-mock)
3147 ("python-nose" ,python-nose)
3148 ("python-gevent" ,python-gevent)
3149 ("python-eventlet" ,python-eventlet)))
3150 (home-page "https://www.pykka.org/")
3151 (synopsis "Pykka is a Python implementation of the actor model")
3152 (description
3153 "Pykka is a Python implementation of the actor model.
3154 The actor model introduces some simple rules to control the sharing
3155 of state and cooperation between execution units, which makes it
3156 easier to build concurrent applications.")
3157 (license license:asl2.0)))
3158
3159 (define-public python-pymsgbox
3160 (package
3161 (name "python-pymsgbox")
3162 (version "1.0.6")
3163 (source
3164 (origin
3165 (method git-fetch)
3166 (uri (git-reference
3167 ;; LICENSE.txt is not present on pypi
3168 (url "https://github.com/asweigart/PyMsgBox")
3169 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3170 (file-name (git-file-name name version))
3171 (sha256
3172 (base32
3173 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3174 (arguments
3175 ;; Circular dependency to run tests:
3176 ;; Tests need pyautogui, which depends on pymsgbox.
3177 '(#:tests? #f))
3178 (build-system python-build-system)
3179 (home-page "https://github.com/asweigart/PyMsgBox")
3180 (synopsis "Python module for JavaScript-like message boxes")
3181 (description
3182 "PyMsgBox is a simple, cross-platform, pure Python module for
3183 JavaScript-like message boxes. Types of dialog boxes include:
3184 @enumerate
3185 @item alert
3186 @item confirm
3187 @item prompt
3188 @item password
3189 @end enumerate
3190 ")
3191 (license license:bsd-3)))
3192
3193 (define-public python-pympler
3194 (package
3195 (name "python-pympler")
3196 (home-page "https://pythonhosted.org/Pympler/")
3197 (version "0.8")
3198 (source (origin
3199 (method url-fetch)
3200 (uri (pypi-uri "Pympler" version))
3201 (sha256
3202 (base32
3203 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3204 (build-system python-build-system)
3205 (arguments
3206 `(#:phases (modify-phases %standard-phases
3207 (delete 'check)
3208 (add-after 'install 'check
3209 (lambda* (#:key inputs outputs #:allow-other-keys)
3210 (add-installed-pythonpath inputs outputs)
3211 (invoke "python" "setup.py" "test"))))))
3212 (synopsis "Measure, monitor and analyze memory behavior")
3213 (description
3214 "Pympler is a development tool to measure, monitor and analyze
3215 the memory behavior of Python objects in a running Python application.
3216
3217 By pympling a Python application, detailed insight in the size and the
3218 lifetime of Python objects can be obtained. Undesirable or unexpected
3219 runtime behavior like memory bloat and other @samp{pymples} can easily
3220 be identified.
3221
3222 A web profiling frontend exposes process statistics, garbage
3223 visualisation and class tracker statistics.")
3224 (license license:asl2.0)))
3225
3226 (define-public python2-pympler
3227 (package-with-python2 python-pympler))
3228
3229 (define-public python-itsdangerous
3230 (package
3231 (name "python-itsdangerous")
3232 (version "1.1.0")
3233 (source
3234 (origin
3235 (method url-fetch)
3236 (uri (pypi-uri "itsdangerous" version))
3237 (sha256
3238 (base32
3239 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3240 (build-system python-build-system)
3241 (home-page "https://palletsprojects.com/p/itsdangerous/")
3242 (synopsis "Python library for passing data to/from untrusted environments")
3243 (description
3244 "Itsdangerous provides various helpers to pass trusted data to untrusted
3245 environments and back.")
3246 (license license:bsd-3)))
3247
3248 (define-public python2-itsdangerous
3249 (package-with-python2 python-itsdangerous))
3250
3251 (define-public python-pyyaml
3252 (package
3253 (name "python-pyyaml")
3254 (version "5.3.1")
3255 (source
3256 (origin
3257 (method url-fetch)
3258 (uri (pypi-uri "PyYAML" version))
3259 (sha256
3260 (base32
3261 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3262 (build-system python-build-system)
3263 (inputs
3264 `(("libyaml" ,libyaml)))
3265 (home-page "https://pyyaml.org")
3266 (synopsis "YAML parser and emitter for Python")
3267 (description
3268 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3269 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3270 API, and sensible error messages. PyYAML supports standard YAML tags and
3271 provides Python-specific tags that represent an arbitrary Python object.")
3272 (license license:expat)))
3273
3274 (define-public python2-pyyaml
3275 (package-with-python2 python-pyyaml))
3276
3277 (define-public python-vine
3278 (package
3279 (name "python-vine")
3280 (version "1.1.4")
3281 (source
3282 (origin
3283 (method url-fetch)
3284 (uri (pypi-uri "vine" version))
3285 (sha256
3286 (base32
3287 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3288 (build-system python-build-system)
3289 (native-inputs
3290 `(("python-pytest" ,python-pytest)
3291 ("python-case" ,python-case)))
3292 (home-page "https://github.com/celery/vine")
3293 (synopsis "Promises for Python")
3294 (description
3295 "@code{vine} provides a special implementation of promises in that it can
3296 be used both for \"promise of a value\" and lazy evaluation. The biggest
3297 upside for this is that everything in a promise can also be a promise,
3298 e.g. filters, callbacks and errbacks can all be promises.")
3299 (license license:bsd-3)))
3300
3301 (define-public python-virtualenv
3302 (package
3303 (name "python-virtualenv")
3304 (version "20.2.1")
3305 (source
3306 (origin
3307 (method url-fetch)
3308 (uri (pypi-uri "virtualenv" version))
3309 (sha256
3310 (base32
3311 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3312 (build-system python-build-system)
3313 (native-inputs
3314 `(("python-mock" ,python-mock)
3315 ("python-pytest" ,python-pytest)
3316 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3317 ;; be an input at all". However, removing the input makes the build error:
3318 ;; File "setup.py", line 4, in <module>
3319 ;; raise RuntimeError("setuptools >= 41 required to build")
3320 ("python-setuptools" ,python-setuptools)
3321 ("python-setuptools-scm" ,python-setuptools-scm)))
3322 (propagated-inputs
3323 `(("python-appdirs" ,python-appdirs)
3324 ("python-distlib" ,python-distlib/next)
3325 ("python-filelock" ,python-filelock)
3326 ("python-six" ,python-six)
3327 ("python-importlib-metadata" ,python-importlib-metadata)))
3328 (home-page "https://virtualenv.pypa.io/")
3329 (synopsis "Virtual Python environment builder")
3330 (description
3331 "Virtualenv is a tool to create isolated Python environments.")
3332 (license license:expat)))
3333
3334 (define-public python-markupsafe
3335 (package
3336 (name "python-markupsafe")
3337 (version "1.1.1")
3338 (source
3339 (origin
3340 (method url-fetch)
3341 (uri (pypi-uri "MarkupSafe" version))
3342 (sha256
3343 (base32
3344 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3345 (build-system python-build-system)
3346 (arguments
3347 `(#:modules ((ice-9 ftw)
3348 (srfi srfi-1)
3349 (srfi srfi-26)
3350 (guix build utils)
3351 (guix build python-build-system))
3352 #:phases (modify-phases %standard-phases
3353 (replace 'check
3354 (lambda _
3355 (let ((cwd (getcwd))
3356 (libdir (find (cut string-prefix? "lib." <>)
3357 (scandir "build"))))
3358 (setenv "PYTHONPATH"
3359 (string-append cwd "/build/" libdir ":"
3360 (getenv "PYTHONPATH")))
3361 (invoke "pytest" "-vv")))))))
3362 (native-inputs
3363 `(("python-pytest" ,python-pytest)))
3364 (home-page "https://github.com/mitsuhiko/markupsafe")
3365 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3366 (description
3367 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3368 for Python.")
3369 (license license:bsd-3)))
3370
3371 (define-public python2-markupsafe
3372 (package-with-python2 python-markupsafe))
3373
3374 (define-public python-jinja2
3375 (package
3376 (name "python-jinja2")
3377 (version "2.11.2")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (pypi-uri "Jinja2" version))
3382 (sha256
3383 (base32
3384 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3385 (build-system python-build-system)
3386 (arguments
3387 '(#:phases (modify-phases %standard-phases
3388 (replace 'check
3389 (lambda* (#:key tests? #:allow-other-keys)
3390 (if tests?
3391 (begin
3392 (setenv "PYTHONPATH"
3393 (string-append "./build/lib:"
3394 (getenv "PYTHONPATH")))
3395 (invoke "pytest" "-vv"))
3396 (format #t "test suite not run~%"))
3397 #t)))))
3398 (native-inputs
3399 `(("python-pytest" ,python-pytest)))
3400 (propagated-inputs
3401 `(("python-markupsafe" ,python-markupsafe)))
3402 (home-page "http://jinja.pocoo.org/")
3403 (synopsis "Python template engine")
3404 (description
3405 "Jinja2 is a small but fast and easy to use stand-alone template engine
3406 written in pure Python.")
3407 (license license:bsd-3)))
3408
3409 (define-public python2-jinja2
3410 (package-with-python2 python-jinja2))
3411
3412 (define-public python-jinja2-time
3413 (package
3414 (name "python-jinja2-time")
3415 (version "0.2.0")
3416 (source
3417 (origin
3418 (method url-fetch)
3419 (uri (pypi-uri "jinja2-time" version))
3420 (sha256
3421 (base32
3422 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3423 (build-system python-build-system)
3424 (propagated-inputs
3425 `(("python-arrow" ,python-arrow)
3426 ("python-jinja2" ,python-jinja2)))
3427 (home-page
3428 "https://github.com/hackebrot/jinja2-time")
3429 (synopsis "Jinja2 Extension for Dates and Times")
3430 (description
3431 "This package provides an extension for the template engine Jinja2. It
3432 adds a 'now' tag providing a convenient access to the arrow.now() API from
3433 templates. A format string can be provided to control the output.")
3434 (license license:expat)))
3435
3436 (define-public python-pystache
3437 (package
3438 (name "python-pystache")
3439 (version "0.5.4")
3440 (source (origin
3441 (method url-fetch)
3442 (uri (pypi-uri "pystache" version))
3443 (sha256
3444 (base32
3445 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3446 (build-system python-build-system)
3447 (arguments
3448 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3449 (home-page "http://defunkt.io/pystache/")
3450 (synopsis "Python logic-less template engine")
3451 (description
3452 "Pystache is a Python implementation of the framework agnostic,
3453 logic-free templating system Mustache.")
3454 (license license:expat)
3455 (properties `((python2-variant . ,(delay python2-pystache))))))
3456
3457 (define-public python2-pystache
3458 (let ((base (package-with-python2
3459 (strip-python2-variant python-pystache))))
3460 (package/inherit base
3461 (arguments
3462 `(#:python ,python-2
3463 #:phases
3464 (modify-phases %standard-phases
3465 (replace 'check
3466 (lambda _
3467 (invoke "python" "test_pystache.py")))))))))
3468
3469 (define-public python-joblib
3470 (package
3471 (name "python-joblib")
3472 (version "0.14.1")
3473 (source (origin
3474 (method url-fetch)
3475 (uri (pypi-uri "joblib" version))
3476 (sha256
3477 (base32
3478 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3479 (build-system python-build-system)
3480 (arguments
3481 `(#:phases
3482 (modify-phases %standard-phases
3483 (replace 'check
3484 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3485 (native-inputs
3486 `(("python-pytest" ,python-pytest)))
3487 (home-page "https://joblib.readthedocs.io/")
3488 (synopsis "Using Python functions as pipeline jobs")
3489 (description
3490 "Joblib is a set of tools to provide lightweight pipelining in Python.
3491 In particular, joblib offers: transparent disk-caching of the output values
3492 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3493 logging and tracing of the execution.")
3494 (license license:bsd-3)))
3495
3496 (define-public python2-joblib
3497 (package-with-python2 python-joblib))
3498
3499 (define-public python-daemon
3500 (package
3501 (name "python-daemon")
3502 (version "2.2.3")
3503 (source
3504 (origin
3505 (method url-fetch)
3506 (uri (pypi-uri "python-daemon" version))
3507 (sha256
3508 (base32
3509 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3510 (build-system python-build-system)
3511 (arguments
3512 `(#:phases
3513 (modify-phases %standard-phases
3514 (add-before 'check 'disable-tests
3515 (lambda _
3516 ;; FIXME: Determine why test fails
3517 (substitute* "test/test_daemon.py"
3518 (("test_detaches_process_context")
3519 "skip_test_detaches_process_context"))
3520 #t)))))
3521 (propagated-inputs
3522 `(("python-lockfile" ,python-lockfile)))
3523 (native-inputs
3524 `(("python-unittest2" ,python-unittest2)
3525 ("python-testtools" ,python-testtools)
3526 ("python-testscenarios" ,python-testscenarios)
3527 ("python-mock" ,python-mock)
3528 ("python-docutils" ,python-docutils)))
3529 (home-page "https://pagure.io/python-daemon/")
3530 (synopsis "Python library for making a Unix daemon process")
3531 (description "Python-daemon is a library that assists a Python program to
3532 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3533
3534 This library provides a @code{DaemonContext} class that manages the following
3535 important tasks for becoming a daemon process:
3536 @enumerate
3537 @item Detach the process into its own process group.
3538 @item Set process environment appropriate for running inside a chroot.
3539 @item Renounce suid and sgid privileges.
3540 @item Close all open file descriptors.
3541 @item Change the working directory, uid, gid, and umask.
3542 @item Set appropriate signal handlers.
3543 @item Open new file descriptors for stdin, stdout, and stderr.
3544 @item Manage a specified PID lock file.
3545 @item Register cleanup functions for at-exit processing.
3546 @end enumerate")
3547 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3548 (license (list license:asl2.0 license:gpl3+))))
3549
3550 (define-public python-anytree
3551 (package
3552 (name "python-anytree")
3553 (version "2.8.0")
3554 (source (origin
3555 (method url-fetch)
3556 (uri (pypi-uri "anytree" version))
3557 (sha256
3558 (base32
3559 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3560 (build-system python-build-system)
3561 (propagated-inputs
3562 `(("python-six" ,python-six)))
3563 (native-inputs
3564 `(;; For tests.
3565 ("graphviz" ,graphviz) ;for 'dot'
3566 ("python-nose" ,python-nose)))
3567 (home-page "https://github.com/c0fec0de/anytree")
3568 (synopsis "Lightweight tree data library")
3569 (description
3570 "@code{anytree} is a simple, lightweight, and extensible tree data
3571 structure for Python.")
3572 (license license:asl2.0)))
3573
3574 (define-public python-docutils
3575 (package
3576 (name "python-docutils")
3577 (version "0.16")
3578 (source
3579 (origin
3580 (method url-fetch)
3581 (uri (pypi-uri "docutils" version))
3582 (sha256
3583 (base32
3584 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3585 (build-system python-build-system)
3586 (arguments
3587 '(#:phases (modify-phases %standard-phases
3588 (replace 'check
3589 (lambda* (#:key tests? #:allow-other-keys)
3590 (if tests?
3591 (invoke "python" "test/alltests.py")
3592 (format #t "test suite not run~%"))
3593 #t)))))
3594 (home-page "http://docutils.sourceforge.net/")
3595 (synopsis "Python Documentation Utilities")
3596 (description
3597 "Docutils is a modular system for processing documentation into useful
3598 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3599 easy to use markup language, for input.
3600
3601 This package provides tools for converting @file{.rst} files to other formats
3602 via commands such as @command{rst2man}, as well as supporting Python code.")
3603 ;; Most of the source code is public domain, but some source files are
3604 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3605 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3606
3607 (define-public python2-docutils
3608 (package-with-python2 python-docutils))
3609
3610 ;; python2-sphinx fails its test suite with newer versions.
3611 (define-public python2-docutils-0.14
3612 (package
3613 (inherit python2-docutils)
3614 (version "0.14")
3615 (source (origin
3616 (method url-fetch)
3617 (uri (pypi-uri "docutils" version))
3618 (sha256
3619 (base32
3620 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3621
3622 (define-public python-restructuredtext-lint
3623 (package
3624 (name "python-restructuredtext-lint")
3625 (version "1.3.0")
3626 (source
3627 (origin
3628 (method url-fetch)
3629 (uri (pypi-uri "restructuredtext-lint" version))
3630 (sha256
3631 (base32
3632 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3633 (build-system python-build-system)
3634 (arguments
3635 `(#:phases
3636 (modify-phases %standard-phases
3637 (delete 'check)
3638 (add-after 'install 'check
3639 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3640 (when tests?
3641 (add-installed-pythonpath inputs outputs)
3642 (invoke "nosetests" "-v"))
3643 #t)))))
3644 (propagated-inputs
3645 `(("python-docutils" ,python-docutils)))
3646 (native-inputs
3647 `(("python-nose" ,python-nose)))
3648 (home-page "https://github.com/twolfson/restructuredtext-lint")
3649 (synopsis "reStructuredText linter")
3650 (description "This package provides a linter for the reStructuredText
3651 format.")
3652 (license license:unlicense)))
3653
3654 (define-public python-doc8
3655 (package
3656 (name "python-doc8")
3657 (version "0.8.0")
3658 (source
3659 (origin
3660 (method url-fetch)
3661 (uri (pypi-uri "doc8" version))
3662 (sha256
3663 (base32
3664 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3665 (build-system python-build-system)
3666 (arguments
3667 `(#:phases
3668 (modify-phases %standard-phases
3669 (delete 'check)
3670 (add-after 'install 'check
3671 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3672 (when tests?
3673 (add-installed-pythonpath inputs outputs)
3674 (invoke "pytest" "-v"))
3675 #t)))))
3676 (propagated-inputs
3677 `(("python-chardet" ,python-chardet)
3678 ("python-docutils" ,python-docutils)
3679 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3680 ("python-six" ,python-six)
3681 ("python-stevedore" ,python-stevedore)))
3682 (native-inputs
3683 `(("python-testtools" ,python-testtools)
3684 ("python-pytest" ,python-pytest)))
3685 (home-page "https://launchpad.net/doc8")
3686 (synopsis
3687 "Style checker for Sphinx (or other) RST documentation")
3688 (description
3689 "Doc8 is an opinionated style checker for reStructured Text and plain
3690 text styles of documentation.")
3691 (license license:asl2.0)))
3692
3693 (define-public python-pygments
3694 (package
3695 (name "python-pygments")
3696 (version "2.7.3")
3697 (source
3698 (origin
3699 (method url-fetch)
3700 (uri (pypi-uri "Pygments" version))
3701 (sha256
3702 (base32
3703 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3704 (replacement python-pygments/fixed)
3705 (build-system python-build-system)
3706 (arguments
3707 ;; FIXME: Tests require sphinx, which depends on this.
3708 '(#:tests? #f))
3709 (home-page "https://pygments.org/")
3710 (synopsis "Syntax highlighting")
3711 (description
3712 "Pygments is a syntax highlighting package written in Python.")
3713 (license license:bsd-2)
3714 (properties `((python2-variant . ,(delay python2-pygments))))))
3715
3716 (define python-pygments/fixed
3717 (package/inherit python-pygments
3718 (version "2.7.4")
3719 (source
3720 (origin
3721 (method url-fetch)
3722 (uri (pypi-uri "Pygments" version))
3723 (sha256
3724 (base32
3725 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
3726
3727 ;; Pygments 2.6 and later does not support Python 2.
3728 (define-public python2-pygments
3729 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3730 (package
3731 (inherit base)
3732 (version "2.5.2")
3733 (source (origin
3734 (method url-fetch)
3735 (uri (pypi-uri "Pygments" version))
3736 (sha256
3737 (base32
3738 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3739
3740 (define-public python-bump2version
3741 (package
3742 (name "python-bump2version")
3743 (version "1.0.1")
3744 (source
3745 (origin
3746 (method url-fetch)
3747 (uri (pypi-uri "bump2version" version))
3748 (sha256
3749 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3750 (build-system python-build-system)
3751 (arguments
3752 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3753 ;; required: --new-version".
3754 `(#:tests? #false))
3755 (home-page "https://github.com/c4urself/bump2version")
3756 (synopsis "Version-bump your software with a single command!")
3757 (description
3758 "This package provides a small command line tool to simplify releasing
3759 software by updating all version strings in your source code by the correct
3760 increment. It also creates commits and tags.")
3761 (license license:expat)))
3762
3763 (define-public python-bumpversion
3764 (package
3765 (name "python-bumpversion")
3766 (version "0.5.3")
3767 (source
3768 (origin
3769 (method url-fetch)
3770 (uri (pypi-uri "bumpversion" version))
3771 (sha256
3772 (base32
3773 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3774 (build-system python-build-system)
3775 (home-page "https://github.com/peritus/bumpversion")
3776 (synopsis "Tool to bump software version")
3777 (description "This tool provides a command-line interface (CLI) to bump a
3778 software version simply.")
3779 (license license:expat)))
3780
3781 (define-public python-deprecated
3782 (package
3783 (name "python-deprecated")
3784 (version "1.2.5")
3785 (source
3786 (origin
3787 (method git-fetch)
3788 (uri (git-reference
3789 (url "https://github.com/tantale/deprecated")
3790 (commit (string-append "v" version))))
3791 (file-name (git-file-name name version))
3792 (sha256
3793 (base32
3794 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3795 (build-system python-build-system)
3796 (arguments
3797 `(#:phases (modify-phases %standard-phases
3798 (replace 'check
3799 (lambda _
3800 (invoke "pytest"))))))
3801 (propagated-inputs
3802 `(("python-wrapt" ,python-wrapt)))
3803 (native-inputs
3804 `(("python-bumpversion" ,python-bumpversion)
3805 ("python-pytest" ,python-pytest)
3806 ("python-pytest-cov" ,python-pytest-cov)
3807 ("python-sphinx" ,python-sphinx)
3808 ("python-tox" ,python-tox)))
3809 (home-page "https://github.com/tantale/deprecated")
3810 (synopsis "Python decorator to deprecate classes, functions or methods")
3811 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3812 to deprecate classes, functions or methods.")
3813 (license license:expat)))
3814
3815 (define-public python-pygithub
3816 (package
3817 (name "python-pygithub")
3818 (version "1.43.8")
3819 (source
3820 ;; We fetch from the Git repo because there are no tests in the PyPI
3821 ;; archive.
3822 (origin
3823 (method git-fetch)
3824 (uri (git-reference
3825 (url "https://github.com/PyGithub/PyGithub")
3826 (commit (string-append "v" version))))
3827 (file-name (git-file-name name version))
3828 (sha256
3829 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3830 (build-system python-build-system)
3831 (arguments
3832 `(#:phases (modify-phases %standard-phases
3833 ;; Some tests rely on the network.
3834 (add-after 'unpack 'disable-failing-tests
3835 (lambda _
3836 (substitute* "tests/Issue142.py"
3837 (("testDecodeJson") "disabled_testDecodeJson"))
3838 #t))
3839 (add-before 'check 'prepare-for-tests
3840 (lambda _
3841 (for-each (lambda (f)
3842 (chmod f #o666))
3843 (find-files "./tests"))
3844 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3845 (setenv "PYTHONPATH"
3846 (string-append "./tests:" (getenv "PYTHONPATH")))
3847 #t)))))
3848 (propagated-inputs
3849 `(("python-deprecated" ,python-deprecated)
3850 ("python-pyjwt" ,python-pyjwt)
3851 ("python-requests" ,python-requests)))
3852 (native-inputs `(("python-httpretty" ,python-httpretty)))
3853 (home-page "https://pygithub.readthedocs.io/en/latest/")
3854 (synopsis "Python library for the GitHub API")
3855 (description "This library allows managing GitHub resources such as
3856 repositories, user profiles, and organizations in your Python applications,
3857 using version 3 of the GitHub application programming interface (API).")
3858 (license license:lgpl3+)))
3859
3860 (define-public python-rellu
3861 (package
3862 (name "python-rellu")
3863 (version "0.7")
3864 (source
3865 (origin
3866 (method url-fetch)
3867 (uri (pypi-uri "rellu" version))
3868 (sha256
3869 (base32
3870 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3871 (build-system python-build-system)
3872 (propagated-inputs
3873 `(("python-invoke" ,python-invoke)
3874 ("python-pygithub" ,python-pygithub)))
3875 (home-page "https://github.com/robotframework/rellu")
3876 (synopsis "Utilities to create PyPI releases")
3877 (description "This collection of utilities contains tooling and templates
3878 to assist in creating releases on GitHub and publishing them on PyPI. It is
3879 designed to be used by Robot Framework and tools and libraries in its
3880 ecosystem, but can naturally be used also by other projects.")
3881 (license license:asl2.0)))
3882
3883 (define-public python-robotframework
3884 (package
3885 (name "python-robotframework")
3886 (version "3.2.2")
3887 ;; There are no tests in the PyPI archive.
3888 (source
3889 (origin
3890 (method git-fetch)
3891 (uri (git-reference
3892 (url "https://github.com/robotframework/robotframework")
3893 (commit (string-append "v" version))))
3894 (file-name (git-file-name name version))
3895 (sha256
3896 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3897 (patches (search-patches
3898 "python-robotframework-source-date-epoch.patch"))))
3899 (build-system python-build-system)
3900 (arguments
3901 `(#:phases (modify-phases %standard-phases
3902 (add-before 'build 'build-and-install-doc
3903 (lambda* (#:key outputs #:allow-other-keys)
3904 (let* ((doc-output (assoc-ref outputs "doc"))
3905 (doc (string-append doc-output "/share/"
3906 ,name "-" ,version "/")))
3907 (invoke "invoke" "library-docs" "all")
3908 (mkdir-p doc)
3909 (copy-recursively "doc/libraries"
3910 (string-append doc "/libraries"))
3911 #t)))
3912 (replace 'check
3913 (lambda* (#:key inputs #:allow-other-keys)
3914 ;; Some tests require timezone data. Otherwise, they
3915 ;; look up /etc/localtime, which doesn't exist, and fail
3916 ;; with:
3917 ;;
3918 ;; OverflowError: mktime argument out of range
3919 (setenv "TZDIR"
3920 (string-append (assoc-ref inputs "tzdata")
3921 "/share/zoneinfo"))
3922 (setenv "TZ" "Europe/Paris")
3923
3924 (invoke "python" "utest/run.py"))))))
3925 (native-inputs
3926 `(("python-invoke" ,python-invoke)
3927 ("python-rellu" ,python-rellu)
3928 ("python:tk" ,python "tk") ;used when building the HTML doc
3929 ("tzdata" ,tzdata-for-tests)))
3930 (outputs '("out" "doc"))
3931 (home-page "https://robotframework.org")
3932 (synopsis "Generic automation framework")
3933 (description "Robot Framework is a generic automation framework for
3934 acceptance testing, acceptance test driven development (ATDD), and robotic
3935 process automation (RPA).")
3936 (license license:asl2.0)))
3937
3938 (define-public python-robotframework-lint
3939 ;; There is no properly tagged release; the commit below seems to correspond
3940 ;; to the 0.9 stable release available from PyPI. The tests are not
3941 ;; included in the PyPI archive, so we fetch the sources from the upstream
3942 ;; Git repo.
3943 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3944 (revision "0"))
3945 (package
3946 (name "python-robotframework-lint")
3947 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3948 revision commit))
3949 (source
3950 (origin
3951 (method git-fetch)
3952 (uri (git-reference
3953 (url "https://github.com/boakley/robotframework-lint")
3954 (commit commit)))
3955 (file-name (git-file-name name version))
3956 (sha256
3957 (base32
3958 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3959 (build-system python-build-system)
3960 (arguments
3961 `(#:phases
3962 (modify-phases %standard-phases
3963 (replace 'check
3964 (lambda _
3965 (invoke "python" "-m" "robot" "-A"
3966 "tests/conf/default.args" "tests"))))))
3967 (propagated-inputs
3968 `(("python-robotframework" ,python-robotframework)))
3969 (home-page "https://github.com/boakley/robotframework-lint/")
3970 (synopsis "Static analysis tool (linter) for Robot Framework")
3971 (description "This package provides the @code{rflint} command-line
3972 utility, a static analysis tool (linter) for Robot Framework source files.")
3973 (license license:asl2.0))))
3974
3975 (define-public python-robotframework-sshlibrary
3976 (package
3977 (name "python-robotframework-sshlibrary")
3978 (version "3.3.0")
3979 ;; There are no tests in the PyPI archive.
3980 (source
3981 (origin
3982 (method git-fetch)
3983 (uri (git-reference
3984 (url "https://github.com/robotframework/SSHLibrary")
3985 (commit (string-append "v" version))))
3986 (file-name (git-file-name name version))
3987 (sha256
3988 (base32
3989 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3990 (build-system python-build-system)
3991 (arguments
3992 `(#:phases
3993 (modify-phases %standard-phases
3994 (add-before 'build 'build-and-install-doc
3995 (lambda* (#:key outputs #:allow-other-keys)
3996 (let* ((doc-output (assoc-ref outputs "doc"))
3997 (doc (string-append doc-output "/share/"
3998 ,name "-" ,version "/")))
3999 (invoke "chmod" "-R" "+w" "docs")
4000 (invoke "invoke" "kw-docs" "project-docs")
4001 (mkdir-p doc)
4002 (for-each delete-file (find-files "docs" "\\.rst"))
4003 (copy-recursively "docs" doc)
4004 #t)))
4005 (replace 'check
4006 (lambda _
4007 ;; Some tests require an SSH server; we remove them.
4008 (delete-file "utest/test_client_api.py")
4009 (delete-file "utest/test_scp.py")
4010 (invoke "python" "utest/run.py"))))))
4011 (propagated-inputs
4012 `(("python-robotframework" ,python-robotframework)
4013 ("python-paramiko" ,python-paramiko)
4014 ("python-scp" ,python-scp)))
4015 (native-inputs
4016 `(("openssh" ,openssh)
4017 ("which" ,which)
4018 ;; To generate the documentation
4019 ("python-docutils" ,python-docutils)
4020 ("python-invoke" ,python-invoke)
4021 ("python-pygments" ,python-pygments)
4022 ("python-rellu" ,python-rellu)))
4023 (outputs '("out" "doc"))
4024 (home-page "https://github.com/robotframework/SSHLibrary")
4025 (synopsis "Robot Framework library for SSH and SFTP")
4026 (description "SSHLibrary is a Robot Framework library providing support
4027 for SSH and SFTP. It has the following main usages:
4028 @itemize @bullet
4029 @item Executing commands on the remote machine, either blocking or non-blocking.
4030 @item Writing and reading in an interactive shell.
4031 @item Transferring files and directories over SFTP.
4032 @item Ensuring that files and directories exist on the remote machine.
4033 @end itemize")
4034 (license license:asl2.0)))
4035
4036 (define-public python-rstr
4037 (package
4038 (name "python-rstr")
4039 (version "2.2.6")
4040 (source
4041 (origin
4042 (method url-fetch)
4043 (uri (pypi-uri "rstr" version))
4044 (sha256
4045 (base32
4046 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4047 (build-system python-build-system)
4048 (home-page "https://github.com/leapfrogonline/rstr")
4049 (synopsis "Generate random strings in Python")
4050 (description "This package provides a python module for generating
4051 random strings of various types. It could be useful for fuzz testing,
4052 generating dummy data, or other applications. It has no dependencies
4053 outside the standard library.")
4054 (license license:bsd-3)))
4055
4056 (define-public python-scp
4057 (package
4058 (name "python-scp")
4059 (version "0.13.3")
4060 (source
4061 (origin
4062 (method url-fetch)
4063 (uri (pypi-uri "scp" version))
4064 (sha256
4065 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4066 (build-system python-build-system)
4067 (arguments
4068 '(#:tests? #f)) ;tests require an SSH server
4069 (propagated-inputs
4070 `(("python-paramiko" ,python-paramiko)))
4071 (home-page "https://github.com/jbardin/scp.py")
4072 (synopsis "SCP protocol module for Python and Paramiko")
4073 (description "The scp module extends the Paramiko library to send and
4074 receive files via the SCP1 protocol, as implemented by the OpenSSH
4075 @command{scp} program.")
4076 (license license:gpl2+)))
4077
4078 (define-public python-rst.linker
4079 (package
4080 (name "python-rst.linker")
4081 (version "1.11")
4082 (source
4083 (origin
4084 (method url-fetch)
4085 (uri (pypi-uri "rst.linker" version))
4086 (sha256
4087 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4088 (build-system python-build-system)
4089 (propagated-inputs
4090 `(("python-dateutil" ,python-dateutil)
4091 ("python-six" ,python-six)))
4092 (native-inputs
4093 `(("python-setuptools-scm" ,python-setuptools-scm)))
4094 ;; Test would require path.py, which would introduce a cyclic dependence.
4095 (arguments `(#:tests? #f))
4096 ;; Note: As of version 1.7 the documentation is not worth building.
4097 (home-page "https://github.com/jaraco/rst.linker")
4098 (synopsis "Sphinx plugin to add links and timestamps")
4099 (description "rst.linker automatically replaces text by a
4100 reStructuredText external reference or timestamps. It's primary purpose is to
4101 augment the changelog, but it can be used for other documents, too.")
4102 (license license:expat)))
4103
4104 (define-public python2-rst.linker
4105 (package-with-python2 python-rst.linker))
4106
4107 (define-public python-sshpubkeys
4108 (package
4109 (name "python-sshpubkeys")
4110 (version "3.1.0")
4111 (home-page "https://github.com/ojarva/python-sshpubkeys")
4112 (source (origin
4113 (method git-fetch)
4114 (uri (git-reference
4115 (url home-page)
4116 (commit (string-append "v" version))))
4117 (file-name (git-file-name name version))
4118 (sha256
4119 (base32
4120 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4121 (build-system python-build-system)
4122 (propagated-inputs
4123 `(("python-cryptography" ,python-cryptography)
4124 ("python-ecdsa" ,python-ecdsa)))
4125 (synopsis "OpenSSH public key parser")
4126 (description
4127 "This package provides a library for parsing and validating OpenSSH
4128 public key files.")
4129 (license license:bsd-3)))
4130
4131 (define-public python-feedgenerator
4132 (package
4133 (name "python-feedgenerator")
4134 (version "1.9")
4135 (source
4136 (origin
4137 (method url-fetch)
4138 (uri (pypi-uri "feedgenerator" version))
4139 (sha256
4140 (base32
4141 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4142 (modules '((guix build utils)))
4143 (snippet
4144 '(begin
4145 ;; Remove pre-compiled .pyc files from source.
4146 (for-each delete-file-recursively
4147 (find-files "." "__pycache__" #:directories? #t))
4148 (for-each delete-file (find-files "." "\\.pyc$"))
4149 #t))))
4150 (build-system python-build-system)
4151 (propagated-inputs
4152 `(("python-pytz" ,python-pytz)
4153 ("python-six" ,python-six)))
4154 (home-page "https://github.com/getpelican/feedgenerator")
4155 (synopsis
4156 "Standalone version of Django's Atom/RSS feed generator")
4157 (description
4158 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4159 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4160 (license license:bsd-3)))
4161
4162 (define-public python2-feedgenerator
4163 (package-with-python2 python-feedgenerator))
4164
4165 (define-public python-jsonrpc-server
4166 (package
4167 (name "python-jsonrpc-server")
4168 (version "0.4.0")
4169 (source
4170 (origin
4171 (method url-fetch)
4172 (uri (pypi-uri "python-jsonrpc-server" version))
4173 (sha256
4174 (base32
4175 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4176 (build-system python-build-system)
4177 (propagated-inputs
4178 `(("python-mock" ,python-mock)
4179 ("python-pytest" ,python-pytest)
4180 ("python-ujson" ,python-ujson)))
4181 (home-page
4182 "https://github.com/palantir/python-jsonrpc-server")
4183 (synopsis "JSON RPC 2.0 server library")
4184 (description
4185 "This package provides a JSON RPC 2.0 server library for Python.")
4186 (license license:expat)))
4187
4188 (define-public python-pydantic
4189 (package
4190 (name "python-pydantic")
4191 (version "1.6.1")
4192 (source
4193 (origin
4194 (method git-fetch)
4195 (uri (git-reference
4196 (url "https://github.com/samuelcolvin/pydantic")
4197 (commit (string-append "v" version))))
4198 (file-name (git-file-name name version))
4199 (sha256
4200 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4201 (build-system python-build-system)
4202 (arguments
4203 '(#:phases
4204 (modify-phases %standard-phases
4205 ;; Reported upstream:
4206 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4207 ;; Disable the faulty test as the fix is unclear.
4208 (add-before 'check 'disable-test
4209 (lambda _
4210 (substitute* "tests/test_validators.py"
4211 (("test_assert_raises_validation_error")
4212 "_test_assert_raises_validation_error"))
4213 #t))
4214 (replace 'check
4215 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4216 (native-inputs
4217 `(("python-pytest" ,python-pytest)))
4218 (home-page "https://github.com/samuelcolvin/pydantic")
4219 (synopsis "Python data validation and settings management")
4220 (description
4221 "Pydantic enforces type hints at runtime, and provides user friendly
4222 errors when data is invalid.")
4223 (license license:expat)))
4224
4225 (define-public python-pydocstyle
4226 (package
4227 (name "python-pydocstyle")
4228 (version "3.0.0")
4229 (source
4230 (origin
4231 (method url-fetch)
4232 (uri (pypi-uri "pydocstyle" version))
4233 (sha256
4234 (base32
4235 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4236 (build-system python-build-system)
4237 (propagated-inputs
4238 `(("python-six" ,python-six)
4239 ("python-snowballstemmer" ,python-snowballstemmer)))
4240 (home-page
4241 "https://github.com/PyCQA/pydocstyle/")
4242 (synopsis "Python docstring style checker")
4243 (description
4244 "This package provides a style checker for the Python Language
4245 Server (PLS).")
4246 (license license:expat)))
4247
4248 (define-public python-language-server
4249 (package
4250 (name "python-language-server")
4251 (version "0.36.2")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 (uri (pypi-uri "python-language-server" version))
4256 (sha256
4257 (base32
4258 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4259 (build-system python-build-system)
4260 (propagated-inputs
4261 `(("python-autopep8" ,python-autopep8)
4262 ("python-configparser" ,python-configparser)
4263 ("python-pydocstyle" ,python-pydocstyle)
4264 ("python-future" ,python-future)
4265 ("python-jedi" ,python-jedi)
4266 ("python-jsonrpc-server" ,python-jsonrpc-server)
4267 ("python-pluggy" ,python-pluggy)
4268 ("python-pycodestyle" ,python-pycodestyle)
4269 ("python-pyflakes" ,python-pyflakes)
4270 ("python-rope" ,python-rope)
4271 ("python-ujson" ,python-ujson)
4272 ("python-yapf" ,python-yapf)))
4273 (native-inputs
4274 `(("python-coverage" ,python-coverage)
4275 ("python-flaky" ,python-flaky)
4276 ("python-matplotlib" ,python-matplotlib)
4277 ("python-mock" ,python-mock)
4278 ("python-numpy" ,python-numpy)
4279 ("python-pandas" ,python-pandas)
4280 ("python-pylint" ,python-pylint)
4281 ("python-pytest" ,python-pytest)
4282 ("python-pytest-cov" ,python-pytest-cov)
4283 ("python-versioneer" ,python-versioneer)))
4284 (home-page "https://github.com/palantir/python-language-server")
4285 (synopsis "Python implementation of the Language Server Protocol")
4286 (description
4287 "The Python Language Server (pyls) is an implementation of the Python 3
4288 language specification for the Language Server Protocol (LSP). This tool is
4289 used in text editing environments to provide a complete and integrated
4290 feature-set for programming Python effectively.")
4291 (license license:expat)))
4292
4293 (define-public python-pathspec
4294 (package
4295 (name "python-pathspec")
4296 (version "0.7.0")
4297 (source
4298 (origin
4299 (method url-fetch)
4300 (uri (pypi-uri "pathspec" version))
4301 (sha256
4302 (base32
4303 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4304 (build-system python-build-system)
4305 (home-page "https://github.com/cpburnz/python-path-specification")
4306 (synopsis "Utility library for gitignore style pattern matching of file paths")
4307 (description
4308 "This package provides a utility library for gitignore style pattern
4309 matching of file paths.")
4310 (license license:mpl2.0)))
4311
4312 (define-public python-black
4313 (package
4314 (name "python-black")
4315 (version "20.8b1")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (pypi-uri "black" version))
4320 (sha256
4321 (base32
4322 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4323 (build-system python-build-system)
4324 (arguments
4325 `(#:phases
4326 (modify-phases %standard-phases
4327 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4328 (lambda _
4329 (let ((python3 (which "python3")))
4330 (substitute* '("tests/data/fmtonoff.py"
4331 "tests/data/string_prefixes.py"
4332 "tests/data/function.py"
4333 "tests/data/python37.py")
4334 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4335 (string-append "#!" python3 (if (string? minor-version)
4336 minor-version
4337 "")))))
4338 #t))
4339 (add-after 'unpack 'disable-broken-tests
4340 (lambda* (#:key outputs inputs #:allow-other-keys)
4341 ;; Make installed package available for running the tests
4342 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4343 ":" (getenv "PATH")))
4344
4345 ;; These tests are supposed to be skipped when the blackd
4346 ;; dependencies are missing, but this doesn't quite work.
4347 (substitute* "tests/test_black.py"
4348 (("( *)class BlackDTestCase.*" match indent)
4349 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4350 indent "class BlackDTestCase(unittest.TestCase):\n"))
4351 (("web.Application") "False")
4352 (("@unittest_run_loop") ""))
4353
4354 ;; Patching the above file breaks the self test
4355 (substitute* "tests/test_black.py"
4356 (("( *)def test_self" match indent)
4357 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4358
4359 (substitute* "tests/test_black.py"
4360 (("( *)def test_python38" match indent)
4361 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4362 #t)))))
4363 (propagated-inputs
4364 `(("python-click" ,python-click)
4365 ("python-attrs" ,python-attrs)
4366 ("python-appdirs" ,python-appdirs)
4367 ("python-pathspec" ,python-pathspec)
4368 ("python-mypy-extensions" ,python-mypy-extensions)
4369 ("python-regex" ,python-regex)
4370 ("python-toml" ,python-toml)
4371 ("python-typed-ast" ,python-typed-ast)
4372 ("python-typing-extensions" ,python-typing-extensions)))
4373 (native-inputs
4374 `(("python-setuptools-scm" ,python-setuptools-scm)))
4375 (home-page "https://github.com/ambv/black")
4376 (synopsis "The uncompromising code formatter")
4377 (description "Black is the uncompromising Python code formatter.")
4378 (license license:expat)))
4379
4380 (define-public python-black-macchiato
4381 (package
4382 (name "python-black-macchiato")
4383 (version "1.3.0")
4384 (source
4385 (origin
4386 (method url-fetch)
4387 (uri (pypi-uri "black-macchiato" version))
4388 (sha256
4389 (base32
4390 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4391 (build-system python-build-system)
4392 (propagated-inputs
4393 `(("python-black" ,python-black)))
4394 (home-page "https://github.com/wbolster/black-macchiato")
4395 (synopsis "Partial @code{python-black} formatting")
4396 (description
4397 "This package is built on top the @{python-black} code formatter to
4398 enable formatting of partial files.")
4399 (license license:bsd-3)))
4400
4401 (define-public python-blinker
4402 (package
4403 (name "python-blinker")
4404 (version "1.4")
4405 (source
4406 (origin
4407 (method url-fetch)
4408 (uri (pypi-uri "blinker" version))
4409 (sha256
4410 (base32
4411 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4412 (build-system python-build-system)
4413 (home-page "https://pythonhosted.org/blinker/")
4414 (synopsis "Fast, simple object-to-object and broadcast signaling")
4415 (description
4416 "Blinker provides a fast dispatching system that allows any number of
4417 interested parties to subscribe to events, or \"signals\".")
4418 (license license:expat)))
4419
4420 (define-public python2-blinker
4421 (package-with-python2 python-blinker))
4422
4423 (define-public pelican
4424 (package
4425 (name "pelican")
4426 (version "4.2.0")
4427 (source
4428 (origin
4429 (method url-fetch)
4430 (uri (pypi-uri "pelican" version))
4431 (sha256
4432 (base32
4433 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4434 (build-system python-build-system)
4435 (propagated-inputs
4436 `(("python-blinker" ,python-blinker)
4437 ("python-dateutil" ,python-dateutil)
4438 ("python-docutils" ,python-docutils)
4439 ("python-feedgenerator" ,python-feedgenerator)
4440 ("python-jinja2" ,python-jinja2)
4441 ("python-markdown" ,python-markdown)
4442 ("python-pygments" ,python-pygments)
4443 ("python-pytz" ,python-pytz)
4444 ("python-six" ,python-six)
4445 ("python-unidecode" ,python-unidecode)))
4446 (home-page "https://getpelican.com/")
4447 (arguments
4448 `(;; XXX Requires a lot more packages to do unit tests :P
4449 #:tests? #f))
4450 (synopsis "Python-based static site publishing system")
4451 (description
4452 "Pelican is a tool to generate a static blog from reStructuredText,
4453 Markdown input files, and more. Pelican uses Jinja2 for templating
4454 and is very extensible.")
4455 (license license:agpl3+)))
4456
4457 (define-public mallard-ducktype
4458 (package
4459 (name "mallard-ducktype")
4460 (version "1.0.2")
4461 (source
4462 (origin
4463 (method git-fetch)
4464 ;; git-reference because tests are not included in pypi source tarball
4465 ;; https://issues.guix.gnu.org/issue/36755#2
4466 (uri (git-reference
4467 (url "https://github.com/projectmallard/mallard-ducktype")
4468 (commit version)))
4469 (file-name (git-file-name name version))
4470 (sha256
4471 (base32
4472 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4473 (build-system python-build-system)
4474 (arguments
4475 '(#:phases
4476 (modify-phases %standard-phases
4477 (replace 'check
4478 (lambda _
4479 (with-directory-excursion "tests"
4480 (invoke "sh" "runtests")))))))
4481 (home-page "http://projectmallard.org")
4482 (synopsis "Convert Ducktype to Mallard documentation markup")
4483 (description
4484 "Ducktype is a lightweight syntax that can represent all the semantics
4485 of the Mallard XML documentation system. Ducktype files can be converted to
4486 Mallard using the @command{ducktype} tool. The yelp-tools package
4487 provides additional functionality on the produced Mallard documents.")
4488 (license license:expat)))
4489
4490 (define-public python-cython
4491 (package
4492 (name "python-cython")
4493 (version "0.29.21")
4494 (source
4495 (origin
4496 (method url-fetch)
4497 (uri (pypi-uri "Cython" version))
4498 (sha256
4499 (base32
4500 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4501 (build-system python-build-system)
4502 ;; we need the full python package and not just the python-wrapper
4503 ;; because we need libpython3.3m.so
4504 (inputs
4505 `(("python" ,python)))
4506 (arguments
4507 `(#:phases
4508 (modify-phases %standard-phases
4509 (add-before 'check 'set-HOME
4510 ;; some tests require access to "$HOME/.cython"
4511 (lambda _ (setenv "HOME" "/tmp") #t))
4512 (replace 'check
4513 (lambda _
4514 ;; Disable compiler optimizations to greatly reduce the running
4515 ;; time of the test suite.
4516 (setenv "CFLAGS" "-O0")
4517
4518 (invoke "python" "runtests.py" "-vv"
4519 "-j" (number->string (parallel-job-count))
4520 ;; XXX: On 32-bit architectures, running the parallel tests
4521 ;; fails on many-core systems, see
4522 ;; <https://github.com/cython/cython/issues/2807>.
4523 ,@(if (not (target-64bit?))
4524 '("-x" "run.parallel")
4525 '())))))))
4526 (home-page "https://cython.org/")
4527 (synopsis "C extensions for Python")
4528 (description "Cython is an optimising static compiler for both the Python
4529 programming language and the extended Cython programming language. It makes
4530 writing C extensions for Python as easy as Python itself.")
4531 (license license:asl2.0)
4532 (properties `((python2-variant . ,(delay python2-cython))))))
4533
4534 (define-public python2-cython
4535 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4536 (package/inherit base
4537 (name "python2-cython")
4538 (inputs
4539 `(("python-2" ,python-2))) ;this is not automatically changed
4540 (arguments
4541 (substitute-keyword-arguments (package-arguments base)
4542 ((#:phases phases)
4543 `(modify-phases ,phases
4544 (add-before 'check 'adjust-test_embed
4545 (lambda _
4546 (substitute* "runtests.py"
4547 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4548 ;; so it can give the right -L flag to GCC when embedding static
4549 ;; builds of Python. It is unaware that the Python "config"
4550 ;; directory (where the static library lives) was renamed in
4551 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4552 ;; which works fine, because that is where the shared library is.
4553 ;;
4554 ;; It also appears to be unaware that the Makefile in Demos/embed
4555 ;; already unconditionally pass the static library location to GCC,
4556 ;; after checking sysconfig.get_config_var('LIBPL).
4557 ;;
4558 ;; The effect is that the linker is unable to resolve libexpat
4559 ;; symbols when building for Python 2, because neither the Python 2
4560 ;; shared library nor Expat is available. To fix it, we can either
4561 ;; add Expat as an input and make it visible to the linker, or just
4562 ;; prevent it from overriding the Python shared library location.
4563 ;; The end result is identical, so we take the easy route.
4564 ((" or libname not in os\\.listdir\\(libdir\\)")
4565 ""))
4566 #t)))))))))
4567
4568 ;; The RPython toolchain currently does not support Python 3.
4569 (define-public python2-rpython
4570 (package
4571 (name "python2-rpython")
4572 (version "0.2.1")
4573 (source
4574 (origin
4575 (method url-fetch)
4576 (uri (pypi-uri "rpython" version))
4577 (sha256
4578 (base32
4579 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4580 (build-system python-build-system)
4581 (arguments `(#:python ,python-2))
4582 (native-inputs
4583 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4584 (home-page "https://rpython.readthedocs.org")
4585 (synopsis "Framework for implementing interpreters and virtual machines")
4586 (description "RPython is a translation and support framework for
4587 producing implementations of dynamic languages, emphasizing a clean separation
4588 between language specification and implementation aspects.")
4589 (license license:expat)))
4590
4591 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4592 ;; python-scipy still build, as these three packages are often used together.
4593 (define-public python-numpy
4594 (package
4595 (name "python-numpy")
4596 (version "1.17.3")
4597 (source
4598 (origin
4599 (method url-fetch)
4600 (uri (string-append
4601 "https://github.com/numpy/numpy/releases/download/v"
4602 version "/numpy-" version ".tar.gz"))
4603 (sha256
4604 (base32
4605 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4606 (build-system python-build-system)
4607 (inputs
4608 `(("openblas" ,openblas)
4609 ("lapack" ,lapack)))
4610 (native-inputs
4611 `(("python-cython" ,python-cython)
4612 ("python-pytest" ,python-pytest)
4613 ("gfortran" ,gfortran)))
4614 (arguments
4615 `(#:phases
4616 (modify-phases %standard-phases
4617 (add-before 'build 'configure-blas-lapack
4618 (lambda* (#:key inputs #:allow-other-keys)
4619 (call-with-output-file "site.cfg"
4620 (lambda (port)
4621 (format port
4622 "[openblas]
4623 libraries = openblas
4624 library_dirs = ~a/lib
4625 include_dirs = ~a/include
4626
4627 # backslash-n to make emacs happy
4628 \n[lapack]
4629 lapack_libs = lapack
4630 library_dirs = ~a/lib
4631 include_dirs = ~a/include
4632 "
4633 (assoc-ref inputs "openblas")
4634 (assoc-ref inputs "openblas")
4635 (assoc-ref inputs "lapack")
4636 (assoc-ref inputs "lapack"))))
4637 #t))
4638 (add-before 'build 'fix-executable-paths
4639 (lambda* (#:key inputs #:allow-other-keys)
4640 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4641 ;; instead of /bin/sh.
4642 (substitute* "numpy/distutils/exec_command.py"
4643 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4644 (string-append match-start (assoc-ref inputs "bash") match-end)))
4645 ;; Use "gcc" executable, not "cc".
4646 (substitute* "numpy/distutils/system_info.py"
4647 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4648 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4649 #t))
4650 ;; Tests can only be run after the library has been installed and not
4651 ;; within the source directory.
4652 (delete 'check)
4653 (add-after 'install 'check
4654 (lambda* (#:key outputs inputs #:allow-other-keys)
4655 ;; Make installed package available for running the tests
4656 (add-installed-pythonpath inputs outputs)
4657 ;; Make sure "f2py" etc is found.
4658 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4659 ":" (getenv "PATH")))
4660 (with-directory-excursion "/tmp"
4661 (invoke "python" "-c"
4662 "import numpy; numpy.test(verbose=2)")))))))
4663 (home-page "https://numpy.org")
4664 (synopsis "Fundamental package for scientific computing with Python")
4665 (description "NumPy is the fundamental package for scientific computing
4666 with Python. It contains among other things: a powerful N-dimensional array
4667 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4668 and Fortran code, useful linear algebra, Fourier transform, and random number
4669 capabilities.")
4670 (properties `((python2-variant . ,(delay python2-numpy))))
4671 (license license:bsd-3)))
4672
4673 ;; Numpy 1.16.x are the last versions that support Python 2.
4674 (define-public python2-numpy
4675 (let ((numpy (package-with-python2
4676 (strip-python2-variant python-numpy))))
4677 (package/inherit
4678 numpy
4679 (version "1.16.5")
4680 (source (origin
4681 (method url-fetch)
4682 (uri (string-append
4683 "https://github.com/numpy/numpy/releases/download/v"
4684 version "/numpy-" version ".tar.gz"))
4685 (sha256
4686 (base32
4687 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4688
4689 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4690 ;; interest only for legacy code going back to NumPy's predecessor
4691 ;; Numeric.
4692 (define-public python2-numpy-1.8
4693 (package (inherit python2-numpy)
4694 (version "1.8.2")
4695 (source
4696 (origin
4697 (method git-fetch)
4698 (uri (git-reference
4699 (url "https://github.com/numpy/numpy")
4700 (commit (string-append "v" version))))
4701 (file-name (git-file-name "numpy" version))
4702 (sha256
4703 (base32
4704 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4705 (arguments
4706 (substitute-keyword-arguments (package-arguments python2-numpy)
4707 ((#:phases phases)
4708 `(modify-phases ,phases
4709 (replace 'configure-blas-lapack
4710 (lambda* (#:key inputs #:allow-other-keys)
4711 (call-with-output-file "site.cfg"
4712 (lambda (port)
4713 (format port
4714 "[openblas]
4715 libraries = openblas,lapack
4716 library_dirs = ~a/lib:~a/lib
4717 include_dirs = ~a/include:~a/include
4718 "
4719 (assoc-ref inputs "openblas")
4720 (assoc-ref inputs "lapack")
4721 (assoc-ref inputs "openblas")
4722 (assoc-ref inputs "lapack"))))
4723 #t))))))
4724 (native-inputs
4725 `(("python2-nose" ,python2-nose)))
4726 (description "NumPy is the fundamental package for scientific computing
4727 with Python. It contains among other things: a powerful N-dimensional array
4728 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4729 and Fortran code, useful linear algebra, Fourier transform, and random number
4730 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4731 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4732 Numeric.")
4733 (license license:bsd-3)))
4734
4735 (define-public python-munch
4736 (package
4737 (name "python-munch")
4738 (version "2.0.4")
4739 (source
4740 (origin
4741 (method url-fetch)
4742 (uri (pypi-uri "munch" version))
4743 (sha256
4744 (base32
4745 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4746 (build-system python-build-system)
4747 (home-page "https://github.com/Infinidat/munch")
4748 (synopsis "Dot-accessible dictionary")
4749 (description "Munch is a dot-accessible dictionary similar to JavaScript
4750 objects.")
4751 (license license:expat)))
4752
4753 (define-public python2-munch
4754 (package-with-python2 python-munch))
4755
4756 (define-public python-colormath
4757 (package
4758 (name "python-colormath")
4759 (version "3.0.0")
4760 (source
4761 (origin
4762 (method url-fetch)
4763 (uri (pypi-uri "colormath" version))
4764 (sha256
4765 (base32
4766 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4767 (build-system python-build-system)
4768 (propagated-inputs
4769 `(("python-networkx" ,python-networkx)
4770 ("python-numpy" ,python-numpy)))
4771 (home-page "https://github.com/gtaylor/python-colormath")
4772 (synopsis "Color math and conversion library")
4773 (description
4774 "This is a Python library for color math and conversions.")
4775 (license license:bsd-3)))
4776
4777 (define-public python2-colormath
4778 (package-with-python2 python-colormath))
4779
4780 (define-public python-spectra
4781 (package
4782 (name "python-spectra")
4783 (version "0.0.11")
4784 (source
4785 (origin
4786 (method url-fetch)
4787 (uri (pypi-uri "spectra" version))
4788 (sha256
4789 (base32
4790 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4791 (build-system python-build-system)
4792 (arguments
4793 `(#:phases
4794 (modify-phases %standard-phases
4795 (replace 'check
4796 (lambda _ (invoke "nosetests" "-v"))))))
4797 (propagated-inputs
4798 `(("python-colormath" ,python-colormath)))
4799 (native-inputs
4800 `(("python-nose" ,python-nose)))
4801 (home-page "https://github.com/jsvine/spectra")
4802 (synopsis "Color scales and color conversion")
4803 (description
4804 "This package provides a Python library intended to make color math,
4805 color scales, and color space conversion easy. It has support for:
4806
4807 @enumerate
4808 @item Color scales
4809 @item Color ranges
4810 @item Color blending
4811 @item Brightening/darkening colors
4812 @item Saturating/desaturating colors
4813 @item Conversion to/from multiple color spaces.
4814 @end enumerate\n")
4815 (license license:expat)))
4816
4817 (define-public python2-spectra
4818 (package-with-python2 python-spectra))
4819
4820 (define-public python-numpy-documentation
4821 (package
4822 (name "python-numpy-documentation")
4823 (version (package-version python-numpy))
4824 (source (package-source python-numpy))
4825 (build-system python-build-system)
4826 (native-inputs
4827 `(("python-matplotlib" ,python-matplotlib)
4828 ("python-numpy" ,python-numpy)
4829 ("pkg-config" ,pkg-config)
4830 ("python-sphinx" ,python-sphinx)
4831 ("python-numpydoc" ,python-numpydoc)
4832 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4833 texlive-fonts-ec
4834 texlive-generic-ifxetex
4835 texlive-generic-pdftex
4836 texlive-amsfonts
4837 texlive-latex-capt-of
4838 texlive-latex-cmap
4839 texlive-latex-environ
4840 texlive-latex-eqparbox
4841 texlive-latex-etoolbox
4842 texlive-latex-expdlist
4843 texlive-latex-fancyhdr
4844 texlive-latex-fancyvrb
4845 texlive-latex-fncychap
4846 texlive-latex-float
4847 texlive-latex-framed
4848 texlive-latex-geometry
4849 texlive-latex-graphics
4850 texlive-latex-hyperref
4851 texlive-latex-mdwtools
4852 texlive-latex-multirow
4853 texlive-latex-needspace
4854 texlive-latex-oberdiek
4855 texlive-latex-parskip
4856 texlive-latex-preview
4857 texlive-latex-tabulary
4858 texlive-latex-threeparttable
4859 texlive-latex-titlesec
4860 texlive-latex-trimspaces
4861 texlive-latex-ucs
4862 texlive-latex-upquote
4863 texlive-latex-url
4864 texlive-latex-varwidth
4865 texlive-latex-wrapfig)))
4866 ("texinfo" ,texinfo)
4867 ("perl" ,perl)
4868 ("scipy-sphinx-theme"
4869 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4870 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4871 (method git-fetch)
4872 (uri (git-reference
4873 (url "https://github.com/scipy/scipy-sphinx-theme")
4874 (commit commit)))
4875 (file-name (git-file-name "python-scipy-sphinx-theme"
4876 (string-take commit 7)))
4877 (sha256
4878 (base32
4879 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4880 ,@(package-native-inputs python-numpy)))
4881 (arguments
4882 `(#:tests? #f ; we're only generating the documentation
4883 #:phases
4884 (modify-phases %standard-phases
4885 (delete 'build)
4886 (replace 'install
4887 (lambda* (#:key inputs outputs #:allow-other-keys)
4888 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4889 (doc (string-append
4890 data "/doc/" ,name "-"
4891 ,(package-version python-numpy)))
4892 (info-reader (string-append data "/info"))
4893 (html (string-append doc "/html"))
4894 (scipy-sphinx-theme "scipy-sphinx-theme")
4895 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4896 (pyver ,(string-append "PYVER=")))
4897
4898 ;; FIXME: this is needed to for texlive-union to generate
4899 ;; fonts, which are not found.
4900 (setenv "HOME" "/tmp")
4901
4902 (with-directory-excursion "doc"
4903 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4904 (mkdir-p html)
4905 (invoke "make" "html" pyver)
4906 (invoke "make" "latex" "PAPER=a4" pyver)
4907 (invoke "make" "-C" "build/latex"
4908 "all-pdf" "PAPER=a4" pyver)
4909 ;; FIXME: Generation of the info file fails.
4910 ;; (invoke "make" "info" pyver)
4911 ;; (mkdir-p info)
4912 ;; (copy-file "build/texinfo/numpy.info"
4913 ;; (string-append info "/numpy.info"))
4914 (for-each (lambda (file)
4915 (copy-file (string-append "build/latex" file)
4916 (string-append doc file)))
4917 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4918 (with-directory-excursion "build/html"
4919 (for-each (lambda (file)
4920 (let* ((dir (dirname file))
4921 (tgt-dir (string-append html "/" dir)))
4922 (unless (equal? "." dir)
4923 (mkdir-p tgt-dir))
4924 (install-file file html)))
4925 (find-files "." ".*")))))
4926 #t)))))
4927 (home-page (package-home-page python-numpy))
4928 (synopsis "Documentation for the python-numpy package")
4929 (description (package-description python-numpy))
4930 (license (package-license python-numpy))))
4931
4932 (define-public python2-numpy-documentation
4933 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4934 (package
4935 (inherit numpy-documentation)
4936 (native-inputs `(("python2-functools32" ,python2-functools32)
4937 ,@(package-native-inputs numpy-documentation))))))
4938
4939 (define-public python-pygit2
4940 (package
4941 (name "python-pygit2")
4942 (version "1.4.0")
4943 (source
4944 (origin
4945 (method url-fetch)
4946 (uri (pypi-uri "pygit2" version))
4947 (sha256
4948 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4949 (build-system python-build-system)
4950 (arguments
4951 '(#:tests? #f)) ; tests don't run correctly in our environment
4952 (propagated-inputs
4953 `(("python-cached-property" ,python-cached-property)
4954 ("python-cffi" ,python-cffi)
4955 ("libgit2" ,libgit2)))
4956 (native-inputs
4957 `(("python-pytest" ,python-pytest)))
4958 (home-page "https://github.com/libgit2/pygit2")
4959 (synopsis "Python bindings for libgit2")
4960 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4961 library, libgit2 implements Git plumbing.")
4962 ;; GPL2.0 only, with linking exception.
4963 (license license:gpl2)))
4964
4965 (define-public python-patiencediff
4966 (package
4967 (name "python-patiencediff")
4968 (version "0.2.0")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (pypi-uri "patiencediff" version))
4973 (sha256
4974 (base32
4975 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4976 (build-system python-build-system)
4977 (home-page "https://www.breezy-vcs.org/")
4978 (synopsis "Python implementation of the patiencediff algorithm")
4979 (description
4980 "This package contains a Python implementation of the @code{patiencediff}
4981 algorithm. Patiencediff provides a good balance of performance, nice output for
4982 humans, and implementation simplicity.")
4983 (license license:gpl2)))
4984
4985 (define-public python-pdftotext
4986 (package
4987 (name "python-pdftotext")
4988 (version "2.1.5")
4989 (source
4990 (origin
4991 (method url-fetch)
4992 (uri (pypi-uri "pdftotext" version))
4993 (sha256
4994 (base32
4995 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
4996 (build-system python-build-system)
4997 (inputs
4998 `(("poppler" ,poppler)))
4999 (home-page "https://github.com/jalan/pdftotext")
5000 (synopsis "Simple PDF text extraction")
5001 (description "Pdftotext is a Python library of PDF text extraction.")
5002 (license license:expat)))
5003
5004 (define-public python-pyparsing
5005 (package
5006 (name "python-pyparsing")
5007 (version "2.4.6")
5008 (source
5009 (origin
5010 (method url-fetch)
5011 (uri (pypi-uri "pyparsing" version))
5012 (sha256
5013 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5014 (build-system python-build-system)
5015 (outputs '("out" "doc"))
5016 (arguments
5017 `(#:tests? #f ; no test target
5018 #:phases
5019 (modify-phases %standard-phases
5020 (add-after 'install 'install-doc
5021 (lambda* (#:key outputs #:allow-other-keys)
5022 (let* ((doc (string-append (assoc-ref outputs "doc")
5023 "/share/doc/" ,name "-" ,version))
5024 (html-doc (string-append doc "/html"))
5025 (examples (string-append doc "/examples")))
5026 (mkdir-p html-doc)
5027 (mkdir-p examples)
5028 (for-each
5029 (lambda (dir tgt)
5030 (map (lambda (file)
5031 (install-file file tgt))
5032 (find-files dir ".*")))
5033 (list "docs" "htmldoc" "examples")
5034 (list doc html-doc examples))
5035 #t))))))
5036 (home-page "https://github.com/pyparsing/pyparsing")
5037 (synopsis "Python parsing class library")
5038 (description
5039 "The pyparsing module is an alternative approach to creating and
5040 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5041 of regular expressions. The pyparsing module provides a library of classes
5042 that client code uses to construct the grammar directly in Python code.")
5043 (license license:expat)))
5044
5045 (define-public python2-pyparsing
5046 (package-with-python2 python-pyparsing))
5047
5048 (define-public python-pyparsing-2.4.7
5049 (package
5050 (inherit python-pyparsing)
5051 (version "2.4.7")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "pyparsing" version))
5056 (sha256
5057 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5058
5059 (define-public python-numpydoc
5060 (package
5061 (name "python-numpydoc")
5062 (version "0.8.0")
5063 (source
5064 (origin
5065 (method url-fetch)
5066 (uri (pypi-uri "numpydoc" version))
5067 (sha256
5068 (base32
5069 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5070 (build-system python-build-system)
5071 (propagated-inputs
5072 `(("python-sphinx" ,python-sphinx)))
5073 (native-inputs
5074 `(("python-nose" ,python-nose)))
5075 (home-page "https://pypi.org/project/numpydoc/")
5076 (synopsis
5077 "Numpy's Sphinx extensions")
5078 (description
5079 "Sphinx extension to support docstrings in Numpy format.")
5080 (license license:bsd-2)
5081 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5082
5083 (define-public python2-numpydoc
5084 (let ((base (package-with-python2
5085 (strip-python2-variant python-numpydoc))))
5086 (package/inherit base
5087 (propagated-inputs
5088 `(("python2-jinja2" ,python2-jinja2)
5089 ,@(package-propagated-inputs base))))))
5090
5091 (define-public python-numexpr
5092 (package
5093 (name "python-numexpr")
5094 (version "2.6.5")
5095 (source
5096 (origin
5097 (method url-fetch)
5098 (uri (pypi-uri "numexpr" version))
5099 (sha256
5100 (base32
5101 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5102 (build-system python-build-system)
5103 (arguments `(#:tests? #f)) ; no tests included
5104 (propagated-inputs
5105 `(("python-numpy" ,python-numpy)))
5106 (home-page "https://github.com/pydata/numexpr")
5107 (synopsis "Fast numerical expression evaluator for NumPy")
5108 (description
5109 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5110 expressions that operate on arrays are accelerated and use less memory than
5111 doing the same calculation in Python. In addition, its multi-threaded
5112 capabilities can make use of all your cores, which may accelerate
5113 computations, most specially if they are not memory-bounded (e.g. those using
5114 transcendental functions).")
5115 (license license:expat)))
5116
5117 (define-public python2-numexpr
5118 (package-with-python2 python-numexpr))
5119
5120 (define-public python-cycler
5121 (package
5122 (name "python-cycler")
5123 (version "0.10.0")
5124 (source (origin
5125 (method url-fetch)
5126 (uri (pypi-uri "cycler" version))
5127 (sha256
5128 (base32
5129 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5130 (build-system python-build-system)
5131 (arguments
5132 ;; XXX: The current version requires 'coveralls' which we don't have.
5133 ;; Enable this for the next release which uses 'python-pytest'.
5134 '(#:tests? #f))
5135 (propagated-inputs
5136 `(("python-six" ,python-six)))
5137 (home-page "https://matplotlib.org/cycler/")
5138 (synopsis "Composable keyword argument iterator")
5139 (description
5140 "When using @code{matplotlib} and plotting more than one line, it is
5141 common to want to be able to want to be able to cycle over one or more artist
5142 styles; but the plotting logic can quickly become involved.
5143 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5144 @code{Cycler} class was developed.")
5145 (license license:bsd-3)))
5146
5147 (define-public python2-cycler
5148 (package-with-python2 python-cycler))
5149
5150 (define-public python-colorspacious
5151 (package
5152 (name "python-colorspacious")
5153 (version "1.1.2")
5154 (source
5155 (origin
5156 (method git-fetch)
5157 (uri (git-reference
5158 (url "https://github.com/njsmith/colorspacious")
5159 (commit (string-append "v" version))))
5160 (file-name (git-file-name name version))
5161 (sha256
5162 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5163 (build-system python-build-system)
5164 (propagated-inputs
5165 `(("python-numpy" ,python-numpy)))
5166 (native-inputs
5167 `(("python-nose" ,python-nose)))
5168 (arguments
5169 `(#:phases
5170 (modify-phases %standard-phases
5171 (replace 'check
5172 (lambda _
5173 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5174 (home-page "https://github.com/njsmith/colorspacious")
5175 (synopsis "Python library for colorspace conversions")
5176 (description "@code{colorspacious} is a Python library that lets you
5177 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5178 (license license:expat)))
5179
5180 (define-public python2-colorspacious
5181 (package-with-python2 python-colorspacious))
5182
5183 (define-public python-matplotlib
5184 (package
5185 (name "python-matplotlib")
5186 (version "3.1.2")
5187 (source
5188 (origin
5189 (method url-fetch)
5190 (uri (pypi-uri "matplotlib" version))
5191 (sha256
5192 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5193 (patches
5194 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5195 (build-system python-build-system)
5196 (propagated-inputs ; the following packages are all needed at run time
5197 `(("python-cycler" ,python-cycler)
5198 ("python-kiwisolver" ,python-kiwisolver)
5199 ("python-pyparsing" ,python-pyparsing)
5200 ("python-pygobject" ,python-pygobject)
5201 ("gobject-introspection" ,gobject-introspection)
5202 ("python-tkinter" ,python "tk")
5203 ("python-dateutil" ,python-dateutil)
5204 ("python-numpy" ,python-numpy)
5205 ("python-pillow" ,python-pillow)
5206 ("python-pytz" ,python-pytz)
5207 ("python-six" ,python-six)
5208 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5209 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5210 ;; object. For this reason we need to import both libraries.
5211 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5212 ("python-pycairo" ,python-pycairo)
5213 ("python-cairocffi" ,python-cairocffi)))
5214 (inputs
5215 `(("libpng" ,libpng)
5216 ("freetype" ,freetype)
5217 ("cairo" ,cairo)
5218 ("glib" ,glib)
5219 ;; FIXME: Add backends when available.
5220 ;("python-wxpython" ,python-wxpython)
5221 ("tcl" ,tcl)
5222 ("tk" ,tk)))
5223 (native-inputs
5224 `(("pkg-config" ,pkg-config)
5225 ("python-pytest" ,python-pytest)
5226 ("python-mock" ,python-mock)
5227 ("unzip" ,unzip)
5228 ("jquery-ui"
5229 ,(origin
5230 (method url-fetch)
5231 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5232 (sha256
5233 (base32
5234 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5235 (arguments
5236 `(#:phases
5237 (modify-phases %standard-phases
5238 ;; XXX We disable all image comparison tests because we're using a
5239 ;; newer version of FreeType than matplotlib expects. This leads to
5240 ;; minor differences throughout the tests.
5241 (add-after 'unpack 'fix-and-disable-failing-tests
5242 (lambda _
5243 (substitute* (append (find-files "lib/matplotlib/tests/"
5244 "test_.*\\.py$")
5245 (find-files "lib/mpl_toolkits/tests"
5246 "test_.*\\.py$"))
5247 (("^from matplotlib" match)
5248 (string-append "import pytest\n" match))
5249 (("( *)@image_comparison" match indent)
5250 (string-append indent
5251 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5252 match)))
5253 (substitute* "lib/matplotlib/tests/test_animation.py"
5254 (("/bin/sh") (which "sh")))
5255 (for-each delete-file
5256 ;; test_normal_axes, test_get_tightbbox_polar
5257 '("lib/matplotlib/tests/test_axes.py"
5258 ;; We don't use the webagg backend and this test forces it.
5259 "lib/matplotlib/tests/test_backend_webagg.py"
5260 ;; test_outward_ticks
5261 "lib/matplotlib/tests/test_tightlayout.py"
5262 ;; test_hidden_axes fails with minor extent
5263 ;; differences, possibly due to the use of a
5264 ;; different version of FreeType.
5265 "lib/matplotlib/tests/test_constrainedlayout.py"
5266 ;; Fontconfig returns no fonts.
5267 "lib/matplotlib/tests/test_font_manager.py"))
5268 #t))
5269 (add-before 'install 'install-jquery-ui
5270 (lambda* (#:key outputs inputs #:allow-other-keys)
5271 (let ((dir (string-append (assoc-ref outputs "out")
5272 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5273 (mkdir-p dir)
5274 (invoke "unzip"
5275 (assoc-ref inputs "jquery-ui")
5276 "-d" dir))
5277 #t))
5278 (replace 'check
5279 (lambda* (#:key outputs inputs #:allow-other-keys)
5280 (add-installed-pythonpath inputs outputs)
5281 (invoke "python" "tests.py" "-v"
5282 "-m" "not network and not webagg")))
5283 (add-before 'build 'configure-environment
5284 (lambda* (#:key outputs inputs #:allow-other-keys)
5285 (let ((cairo (assoc-ref inputs "cairo")))
5286 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5287 ;; has not effect.
5288 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5289 (setenv "HOME" (getcwd))
5290 ;; Fix rounding errors when using the x87 FPU.
5291 (when (string-prefix? "i686" ,(%current-system))
5292 (setenv "CFLAGS" "-ffloat-store"))
5293 (call-with-output-file "setup.cfg"
5294 (lambda (port)
5295 (format port "[directories]~%
5296 basedirlist = ~a,~a~%
5297 [packages]~%
5298 tests = True~%"
5299 (assoc-ref inputs "tcl")
5300 (assoc-ref inputs "tk")))))
5301 #t)))))
5302 (home-page "https://matplotlib.org/")
5303 (synopsis "2D plotting library for Python")
5304 (description
5305 "Matplotlib is a Python 2D plotting library which produces publication
5306 quality figures in a variety of hardcopy formats and interactive environments
5307 across platforms. Matplotlib can be used in Python scripts, the python and
5308 ipython shell, web application servers, and six graphical user interface
5309 toolkits.")
5310 (license license:psfl)
5311 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5312
5313 (define-public python2-matplotlib
5314 (let ((matplotlib (package-with-python2
5315 (strip-python2-variant python-matplotlib))))
5316 (package (inherit matplotlib)
5317 (version "2.2.4")
5318 (source
5319 (origin
5320 (method url-fetch)
5321 (uri (pypi-uri "matplotlib" version))
5322 (sha256
5323 (base32
5324 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5325 (arguments
5326 (substitute-keyword-arguments (package-arguments matplotlib)
5327 ((#:phases phases)
5328 `(modify-phases ,phases
5329 (replace 'install-jquery-ui
5330 (lambda* (#:key outputs inputs #:allow-other-keys)
5331 (let ((dir (string-append (assoc-ref outputs "out")
5332 "/lib/python2.7/site-packages/"
5333 "matplotlib/backends/web_backend/")))
5334 (mkdir-p dir)
5335 (invoke "unzip"
5336 (assoc-ref inputs "jquery-ui")
5337 "-d" dir))
5338 #t))
5339 (delete 'fix-and-disable-failing-tests)
5340 (delete 'check))))) ; These tests weren't run the the past.
5341 ;; Make sure to use special packages for Python 2 instead
5342 ;; of those automatically rewritten by package-with-python2.
5343 (propagated-inputs
5344 `(("python2-pycairo" ,python2-pycairo)
5345 ("python2-backports-functools-lru-cache"
5346 ,python2-backports-functools-lru-cache)
5347 ("python2-functools32" ,python2-functools32)
5348 ("python2-pygobject-2" ,python2-pygobject-2)
5349 ("python2-subprocess32" ,python2-subprocess32)
5350 ("python2-tkinter" ,python-2 "tk")
5351 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5352 '("python-cairocffi"
5353 "python-pycairo"
5354 "python-pygobject"
5355 "python-tkinter")))))))
5356
5357 (define-public python-matplotlib-documentation
5358 (package
5359 (name "python-matplotlib-documentation")
5360 (version (package-version python-matplotlib))
5361 (source (package-source python-matplotlib))
5362 (build-system python-build-system)
5363 (native-inputs
5364 `(("python-matplotlib" ,python-matplotlib)
5365 ("python-colorspacious" ,python-colorspacious)
5366 ("python-sphinx" ,python-sphinx)
5367 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5368 ("python-sphinx-gallery" ,python-sphinx-gallery)
5369 ("python-numpydoc" ,python-numpydoc)
5370 ("python-ipython" ,python-ipython)
5371 ("python-ipykernel" ,python-ipykernel)
5372 ("python-mock" ,python-mock)
5373 ("graphviz" ,graphviz)
5374 ("texlive" ,(texlive-union (list texlive-amsfonts
5375 texlive-latex-amsmath
5376 texlive-latex-enumitem
5377 texlive-latex-expdlist
5378 texlive-latex-geometry
5379 texlive-latex-preview
5380 texlive-latex-type1cm
5381 texlive-latex-ucs
5382
5383 texlive-generic-pdftex
5384
5385 texlive-fonts-ec
5386 texlive-fonts-adobe-times
5387 texlive-fonts-txfonts)))
5388 ("texinfo" ,texinfo)
5389 ,@(package-native-inputs python-matplotlib)))
5390 (arguments
5391 `(#:tests? #f ; we're only generating documentation
5392 #:phases
5393 (modify-phases %standard-phases
5394 ;; The tests in python-matplotlib are run after the install phase, so
5395 ;; we need to delete the extra phase here.
5396 (delete 'check)
5397 (replace 'build
5398 (lambda _
5399 (chdir "doc")
5400 (setenv "PYTHONPATH"
5401 (string-append (getenv "PYTHONPATH")
5402 ":" (getcwd) "/../examples/units"))
5403 (substitute* "conf.py"
5404 ;; Don't use git.
5405 (("^SHA = check_output.*")
5406 (string-append "SHA = \"" ,version "\"\n"))
5407 ;; Don't fetch intersphinx files from the Internet
5408 (("^explicit_order_folders" m)
5409 (string-append "intersphinx_mapping = {}\n" m))
5410 (("'sphinx.ext.intersphinx',") "")
5411 ;; Disable URL embedding which requires internet access.
5412 (("'https://docs.scipy.org/doc/numpy'") "None")
5413 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5414 (invoke "make"
5415 "SPHINXBUILD=sphinx-build"
5416 "SPHINXOPTS=" ; don't abort on warnings
5417 "html" "texinfo")))
5418 (replace 'install
5419 (lambda* (#:key inputs outputs #:allow-other-keys)
5420 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5421 (doc (string-append data "/doc/python-matplotlib-" ,version))
5422 (info (string-append data "/info"))
5423 (html (string-append doc "/html")))
5424 (mkdir-p html)
5425 (mkdir-p info)
5426 (copy-recursively "build/html" html)
5427 (symlink (string-append html "/_images")
5428 (string-append info "/matplotlib-figures"))
5429 (with-directory-excursion "build/texinfo"
5430 (substitute* "matplotlib.texi"
5431 (("@image\\{([^,]*)" all file)
5432 (string-append "@image{matplotlib-figures/" file)))
5433 (symlink (string-append html "/_images")
5434 "./matplotlib-figures")
5435 (invoke "makeinfo" "--no-split"
5436 "-o" "matplotlib.info" "matplotlib.texi"))
5437 (install-file "build/texinfo/matplotlib.info" info))
5438 #t)))))
5439 (home-page (package-home-page python-matplotlib))
5440 (synopsis "Documentation for the python-matplotlib package")
5441 (description (package-description python-matplotlib))
5442 (license (package-license python-matplotlib))))
5443
5444 (define-public python2-matplotlib-documentation
5445 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5446 (package
5447 (inherit parent)
5448 (native-inputs
5449 (alist-delete "python-sphinx-copybutton"
5450 (package-native-inputs parent))))))
5451
5452 (define-public python-matplotlib-venn
5453 (package
5454 (name "python-matplotlib-venn")
5455 (version "0.11.5")
5456 (source
5457 (origin
5458 (method url-fetch)
5459 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5460 (sha256
5461 (base32
5462 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5463 (build-system python-build-system)
5464 (arguments '(#:tests? #f)) ; tests are not included
5465 (propagated-inputs
5466 `(("python-matplotlib" ,python-matplotlib)
5467 ("python-numpy" ,python-numpy)
5468 ("python-scipy" ,python-scipy)))
5469 (native-inputs
5470 `(("unzip" ,unzip)))
5471 (home-page "https://github.com/konstantint/matplotlib-venn")
5472 (synopsis "Plot area-proportional Venn diagrams")
5473 (description
5474 "This package provides tools for plotting area-proportional two- and
5475 three-way Venn diagrams in @code{matplotlib}.")
5476 (license license:expat)))
5477
5478 (define-public python-pysnptools
5479 (package
5480 (name "python-pysnptools")
5481 (version "0.4.11")
5482 (source
5483 (origin
5484 (method url-fetch)
5485 (uri (pypi-uri "pysnptools" version))
5486 (sha256
5487 (base32
5488 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5489 (build-system python-build-system)
5490 (arguments
5491 `(#:tests? #f ; no test data are included
5492 #:phases
5493 (modify-phases %standard-phases
5494 (replace 'check
5495 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5496 (if tests?
5497 (begin
5498 (add-installed-pythonpath inputs outputs)
5499 (invoke "python3" "pysnptools/test.py"))
5500 #t))))))
5501 (propagated-inputs
5502 `(("python-dill" ,python-dill)
5503 ("python-h5py" ,python-h5py)
5504 ("python-numpy" ,python-numpy)
5505 ("python-pandas" ,python-pandas)
5506 ("python-psutil" ,python-psutil)
5507 ("python-scipy" ,python-scipy)))
5508 (native-inputs
5509 `(("python-cython" ,python-cython)))
5510 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5511 (synopsis "Library for reading and manipulating genetic data")
5512 (description
5513 "PySnpTools is a library for reading and manipulating genetic data. It
5514 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5515 those files. It can also efficiently manipulate ranges of integers using set
5516 operators such as union, intersection, and difference.")
5517 (license license:asl2.0)))
5518
5519 (define-public python2-pysnptools
5520 (package-with-python2 python-pysnptools))
5521
5522 (define-public python-wurlitzer
5523 (package
5524 (name "python-wurlitzer")
5525 (version "2.0.1")
5526 (source
5527 (origin
5528 (method url-fetch)
5529 (uri (pypi-uri "wurlitzer" version))
5530 (sha256
5531 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5532 (build-system python-build-system)
5533 (arguments
5534 '(#:phases
5535 (modify-phases %standard-phases
5536 (replace 'check
5537 (lambda _
5538 (invoke "pytest" "-vv" "test.py"))))))
5539 (native-inputs
5540 `(("python-mock" ,python-mock)
5541 ("python-pytest" ,python-pytest)))
5542 (home-page "https://github.com/minrk/wurlitzer")
5543 (synopsis "Capture C-level output in context managers")
5544 (description
5545 "This library helps to redirect @code{sys.stdout} to a stream or a file
5546 while executing some piece of code, including C code running within a Python
5547 process.")
5548 (license license:expat)))
5549
5550 (define-public python-socksipy-branch
5551 (package
5552 (name "python-socksipy-branch")
5553 (version "1.01")
5554 (source
5555 (origin
5556 (method url-fetch)
5557 (uri (pypi-uri "SocksiPy-branch" version))
5558 (sha256
5559 (base32
5560 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5561 (build-system python-build-system)
5562 (arguments
5563 `(#:tests? #f)) ; There are no tests
5564 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5565 (synopsis "Python SOCKS module")
5566 (description
5567 "SocksiPy - A Python SOCKS client module. It provides a
5568 socket-like interface that supports connections to any TCP
5569 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5570 The original version was developed by Dan Haim, this is a
5571 branch created by Mario Vilas to address some open issues,
5572 as the original project seems to have been abandoned circa 2007.")
5573 (license license:bsd-3)))
5574
5575 (define-public python2-socksipy-branch
5576 (package-with-python2 python-socksipy-branch))
5577
5578 (define-public python-socksipychain
5579 (package
5580 (name "python-socksipychain")
5581 (version "2.1.2")
5582 (source
5583 (origin
5584 (method git-fetch)
5585 (uri (git-reference
5586 (url "https://github.com/pagekite/PySocksipyChain")
5587 (commit (string-append "v" version))))
5588 (file-name (git-file-name name version))
5589 (sha256
5590 (base32
5591 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5592 (build-system python-build-system)
5593 (arguments
5594 `(#:tests? #f)) ; Tests try to access the network.
5595 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5596 (synopsis "Python SOCKS module with chained proxies support")
5597 (description
5598 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5599 adds support for arbitrary chaining of proxy servers and various modes of
5600 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5601 a simple netcat replacement with chaining support.")
5602 (license license:bsd-3)))
5603
5604 (define-public python-pycodestyle
5605 (package
5606 (name "python-pycodestyle")
5607 (version "2.6.0")
5608 (source
5609 (origin
5610 (method url-fetch)
5611 (uri (pypi-uri "pycodestyle" version))
5612 (sha256
5613 (base32
5614 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5615 (build-system python-build-system)
5616 (arguments
5617 `(#:phases
5618 (modify-phases %standard-phases
5619 (replace 'check
5620 (lambda _
5621 (invoke "pytest" "-vv"))))))
5622 (native-inputs
5623 `(("python-pytest" ,python-pytest)))
5624 (home-page "https://pycodestyle.readthedocs.io/")
5625 (synopsis "Python style guide checker")
5626 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5627 Python code against some of the style conventions in
5628 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5629 (license license:expat)))
5630
5631 (define-public python2-pycodestyle
5632 (package-with-python2 python-pycodestyle))
5633
5634 (define-public python-multidict
5635 (package
5636 (name "python-multidict")
5637 (version "4.7.5")
5638 (source
5639 (origin
5640 (method url-fetch)
5641 (uri (pypi-uri "multidict" version))
5642 (sha256
5643 (base32
5644 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5645 (build-system python-build-system)
5646 (arguments
5647 '(#:modules ((ice-9 ftw)
5648 (srfi srfi-1)
5649 (srfi srfi-26)
5650 (guix build utils)
5651 (guix build python-build-system))
5652 #:phases (modify-phases %standard-phases
5653 (replace 'check
5654 (lambda* (#:key tests? #:allow-other-keys)
5655 (if tests?
5656 (begin
5657 (let ((libdir (find (cut string-prefix? "lib." <>)
5658 (scandir "build"))))
5659 (setenv "PYTHONPATH"
5660 (string-append "./build/" libdir ":"
5661 (getenv "PYTHONPATH")))
5662 (invoke "pytest" "-vv")))
5663 (format #t "test suite not run~%"))
5664 #t)))))
5665 (native-inputs
5666 `(("python-pytest" ,python-pytest)
5667 ("python-pytest-cov" ,python-pytest-cov)))
5668 (home-page "https://github.com/aio-libs/multidict/")
5669 (synopsis "Multidict implementation")
5670 (description "Multidict is dict-like collection of key-value pairs
5671 where key might be occurred more than once in the container.")
5672 (license license:asl2.0)))
5673
5674 (define-public python-orderedmultidict
5675 (package
5676 (name "python-orderedmultidict")
5677 (version "1.0")
5678 (source
5679 (origin
5680 (method url-fetch)
5681 (uri (pypi-uri "orderedmultidict" version))
5682 (sha256
5683 (base32
5684 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5685 (build-system python-build-system)
5686 (arguments
5687 `(#:phases
5688 (modify-phases %standard-phases
5689 (add-after 'unpack 'fix-tests
5690 (lambda _
5691 ;; The package uses nosetest for running the tests.
5692 ;; Adding this initfile allows to run the test suite
5693 ;; without requiring nosetest.
5694 (with-output-to-file "tests/__init__.py" newline)
5695 #t)))))
5696 (propagated-inputs
5697 `(("python-six" ,python-six)))
5698 (native-inputs
5699 `(("python-pycodestyle" ,python-pycodestyle)))
5700 (home-page "https://github.com/gruns/orderedmultidict")
5701 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5702 (description "This package contains a library for ordered multivalue
5703 dictionaries. A multivalue dictionary is a dictionary that can store
5704 multiple values for the same key. An ordered multivalue dictionary is a
5705 multivalue dictionary that retains the order of insertions and deletions.")
5706 (license license:unlicense)))
5707
5708 (define-public python2-orderedmultidict
5709 (package-with-python2 python-orderedmultidict))
5710
5711 (define-public python-autopep8
5712 (package
5713 (name "python-autopep8")
5714 (version "1.5.3")
5715 (source
5716 (origin
5717 (method url-fetch)
5718 (uri (pypi-uri "autopep8" version))
5719 (sha256
5720 (base32
5721 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5722 (build-system python-build-system)
5723 (propagated-inputs
5724 `(("python-pycodestyle" ,python-pycodestyle)
5725 ("python-toml" ,python-toml)))
5726 (home-page "https://github.com/hhatto/autopep8")
5727 (synopsis "Format Python code according to the PEP 8 style guide")
5728 (description
5729 "@code{autopep8} automatically formats Python code to conform to
5730 the PEP 8 style guide. It uses the pycodestyle utility to determine
5731 what parts of the code needs to be formatted. @code{autopep8} is
5732 capable of fixing most of the formatting issues that can be reported
5733 by pycodestyle.")
5734 (license (license:non-copyleft
5735 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5736
5737 (define-public python2-autopep8
5738 (package-with-python2 python-autopep8))
5739
5740 (define-public python-distlib
5741 (package
5742 (name "python-distlib")
5743 (version "0.3.0")
5744 (source
5745 (origin
5746 (method url-fetch)
5747 (uri (pypi-uri "distlib" version ".zip"))
5748 (sha256
5749 (base32
5750 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5751 (build-system python-build-system)
5752 (arguments
5753 `(#:phases
5754 (modify-phases %standard-phases
5755 (add-before 'build 'no-/bin/sh
5756 (lambda _
5757 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5758 (("/bin/sh") (which "sh")))
5759 #t))
5760 (add-before 'check 'prepare-test-env
5761 (lambda _
5762 (setenv "HOME" "/tmp")
5763 ;; NOTE: Any value works, the variable just has to be present.
5764 (setenv "SKIP_ONLINE" "1")
5765 #t)))))
5766 (native-inputs `(("unzip" ,unzip)))
5767 (home-page "https://bitbucket.org/pypa/distlib")
5768 (synopsis "Distribution utilities")
5769 (description "Distlib is a library which implements low-level functions that
5770 relate to packaging and distribution of Python software. It is intended to be
5771 used as the basis for third-party packaging tools.")
5772 (license license:psfl)))
5773
5774 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5775 (define-public python-distlib/next
5776 (package
5777 (inherit python-distlib)
5778 (version "0.3.1")
5779 (source
5780 (origin
5781 (method url-fetch)
5782 (uri (pypi-uri "distlib" version ".zip"))
5783 (sha256
5784 (base32
5785 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5786
5787 (define-public python-distutils-extra
5788 (package
5789 (name "python-distutils-extra")
5790 (version "2.38")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5795 version "/+download/python-distutils-extra-"
5796 version ".tar.gz"))
5797 (sha256
5798 (base32
5799 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5800 (build-system python-build-system)
5801 (home-page "https://launchpad.net/python-distutils-extra/")
5802 (synopsis "Enhancements to Python's distutils")
5803 (description
5804 "The python-distutils-extra module enables you to easily integrate
5805 gettext support, themed icons, and scrollkeeper-based documentation into
5806 Python's distutils.")
5807 (license license:gpl2)))
5808
5809 (define-public python2-distutils-extra
5810 (package-with-python2 python-distutils-extra))
5811
5812 (define-public python2-elib.intl
5813 (package
5814 (name "python2-elib.intl")
5815 (version "0.0.3")
5816 (source
5817 (origin
5818 ;; This project doesn't tag releases or publish tarballs, so we take
5819 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5820 (method git-fetch)
5821 (uri (git-reference
5822 (url "https://github.com/dieterv/elib.intl")
5823 (commit "d09997cfef")))
5824 (file-name (string-append name "-" version "-checkout"))
5825 (sha256
5826 (base32
5827 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5828 (build-system python-build-system)
5829 (arguments
5830 ;; incompatible with Python 3 (exception syntax)
5831 `(#:python ,python-2
5832 #:tests? #f))
5833 (home-page "https://github.com/dieterv/elib.intl")
5834 (synopsis "Enhanced internationalization for Python")
5835 (description
5836 "The elib.intl module provides enhanced internationalization (I18N)
5837 services for your Python modules and applications.")
5838 (license license:lgpl3+)))
5839
5840 (define-public python-olefile
5841 (package
5842 (name "python-olefile")
5843 (version "0.46")
5844 (source
5845 (origin
5846 (method url-fetch)
5847 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5848 "download/v" version "/olefile-" version ".tar.gz"))
5849 (file-name (string-append name "-" version ".tar.gz"))
5850 (sha256
5851 (base32
5852 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5853 (build-system python-build-system)
5854 (home-page "https://www.decalage.info/python/olefileio")
5855 (synopsis "Read and write Microsoft OLE2 files.")
5856 (description
5857 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5858 Storage or Compound Document, Microsoft Office). It is an improved version of
5859 the OleFileIO module from PIL, the Python Image Library.")
5860 (license license:bsd-3)))
5861
5862 (define-public python2-olefile
5863 (package-with-python2 python-olefile))
5864
5865 (define-public python-pikepdf
5866 (package
5867 (name "python-pikepdf")
5868 (version "2.9.0")
5869 (source
5870 (origin
5871 (method url-fetch)
5872 (uri (pypi-uri "pikepdf" version))
5873 (sha256
5874 (base32 "1dx84gvxf8js5988b20dwpg0xd7by2bczjlrdh3cpppwaaxx5nx9"))))
5875 (build-system python-build-system)
5876 (arguments
5877 `(#:tests? #false)) ;require python-xmp-toolkit
5878 (native-inputs
5879 `(("pybind11" ,pybind11)
5880 ("python-setuptools" ,python-setuptools)
5881 ("python-setuptools-scm" ,python-setuptools-scm/next)
5882 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5883 ("python-toml" ,python-toml)
5884 ("python-wheel" ,python-wheel)))
5885 (inputs
5886 `(("qpdf" ,qpdf)))
5887 (propagated-inputs
5888 `(("python-lxml" ,python-lxml)
5889 ("python-pillow" ,python-pillow)))
5890 (home-page "https://github.com/pikepdf/pikepdf")
5891 (synopsis "Read and write PDFs with Python")
5892 (description
5893 "pikepdf is a Python library for reading and writing PDF files.")
5894 (license license:mpl2.0)))
5895
5896 (define-public python-pillow
5897 (package
5898 (name "python-pillow")
5899 (version "8.1.1")
5900 (source
5901 (origin
5902 (method url-fetch)
5903 (uri (pypi-uri "Pillow" version))
5904 (sha256
5905 (base32
5906 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5907 (build-system python-build-system)
5908 (native-inputs
5909 `(("python-pytest" ,python-pytest)))
5910 (inputs
5911 `(("freetype" ,freetype)
5912 ("lcms" ,lcms)
5913 ("libjpeg" ,libjpeg-turbo)
5914 ("libtiff" ,libtiff)
5915 ("libwebp" ,libwebp)
5916 ("openjpeg" ,openjpeg)
5917 ("zlib" ,zlib)))
5918 (propagated-inputs
5919 `(("python-olefile" ,python-olefile)))
5920 (arguments
5921 `(#:phases
5922 (modify-phases %standard-phases
5923 (add-after 'unpack 'patch-ldconfig
5924 (lambda _
5925 (substitute* "setup.py"
5926 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5927 (replace 'check
5928 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5929 (if tests?
5930 (begin
5931 (setenv "HOME" (getcwd))
5932 ;; Make installed package available for running the tests.
5933 (add-installed-pythonpath inputs outputs)
5934 (invoke "python" "selftest.py" "--installed")
5935 (invoke "python" "-m" "pytest" "-vv"))
5936 #t))))))
5937 (home-page "https://python-pillow.org")
5938 (synopsis "Fork of the Python Imaging Library")
5939 (description
5940 "The Python Imaging Library adds image processing capabilities to your
5941 Python interpreter. This library provides extensive file format support, an
5942 efficient internal representation, and fairly powerful image processing
5943 capabilities. The core image library is designed for fast access to data
5944 stored in a few basic pixel formats. It should provide a solid foundation for
5945 a general image processing tool.")
5946 (properties `((python2-variant . ,(delay python2-pillow))))
5947 (license (license:x11-style
5948 "http://www.pythonware.com/products/pil/license.htm"
5949 "The PIL Software License"))))
5950
5951 (define-public python2-pillow
5952 (package-with-python2
5953 (package
5954 (inherit (strip-python2-variant python-pillow))
5955 ;; Version 6 is the last series with Python 2 support.
5956 (version "6.2.2")
5957 (source
5958 (origin
5959 (method url-fetch)
5960 (uri (pypi-uri "Pillow" version))
5961 (sha256
5962 (base32
5963 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5964
5965 (define-public python-pillow-2.9
5966 (package
5967 (inherit python-pillow)
5968 (version "2.9.0")
5969 (source
5970 (origin
5971 (method url-fetch)
5972 (uri (pypi-uri "Pillow" version))
5973 (sha256
5974 (base32
5975 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5976 (arguments
5977 (substitute-keyword-arguments (package-arguments python-pillow)
5978 ((#:tests? _ #f) #f)))
5979 (properties '((hidden? #t)))))
5980
5981 (define-public python-pillow-simd
5982 (package
5983 (inherit python-pillow)
5984 (name "python-pillow-simd")
5985 (version "7.1.2")
5986 ;; The PyPI tarball does not include test files.
5987 (source
5988 (origin
5989 (method git-fetch)
5990 (uri (git-reference
5991 (url "https://github.com/uploadcare/pillow-simd")
5992 (commit version)))
5993 (file-name (git-file-name name version))
5994 (sha256
5995 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
5996 (arguments
5997 (substitute-keyword-arguments
5998 (package-arguments python-pillow)
5999 ((#:phases phases)
6000 `(modify-phases ,phases
6001 (add-after 'unpack 'make-tests-writable
6002 (lambda _
6003 (for-each make-file-writable (find-files "Tests"))
6004 #t))))))
6005 (inputs
6006 `(("libraqm" ,libraqm)
6007 ("libimagequant" ,libimagequant)
6008 ,@(package-inputs python-pillow)))
6009 (home-page "https://github.com/uploadcare/pillow-simd")
6010 (synopsis "Fork of the Python Imaging Library (Pillow)")
6011 (description "This package is a fork of Pillow which adds support for SIMD
6012 parallelism.")))
6013
6014 (define-public python-roifile
6015 (package
6016 (name "python-roifile")
6017 (version "2020.5.28")
6018 (source
6019 (origin
6020 (method url-fetch)
6021 (uri (pypi-uri "roifile" version))
6022 (sha256
6023 (base32
6024 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
6025 (build-system python-build-system)
6026 (arguments `(#:tests? #f)) ; there are none
6027 (propagated-inputs
6028 `(("python-numpy" ,python-numpy)))
6029 (home-page "https://www.lfd.uci.edu/~gohlke/")
6030 (synopsis "Read and write ImageJ ROI format")
6031 (description "Roifile is a Python library to read, write, create, and plot
6032 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6033 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6034 (license license:bsd-3)))
6035
6036 (define-public python-tifffile
6037 (package
6038 (name "python-tifffile")
6039 (version "2020.6.3")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (pypi-uri "tifffile" version))
6044 (sha256
6045 (base32
6046 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
6047 (build-system python-build-system)
6048 ;; Tests require lfdfiles, which depends on tifffile
6049 (arguments `(#:tests? #f))
6050 (propagated-inputs
6051 `(("python-numpy" ,python-numpy)
6052 ;;("python-lfdfiles" ,python-lfdfiles)
6053 ("python-roifile" ,python-roifile)))
6054 (home-page "https://www.lfd.uci.edu/~gohlke/")
6055 (synopsis "Read and write TIFF(r) files")
6056 (description "This package lets you read image and metadata from many
6057 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6058 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6059 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6060 (license license:bsd-3)))
6061
6062 (define-public python-lfdfiles
6063 (package
6064 (name "python-lfdfiles")
6065 (version "2020.1.1")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (pypi-uri "lfdfiles" version))
6070 (sha256
6071 (base32
6072 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
6073 (build-system python-build-system)
6074 (propagated-inputs
6075 `(("python-click" ,python-click)
6076 ("python-numpy" ,python-numpy)
6077 ("python-tifffile" ,python-tifffile)))
6078 (home-page "https://www.lfd.uci.edu/~gohlke/")
6079 (synopsis "Work with LFD data files")
6080 (description
6081 "Lfdfiles is a Python library and console script for reading, writing,
6082 converting, and viewing many of the proprietary file formats used to store
6083 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6084 (license license:bsd-3)))
6085
6086 (define-public python-imageio
6087 (package
6088 (name "python-imageio")
6089 (version "2.8.0")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (pypi-uri "imageio" version))
6094 (sha256
6095 (base32
6096 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6097 (build-system python-build-system)
6098 (arguments
6099 `(#:tests? #f ; many tests require online data
6100 #:phases
6101 (modify-phases %standard-phases
6102 (replace 'check
6103 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6104 (if tests?
6105 (begin
6106 ;; Make installed package available for running the tests.
6107 (add-installed-pythonpath inputs outputs)
6108 (invoke "pytest" "-vv"))
6109 #t))))))
6110 (propagated-inputs
6111 `(("python-numpy" ,python-numpy)
6112 ("python-pillow" ,python-pillow)
6113 ("python-psutil" ,python-psutil)))
6114 (native-inputs
6115 `(("python-pytest" ,python-pytest)))
6116 (home-page "https://imageio.github.io/")
6117 (synopsis "Library for reading and writing a wide range of image data")
6118 (description
6119 "Imageio is a Python library that provides an easy interface to read and
6120 write a wide range of image data, including animated images, video, volumetric
6121 data, and scientific formats.")
6122 (license license:bsd-2)))
6123
6124 (define-public python-pycparser
6125 (package
6126 (name "python-pycparser")
6127 (version "2.20")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (pypi-uri "pycparser" version))
6132 (sha256
6133 (base32
6134 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6135 (outputs '("out" "doc"))
6136 (build-system python-build-system)
6137 (native-inputs
6138 `(("pkg-config" ,pkg-config)))
6139 (arguments
6140 `(#:phases
6141 (modify-phases %standard-phases
6142 (replace 'check
6143 (lambda _
6144 (with-directory-excursion "tests"
6145 (invoke "python" "all_tests.py"))
6146 #t))
6147 (add-after 'install 'install-doc
6148 (lambda* (#:key outputs #:allow-other-keys)
6149 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6150 (doc (string-append data "/doc/" ,name "-" ,version))
6151 (examples (string-append doc "/examples")))
6152 (mkdir-p examples)
6153 (for-each (lambda (file)
6154 (copy-file (string-append "." file)
6155 (string-append doc file)))
6156 '("/README.rst" "/CHANGES" "/LICENSE"))
6157 (copy-recursively "examples" examples)
6158 #t))))))
6159 (home-page "https://github.com/eliben/pycparser")
6160 (synopsis "C parser in Python")
6161 (description
6162 "Pycparser is a complete parser of the C language, written in pure Python
6163 using the PLY parsing library. It parses C code into an AST and can serve as
6164 a front-end for C compilers or analysis tools.")
6165 (license license:bsd-3)))
6166
6167 (define-public python2-pycparser
6168 (package-with-python2 python-pycparser))
6169
6170 (define-public python-xlsxwriter
6171 (package
6172 (name "python-xlsxwriter")
6173 (version "1.3.7")
6174 (source
6175 (origin
6176 ;; There are no tests in the PyPI tarball.
6177 (method git-fetch)
6178 (uri (git-reference
6179 (url "https://github.com/jmcnamara/XlsxWriter")
6180 (commit (string-append "RELEASE_" version))))
6181 (file-name (git-file-name name version))
6182 (sha256
6183 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6184 (build-system python-build-system)
6185 (home-page "https://github.com/jmcnamara/XlsxWriter")
6186 (synopsis "Python module for creating Excel XLSX files")
6187 (description
6188 "XlsxWriter is a Python module that can be used to write text, numbers,
6189 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6190 (license license:bsd-2)))
6191
6192 (define-public python-pywavelets
6193 (package
6194 (name "python-pywavelets")
6195 (version "1.1.1")
6196 (home-page "https://github.com/PyWavelets/pywt")
6197 (source (origin
6198 (method url-fetch)
6199 (uri (pypi-uri "PyWavelets" version))
6200 (sha256
6201 (base32
6202 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6203 (build-system python-build-system)
6204 (arguments
6205 '(#:modules ((ice-9 ftw)
6206 (srfi srfi-1)
6207 (srfi srfi-26)
6208 (guix build utils)
6209 (guix build python-build-system))
6210 #:phases
6211 (modify-phases %standard-phases
6212 (replace 'check
6213 (lambda _
6214 (let ((cwd (getcwd))
6215 (libdir (find (cut string-prefix? "lib." <>)
6216 (scandir "build"))))
6217 (with-directory-excursion (string-append cwd "/build/" libdir)
6218 (invoke "pytest" "-vv"))))))))
6219 (native-inputs
6220 `(("python-matplotlib" ,python-matplotlib) ;for tests
6221 ("python-pytest" ,python-pytest)))
6222 (propagated-inputs
6223 `(("python-numpy" ,python-numpy)))
6224 (synopsis "Wavelet transforms in Python")
6225 (description
6226 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6227 mathematical basis functions that are localized in both time and frequency.
6228 Wavelet transforms are time-frequency transforms employing wavelets. They are
6229 similar to Fourier transforms, the difference being that Fourier transforms are
6230 localized only in frequency instead of in time and frequency.")
6231 (license license:expat)))
6232
6233 (define-public python-pywal
6234 (package
6235 (name "python-pywal")
6236 (version "3.3.0")
6237 (source
6238 (origin
6239 (method git-fetch)
6240 (uri (git-reference
6241 (url "https://github.com/dylanaraps/pywal")
6242 (commit version)))
6243 (file-name (git-file-name name version))
6244 (sha256
6245 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6246 (build-system python-build-system)
6247 (arguments
6248 `(#:phases
6249 (modify-phases %standard-phases
6250 (add-before 'check 'fix-home-directory
6251 (lambda _
6252 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6253 (setenv "HOME" "/tmp")
6254 #t)))))
6255 (inputs
6256 `(("imagemagick" ,imagemagick)))
6257 (home-page "https://github.com/dylanaraps/pywal")
6258 (synopsis "Color palette generator and applicator")
6259 (description
6260 "Pywal is a tool that generates a color palette from the dominant colors
6261 in an image. It then applies the colors system-wide and on-the-fly in all of
6262 your favourite programs.")
6263 (license license:expat)))
6264
6265 (define-public python-pywinrm
6266 (package
6267 (name "python-pywinrm")
6268 (version "0.4.1")
6269 (source
6270 (origin
6271 (method url-fetch)
6272 (uri (pypi-uri "pywinrm" version))
6273 (sha256
6274 (base32
6275 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6276 (build-system python-build-system)
6277 (propagated-inputs
6278 `(("python-six" ,python-six)
6279 ("python-requests_ntlm" ,python-requests_ntlm)
6280 ("python-xmltodict" ,python-xmltodict)
6281 ("python-kerberos" ,python-kerberos)))
6282 (native-inputs
6283 `(("python-mock" ,python-mock)
6284 ("python-pytest" ,python-pytest)))
6285 (home-page "https://github.com/diyan/pywinrm/")
6286 (synopsis
6287 "Python library for Windows Remote Management (WinRM)")
6288 (description
6289 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6290 service. It allows you to invoke commands on target Windows machines from
6291 any machine that can run Python.")
6292 (license license:expat)))
6293
6294 (define-public python-xcffib
6295 (package
6296 (name "python-xcffib")
6297 (version "0.6.0")
6298 (source
6299 (origin
6300 (method url-fetch)
6301 (uri (pypi-uri "xcffib" version))
6302 (sha256
6303 (base32
6304 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6305 (build-system python-build-system)
6306 (inputs
6307 `(("libxcb" ,libxcb)))
6308 (propagated-inputs
6309 `(("python-cffi" ,python-cffi) ; used at run time
6310 ("python-six" ,python-six)))
6311 (arguments
6312 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6313 #:tests? #f
6314 #:phases
6315 (modify-phases %standard-phases
6316 (add-after 'unpack 'fix-libxcb-path
6317 (lambda* (#:key inputs #:allow-other-keys)
6318 (let ((libxcb (assoc-ref inputs "libxcb")))
6319 (substitute* '("xcffib/__init__.py")
6320 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6321 #t)))
6322 (add-after 'install 'install-doc
6323 (lambda* (#:key outputs #:allow-other-keys)
6324 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6325 "/doc/" ,name "-" ,version)))
6326 (mkdir-p doc)
6327 (copy-file "README.md"
6328 (string-append doc "/README.md"))
6329 #t))))))
6330 (home-page "https://github.com/tych0/xcffib")
6331 (synopsis "XCB Python bindings")
6332 (description
6333 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6334 support for Python 3 and PyPy. It is based on cffi.")
6335 (license license:expat)))
6336
6337 (define-public python2-xcffib
6338 (package-with-python2 python-xcffib))
6339
6340 (define-public python-cairocffi
6341 (package
6342 (name "python-cairocffi")
6343 (version "1.2.0")
6344 (source
6345 (origin
6346 ;; The PyPI archive does not include the documentation, so use Git.
6347 (method git-fetch)
6348 (uri (git-reference
6349 (url "https://github.com/Kozea/cairocffi")
6350 (commit (string-append "v" version))))
6351 (file-name (git-file-name name version))
6352 (sha256
6353 (base32
6354 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6355 (build-system python-build-system)
6356 (outputs '("out" "doc"))
6357 (inputs
6358 `(("glib" ,glib)
6359 ("gtk+" ,gtk+)
6360 ("gdk-pixbuf" ,gdk-pixbuf)
6361 ("cairo" ,cairo)))
6362 (native-inputs
6363 `(("python-numpy" ,python-numpy)
6364 ("python-pytest" ,python-pytest)
6365 ("python-pytest-cov" ,python-pytest-cov)
6366 ("python-pytest-runner" ,python-pytest-runner)
6367 ("python-sphinx" ,python-sphinx)
6368 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6369 (propagated-inputs
6370 `(("python-xcffib" ,python-xcffib))) ; used at run time
6371 (arguments
6372 `(#:phases
6373 (modify-phases %standard-phases
6374 (add-after 'unpack 'patch-paths
6375 (lambda* (#:key inputs #:allow-other-keys)
6376 (substitute* "cairocffi/__init__.py"
6377 ;; Hack the dynamic library loading mechanism.
6378 (("find_library\\(library_name\\)")
6379 "\"found\"")
6380 (("filenames = \\(library_filename,\\) \\+ filenames")
6381 "pass")
6382 (("libcairo.so.2")
6383 (string-append (assoc-ref inputs "cairo")
6384 "/lib/libcairo.so.2")))
6385 (substitute* "cairocffi/pixbuf.py"
6386 (("libgdk_pixbuf-2.0.so.0")
6387 (string-append (assoc-ref inputs "gdk-pixbuf")
6388 "/lib/libgdk_pixbuf-2.0.so.0"))
6389 (("libgobject-2.0.so.0")
6390 (string-append (assoc-ref inputs "glib")
6391 "/lib/libgobject-2.0.so.0"))
6392 (("libglib-2.0.so.0")
6393 (string-append (assoc-ref inputs "glib")
6394 "/lib/libglib-2.0.so.0"))
6395 (("libgdk-3.so.0")
6396 (string-append (assoc-ref inputs "gtk+")
6397 "/lib/libgdk-3.so.0")))
6398 #t))
6399 (add-after 'unpack 'disable-linters
6400 ;; Their check fails; none of our business.
6401 (lambda _
6402 (substitute* "setup.cfg"
6403 ((".*pytest-flake8.*") "")
6404 ((".*pytest-isort.*") "")
6405 (("--flake8") "")
6406 (("--isort") ""))
6407 #t))
6408 (add-after 'install 'install-doc
6409 (lambda* (#:key inputs outputs #:allow-other-keys)
6410 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6411 (doc (string-append data "/doc/" ,name "-" ,version))
6412 (html (string-append doc "/html")))
6413 (setenv "LD_LIBRARY_PATH"
6414 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6415 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6416 (setenv "LANG" "en_US.UTF-8")
6417 (mkdir-p html)
6418 (for-each (lambda (file)
6419 (copy-file (string-append "." file)
6420 (string-append doc file)))
6421 '("/README.rst" "/NEWS.rst"))
6422 (system* "python" "setup.py" "build_sphinx")
6423 (copy-recursively "docs/_build/html" html)
6424 #t))))))
6425 (home-page "https://github.com/Kozea/cairocffi")
6426 (synopsis "Python bindings and object-oriented API for Cairo")
6427 (description
6428 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6429 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6430 graphics library with support for multiple backends including image buffers,
6431 PNG, PostScript, PDF, and SVG file output.")
6432 (license license:bsd-3)))
6433
6434 (define-public python2-cairocffi
6435 (package-with-python2 python-cairocffi))
6436
6437 (define-public python-decorator
6438 (package
6439 (name "python-decorator")
6440 (version "4.3.0")
6441 (source
6442 (origin
6443 (method url-fetch)
6444 (uri (pypi-uri "decorator" version))
6445 (sha256
6446 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6447 (build-system python-build-system)
6448 (home-page "https://pypi.org/project/decorator/")
6449 (synopsis "Python module to simplify usage of decorators")
6450 (description
6451 "The aim of the decorator module is to simplify the usage of decorators
6452 for the average programmer, and to popularize decorators usage giving examples
6453 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6454 etc. The core of this module is a decorator factory.")
6455 (license license:expat)))
6456
6457 (define-public python2-decorator
6458 (package-with-python2 python-decorator))
6459
6460 (define-public python-drmaa
6461 (package
6462 (name "python-drmaa")
6463 (version "0.7.7")
6464 (source
6465 (origin
6466 (method url-fetch)
6467 (uri (pypi-uri "drmaa" version))
6468 (sha256
6469 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6470 (build-system python-build-system)
6471 ;; The test suite requires libdrmaa which is provided by the cluster
6472 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6473 ;; should be set to the path of the libdrmaa library.
6474 (arguments '(#:tests? #f))
6475 (native-inputs
6476 `(("python-nose" ,python-nose)))
6477 (home-page "https://pypi.org/project/drmaa/")
6478 (synopsis "Python bindings for the DRMAA library")
6479 (description
6480 "A Python package for Distributed Resource Management (DRM) job
6481 submission and control. This package is an implementation of the DRMAA 1.0
6482 Python language binding specification.")
6483 (license license:bsd-3)))
6484
6485 (define-public python2-drmaa
6486 (package-with-python2 python-drmaa))
6487
6488 (define-public python-grako
6489 (package
6490 (name "python-grako")
6491 (version "3.99.9")
6492 (source
6493 (origin
6494 (method url-fetch)
6495 (uri
6496 (pypi-uri "grako" version ".zip"))
6497 (sha256
6498 (base32
6499 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6500 (build-system python-build-system)
6501 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6502 (native-inputs
6503 `(("unzip" ,unzip)
6504 ("python-pytest" ,python-pytest)
6505 ("python-pytest-runner" ,python-pytest-runner)))
6506 (home-page "https://bitbucket.org/neogeny/grako")
6507 (synopsis "EBNF parser generator")
6508 (description
6509 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6510 memoizing PEG/Packrat parser in Python.")
6511 (license license:bsd-3)))
6512
6513 (define-public python2-grako
6514 (package-with-python2 python-grako))
6515
6516 (define-public python-grandalf
6517 (package
6518 (name "python-grandalf")
6519 (version "0.7")
6520 (source
6521 (origin
6522 ;; There's no source tarball on PyPI.
6523 (method git-fetch)
6524 (uri (git-reference
6525 (url "https://github.com/bdcht/grandalf")
6526 (commit (string-append "v" version))))
6527 (file-name (git-file-name name version))
6528 (sha256
6529 (base32
6530 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6531 (build-system python-build-system)
6532 (arguments
6533 '(#:phases
6534 (modify-phases %standard-phases
6535 (replace 'check
6536 (lambda _
6537 (invoke "python" "setup.py" "pytest"))))))
6538 (native-inputs
6539 `(("python-pytest" ,python-pytest)
6540 ("python-pytest-runner" ,python-pytest-runner)))
6541 (propagated-inputs
6542 `(("python-numpy" ,python-numpy)
6543 ("python-ply" ,python-ply)))
6544 (home-page "https://github.com/bdcht/grandalf")
6545 (synopsis "Graph and drawing algorithms framework")
6546 (description
6547 "Grandalf is a Python package made for experimentations with graphs
6548 drawing algorithms. It is written in pure Python, and currently implements
6549 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6550 minimization approach. While not as fast or featured as graphviz or other
6551 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6552 than thousands of nodes, while keeping the source code simple enough to tweak
6553 and hack any part of it for experimental purpose. With a total of about 1500
6554 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6555 in less than 600 lines. The energy minimization approach is comprised of only
6556 250 lines!
6557
6558 Grandalf does only 2 not-so-simple things:
6559 @itemize
6560 @item computing the nodes (x,y) coordinates (based on provided nodes
6561 dimensions, and a chosen layout)
6562 @item routing the edges with lines or nurbs
6563 @end itemize
6564
6565 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6566 will help you find where to draw things like nodes and edges, but it’s up to
6567 you to actually draw things with your favorite toolkit.")
6568 ;; The user can choose either license.
6569 (license (list license:gpl2 license:epl1.0))))
6570
6571 (define-public python-gridmap
6572 (package
6573 (name "python-gridmap")
6574 (version "0.14.0")
6575 (source
6576 (origin
6577 (method git-fetch)
6578 (uri (git-reference
6579 (url "https://github.com/pygridtools/gridmap")
6580 (commit (string-append "v" version))))
6581 (file-name (git-file-name name version))
6582 (sha256
6583 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6584 (build-system python-build-system)
6585 (arguments
6586 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6587 (propagated-inputs
6588 `(("python-psutil" ,python-psutil)
6589 ("python-drmaa" ,python-drmaa)
6590 ("python-pyzmq" ,python-pyzmq)))
6591 (home-page "https://github.com/pygridtools/gridmap")
6592 (synopsis "Create jobs on a cluster directly from Python")
6593 (description
6594 "Gridmap is a Python package to allow you to easily create jobs on the
6595 cluster directly from Python. You can directly map Python functions onto the
6596 cluster without needing to write any wrapper code yourself.")
6597 (license license:gpl3+)))
6598
6599 (define-public python2-gridmap
6600 (package-with-python2 python-gridmap))
6601
6602 (define-public python-honcho
6603 (package
6604 (name "python-honcho")
6605 (version "1.0.1")
6606 (source
6607 (origin
6608 (method git-fetch)
6609 (uri (git-reference
6610 (url "https://github.com/nickstenning/honcho")
6611 (commit (string-append "v" version))))
6612 (file-name (git-file-name name version))
6613 (sha256
6614 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6615 (build-system python-build-system)
6616 (native-inputs
6617 `(("python-pytest" ,python-pytest)
6618 ("python-mock" ,python-mock)
6619 ("python-tox" ,python-tox)
6620 ("which" ,which))) ;for tests
6621 (propagated-inputs
6622 `(("python-jinja2" ,python-jinja2)))
6623 (arguments
6624 `(#:phases
6625 (modify-phases %standard-phases
6626 (delete 'check)
6627 (add-after 'install 'check
6628 (lambda* (#:key outputs inputs #:allow-other-keys)
6629 ;; fix honcho path in testsuite
6630 (substitute* "tests/conftest.py"
6631 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6632 "/bin/honcho" "'")))
6633 ;; It's easier to run tests after install.
6634 ;; Make installed package available for running the tests
6635 (add-installed-pythonpath inputs outputs)
6636 (invoke "py.test" "-v"))))))
6637 (home-page "https://github.com/nickstenning/honcho")
6638 (synopsis "Manage Procfile-based applications")
6639 (description
6640 "A Procfile is a file which describes how to run an application
6641 consisting of several processes. honcho starts all listed processes.
6642 The output of all running processes is collected by honcho and
6643 displayed.")
6644 (license license:expat)))
6645
6646 (define-public python-pexpect
6647 (package
6648 (name "python-pexpect")
6649 (version "4.8.0")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri (pypi-uri "pexpect" version))
6654 (sha256
6655 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6656 (build-system python-build-system)
6657 (arguments
6658 `(#:phases
6659 (modify-phases %standard-phases
6660 (add-before 'check 'prepare-tests
6661 (lambda _
6662 (substitute* (find-files "tests")
6663 (("/bin/ls") (which "ls"))
6664 (("/bin/echo") (which "echo"))
6665 (("/bin/which") (which "which"))
6666 ;; Many tests try to use the /bin directory which
6667 ;; is not present in the build environment.
6668 ;; Use one that's non-empty and unlikely to change.
6669 (("/bin'") "/dev'")
6670 ;; Disable failing test. See upstream bug report
6671 ;; https://github.com/pexpect/pexpect/issues/568
6672 (("def test_bash") "def _test_bash"))
6673 ;; XXX: Socket connection test gets "Connection reset by peer".
6674 ;; Why does it not work? Delete for now.
6675 (delete-file "tests/test_socket.py")
6676 #t))
6677 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6678 (native-inputs
6679 `(("python-nose" ,python-nose)
6680 ("python-pytest" ,python-pytest)
6681 ("man-db" ,man-db)
6682 ("which" ,which)
6683 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6684 (propagated-inputs
6685 `(("python-ptyprocess" ,python-ptyprocess)))
6686 (home-page "http://pexpect.readthedocs.org/")
6687 (synopsis "Controlling interactive console applications")
6688 (description
6689 "Pexpect is a pure Python module for spawning child applications;
6690 controlling them; and responding to expected patterns in their output.
6691 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6692 child application and control it as if a human were typing commands.")
6693 (license license:isc)))
6694
6695 (define-public python2-pexpect
6696 (package-with-python2 python-pexpect))
6697
6698 (define-public python-setuptools-scm
6699 (package
6700 (name "python-setuptools-scm")
6701 (version "3.4.3")
6702 (source (origin
6703 (method url-fetch)
6704 (uri (pypi-uri "setuptools_scm" version))
6705 (sha256
6706 (base32
6707 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6708 (build-system python-build-system)
6709 (home-page "https://github.com/pypa/setuptools_scm/")
6710 (synopsis "Manage Python package versions in SCM metadata")
6711 (description
6712 "Setuptools_scm handles managing your Python package versions in
6713 @dfn{software configuration management} (SCM) metadata instead of declaring
6714 them as the version argument or in a SCM managed file.")
6715 (license license:expat)))
6716
6717 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6718 (define-public python-setuptools-scm/next
6719 (package
6720 (inherit python-setuptools-scm)
6721 (version "5.0.1")
6722 (source
6723 (origin
6724 (method url-fetch)
6725 (uri (pypi-uri "setuptools_scm" version))
6726 (sha256
6727 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6728
6729 (define-public python2-setuptools-scm
6730 (package-with-python2 python-setuptools-scm))
6731
6732 (define-public python-sexpdata
6733 (package
6734 (name "python-sexpdata")
6735 (version "0.0.3")
6736 (source
6737 (origin
6738 (method url-fetch)
6739 (uri (pypi-uri "sexpdata" version))
6740 (sha256
6741 (base32
6742 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6743 (build-system python-build-system)
6744 (home-page "https://github.com/jd-boyd/sexpdata")
6745 (synopsis "S-expression parser for Python")
6746 (description
6747 "Sexpdata is an S-expression parser/serializer. It has load and dump
6748 functions like pickle, json or PyYAML module.")
6749 (license license:bsd-3)))
6750
6751 (define-public python-pathlib2
6752 (package
6753 (name "python-pathlib2")
6754 (version "2.3.3")
6755 (source
6756 (origin
6757 (method url-fetch)
6758 (uri (pypi-uri "pathlib2" version))
6759 (sha256
6760 (base32
6761 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6762 (build-system python-build-system)
6763 (propagated-inputs
6764 `(("python-scandir" ,python-scandir)
6765 ("python-six" ,python-six)))
6766 (home-page "https://pypi.org/project/pathlib2/")
6767 (synopsis "Object-oriented file system paths")
6768 (description "The goal of pathlib2 is to provide a backport of the
6769 standard @code{pathlib} module which tracks the standard library module, so
6770 all the newest features of the standard @code{pathlib} can be used also on
6771 older Python versions.")
6772 (license license:expat)))
6773
6774 (define-public python-importlib-resources
6775 (package
6776 (name "python-importlib-resources")
6777 (version "3.0.0")
6778 (source
6779 (origin
6780 (method url-fetch)
6781 (uri (pypi-uri "importlib_resources" version))
6782 (sha256
6783 (base32
6784 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6785 (build-system python-build-system)
6786 (native-inputs
6787 `(("python-setuptools-scm" ,python-setuptools-scm)
6788 ("python-toml" ,python-toml)))
6789 (home-page "http://importlib-resources.readthedocs.io/")
6790 (synopsis "Read resources from Python packages")
6791 (description
6792 "@code{importlib_resources} is a backport of Python 3's standard library
6793 @code{importlib.resources} module for Python 2.7, and Python 3.")
6794 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6795 (license license:asl2.0)))
6796
6797 (define-public python2-importlib-resources
6798 (package
6799 (name "python2-importlib-resources")
6800 (version "1.0.2")
6801 (source (origin
6802 (method url-fetch)
6803 (uri (pypi-uri "importlib_resources" version))
6804 (sha256
6805 (base32
6806 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6807 (build-system python-build-system)
6808 (arguments
6809 `(#:python ,python-2
6810 #:phases (modify-phases %standard-phases
6811 ;; The build system tests for python-wheel, but it is
6812 ;; not required for Guix nor the test suite. Just drop
6813 ;; it to make bootstrapping pytest easier.
6814 (add-after 'unpack 'drop-wheel-dependency
6815 (lambda _
6816 (substitute* "setup.cfg"
6817 (("^[[:blank:]]+wheel")
6818 ""))
6819 #t)))))
6820 (propagated-inputs
6821 `(("python-pathlib2" ,python2-pathlib2)
6822 ("python-typing" ,python2-typing)))
6823 (home-page "https://gitlab.com/python-devs/importlib_resources")
6824 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6825 (description
6826 "This package provides an implementation of @code{importlib.resources}
6827 for older versions of Python.")
6828 (license license:asl2.0)))
6829
6830 ;; For importlib-metadata-bootstrap below.
6831 (define-public python2-importlib-resources-bootstrap
6832 (hidden-package
6833 (package/inherit
6834 python2-importlib-resources
6835 (name "python2-importlib-resources-bootstrap")
6836 (propagated-inputs
6837 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6838 ("python-typing" ,python2-typing))))))
6839
6840 (define-public python-importlib-metadata
6841 (package
6842 (name "python-importlib-metadata")
6843 (version "1.5.0")
6844 (source
6845 (origin
6846 (method url-fetch)
6847 (uri (pypi-uri "importlib_metadata" version))
6848 (sha256
6849 (base32
6850 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6851 (build-system python-build-system)
6852 (propagated-inputs
6853 `(("python-zipp" ,python-zipp)))
6854 (native-inputs
6855 `(("python-setuptools-scm" ,python-setuptools-scm)
6856 ("python-pyfakefs" ,python-pyfakefs)
6857 ("python-packaging" ,python-packaging)))
6858 (home-page "https://importlib-metadata.readthedocs.io/")
6859 (synopsis "Read metadata from Python packages")
6860 (description
6861 "@code{importlib_metadata} is a library which provides an API for
6862 accessing an installed Python package's metadata, such as its entry points or
6863 its top-level name. This functionality intends to replace most uses of
6864 @code{pkg_resources} entry point API and metadata API. Along with
6865 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6866 need to use the older and less efficient @code{pkg_resources} package.")
6867 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6868 (license license:asl2.0)))
6869
6870 (define-public python2-importlib-metadata
6871 (let ((base (package-with-python2 (strip-python2-variant
6872 python-importlib-metadata))))
6873 (package/inherit
6874 base
6875 (name "python2-importlib-metadata")
6876 (native-inputs
6877 `(("python-setuptools-scm" ,python2-setuptools-scm)
6878 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6879 ("python-packaging" ,python2-packaging-bootstrap)))
6880 (propagated-inputs
6881 `(("python-configparser" ,python2-configparser)
6882 ("python-contextlib2" ,python2-contextlib2)
6883 ("python-importlib-resources" ,python2-importlib-resources)
6884 ("python-pathlib2" ,python2-pathlib2)
6885 ,@(package-propagated-inputs base))))))
6886
6887 ;; This package is used by python2-pytest, and thus must not depend on it.
6888 (define-public python2-importlib-metadata-bootstrap
6889 (hidden-package
6890 (package/inherit
6891 python2-importlib-metadata
6892 (name "python2-importlib-metadata-bootstrap")
6893 (arguments
6894 `(#:tests? #f
6895 ,@(package-arguments python2-importlib-metadata)))
6896 (propagated-inputs
6897 `(("python-zipp" ,python2-zipp-bootstrap)
6898 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6899 ("python-configparser" ,python2-configparser)
6900 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6901 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6902
6903 (define-public python-importmagic
6904 (package
6905 (name "python-importmagic")
6906 (version "0.1.7")
6907 (source
6908 (origin
6909 (method url-fetch)
6910 (uri (pypi-uri "importmagic" version))
6911 (sha256
6912 (base32
6913 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6914 (build-system python-build-system)
6915 (home-page "https://github.com/alecthomas/importmagic")
6916 (synopsis "Library for adding, removing and managing Python imports")
6917 (description
6918 "Importmagic is a Python library for automatically managing imports by
6919 finding unresolved symbols in Python code and their corresponding imports.")
6920 (license license:bsd-3)))
6921
6922 (define-public python-inotify-simple
6923 (package
6924 (name "python-inotify-simple")
6925 (version "1.3.5")
6926 (source
6927 (origin
6928 (method git-fetch)
6929 (uri (git-reference
6930 (url "https://github.com/chrisjbillington/inotify_simple")
6931 (commit version)))
6932 (file-name (git-file-name name version))
6933 (sha256
6934 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6935 (build-system python-build-system)
6936 (home-page
6937 "https://github.com/chrisjbillington/inotify_simple")
6938 (synopsis "Simple wrapper around inotify library")
6939 (description
6940 "@code{inotify-simple} is a simple wrapper around inotify library.")
6941 (license license:bsd-3)))
6942
6943 (define-public python-jaraco-packaging
6944 (package
6945 (name "python-jaraco-packaging")
6946 (version "6.1")
6947 (source
6948 (origin
6949 (method url-fetch)
6950 (uri (pypi-uri "jaraco.packaging" version))
6951 (sha256
6952 (base32
6953 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6954 (build-system python-build-system)
6955 (propagated-inputs
6956 `(("python-pytest" ,python-pytest)
6957 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6958 ("python-pytest-flake8" ,python-pytest-flake8)
6959 ("python-rst.linker" ,python-rst.linker)
6960 ("python-setuptools" ,python-setuptools)
6961 ("python-setuptools-scm" ,python-setuptools-scm)
6962 ("python-six" ,python-six)
6963 ("python-sphinx" ,python-sphinx)))
6964 (home-page "https://github.com/jaraco/jaraco.packaging")
6965 (synopsis "Tools to supplement packaging Python releases")
6966 (description
6967 "This package provides various tools to supplement packaging Python
6968 releases.")
6969 (license license:expat)))
6970
6971 (define-public python-pathpy
6972 (package
6973 (name "python-pathpy")
6974 (version "11.5.1")
6975 (source
6976 (origin
6977 (method url-fetch)
6978 (uri (pypi-uri "path.py" version))
6979 (sha256
6980 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6981 (outputs '("out" "doc"))
6982 (build-system python-build-system)
6983 (propagated-inputs
6984 `(("python-appdirs" ,python-appdirs)
6985 ("python-importlib-metadata" ,python-importlib-metadata)))
6986 (native-inputs
6987 `(("python-setuptools-scm" ,python-setuptools-scm)
6988 ("python-sphinx" ,python-sphinx)
6989 ("python-rst.linker" ,python-rst.linker)
6990 ("python-pytest" ,python-pytest)
6991 ("python-pytest-runner" ,python-pytest-runner)
6992 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6993 (arguments
6994 `(#:phases
6995 (modify-phases %standard-phases
6996 (add-after 'build 'build-doc
6997 (lambda _
6998 (setenv "LANG" "en_US.UTF-8")
6999 (invoke "python" "setup.py" "build_sphinx")))
7000 (add-after 'install 'install-doc
7001 (lambda* (#:key outputs #:allow-other-keys)
7002 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7003 (doc (string-append data "/doc/" ,name "-" ,version))
7004 (html (string-append doc "/html")))
7005 (mkdir-p html)
7006 (for-each (lambda (file)
7007 (copy-file file (string-append doc "/" file)))
7008 '("README.rst" "CHANGES.rst"))
7009 (copy-recursively "build/sphinx/html" html)
7010 #t)))
7011 (replace 'check
7012 (lambda _
7013 ;; The import time test aborts if an import takes longer than
7014 ;; 100ms. It may very well take a little longer than that.
7015 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7016 (home-page "https://github.com/jaraco/path.py")
7017 (synopsis "Python module wrapper for built-in os.path")
7018 (description
7019 "@code{path.py} implements path objects as first-class entities, allowing
7020 common operations on files to be invoked on those path objects directly.")
7021 (license license:expat)))
7022
7023 (define-public python-simplegeneric
7024 (package
7025 (name "python-simplegeneric")
7026 (version "0.8.1")
7027 (source
7028 (origin
7029 (method url-fetch)
7030 (uri (pypi-uri "simplegeneric" version ".zip"))
7031 (sha256
7032 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7033 (build-system python-build-system)
7034 (native-inputs
7035 `(("unzip" ,unzip)))
7036 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7037 (synopsis "Python module for simple generic functions")
7038 (description
7039 "The simplegeneric module lets you define simple single-dispatch generic
7040 functions, akin to Python’s built-in generic functions like @code{len()},
7041 @code{iter()} and so on. However, instead of using specially-named methods,
7042 these generic functions use simple lookup tables, akin to those used by
7043 e.g. @code{pickle.dump()} and other generic functions found in the Python
7044 standard library.")
7045 (license license:zpl2.1)))
7046
7047 (define-public python2-simplegeneric
7048 (package-with-python2 python-simplegeneric))
7049
7050 (define-public python-ipython-genutils
7051 ;; TODO: This package is retired, check if can be removed, see description.
7052 (package
7053 (name "python-ipython-genutils")
7054 (version "0.1.0")
7055 (source
7056 (origin
7057 (method url-fetch)
7058 (uri (pypi-uri "ipython_genutils" version))
7059 (sha256
7060 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7061 (build-system python-build-system)
7062 (arguments `(#:tests? #f)) ; no tests
7063 (home-page "https://ipython.org")
7064 (synopsis "Vestigial utilities from IPython")
7065 (description
7066 "This package provides retired utilities from IPython. No packages
7067 outside IPython/Jupyter should depend on it.
7068
7069 This package shouldn't exist. It contains some common utilities shared by
7070 Jupyter and IPython projects during The Big Split. As soon as possible, those
7071 packages will remove their dependency on this, and this package will go
7072 away.")
7073 (license license:bsd-3)))
7074
7075 (define-public python2-ipython-genutils
7076 (package-with-python2 python-ipython-genutils))
7077
7078 (define-public python-ipyparallel
7079 (package
7080 (name "python-ipyparallel")
7081 (version "6.2.4")
7082 (source
7083 (origin
7084 (method url-fetch)
7085 (uri (pypi-uri "ipyparallel" version))
7086 (sha256
7087 (base32
7088 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7089 (build-system python-build-system)
7090 (arguments
7091 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7092 #:phases
7093 (modify-phases %standard-phases
7094 (add-before 'check 'prepare-for-tests
7095 (lambda _
7096 (setenv "HOME" (getcwd))
7097 #t)))))
7098 (propagated-inputs
7099 `(("python-dateutil" ,python-dateutil)
7100 ("python-decorator" ,python-decorator)
7101 ("python-ipykernel" ,python-ipykernel)
7102 ("python-ipython" ,python-ipython)
7103 ("python-ipython-genutils" ,python-ipython-genutils)
7104 ("python-jupyter-client" ,python-jupyter-client)
7105 ("python-pyzmq" ,python-pyzmq)
7106 ("python-tornado" ,python-tornado)
7107 ("python-traitlets" ,python-traitlets)))
7108 (native-inputs
7109 `(("python-ipython" ,python-ipython)
7110 ("python-mock" ,python-mock)
7111 ("python-nose" ,python-nose)
7112 ("python-pytest" ,python-pytest)
7113 ("python-pytest-cov" ,python-pytest-cov)
7114 ("python-testpath" ,python-testpath)))
7115 (home-page "https://ipython.org/")
7116 (synopsis "Interactive Parallel Computing with IPython")
7117 (description
7118 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7119 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7120 CLI scripts:
7121 @enumerate
7122 @item ipcluster - start/stop a cluster
7123 @item ipcontroller - start a scheduler
7124 @item ipengine - start an engine
7125 @end enumerate")
7126 (license license:bsd-3)))
7127
7128 (define-public python2-ipyparallel
7129 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7130 (package/inherit ipyparallel
7131 (propagated-inputs
7132 `(("python2-futures" ,python2-futures)
7133 ,@(package-propagated-inputs ipyparallel))))))
7134
7135 (define-public python-ipython-cluster-helper
7136 (package
7137 (name "python-ipython-cluster-helper")
7138 (version "0.6.4")
7139 (source
7140 (origin
7141 (method url-fetch)
7142 (uri (pypi-uri "ipython-cluster-helper" version))
7143 (sha256
7144 (base32
7145 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7146 (modules '((guix build utils)))
7147 (snippet
7148 '(begin (substitute* "requirements.txt"
7149 (("ipython.*") "ipython\n"))
7150 #t))))
7151 (build-system python-build-system)
7152 (arguments
7153 `(#:tests? #f ; Test suite can't find IPython.
7154 #:phases
7155 (modify-phases %standard-phases
7156 (replace 'check
7157 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7158 (if tests?
7159 (begin
7160 (setenv "HOME" (getcwd))
7161 (add-installed-pythonpath inputs outputs)
7162 (invoke "python" "example/example.py" "--local"))
7163 #t))))))
7164 (propagated-inputs
7165 `(("python-ipyparallel" ,python-ipyparallel)
7166 ("python-ipython" ,python-ipython)
7167 ("python-netifaces" ,python-netifaces)
7168 ("python-pyzmq" ,python-pyzmq)
7169 ("python-setuptools" ,python-setuptools)
7170 ("python-six" ,python-six)))
7171 (home-page "https://github.com/roryk/ipython-cluster-helper")
7172 (synopsis
7173 "Simplify IPython cluster start up and use for multiple schedulers")
7174 (description
7175 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7176 profile, launches a cluster and returns a view. On program exit it shuts the
7177 cluster down and deletes the throwaway profile.")
7178 (license license:expat)))
7179
7180 (define-public python2-ipython-cluster-helper
7181 (package-with-python2 python-ipython-cluster-helper))
7182
7183 (define-public python-traitlets
7184 (package
7185 (name "python-traitlets")
7186 (version "4.3.3")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "traitlets" version))
7191 (sha256
7192 (base32
7193 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7194 (build-system python-build-system)
7195 (arguments
7196 `(#:phases
7197 (modify-phases %standard-phases
7198 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7199 (propagated-inputs
7200 `(("python-ipython-genutils" ,python-ipython-genutils)
7201 ("python-decorator" ,python-decorator)))
7202 (native-inputs
7203 `(("python-pytest" ,python-pytest)))
7204 (properties `((python2-variant . ,(delay python2-traitlets))))
7205 (home-page "https://ipython.org")
7206 (synopsis "Configuration system for Python applications")
7207 (description
7208 "Traitlets is a framework that lets Python classes have attributes with
7209 type checking, dynamically calculated default values, and ‘on change’
7210 callbacks. The package also includes a mechanism to use traitlets for
7211 configuration, loading values from files or from command line arguments. This
7212 is a distinct layer on top of traitlets, so you can use traitlets in your code
7213 without using the configuration machinery.")
7214 (license license:bsd-3)))
7215
7216 (define-public python2-traitlets
7217 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7218 (package/inherit traitlets
7219 (propagated-inputs
7220 `(("python2-enum34" ,python2-enum34)
7221 ,@(package-propagated-inputs traitlets))))))
7222
7223 (define-public python-jupyter-core
7224 (package
7225 (name "python-jupyter-core")
7226 (version "4.4.0")
7227 (source
7228 (origin
7229 (method url-fetch)
7230 (uri (string-append (pypi-uri "jupyter_core" version)))
7231 (sha256
7232 (base32
7233 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
7234 (build-system python-build-system)
7235 ;; FIXME: not sure how to run the tests
7236 (arguments `(#:tests? #f))
7237 (propagated-inputs
7238 `(("python-traitlets" ,python-traitlets)))
7239 (home-page "https://jupyter.org/")
7240 (synopsis "Jupyter base package")
7241 (description
7242 "Jupyter core is the base package on which Jupyter projects rely.")
7243 (license license:bsd-3)))
7244
7245 (define-public python2-jupyter-core
7246 (package-with-python2 python-jupyter-core))
7247
7248 (define-public python-jupyter-client
7249 (package
7250 (name "python-jupyter-client")
7251 (version "5.2.4")
7252 (source
7253 (origin
7254 (method url-fetch)
7255 (uri (pypi-uri "jupyter_client" version))
7256 (sha256
7257 (base32
7258 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7259 (build-system python-build-system)
7260 ;; Tests fail because of missing native python kernel which I assume is
7261 ;; provided by the ipython package, which we cannot use because it would
7262 ;; cause a dependency cycle.
7263 (arguments
7264 `(#:tests? #f
7265
7266 #:phases (modify-phases %standard-phases
7267 (add-after 'unpack 'set-tool-file-names
7268 (lambda* (#:key inputs #:allow-other-keys)
7269 (let ((iproute (assoc-ref inputs "iproute")))
7270 (substitute* "jupyter_client/localinterfaces.py"
7271 (("'ip'")
7272 (string-append "'" iproute "/sbin/ip'")))
7273 #t))))))
7274 (inputs
7275 `(("iproute" ,iproute)))
7276 (propagated-inputs
7277 `(("python-pyzmq" ,python-pyzmq)
7278 ("python-traitlets" ,python-traitlets)
7279 ("python-jupyter-core" ,python-jupyter-core)))
7280 (home-page "https://jupyter.org/")
7281 (synopsis "Jupyter protocol implementation and client libraries")
7282 (description
7283 "The @code{jupyter_client} package contains the reference implementation
7284 of the Jupyter protocol. It also provides client and kernel management APIs
7285 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7286 installing @code{kernelspec}s for use with Jupyter frontends.")
7287 (license license:bsd-3)))
7288
7289 (define-public python2-jupyter-client
7290 (package-with-python2 python-jupyter-client))
7291
7292 (define-public python-ipykernel
7293 (package
7294 (name "python-ipykernel")
7295 (version "5.1.3")
7296 (source
7297 (origin
7298 (method url-fetch)
7299 (uri (pypi-uri "ipykernel" version))
7300 (sha256
7301 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7302 (build-system python-build-system)
7303 (arguments
7304 `(#:phases
7305 (modify-phases %standard-phases
7306 (replace 'check
7307 (lambda _
7308 (setenv "HOME" "/tmp")
7309 (invoke "pytest" "-v")
7310 #t))
7311 (add-after 'install 'set-python-file-name
7312 (lambda* (#:key outputs #:allow-other-keys)
7313 ;; Record the absolute file name of the 'python' executable in
7314 ;; 'kernel.json'.
7315 (let ((out (assoc-ref outputs "out")))
7316 (substitute* (string-append out "/share/jupyter"
7317 "/kernels/python3/kernel.json")
7318 (("\"python\"")
7319 (string-append "\"" (which "python") "\"")))
7320 #t))))))
7321 (propagated-inputs
7322 `(("python-ipython" ,python-ipython)
7323 ;; imported at runtime during connect
7324 ("python-jupyter-client" ,python-jupyter-client)))
7325 (native-inputs
7326 `(("python-flaky" ,python-flaky)
7327 ("python-nose" ,python-nose)
7328 ("python-pytest" ,python-pytest)))
7329 (home-page "https://ipython.org")
7330 (synopsis "IPython Kernel for Jupyter")
7331 (description
7332 "This package provides the IPython kernel for Jupyter.")
7333 (properties `((python2-variant . ,(delay python2-ipykernel))))
7334 (license license:bsd-3)))
7335
7336 ;; Version 5.x and above no longer support Python 2.
7337 (define-public python2-ipykernel
7338 (package
7339 (name "python2-ipykernel")
7340 (version "4.10.1")
7341 (source
7342 (origin
7343 (method url-fetch)
7344 (uri (pypi-uri "ipykernel" version))
7345 (sha256
7346 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7347 (build-system python-build-system)
7348 (arguments
7349 `(#:python ,python-2))
7350 (propagated-inputs
7351 `(("python2-ipython" ,python2-ipython)
7352 ;; imported at runtime during connect
7353 ("python2-jupyter-client" ,python2-jupyter-client)
7354 ("python2-tornado" ,python2-tornado)
7355 ("python2-traitlets" ,python2-traitlets)))
7356 (native-inputs
7357 `(("python2-mock" ,python2-mock)
7358 ("python2-nose" ,python2-nose)
7359 ("python2-pytest" ,python2-pytest)
7360 ("python2-pytest-cov" ,python2-pytest-cov)))
7361 (home-page "https://ipython.org")
7362 (synopsis "IPython Kernel for Jupyter")
7363 (description
7364 "This package provides the IPython kernel for Jupyter.")
7365 (license license:bsd-3)))
7366
7367 (define-public python-pari-jupyter
7368 (package
7369 (name "python-pari-jupyter")
7370 (version "1.3.2")
7371 (source
7372 (origin
7373 (method url-fetch)
7374 (uri (pypi-uri "pari_jupyter" version))
7375 (sha256
7376 (base32
7377 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7378 (build-system python-build-system)
7379 (propagated-inputs
7380 `(("python-ipykernel" ,python-ipykernel)))
7381 (inputs
7382 `(("pari-gp" ,pari-gp)
7383 ("readline" ,readline)))
7384 (arguments
7385 `(#:tests? #f)) ; no test suite
7386 (home-page
7387 "https://github.com/jdemeyer/pari_jupyter")
7388 (synopsis "A Jupyter kernel for PARI/GP")
7389 (description "The package provides a PARI/GP kernel for Jupyter.")
7390 (license license:gpl3+)))
7391
7392 (define-public python-backcall
7393 (package
7394 (name "python-backcall")
7395 (version "0.1.0")
7396 (source
7397 (origin
7398 (method url-fetch)
7399 (uri (pypi-uri "backcall" version))
7400 (sha256
7401 (base32
7402 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7403 (build-system python-build-system)
7404 (home-page "https://github.com/takluyver/backcall/")
7405 (synopsis "Specifications for callback functions passed in to an API")
7406 (description
7407 "If your code lets other people supply callback functions, it's important
7408 to specify the function signature you expect, and check that functions support
7409 that. Adding extra parameters later would break other peoples code unless
7410 you're careful. The @code{backcall} package provides a way of specifying the
7411 callback signature using a prototype function.")
7412 (license license:bsd-3)))
7413
7414 (define-public python-ipython
7415 (package
7416 (name "python-ipython")
7417 (version "7.9.0")
7418 (source
7419 (origin
7420 (method url-fetch)
7421 (uri (pypi-uri "ipython" version ".tar.gz"))
7422 (sha256
7423 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7424 (build-system python-build-system)
7425 (propagated-inputs
7426 `(("python-backcall" ,python-backcall)
7427 ("python-pyzmq" ,python-pyzmq)
7428 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7429 ("python-terminado" ,python-terminado)
7430 ("python-matplotlib" ,python-matplotlib)
7431 ("python-numpy" ,python-numpy)
7432 ("python-numpydoc" ,python-numpydoc)
7433 ("python-jedi" ,python-jedi)
7434 ("python-jinja2" ,python-jinja2)
7435 ("python-mistune" ,python-mistune)
7436 ("python-pexpect" ,python-pexpect)
7437 ("python-pickleshare" ,python-pickleshare)
7438 ("python-simplegeneric" ,python-simplegeneric)
7439 ("python-jsonschema" ,python-jsonschema)
7440 ("python-traitlets" ,python-traitlets)
7441 ("python-nbformat" ,python-nbformat)
7442 ("python-pygments" ,python-pygments)))
7443 (inputs
7444 `(("readline" ,readline)
7445 ("which" ,which)))
7446 (native-inputs
7447 `(("graphviz" ,graphviz)
7448 ("pkg-config" ,pkg-config)
7449 ("python-requests" ,python-requests) ;; for tests
7450 ("python-testpath" ,python-testpath)
7451 ("python-nose" ,python-nose)))
7452 (arguments
7453 `(#:phases
7454 (modify-phases %standard-phases
7455 (add-after 'unpack 'make-docs-reproducible
7456 (lambda _
7457 (substitute* "IPython/sphinxext/ipython_directive.py"
7458 ((".*import datetime") "")
7459 ((".*datetime.datetime.now\\(\\)") "")
7460 (("%timeit") "# %timeit"))
7461 #t))
7462 ;; Tests can only be run after the library has been installed and not
7463 ;; within the source directory.
7464 (delete 'check)
7465 (add-after 'install 'check
7466 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7467 (if tests?
7468 (begin
7469 ;; Make installed package available for running the tests
7470 (add-installed-pythonpath inputs outputs)
7471 (setenv "HOME" "/tmp/") ;; required by a test
7472 ;; We only test the core because one of the other tests
7473 ;; tries to import ipykernel.
7474 (invoke "python" "IPython/testing/iptest.py"
7475 "-v" "IPython/core/tests"))
7476 #t)))
7477 (add-before 'check 'fix-tests
7478 (lambda* (#:key inputs #:allow-other-keys)
7479 (substitute* "./IPython/utils/_process_posix.py"
7480 (("/usr/bin/env', 'which") (which "which")))
7481 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7482 (("#!/usr/bin/env python")
7483 (string-append "#!" (which "python"))))
7484 ;; This test introduces a circular dependency on ipykernel
7485 ;; (which depends on ipython).
7486 (delete-file "IPython/core/tests/test_display.py")
7487 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7488 (delete-file "IPython/core/tests/test_interactiveshell.py")
7489 #t)))))
7490 (home-page "https://ipython.org")
7491 (synopsis "IPython is a tool for interactive computing in Python")
7492 (description
7493 "IPython provides a rich architecture for interactive computing with:
7494 Powerful interactive shells, a browser-based notebook, support for interactive
7495 data visualization, embeddable interpreters and tools for parallel
7496 computing.")
7497 (properties `((python2-variant . ,(delay python2-ipython))))
7498 (license license:bsd-3)))
7499
7500 ;; This is the latest release of the LTS version of ipython with support for
7501 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7502 ;; dropped support for Python 2.7.
7503 (define-public python2-ipython
7504 (package
7505 (name "python2-ipython")
7506 (version "5.8.0")
7507 (source
7508 (origin
7509 (method url-fetch)
7510 (uri (pypi-uri "ipython" version ".tar.gz"))
7511 (sha256
7512 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7513 (build-system python-build-system)
7514 (propagated-inputs
7515 `(("python2-backports-shutil-get-terminal-size"
7516 ,python2-backports-shutil-get-terminal-size)
7517 ("python2-pathlib2" ,python2-pathlib2)
7518 ("python2-pyzmq" ,python2-pyzmq)
7519 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7520 ("python2-terminado" ,python2-terminado)
7521 ("python2-matplotlib" ,python2-matplotlib)
7522 ("python2-numpy" ,python2-numpy)
7523 ("python2-numpydoc" ,python2-numpydoc)
7524 ("python2-jinja2" ,python2-jinja2)
7525 ("python2-mistune" ,python2-mistune)
7526 ("python2-pexpect" ,python2-pexpect)
7527 ("python2-pickleshare" ,python2-pickleshare)
7528 ("python2-simplegeneric" ,python2-simplegeneric)
7529 ("python2-jsonschema" ,python2-jsonschema)
7530 ("python2-traitlets" ,python2-traitlets)
7531 ("python2-nbformat" ,python2-nbformat)
7532 ("python2-pygments" ,python2-pygments)))
7533 (inputs
7534 `(("readline" ,readline)
7535 ("which" ,which)))
7536 (native-inputs
7537 `(("graphviz" ,graphviz)
7538 ("pkg-config" ,pkg-config)
7539 ("python2-requests" ,python2-requests) ;; for tests
7540 ("python2-testpath" ,python2-testpath)
7541 ("python2-mock" ,python2-mock)
7542 ("python2-nose" ,python2-nose)))
7543 (arguments
7544 `(#:python ,python-2
7545 #:phases
7546 (modify-phases %standard-phases
7547 (add-before 'check 'delete-broken-tests
7548 (lambda* (#:key inputs #:allow-other-keys)
7549 ;; These tests throw errors for unknown reasons.
7550 (delete-file "IPython/core/tests/test_displayhook.py")
7551 (delete-file "IPython/core/tests/test_magic_terminal.py")
7552 (delete-file "IPython/core/tests/test_profile.py")
7553 #t)))))
7554 (home-page "https://ipython.org")
7555 (synopsis "IPython is a tool for interactive computing in Python")
7556 (description
7557 "IPython provides a rich architecture for interactive computing with:
7558 Powerful interactive shells, a browser-based notebook, support for interactive
7559 data visualization, embeddable interpreters and tools for parallel
7560 computing.")
7561 (license license:bsd-3)))
7562
7563 (define-public python-ipython-documentation
7564 (package
7565 (inherit python-ipython)
7566 (name "python-ipython-documentation")
7567 (version (package-version python-ipython))
7568 (arguments
7569 `(#:phases
7570 (modify-phases %standard-phases
7571 (delete 'build)
7572 (delete 'check)
7573 (replace 'install
7574 (lambda* (#:key outputs #:allow-other-keys)
7575 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7576 (doc (string-append data "/doc/" ,name "-" ,version))
7577 (html (string-append doc "/html"))
7578 (man1 (string-append data "/man/man1"))
7579 (info (string-append data "/info"))
7580 (examples (string-append doc "/examples"))
7581 (python-arg (string-append "PYTHON=" (which "python"))))
7582 (setenv "LANG" "en_US.utf8")
7583 (with-directory-excursion "docs"
7584 ;; FIXME: pdf fails to build
7585 ;;(system* "make" "pdf" "PAPER=a4")
7586 (system* "make" python-arg "html")
7587 ;; FIXME: the generated texi file contains ^@^@, which trips
7588 ;; up the parser.
7589 ;; (system* "make" python-arg "info")
7590 )
7591 (copy-recursively "docs/man" man1)
7592 (copy-recursively "examples" examples)
7593 (copy-recursively "docs/build/html" html)
7594 ;; (copy-file "docs/build/latex/ipython.pdf"
7595 ;; (string-append doc "/ipython.pdf"))
7596 (mkdir-p info)
7597 ;; (copy-file "docs/build/texinfo/ipython.info"
7598 ;; (string-append info "/ipython.info"))
7599 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7600 #t)))))
7601 (inputs
7602 `(("python-ipython" ,python-ipython)
7603 ("python-ipykernel" ,python-ipykernel)))
7604 (native-inputs
7605 `(("python-sphinx" ,python-sphinx)
7606 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7607 ;; FIXME: It's possible that a smaller union would work just as well.
7608 ("texlive" ,(texlive-union (list texlive-amsfonts
7609 texlive-fonts-ec
7610 texlive-generic-ifxetex
7611 texlive-generic-pdftex
7612 texlive-latex-capt-of
7613 texlive-latex-cmap
7614 texlive-latex-environ
7615 texlive-latex-eqparbox
7616 texlive-latex-etoolbox
7617 texlive-latex-expdlist
7618 texlive-latex-fancyhdr
7619 texlive-latex-fancyvrb
7620 texlive-latex-fncychap
7621 texlive-latex-float
7622 texlive-latex-framed
7623 texlive-latex-geometry
7624 texlive-latex-graphics
7625 texlive-latex-hyperref
7626 texlive-latex-mdwtools
7627 texlive-latex-multirow
7628 texlive-latex-needspace
7629 texlive-latex-oberdiek
7630 texlive-latex-parskip
7631 texlive-latex-preview
7632 texlive-latex-tabulary
7633 texlive-latex-threeparttable
7634 texlive-latex-titlesec
7635 texlive-latex-trimspaces
7636 texlive-latex-ucs
7637 texlive-latex-upquote
7638 texlive-latex-url
7639 texlive-latex-varwidth
7640 texlive-latex-wrapfig)))
7641 ("texinfo" ,texinfo)))))
7642
7643 (define-public python-urwid
7644 (package
7645 (name "python-urwid")
7646 (version "2.1.0")
7647 (source
7648 (origin
7649 (method url-fetch)
7650 (uri (pypi-uri "urwid" version))
7651 (sha256
7652 (base32
7653 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7654 (build-system python-build-system)
7655 (home-page "http://urwid.org")
7656 (synopsis "Console user interface library for Python")
7657 (description
7658 "Urwid is a curses-based UI/widget library for Python. It includes many
7659 features useful for text console applications.")
7660 (license license:lgpl2.1+)))
7661
7662 (define-public python2-urwid
7663 (package-with-python2 python-urwid))
7664
7665 (define-public python-urwidtrees
7666 (package
7667 (name "python-urwidtrees")
7668 (version "1.0.2")
7669 (source
7670 (origin
7671 (method git-fetch)
7672 ;; package author intends on distributing via github rather than pypi:
7673 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7674 (uri (git-reference
7675 (url "https://github.com/pazz/urwidtrees")
7676 (commit version)))
7677 (file-name (git-file-name name version))
7678 (sha256
7679 (base32
7680 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7681 (build-system python-build-system)
7682 (arguments
7683 '(#:use-setuptools? #f
7684 #:tests? #f)) ; no tests
7685 (propagated-inputs `(("python-urwid" ,python-urwid)))
7686 (home-page "https://github.com/pazz/urwidtrees")
7687 (synopsis "Tree widgets for urwid")
7688 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7689 toolkit. Use it to build trees of widgets.")
7690 (license license:gpl3+)))
7691
7692 (define-public python2-urwidtrees
7693 (package-with-python2 python-urwidtrees))
7694
7695 (define-public python-ua-parser
7696 (package
7697 (name "python-ua-parser")
7698 (version "0.8.0")
7699 (source
7700 (origin
7701 (method url-fetch)
7702 (uri (pypi-uri "ua-parser" version))
7703 (sha256
7704 (base32
7705 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7706 (build-system python-build-system)
7707 (arguments
7708 `(#:tests? #f)) ;no test suite in release
7709 (native-inputs
7710 `(("python-pyyaml" ,python-pyyaml)))
7711 (home-page "https://github.com/ua-parser/uap-python")
7712 (synopsis "User agent parser")
7713 (description
7714 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7715 (license license:asl2.0)))
7716
7717 (define-public python2-ua-parser
7718 (package-with-python2 python-ua-parser))
7719
7720 (define-public python-user-agents
7721 (package
7722 (name "python-user-agents")
7723 (version "1.1.0")
7724 (source
7725 (origin
7726 (method url-fetch)
7727 (uri (pypi-uri "user-agents" version))
7728 (sha256
7729 (base32
7730 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7731 (build-system python-build-system)
7732 (arguments
7733 `(#:tests? #f)) ;missing devices.json test file in release
7734 (propagated-inputs
7735 `(("python-ua-parser" ,python-ua-parser)))
7736 (home-page "https://github.com/selwin/python-user-agents")
7737 (synopsis "User Agent strings parsing library")
7738 (description
7739 "A library to identify devices (phones, tablets) and their capabilities by
7740 parsing (browser/HTTP) user agent strings.")
7741 (license license:expat)))
7742
7743 (define-public python2-user-agents
7744 (package-with-python2 python-user-agents))
7745
7746 (define-public python-dbus
7747 (package
7748 (name "python-dbus")
7749 (version "1.2.16")
7750 (source
7751 (origin
7752 (method url-fetch)
7753 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7754 "dbus-python-" version ".tar.gz"))
7755 (sha256
7756 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7757 (build-system gnu-build-system)
7758 (native-inputs
7759 `(("pkg-config" ,pkg-config)))
7760 (inputs
7761 `(("python" ,python-wrapper)
7762 ("dbus-glib" ,dbus-glib)))
7763 (synopsis "Python bindings for D-bus")
7764 (description "python-dbus provides bindings for libdbus, the reference
7765 implementation of D-Bus.")
7766 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7767 (license license:expat)))
7768
7769 (define-public python2-dbus
7770 (package/inherit python-dbus
7771 (name "python2-dbus")
7772 (inputs `(("python" ,python-2)
7773 ,@(alist-delete "python"
7774 (package-inputs python-dbus)
7775 equal?)))))
7776
7777 (define-public python-notify2
7778 (package
7779 (name "python-notify2")
7780 (version "0.3.1")
7781 (source
7782 (origin
7783 (method url-fetch)
7784 (uri (pypi-uri "notify2" version))
7785 (sha256
7786 (base32
7787 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7788 (build-system python-build-system)
7789 (arguments `(#:tests? #f)) ; tests depend on system state
7790 (native-inputs
7791 `(("python-dbus" ,python-dbus)))
7792 (home-page "https://bitbucket.org/takluyver/pynotify2")
7793 (synopsis "Python interface to D-Bus notifications")
7794 (description
7795 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7796 It is a reimplementation of pynotify in pure Python, and an alternative to
7797 the GObject Introspection bindings to libnotify for non-GTK applications.")
7798 (license (list license:bsd-2
7799 license:lgpl2.1+))))
7800
7801 (define-public python2-notify2
7802 (package-with-python2 python-notify2))
7803
7804 ;; beautifulsoup4 has a totally different namespace than 3.x,
7805 ;; and pypi seems to put it under its own name, so I guess we should too
7806 (define-public python-beautifulsoup4
7807 (package
7808 (name "python-beautifulsoup4")
7809 (version "4.9.1")
7810 (source
7811 (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "beautifulsoup4" version))
7814 (sha256
7815 (base32
7816 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7817 (build-system python-build-system)
7818 (arguments
7819 `(#:phases
7820 (modify-phases %standard-phases
7821 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7822 ;; must use this conversion script when building with Python 3. The
7823 ;; conversion script also runs the tests.
7824 ;; For more information, see the file 'convert-py3k' in the source
7825 ;; distribution.
7826 (replace 'check
7827 (lambda _ (invoke "./convert-py3k"))))))
7828 (propagated-inputs
7829 `(("python-soupsieve" ,python-soupsieve)))
7830 (home-page
7831 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7832 (synopsis
7833 "Python screen-scraping library")
7834 (description
7835 "Beautiful Soup is a Python library designed for rapidly setting up
7836 screen-scraping projects. It offers Pythonic idioms for navigating,
7837 searching, and modifying a parse tree, providing a toolkit for
7838 dissecting a document and extracting what you need. It automatically
7839 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7840 (license license:expat)
7841 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7842
7843 (define-public python2-beautifulsoup4
7844 (let ((base (package-with-python2
7845 (strip-python2-variant python-beautifulsoup4))))
7846 (package/inherit base
7847 (arguments `(#:python ,python-2)))))
7848
7849 (define-public python-soupsieve
7850 (package
7851 (name "python-soupsieve")
7852 (version "2.0.1")
7853 (source
7854 (origin
7855 (method url-fetch)
7856 (uri (pypi-uri "soupsieve" version))
7857 (sha256
7858 (base32
7859 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7860 (build-system python-build-system)
7861 (arguments `(#:tests? #f))
7862 ;;XXX: 2 tests fail currently despite claming they were to be
7863 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7864 ;;don't want to create a circular dependency.
7865 (home-page "https://github.com/facelessuser/soupsieve")
7866 (synopsis "CSS selector library")
7867 (description
7868 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7869 Soup 4. It aims to provide selecting, matching, and filtering using modern
7870 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7871 specifications up through the latest CSS level 4 drafts and beyond (though
7872 some are not yet implemented).")
7873 (properties `((python2-variant . ,(delay python2-soupsieve))))
7874 (license license:expat)))
7875
7876 ;; This is the last version that supports python-2
7877 (define-public python2-soupsieve
7878 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7879 (package
7880 (inherit base)
7881 (version "1.9.6")
7882 (source
7883 (origin
7884 (method url-fetch)
7885 (uri (pypi-uri "soupsieve" version))
7886 (sha256
7887 (base32
7888 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7889 (propagated-inputs
7890 `(("python2-backports-functools-lru-cache"
7891 ,python2-backports-functools-lru-cache)
7892 ,@(package-propagated-inputs base))))))
7893
7894 (define-public python-netifaces
7895 (package
7896 (name "python-netifaces")
7897 (version "0.10.9")
7898 (source
7899 (origin
7900 (method url-fetch)
7901 (uri (pypi-uri "netifaces" version))
7902 (sha256
7903 (base32
7904 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7905 (build-system python-build-system)
7906 (home-page "https://github.com/al45tair/netifaces")
7907 (synopsis
7908 "Python module for portable network interface information")
7909 (description
7910 "Netifaces is a Python module providing information on network
7911 interfaces in an easy and portable manner.")
7912 (license license:expat)))
7913
7914 (define-public python2-netifaces
7915 (package-with-python2 python-netifaces))
7916
7917 (define-public python-networkx
7918 (package
7919 (name "python-networkx")
7920 (version "2.5")
7921 (source
7922 (origin
7923 (method url-fetch)
7924 (uri (pypi-uri "networkx" version))
7925 (sha256
7926 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7927 (build-system python-build-system)
7928 (arguments
7929 '(#:phases (modify-phases %standard-phases
7930 (replace 'check
7931 (lambda* (#:key tests? #:allow-other-keys)
7932 (if tests?
7933 (invoke "pytest" "-vv" "--pyargs" "networkx")
7934 (format #t "test suite not run~%"))
7935 #t)))))
7936 ;; python-decorator is needed at runtime.
7937 (propagated-inputs
7938 `(("python-decorator" ,python-decorator)))
7939 (native-inputs
7940 `(("python-pytest" ,python-pytest)))
7941 (home-page "https://networkx.github.io/")
7942 (synopsis "Python module for creating and manipulating graphs and networks")
7943 (description
7944 "NetworkX is a Python package for the creation, manipulation, and study
7945 of the structure, dynamics, and functions of complex networks.")
7946 (properties `((python2-variant . ,(delay python2-networkx))))
7947 (license license:bsd-3)))
7948
7949 ;; NetworkX 2.2 is the last version with support for Python 2.
7950 (define-public python2-networkx
7951 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7952 (package
7953 (inherit base)
7954 (version "2.2")
7955 (source (origin
7956 (method url-fetch)
7957 (uri (pypi-uri "networkx" version ".zip"))
7958 (sha256
7959 (base32
7960 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7961 (arguments
7962 `(#:python ,python-2))
7963 (native-inputs
7964 `(("python-nose" ,python2-nose)
7965 ("unzip" ,unzip))))))
7966
7967 (define-public python-datrie
7968 (package
7969 (name "python-datrie")
7970 (version "0.8.2")
7971 (source
7972 (origin
7973 (method url-fetch)
7974 (uri (pypi-uri "datrie" version))
7975 (sha256
7976 (base32
7977 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7978 (build-system python-build-system)
7979 (native-inputs
7980 `(("python-cython" ,python-cython)
7981 ("python-hypothesis" ,python-hypothesis)
7982 ("python-pytest" ,python-pytest)
7983 ("python-pytest-runner" ,python-pytest-runner)))
7984 (home-page "https://github.com/kmike/datrie")
7985 (synopsis "Fast, efficiently stored trie for Python")
7986 (description
7987 "This package provides a fast, efficiently stored trie implementation for
7988 Python.")
7989 (license license:lgpl2.1+)))
7990
7991 (define-public python-amply
7992 (package
7993 (name "python-amply")
7994 (version "0.1.4")
7995 (source
7996 (origin
7997 (method url-fetch)
7998 (uri (pypi-uri "amply" version))
7999 (sha256
8000 (base32
8001 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8002 (build-system python-build-system)
8003 (propagated-inputs
8004 `(("python-docutils" ,python-docutils)
8005 ("python-pyparsing" ,python-pyparsing)))
8006 (native-inputs
8007 `(("python-setuptools-scm" ,python-setuptools-scm)))
8008 (home-page "https://github.com/willu47/amply")
8009 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8010 (description
8011 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8012 structures.")
8013 (license license:epl1.0)))
8014
8015 (define-public python-pulp
8016 (package
8017 (name "python-pulp")
8018 (version "2.4")
8019 (source
8020 (origin
8021 (method url-fetch)
8022 (uri (pypi-uri "PuLP" version))
8023 (sha256
8024 (base32
8025 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8026 (build-system python-build-system)
8027 (propagated-inputs
8028 `(("python-amply" ,python-amply)))
8029 (home-page "https://github.com/coin-or/pulp")
8030 (synopsis "Linear Programming modeler")
8031 (description
8032 "PuLP is a Linear Programming modeler written in Python. PuLP can
8033 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8034 solve linear problems.")
8035 (license license:expat)))
8036
8037 (define-public python-toposort
8038 (package
8039 (name "python-toposort")
8040 (version "1.6")
8041 (source
8042 (origin
8043 (method url-fetch)
8044 (uri (pypi-uri "toposort" version))
8045 (sha256
8046 (base32
8047 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8048 (build-system python-build-system)
8049 (home-page "https://gitlab.com/ericvsmith/toposort")
8050 (synopsis "Topological sort algorithm")
8051 (description
8052 "This package provides an implementation of a topological sort
8053 algorithm.")
8054 (license license:asl2.0)))
8055
8056 (define-public snakemake
8057 (package
8058 (name "snakemake")
8059 (version "5.32.2")
8060 (source
8061 (origin
8062 (method url-fetch)
8063 (uri (pypi-uri "snakemake" version))
8064 (sha256
8065 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8066 (build-system python-build-system)
8067 (arguments
8068 ;; TODO: Package missing test dependencies.
8069 '(#:tests? #f
8070 #:phases
8071 (modify-phases %standard-phases
8072 ;; For cluster execution Snakemake will call Python. Since there is
8073 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8074 ;; this by calling the snakemake wrapper instead.
8075 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8076 (lambda* (#:key outputs #:allow-other-keys)
8077 (substitute* "snakemake/executors/__init__.py"
8078 (("\\{sys.executable\\} -m snakemake")
8079 (string-append (assoc-ref outputs "out")
8080 "/bin/snakemake")))
8081 #t)))))
8082 (propagated-inputs
8083 `(("python-appdirs" ,python-appdirs)
8084 ("python-configargparse" ,python-configargparse)
8085 ("python-datrie" ,python-datrie)
8086 ("python-docutils" ,python-docutils)
8087 ("python-gitpython" ,python-gitpython)
8088 ("python-jinja2" ,python-jinja2)
8089 ("python-jsonschema" ,python-jsonschema)
8090 ("python-nbformat" ,python-nbformat)
8091 ("python-networkx" ,python-networkx)
8092 ("python-psutil" ,python-psutil)
8093 ("python-pulp" ,python-pulp)
8094 ("python-pyyaml" ,python-pyyaml)
8095 ("python-ratelimiter" ,python-ratelimiter)
8096 ("python-requests" ,python-requests)
8097 ("python-toposort" ,python-toposort)
8098 ("python-wrapt" ,python-wrapt)))
8099 (home-page "https://snakemake.readthedocs.io")
8100 (synopsis "Python-based execution environment for make-like workflows")
8101 (description
8102 "Snakemake aims to reduce the complexity of creating workflows by
8103 providing a clean and modern domain specific specification language (DSL) in
8104 Python style, together with a fast and comfortable execution environment.")
8105 (license license:expat)))
8106
8107 (define-public python-pyqrcode
8108 (package
8109 (name "python-pyqrcode")
8110 (version "1.2.1")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "PyQRCode" version))
8115 (sha256
8116 (base32
8117 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8118 (build-system python-build-system)
8119 (home-page
8120 "https://github.com/mnooner256/pyqrcode")
8121 (synopsis "QR code generator")
8122 (description
8123 "Pyqrcode is a QR code generator written purely in Python with
8124 SVG, EPS, PNG and terminal output.")
8125 (license license:bsd-3)))
8126
8127 (define-public python-seaborn
8128 (package
8129 (name "python-seaborn")
8130 (version "0.10.0")
8131 (source
8132 (origin
8133 (method url-fetch)
8134 (uri (pypi-uri "seaborn" version))
8135 (sha256
8136 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8137 (build-system python-build-system)
8138 (arguments
8139 `(#:phases
8140 (modify-phases %standard-phases
8141 (add-before 'check 'start-xserver
8142 (lambda* (#:key inputs #:allow-other-keys)
8143 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8144 ;; There must be a running X server and make check doesn't
8145 ;; start one. Therefore we must do it.
8146 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8147 (setenv "DISPLAY" ":1")
8148 #t)))
8149 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8150 (propagated-inputs
8151 `(("python-pandas" ,python-pandas)
8152 ("python-matplotlib" ,python-matplotlib)
8153 ("python-numpy" ,python-numpy)
8154 ("python-scipy" ,python-scipy)))
8155 (native-inputs
8156 `(("python-pytest" ,python-pytest)
8157 ("xorg-server" ,xorg-server-for-tests)))
8158 (home-page "https://seaborn.pydata.org/")
8159 (synopsis "Statistical data visualization")
8160 (description
8161 "Seaborn is a library for making attractive and informative statistical
8162 graphics in Python. It is built on top of matplotlib and tightly integrated
8163 with the PyData stack, including support for numpy and pandas data structures
8164 and statistical routines from scipy and statsmodels.")
8165 (properties `((python2-variant . ,(delay python2-seaborn))))
8166 (license license:bsd-3)))
8167
8168 ;; 0.9.1 is the last release with support for Python 2.
8169 (define-public python2-seaborn
8170 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8171 (package
8172 (inherit base)
8173 (version "0.9.1")
8174 (source (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "seaborn" version))
8177 (sha256
8178 (base32
8179 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8180
8181 (define-public python-mpmath
8182 (package
8183 (name "python-mpmath")
8184 (version "1.1.0")
8185 (source (origin
8186 (method url-fetch)
8187 (uri (pypi-uri "mpmath" version))
8188 (file-name (git-file-name name version))
8189 (sha256
8190 (base32
8191 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8192 (build-system python-build-system)
8193 (native-inputs
8194 `(("python-pytest" ,python-pytest)))
8195 (arguments
8196 '(#:phases
8197 (modify-phases %standard-phases
8198 (replace 'check
8199 (lambda _
8200 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8201 (home-page "https://mpmath.org")
8202 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8203 (description
8204 "@code{mpmath} can be used as an arbitrary-precision substitute for
8205 Python's float/complex types and math/cmath modules, but also does much
8206 more advanced mathematics.")
8207 (license license:bsd-3)))
8208
8209 (define-public python2-mpmath
8210 (package-with-python2 python-mpmath))
8211
8212 (define-public python-bigfloat
8213 (package
8214 (name "python-bigfloat")
8215 (version "0.3.0")
8216 (source
8217 (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "bigfloat" version))
8220 (sha256
8221 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8222 (build-system python-build-system)
8223 (inputs
8224 `(("mpfr" ,mpfr)))
8225 (home-page "https://github.com/mdickinson/bigfloat")
8226 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8227 (description
8228 "This package provides a Python interface to the MPFR library for
8229 multiprecision arithmetic.")
8230 (license license:lgpl3+)))
8231
8232 (define-public python2-bigfloat
8233 (package-with-python2 python-bigfloat))
8234
8235 (define-public python-sympy
8236 (package
8237 (name "python-sympy")
8238 (version "1.7.1")
8239 (source
8240 (origin
8241 (method url-fetch)
8242 (uri (pypi-uri "sympy" version))
8243 (sha256
8244 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8245 (build-system python-build-system)
8246 (arguments
8247 `(#:phases
8248 (modify-phases %standard-phases
8249 (replace 'check
8250 (lambda* (#:key outputs #:allow-other-keys)
8251 (invoke
8252 (or (which "python3") (which "python"))
8253 "-c" "import sympy; sympy.test(\"/core\")"))))))
8254 (propagated-inputs
8255 `(("python-mpmath" ,python-mpmath)))
8256 (home-page "https://www.sympy.org/")
8257 (synopsis "Python library for symbolic mathematics")
8258 (description
8259 "SymPy is a Python library for symbolic mathematics. It aims to become a
8260 full-featured computer algebra system (CAS) while keeping the code as simple
8261 as possible in order to be comprehensible and easily extensible.")
8262 (license license:bsd-3)))
8263
8264 (define-public python2-sympy
8265 (package
8266 (inherit (package-with-python2 python-sympy))
8267 (version "1.5.1") ; last release for python2
8268 (source
8269 (origin
8270 (method url-fetch)
8271 (uri (pypi-uri "sympy" version))
8272 (sha256
8273 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8274
8275 (define-public python-q
8276 (package
8277 (name "python-q")
8278 (version "2.6")
8279 (source
8280 (origin
8281 (method url-fetch)
8282 (uri (pypi-uri "q" version))
8283 (sha256
8284 (base32
8285 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8286 (build-system python-build-system)
8287 (home-page "https://github.com/zestyping/q")
8288 (synopsis "Quick-and-dirty debugging output for tired programmers")
8289 (description
8290 "q is a Python module for \"print\" style of debugging Python code. It
8291 provides convenient short API for print out of values, tracebacks, and
8292 falling into the Python interpreter.")
8293 (license license:asl2.0)))
8294
8295 (define-public python2-q
8296 (package-with-python2 python-q))
8297
8298 (define-public python-xlib
8299 (package
8300 (name "python-xlib")
8301 (version "0.29")
8302 (source
8303 (origin
8304 (method git-fetch)
8305 (uri (git-reference
8306 (url "https://github.com/python-xlib/python-xlib")
8307 (commit version)))
8308 (file-name (git-file-name name version))
8309 (sha256
8310 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8311 (build-system python-build-system)
8312 (arguments
8313 `(#:phases
8314 (modify-phases %standard-phases
8315 (add-before 'check 'start-xserver
8316 (lambda* (#:key inputs #:allow-other-keys)
8317 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8318 ;; There must be a running X server and make check doesn't
8319 ;; start one. Therefore we must do it.
8320 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8321 (setenv "DISPLAY" ":1")
8322 #t))))))
8323 (native-inputs
8324 `(("python-mock" ,python-mock)
8325 ("python-setuptools-scm" ,python-setuptools-scm)
8326 ("xorg-server" ,xorg-server)))
8327 (propagated-inputs
8328 `(("python-six" ,python-six)))
8329 (home-page "https://github.com/python-xlib/python-xlib")
8330 (synopsis "Python X11 client library")
8331 (description
8332 "The Python X Library is intended to be a fully functional
8333 X client library for Python programs. It is useful to implement
8334 low-level X clients. It is written entirely in Python.")
8335 (license license:gpl2+)))
8336
8337 (define-public python2-xlib
8338 (package-with-python2 python-xlib))
8339
8340 (define-public python-singledispatch
8341 (package
8342 (name "python-singledispatch")
8343 (version "3.4.0.3")
8344 (source
8345 (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "singledispatch" version))
8348 (sha256
8349 (base32
8350 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8351 (build-system python-build-system)
8352 (native-inputs
8353 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8354 (home-page
8355 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8356 (synopsis "Backport of singledispatch feature from Python 3.4")
8357 (description
8358 "This library brings functools.singledispatch from Python 3.4 to Python
8359 2.6-3.3.")
8360 (license license:expat)))
8361
8362 (define-public python2-singledispatch
8363 (package-with-python2 python-singledispatch))
8364
8365 ;; the python- version can be removed with python-3.5
8366 (define-public python-backports-abc
8367 (package
8368 (name "python-backports-abc")
8369 (version "0.5")
8370 (source
8371 (origin
8372 (method url-fetch)
8373 (uri (pypi-uri "backports_abc" version))
8374 (sha256
8375 (base32
8376 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8377 (build-system python-build-system)
8378 (home-page "https://github.com/cython/backports_abc")
8379 (synopsis "Backport of additions to the 'collections.abc' module")
8380 (description
8381 "Python-backports-abc provides a backport of additions to the
8382 @code{collections.abc} module in Python-3.5.")
8383 (license license:psfl)))
8384
8385 (define-public python2-backports-abc
8386 (package-with-python2 python-backports-abc))
8387
8388 (define-public python-backports-csv
8389 (package
8390 (name "python-backports-csv")
8391 (version "1.0.7")
8392 (source
8393 (origin
8394 (method url-fetch)
8395 (uri (pypi-uri "backports.csv" version))
8396 (sha256
8397 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8398 (build-system python-build-system)
8399 (home-page "https://github.com/ryanhiebert/backports.csv")
8400 (synopsis "Backport of Python 3's csv module for Python 2")
8401 (description
8402 "Provides a backport of Python 3's @code{csv} module for parsing
8403 comma separated values. The API of the @code{csv} module in Python 2
8404 is drastically different from the @code{csv} module in Python 3.
8405 This is due, for the most part, to the difference between str in
8406 Python 2 and Python 3.")
8407 (license license:psfl)))
8408
8409 (define-public python2-backports-csv
8410 (package-with-python2 python-backports-csv))
8411
8412 (define-public python2-backports-shutil-get-terminal-size
8413 (package
8414 (name "python2-backports-shutil-get-terminal-size")
8415 (version "1.0.0")
8416 (source
8417 (origin
8418 (method url-fetch)
8419 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8420 (sha256
8421 (base32
8422 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8423 (build-system python-build-system)
8424 (arguments
8425 `(#:python ,python-2
8426 #:phases
8427 (modify-phases %standard-phases
8428 (replace 'check
8429 (lambda _
8430 (setenv "PYTHONPATH" (string-append "./build/lib:"
8431 (getenv "PYTHONPATH")))
8432 (invoke "py.test" "-v"))))))
8433 (native-inputs
8434 `(("python2-pytest" ,python2-pytest)))
8435 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8436 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8437 (description
8438 "This package provides a backport of the @code{get_terminal_size
8439 function} from Python 3.3's @code{shutil}.
8440 Unlike the original version it is written in pure Python rather than C,
8441 so it might be a tiny bit slower.")
8442 (license license:expat)))
8443
8444 (define-public python-waf
8445 (package
8446 (name "python-waf")
8447 (version "2.0.19")
8448 (source (origin
8449 (method url-fetch)
8450 (uri (string-append "https://waf.io/"
8451 "waf-" version ".tar.bz2"))
8452 (sha256
8453 (base32
8454 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8455 (build-system python-build-system)
8456 (arguments
8457 '(#:phases
8458 (modify-phases %standard-phases
8459 (replace 'build
8460 (lambda _
8461 ;; XXX: Find a way to add all extra tools.
8462 (let ((tools '("gccdeps"
8463 "clang_compilation_database")))
8464 (invoke "python" "waf-light" "configure" "build"
8465 (string-append "--tools="
8466 (string-join tools ","))))))
8467 (replace 'check
8468 (lambda _
8469 (invoke "python" "waf" "--version")))
8470 (replace 'install
8471 (lambda* (#:key outputs #:allow-other-keys)
8472 (let ((out (assoc-ref outputs "out")))
8473 (install-file "waf" (string-append out "/bin")))
8474 #t))
8475 ;; waf breaks when it is wrapped.
8476 (delete 'wrap))))
8477 (home-page "https://waf.io/")
8478 (synopsis "Python-based build system")
8479 (description
8480 "Waf is a Python-based framework for configuring, compiling and installing
8481 applications.")
8482 (license license:bsd-3)))
8483
8484 (define-public python2-waf
8485 (package-with-python2 python-waf))
8486
8487 (define-public python-pyzmq
8488 (package
8489 (name "python-pyzmq")
8490 (version "17.1.2")
8491 (source
8492 (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "pyzmq" version))
8495 (sha256
8496 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8497 (build-system python-build-system)
8498 (arguments
8499 `(#:configure-flags
8500 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8501 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8502 ;; --inplace' for 'python setup.py test' to work.
8503 #:tests? #f))
8504 (inputs
8505 `(("zeromq" ,zeromq)))
8506 (native-inputs
8507 `(("pkg-config" ,pkg-config)
8508 ("python-nose" ,python-nose)))
8509 (home-page "https://github.com/zeromq/pyzmq")
8510 (synopsis "Python bindings for 0MQ")
8511 (description
8512 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8513 (license license:bsd-4)))
8514
8515 (define-public python2-pyzmq
8516 (package-with-python2 python-pyzmq))
8517
8518 (define-public python-pep8
8519 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8520 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8521 ;; some dependents' test suites, and nothing more.
8522 (package
8523 (name "python-pep8")
8524 (version "1.7.0")
8525 (source
8526 (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "pep8" version))
8529 (sha256
8530 (base32
8531 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8532 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8533 (build-system python-build-system)
8534 (home-page "https://pep8.readthedocs.org/")
8535 (synopsis "Python style guide checker")
8536 (description
8537 "This tools checks Python code against some of the style conventions in
8538 PEP 8.")
8539 (license license:expat)))
8540
8541 (define-public python2-pep8
8542 (package-with-python2 python-pep8))
8543
8544 (define-public python-pep517
8545 (package
8546 (inherit python-pep517-bootstrap)
8547 (name "python-pep517")
8548 (arguments
8549 '(#:phases
8550 (modify-phases %standard-phases
8551 (replace 'check
8552 (lambda* (#:key tests? #:allow-other-keys)
8553 (delete-file "pytest.ini")
8554 ;; This test tries to connect to the internet
8555 (delete-file "tests/test_meta.py")
8556 (if tests?
8557 (invoke "pytest")
8558 #t))))))
8559 (native-inputs
8560 `(("python-mock" ,python-mock)
8561 ("python-pytest" ,python-pytest)
8562 ("python-testpath" ,python-testpath)))
8563 (properties `((python2-variant . ,(delay python2-pep517))))))
8564
8565 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8566 (define-public python2-pep517
8567 (let ((base (package-with-python2
8568 (strip-python2-variant python-pep517))))
8569 (package/inherit base
8570 (name "python2-pep517")
8571 (arguments
8572 `(#:tests? #f
8573 ,@(package-arguments base)))
8574 (native-inputs `()))))
8575
8576 (define-public python-pyflakes
8577 (package
8578 (name "python-pyflakes")
8579 (version "2.2.0")
8580 (source
8581 (origin
8582 (method url-fetch)
8583 (uri (pypi-uri "pyflakes" version))
8584 (sha256
8585 (base32
8586 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8587 (build-system python-build-system)
8588 (home-page
8589 "https://github.com/pyflakes/pyflakes")
8590 (synopsis "Passive checker of Python programs")
8591 (description
8592 "Pyflakes statically checks Python source code for common errors.")
8593 (license license:expat)))
8594
8595 (define-public python2-pyflakes
8596 (package-with-python2 python-pyflakes))
8597
8598 (define-public python-mccabe
8599 (package
8600 (name "python-mccabe")
8601 (version "0.6.1")
8602 (source
8603 (origin
8604 (method url-fetch)
8605 (uri (pypi-uri "mccabe" version))
8606 (sha256
8607 (base32
8608 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8609 (build-system python-build-system)
8610 (native-inputs
8611 `(("python-pytest" ,python-pytest-bootstrap)
8612 ("python-pytest-runner" ,python-pytest-runner)))
8613 (home-page "https://github.com/flintwork/mccabe")
8614 (synopsis "McCabe checker, plugin for flake8")
8615 (description
8616 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8617 complexity of Python source code.")
8618 (license license:expat)))
8619
8620 (define-public python2-mccabe
8621 (package-with-python2 python-mccabe))
8622
8623 (define-public python-flake8
8624 (package
8625 (name "python-flake8")
8626 (version "3.8.4")
8627 (source (origin
8628 (method url-fetch)
8629 (uri (pypi-uri "flake8" version))
8630 (sha256
8631 (base32
8632 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8633 (build-system python-build-system)
8634 (arguments
8635 `(#:phases
8636 (modify-phases %standard-phases
8637 (delete 'check)
8638 (add-after 'install 'check
8639 (lambda* (#:key inputs outputs #:allow-other-keys)
8640 (add-installed-pythonpath inputs outputs)
8641 (invoke "pytest" "-v")
8642 #t)))))
8643 (propagated-inputs
8644 `(("python-pycodestyle" ,python-pycodestyle)
8645 ("python-entrypoints" ,python-entrypoints)
8646 ("python-pyflakes" ,python-pyflakes)
8647 ("python-mccabe" ,python-mccabe)))
8648 (native-inputs
8649 `(("python-mock" ,python-mock)
8650 ("python-pytest" ,python-pytest-bootstrap)))
8651 (home-page "https://gitlab.com/pycqa/flake8")
8652 (synopsis
8653 "The modular source code checker: pep8, pyflakes and co")
8654 (description
8655 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8656 (properties `((python2-variant . ,(delay python2-flake8))))
8657 (license license:expat)))
8658
8659 (define-public python2-flake8
8660 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8661 (package/inherit base
8662 (propagated-inputs
8663 `(("python2-configparser" ,python2-configparser)
8664 ("python2-enum34" ,python2-enum34)
8665 ("python2-functools32" ,python2-functools32)
8666 ("python2-typing" ,python2-typing)
8667 ,@(package-propagated-inputs base))))))
8668
8669 (define-public python-flake8-bugbear
8670 (package
8671 (name "python-flake8-bugbear")
8672 (version "20.1.4")
8673 (source
8674 (origin
8675 (method url-fetch)
8676 (uri (pypi-uri "flake8-bugbear" version))
8677 (sha256
8678 (base32
8679 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8680 (build-system python-build-system)
8681 (arguments
8682 '(#:phases
8683 (modify-phases %standard-phases
8684 (add-before 'check 'disable-test
8685 (lambda _
8686 ;; This test fails on slow computers.
8687 (substitute* "tests/test_bugbear.py"
8688 (("def test_does_not_crash_on_any_valid_code")
8689 "def _test_does_not_crash_on_any_valid_code")))))))
8690 (native-inputs
8691 `(("python-hypothesis" ,python-hypothesis)
8692 ("python-hypothesmith" ,python-hypothesmith)))
8693 (propagated-inputs
8694 `(("python-attrs" ,python-attrs)
8695 ("python-flake8" ,python-flake8)))
8696 (home-page "https://github.com/PyCQA/flake8-bugbear")
8697 (synopsis
8698 "Flake8 plugin for finding likely bugs and design problems in your program")
8699 (description
8700 "This package contains a plugin for Flake8 finding likely bugs and
8701 design problems in your program. It contains warnings that don't belong
8702 in pyflakes and pycodestyle.")
8703 (license license:expat)))
8704
8705 (define-public python-flake8-implicit-str-concat
8706 (package
8707 (name "python-flake8-implicit-str-concat")
8708 (version "0.2.0")
8709 (source
8710 (origin
8711 (method url-fetch)
8712 (uri (pypi-uri "flake8_implicit_str_concat" version))
8713 (sha256
8714 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8715 (build-system python-build-system)
8716 (propagated-inputs
8717 `(("python-attrs" ,python-attrs)
8718 ("python-more-itertools" ,python-more-itertools)))
8719 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8720 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8721 (description
8722 "This is a plugin for the Python code checking tool Flake8 to encourage
8723 correct string literal concatenation.
8724
8725 It looks for style problems like implicitly concatenated string literals on
8726 the same line (which can be introduced by the code formating tool Black), or
8727 unnecessary plus operators for explicit string literal concatenation.")
8728 (license license:expat)))
8729
8730 (define-public python-flake8-polyfill
8731 (package
8732 (name "python-flake8-polyfill")
8733 (version "1.0.2")
8734 (source
8735 (origin
8736 (method url-fetch)
8737 (uri (pypi-uri "flake8-polyfill" version))
8738 (sha256
8739 (base32
8740 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8741 (build-system python-build-system)
8742 (arguments
8743 '(#:phases
8744 (modify-phases %standard-phases
8745 (replace 'check
8746 (lambda _
8747 ;; Be compatible with Pytest 4:
8748 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8749 (substitute* "setup.cfg"
8750 (("\\[pytest\\]")
8751 "[tool:pytest]"))
8752
8753 (setenv "PYTHONPATH"
8754 (string-append (getcwd) "/build/lib:"
8755 (getenv "PYTHONPATH")))
8756 (invoke "py.test" "-v"))))))
8757 (native-inputs
8758 `(("python-flake8" ,python-flake8)
8759 ("python-mock" ,python-mock)
8760 ("python-pep8" ,python-pep8)
8761 ("python-pycodestyle" ,python-pycodestyle)
8762 ("python-pytest" ,python-pytest)))
8763 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8764 (synopsis "Polyfill package for Flake8 plugins")
8765 (description
8766 "This package that provides some compatibility helpers for Flake8
8767 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8768 (license license:expat)))
8769
8770 (define-public python2-flake8-polyfill
8771 (package-with-python2 python-flake8-polyfill))
8772
8773 (define-public python-flake8-print
8774 (package
8775 (name "python-flake8-print")
8776 (version "4.0.0")
8777 (source
8778 (origin
8779 (method url-fetch)
8780 (uri (pypi-uri "flake8-print" version))
8781 (sha256
8782 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8783 (build-system python-build-system)
8784 (propagated-inputs
8785 `(("python-flake8" ,python-flake8)
8786 ("python-pycodestyle" ,python-pycodestyle)
8787 ("python-six" ,python-six)))
8788 (home-page "https://github.com/jbkahn/flake8-print")
8789 (synopsis "Print statement checker plugin for Flake8")
8790 (description
8791 "This plugin for Flake8 checks for @code{print} statements in Python
8792 files.")
8793 (license license:expat)))
8794
8795 (define-public python-flake8-pyi
8796 (package
8797 (name "python-flake8-pyi")
8798 (version "20.5.0")
8799 (source
8800 (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "flake8-pyi" version))
8803 (sha256
8804 (base32
8805 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8806 (build-system python-build-system)
8807 (propagated-inputs
8808 `(("python-attrs" ,python-attrs)
8809 ("python-flake8" ,python-flake8)
8810 ("python-pyflakes" ,python-pyflakes)))
8811 (home-page "https://github.com/ambv/flake8-pyi")
8812 (synopsis
8813 "Flake8 plugin that provides specializations for type hinting stub files")
8814 (description
8815 "This package contains a plugin that provides specializations for
8816 type hinting stub files, especially interesting for linting typeshed. It
8817 adds the @file{.pyi} extension to the default value of the @code{--filename}
8818 command-line argument to Flake8. This means stubs are linted by default with
8819 this plugin enabled, without needing to explicitly list every file. It
8820 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8821 expressions after the entire file has been read. This enables support for
8822 first-class forward references that stub files use.")
8823 (license license:expat)))
8824
8825 (define-public python-flake8-pie
8826 (package
8827 (name "python-flake8-pie")
8828 (version "0.5.0")
8829 (source
8830 (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "flake8-pie" version))
8833 (sha256
8834 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8835 (build-system python-build-system)
8836 (home-page "https://github.com/sbdchd/flake8-pie")
8837 (synopsis "Flake8 extension that implements lints")
8838 (description
8839 "This package provides a flake8 extension that implements miscellaneous
8840 lints.")
8841 (license license:bsd-2)))
8842
8843 (define-public python-autoflake
8844 (package
8845 (name "python-autoflake")
8846 (version "1.3.1")
8847 (source
8848 (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "autoflake" version))
8851 (sha256
8852 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8853 (build-system python-build-system)
8854 (propagated-inputs
8855 `(("python-pyflakes" ,python-pyflakes)))
8856 (home-page "https://github.com/myint/autoflake")
8857 (synopsis "Removes unused imports and unused variables")
8858 (description
8859 "@code{autoflake} removes unused imports and unused variables from Python
8860 code as reported by @code{pyflakes}.
8861
8862 By default, it only removes unused imports for modules that are part of the
8863 standard library. Removal of unused variables is also disabled by default.
8864 It also removes useless @code{pass} statements.")
8865 (license license:expat)))
8866
8867 (define-public python-mistune
8868 (package
8869 (name "python-mistune")
8870 (version "0.8.4")
8871 (source
8872 (origin
8873 (method url-fetch)
8874 (uri (pypi-uri "mistune" version))
8875 (sha256
8876 (base32
8877 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8878 (build-system python-build-system)
8879 (native-inputs
8880 `(("python-nose" ,python-nose)
8881 ("python-cython" ,python-cython)))
8882 (home-page "https://github.com/lepture/mistune")
8883 (synopsis "Markdown parser in pure Python")
8884 (description "This package provides a fast markdown parser in pure
8885 Python.")
8886 (license license:bsd-3)))
8887
8888 (define-public python2-mistune
8889 (package-with-python2 python-mistune))
8890
8891 (define-public python-markdown
8892 (package
8893 (name "python-markdown")
8894 (version "3.2.1")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "Markdown" version))
8899 (sha256
8900 (base32
8901 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8902 (build-system python-build-system)
8903 (native-inputs
8904 `(("python-nose" ,python-nose)
8905 ("python-pyyaml" ,python-pyyaml)))
8906 (home-page "https://python-markdown.github.io/")
8907 (synopsis "Python implementation of Markdown")
8908 (description
8909 "This package provides a Python implementation of John Gruber's
8910 Markdown. The library features international input, various Markdown
8911 extensions, and several HTML output formats. A command line wrapper
8912 markdown_py is also provided to convert Markdown files to HTML.")
8913 (properties `((python2-variant . ,(delay python2-markdown))))
8914 (license license:bsd-3)))
8915
8916 ;; Markdown 3.2 dropped support for Python 2.
8917 (define-public python2-markdown
8918 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8919 (package/inherit
8920 base
8921 (version "3.1.1")
8922 (source (origin
8923 (method url-fetch)
8924 (uri (pypi-uri "Markdown" version))
8925 (sha256
8926 (base32
8927 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8928
8929 (define-public python-ptyprocess
8930 (package
8931 (name "python-ptyprocess")
8932 (version "0.5.2")
8933 (source
8934 (origin
8935 (method url-fetch)
8936 (uri (pypi-uri "ptyprocess" version))
8937 (sha256
8938 (base32
8939 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8940 (build-system python-build-system)
8941 (native-inputs
8942 `(("python-nose" ,python-nose)))
8943 (arguments
8944 `(#:phases
8945 (modify-phases %standard-phases
8946 (replace 'check
8947 (lambda _ (invoke "nosetests"))))))
8948 (home-page "https://github.com/pexpect/ptyprocess")
8949 (synopsis "Run a subprocess in a pseudo terminal")
8950 (description
8951 "This package provides a Python library used to launch a subprocess in a
8952 pseudo terminal (pty), and interact with both the process and its pty.")
8953 (license license:isc)))
8954
8955 (define-public python2-ptyprocess
8956 (package-with-python2 python-ptyprocess))
8957
8958 (define-public python-cram
8959 (package
8960 (name "python-cram")
8961 (version "0.7")
8962 (home-page "https://bitheap.org/cram/")
8963 (source (origin
8964 (method url-fetch)
8965 (uri (list (string-append home-page "cram-"
8966 version ".tar.gz")
8967 (pypi-uri "cram" version)))
8968 (sha256
8969 (base32
8970 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8971 (arguments
8972 '(#:phases
8973 (modify-phases %standard-phases
8974 (add-after 'unpack 'patch-source
8975 (lambda _
8976 (substitute* (find-files "cram" ".*\\.py$")
8977 ;; Replace default shell path.
8978 (("/bin/sh") (which "sh")))
8979 (substitute* (find-files "tests" ".*\\.t$")
8980 (("md5") "md5sum")
8981 (("/bin/bash") (which "bash"))
8982 (("/bin/sh") (which "sh")))
8983 (substitute* "cram/_test.py"
8984 ;; This hack works around a bug triggered by substituting
8985 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8986 ;; "cram -h", which breaks the output at 80 characters. This
8987 ;; causes the line showing the default shell to break into two
8988 ;; lines, but the test expects a single line...
8989 (("env\\['COLUMNS'\\] = '80'")
8990 "env['COLUMNS'] = '160'"))
8991
8992 (substitute* "Makefile"
8993 ;; Recent versions of python-coverage have caused the test
8994 ;; coverage to decrease (as of version 0.7). Allow that.
8995 (("--fail-under=100")
8996 "--fail-under=90"))
8997
8998 #t))
8999 (replace 'check
9000 ;; The test phase uses the built library and executable.
9001 (lambda* (#:key inputs outputs #:allow-other-keys)
9002 (add-installed-pythonpath inputs outputs)
9003 (setenv "PATH" (string-append (getenv "PATH") ":"
9004 (assoc-ref outputs "out") "/bin"))
9005 (invoke "make" "test"))))))
9006 (build-system python-build-system)
9007 (native-inputs
9008 `(("python-coverage" ,python-coverage)
9009 ("which" ,which)))
9010 (synopsis "Simple testing framework for command line applications")
9011 (description
9012 "Cram is a functional testing framework for command line applications.
9013 Cram tests look like snippets of interactive shell sessions. Cram runs each
9014 command and compares the command output in the test with the command’s actual
9015 output.")
9016 (license license:gpl2+)))
9017
9018 (define-public python2-cram
9019 (package-with-python2 python-cram))
9020
9021 (define-public python-crashtest
9022 (package
9023 (name "python-crashtest")
9024 (version "0.3.1")
9025 (source
9026 (origin
9027 (method url-fetch)
9028 (uri (pypi-uri "crashtest" version))
9029 (sha256
9030 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9031 (build-system python-build-system)
9032 (home-page "https://github.com/sdispater/crashtest")
9033 (synopsis "Manage Python errors with ease")
9034 (description
9035 "Python library that makes exceptions handling and inspection easier.")
9036 (license license:expat)))
9037
9038 (define-public python-straight-plugin
9039 (package
9040 (name "python-straight-plugin")
9041 (version "1.4.1")
9042 (source
9043 (origin
9044 (method url-fetch)
9045 (uri (pypi-uri "straight.plugin" version))
9046 (sha256
9047 (base32
9048 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9049 (build-system python-build-system)
9050 (home-page "https://github.com/ironfroggy/straight.plugin")
9051 (synopsis "Simple namespaced plugin facility")
9052 (description "Straight Plugin provides a type of plugin you can create from
9053 almost any existing Python modules, and an easy way for outside developers to
9054 add functionality and customization to your projects with their own plugins.")
9055 (license license:expat)))
9056
9057 (define-public python2-straight-plugin
9058 (package-with-python2 python-straight-plugin))
9059
9060 (define-public python-fonttools
9061 (package
9062 (name "python-fonttools")
9063 (version "4.6.0")
9064 (source (origin
9065 (method url-fetch)
9066 (uri (pypi-uri "fonttools" version ".zip"))
9067 (sha256
9068 (base32
9069 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9070 (build-system python-build-system)
9071 (native-inputs
9072 `(("unzip" ,unzip)
9073 ("python-pytest" ,python-pytest)
9074 ("python-pytest-runner" ,python-pytest-runner)))
9075 (home-page "https://github.com/fonttools/fonttools")
9076 (synopsis "Tools to manipulate font files")
9077 (description
9078 "FontTools/TTX is a library to manipulate font files from Python. It
9079 supports reading and writing of TrueType/OpenType fonts, reading and writing
9080 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9081 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9082 from an XML-based format.")
9083 (license license:expat)))
9084
9085 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9086 (define-public python2-fonttools
9087 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9088 (package/inherit
9089 base
9090 (version "3.44.0")
9091 (source (origin
9092 (method url-fetch)
9093 (uri (pypi-uri "fonttools" version ".zip"))
9094 (sha256
9095 (base32
9096 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9097
9098 (define-public python-ly
9099 (package
9100 (name "python-ly")
9101 (version "0.9.5")
9102 (source
9103 (origin
9104 (method url-fetch)
9105 (uri (pypi-uri name version))
9106 (sha256
9107 (base32
9108 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9109 (build-system python-build-system)
9110 (arguments
9111 ;; FIXME: Some tests need network access.
9112 '(#:tests? #f))
9113 (synopsis "Tool and library for manipulating LilyPond files")
9114 (description "This package provides a Python library to parse, manipulate
9115 or create documents in LilyPond format. A command line program ly is also
9116 provided that can be used to do various manipulations with LilyPond files.")
9117 (home-page "https://pypi.org/project/python-ly/")
9118 (license license:gpl2+)))
9119
9120 (define-public python-appdirs
9121 (package
9122 (name "python-appdirs")
9123 (version "1.4.3")
9124 (source
9125 (origin
9126 (method url-fetch)
9127 (uri (pypi-uri "appdirs" version))
9128 (sha256
9129 (base32
9130 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9131 (build-system python-build-system)
9132 (home-page "https://github.com/ActiveState/appdirs")
9133 (synopsis
9134 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9135 (description
9136 "This module provides a portable way of finding out where user data
9137 should be stored on various operating systems.")
9138 (license license:expat)))
9139
9140 (define-public python2-appdirs
9141 (package-with-python2 python-appdirs))
9142
9143 (define-public python-gorilla
9144 (package
9145 (name "python-gorilla")
9146 (version "0.3.0")
9147 (source (origin
9148 (method url-fetch)
9149 (uri (pypi-uri "gorilla" version))
9150 (sha256
9151 (base32
9152 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9153 (build-system python-build-system)
9154 (home-page "https://github.com/christophercrouzet/gorilla")
9155 (synopsis "Convenient monkey patching with Python")
9156 (description
9157 "Gorilla is a Python library that provides a convenient approach to
9158 monkey patching. Monkey patching is the process of modifying module and
9159 class attributes at runtime with the purpose of replacing or extending
9160 third-party code.")
9161 (license license:expat)))
9162
9163 (define-public python-llfuse
9164 (package
9165 (name "python-llfuse")
9166 (version "1.3.8")
9167 (source (origin
9168 (method url-fetch)
9169 (uri (pypi-uri "llfuse" version))
9170 (sha256
9171 (base32
9172 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9173 (build-system python-build-system)
9174 (inputs
9175 `(("fuse" ,fuse)
9176 ("attr" ,attr)))
9177 (native-inputs
9178 `(("pkg-config" ,pkg-config)))
9179 (synopsis "Python bindings for FUSE")
9180 (description
9181 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9182 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9183 (license license:lgpl2.0+)
9184 (properties `((python2-variant . ,(delay python2-llfuse))))))
9185
9186 (define-public python2-llfuse
9187 (let ((base (package-with-python2
9188 (strip-python2-variant python-llfuse))))
9189 (package/inherit base
9190 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9191
9192 (define-public python-msgpack
9193 (package
9194 (name "python-msgpack")
9195 (version "1.0.0")
9196 (source (origin
9197 (method url-fetch)
9198 (uri (pypi-uri "msgpack" version))
9199 (sha256
9200 (base32
9201 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9202 (build-system python-build-system)
9203 (arguments
9204 `(#:modules ((guix build utils)
9205 (guix build python-build-system)
9206 (ice-9 ftw)
9207 (srfi srfi-1)
9208 (srfi srfi-26))
9209 #:phases
9210 (modify-phases %standard-phases
9211 (replace 'check
9212 (lambda _
9213 (let ((cwd (getcwd)))
9214 (setenv "PYTHONPATH"
9215 (string-append cwd "/build/"
9216 (find (cut string-prefix? "lib" <>)
9217 (scandir (string-append cwd "/build")))
9218 ":"
9219 (getenv "PYTHONPATH")))
9220 (invoke "pytest" "-v" "test")))))))
9221 (native-inputs
9222 `(("python-pytest" ,python-pytest)))
9223 (synopsis "MessagePack (de)serializer")
9224 (description "MessagePack is a fast, compact binary serialization format,
9225 suitable for similar data to JSON. This package provides CPython bindings for
9226 reading and writing MessagePack data.")
9227 (home-page "https://pypi.org/project/msgpack/")
9228 (license license:asl2.0)))
9229
9230 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9231 ;; release 0.5. Some packages like borg still call it by the old name for now.
9232 ;; <https://bugs.gnu.org/30662>
9233 (define-public python-msgpack-transitional
9234 (package
9235 (inherit python-msgpack)
9236 (name "python-msgpack-transitional")
9237 (version "0.5.6")
9238 (source (origin
9239 (method url-fetch)
9240 (uri (pypi-uri "msgpack" version))
9241 (sha256
9242 (base32
9243 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9244 (arguments
9245 (substitute-keyword-arguments (package-arguments python-msgpack)
9246 ((#:phases phases)
9247 `(modify-phases ,phases
9248 (add-after 'unpack 'configure-transitional
9249 (lambda _
9250 ;; Keep using the old name.
9251 (substitute* "setup.py"
9252 (("TRANSITIONAL = False")
9253 "TRANSITIONAL = 1"))
9254 #t))))))))
9255
9256 (define-public python2-msgpack
9257 (package-with-python2 python-msgpack))
9258
9259 (define-public python-netaddr
9260 (package
9261 (name "python-netaddr")
9262 (version "0.7.19")
9263 (source
9264 (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "netaddr" version))
9267 (sha256
9268 (base32
9269 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9270 (build-system python-build-system)
9271 (arguments `(#:tests? #f)) ;; No tests.
9272 (home-page "https://github.com/drkjam/netaddr/")
9273 (synopsis "Pythonic manipulation of network addresses")
9274 (description
9275 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9276 and MAC network addresses.")
9277 (license license:bsd-3)))
9278
9279 (define-public python2-netaddr
9280 (package-with-python2 python-netaddr))
9281
9282 (define-public python2-pyroute2
9283 (package
9284 (name "python2-pyroute2")
9285 (version "0.5.6")
9286 (source
9287 (origin
9288 (method url-fetch)
9289 (uri (pypi-uri "pyroute2" version))
9290 (sha256
9291 (base32
9292 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9293 (build-system python-build-system)
9294 (arguments
9295 `(#:python ,python-2)) ;Python 3.x is not supported
9296 (home-page "https://github.com/svinota/pyroute2")
9297 (synopsis "Python netlink library")
9298 (description
9299 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9300 Supported netlink families and protocols include:
9301 @itemize
9302 @item rtnl, network settings - addresses, routes, traffic controls
9303 @item nfnetlink - netfilter API: ipset, nftables, ...
9304 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9305 @item devlink - manage and monitor devlink-enabled hardware
9306 @item generic - generic netlink families
9307 @itemize
9308 @item nl80211 - wireless functions API (basic support)
9309 @item taskstats - extended process statistics
9310 @item acpi_events - ACPI events monitoring
9311 @item thermal_events - thermal events monitoring
9312 @item VFS_DQUOT - disk quota events monitoring
9313 @end itemize
9314 @end itemize")
9315 (license license:gpl2+)))
9316
9317 (define-public python-wrapt
9318 (package
9319 (name "python-wrapt")
9320 (version "1.11.2")
9321 (source
9322 (origin
9323 (method url-fetch)
9324 (uri (pypi-uri "wrapt" version))
9325 (sha256
9326 (base32
9327 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9328 (build-system python-build-system)
9329 (arguments
9330 ;; Tests are not included in the tarball, they are only available in the
9331 ;; git repository.
9332 `(#:tests? #f))
9333 (home-page "https://github.com/GrahamDumpleton/wrapt")
9334 (synopsis "Module for decorators, wrappers and monkey patching")
9335 (description
9336 "The aim of the wrapt module is to provide a transparent object proxy for
9337 Python, which can be used as the basis for the construction of function
9338 wrappers and decorator functions.")
9339 (license license:bsd-2)))
9340
9341 (define-public python2-wrapt
9342 (package-with-python2 python-wrapt))
9343
9344 (define-public python-commonmark
9345 (package
9346 (name "python-commonmark")
9347 (version "0.9.1")
9348 (source
9349 (origin
9350 (method url-fetch)
9351 (uri (pypi-uri "commonmark" version))
9352 (sha256
9353 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9354 (build-system python-build-system)
9355 (arguments
9356 `(#:phases
9357 (modify-phases %standard-phases
9358 (replace 'check
9359 (lambda* (#:key inputs outputs #:allow-other-keys)
9360 (add-installed-pythonpath inputs outputs)
9361 (invoke "python" "setup.py" "test"))))))
9362 (home-page "https://github.com/readthedocs/commonmark.py")
9363 (synopsis "Python parser for the CommonMark Markdown spec")
9364 (description
9365 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9366 Markdown parser and renderer for the CommonMark specification, using only
9367 native modules.")
9368 (license license:bsd-3)))
9369
9370 (define-public python-xlrd
9371 (package
9372 (name "python-xlrd")
9373 (version "1.2.0")
9374 (source (origin
9375 (method url-fetch)
9376 (uri (pypi-uri "xlrd" version))
9377 (sha256
9378 (base32
9379 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9380 (build-system python-build-system)
9381 (arguments
9382 `(#:phases
9383 (modify-phases %standard-phases
9384 ;; Some tests depend on writing a temporary file to the user's home
9385 ;; directory.
9386 (add-after 'unpack 'fix-tests
9387 (lambda _
9388 (delete-file "tests/test_open_workbook.py")
9389 #t)))))
9390 (home-page "http://www.python-excel.org/")
9391 (synopsis "Library for extracting data from Excel files")
9392 (description "This package provides a library to extract data from
9393 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9394 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9395 Unicode-aware. It is not intended as an end-user tool.")
9396 (license license:bsd-3)))
9397
9398 (define-public python2-xlrd
9399 (package-with-python2 python-xlrd))
9400
9401 (define-public python-immutables
9402 (package
9403 (name "python-immutables")
9404 (version "0.14")
9405 (source
9406 (origin
9407 (method url-fetch)
9408 (uri (pypi-uri "immutables" version))
9409 (sha256
9410 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9411 (build-system python-build-system)
9412 (home-page "https://github.com/MagicStack/immutables")
9413 (synopsis "High-performance immutable mapping type for Python")
9414 (description
9415 "An immutable mapping type for Python. The underlying datastructure is a
9416 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9417 functional languages.")
9418 (license license:asl2.0)))
9419
9420 (define-public python-prettytable
9421 (package
9422 (name "python-prettytable")
9423 (version "0.7.2")
9424 (source
9425 (origin
9426 (method url-fetch)
9427 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9428 (sha256
9429 (base32
9430 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9431 (build-system python-build-system)
9432 (home-page "https://code.google.com/archive/p/prettytable/")
9433 (synopsis "Display tabular data in an ASCII table format")
9434 (description
9435 "A library designed to represent tabular data in visually appealing ASCII
9436 tables. PrettyTable allows for selection of which columns are to be printed,
9437 independent alignment of columns (left or right justified or centred) and
9438 printing of sub-tables by specifying a row range.")
9439 (license license:bsd-3)))
9440
9441 (define-public python2-prettytable
9442 (package-with-python2 python-prettytable))
9443
9444 (define-public python-curio
9445 (package
9446 (name "python-curio")
9447 (version "1.2")
9448 (source
9449 (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "curio" version))
9452 (sha256
9453 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9454 (build-system python-build-system)
9455 (arguments
9456 `(#:phases
9457 (modify-phases %standard-phases
9458 (replace 'check
9459 (lambda* (#:key inputs outputs #:allow-other-keys)
9460 (add-installed-pythonpath inputs outputs)
9461 (invoke "pytest" "-vv" "-k"
9462 ;; Tries to open an outgoing connection.
9463 "not test_ssl_outgoing"))))))
9464 (native-inputs
9465 `(("python-pytest" ,python-pytest)))
9466 (home-page "https://github.com/dabeaz/curio")
9467 (synopsis "Coroutine-based library for concurrent Python")
9468 (description
9469 "Curio is a coroutine-based library for concurrent Python systems
9470 programming. It provides standard programming abstractions such as as
9471 tasks, sockets, files, locks, and queues.")
9472 (license license:bsd-3)))
9473
9474 (define-public python-tables
9475 (package
9476 (name "python-tables")
9477 (version "3.6.1")
9478 (source
9479 (origin
9480 (method url-fetch)
9481 (uri (pypi-uri "tables" version))
9482 (sha256
9483 (base32
9484 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9485 (modules '((guix build utils)))
9486 (snippet
9487 '(begin
9488 ;; Remove pre-compiled .pyc files from source.
9489 (for-each delete-file-recursively
9490 (find-files "." "__pycache__" #:directories? #t))
9491 (for-each delete-file (find-files "." "\\.pyc$"))
9492 #t))))
9493 (build-system python-build-system)
9494 (arguments
9495 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9496 ;; or "check", so we must override the build and check phases.
9497 #:phases
9498 (modify-phases %standard-phases
9499 (add-after 'unpack 'use-gcc
9500 (lambda _
9501 (substitute* "setup.py"
9502 (("^( +)compiler = new_compiler\\(\\)" line indent)
9503 (string-append line
9504 "\n"
9505 indent
9506 "compiler.set_executables(compiler='gcc',"
9507 "compiler_so='gcc',"
9508 "linker_exe='gcc',"
9509 "linker_so='gcc -shared')")))
9510 #t))
9511 (add-after 'unpack 'disable-tuning
9512 (lambda _
9513 (substitute* "setup.py"
9514 (("cpu_flags = .*")
9515 "cpu_flags = ['sse2']\n"))
9516 #t))
9517 (replace 'build
9518 (lambda* (#:key inputs #:allow-other-keys)
9519 (invoke "python" "setup.py" "build"
9520 (string-append "--hdf5="
9521 (assoc-ref inputs "hdf5")))))
9522 (replace 'check
9523 (lambda* (#:key inputs #:allow-other-keys)
9524 (invoke "python" "setup.py" "check"
9525 (string-append "--hdf5="
9526 (assoc-ref inputs "hdf5"))))))))
9527 (propagated-inputs
9528 `(("python-numexpr" ,python-numexpr)
9529 ("python-numpy" ,python-numpy)))
9530 (native-inputs
9531 `(("python-cython" ,python-cython)
9532 ("pkg-config" ,pkg-config)))
9533 (inputs
9534 `(("hdf5" ,hdf5-1.10)
9535 ("bzip2" ,bzip2)
9536 ("zlib" ,zlib)))
9537 (home-page "https://www.pytables.org/")
9538 (synopsis "Hierarchical datasets for Python")
9539 (description "PyTables is a package for managing hierarchical datasets and
9540 designed to efficiently cope with extremely large amounts of data.")
9541 (license license:bsd-3)))
9542
9543 (define-public python2-tables
9544 (package-with-python2 python-tables))
9545
9546 (define-public python-sniffio
9547 (package
9548 (name "python-sniffio")
9549 (version "1.1.0")
9550 (source
9551 (origin
9552 (method url-fetch)
9553 (uri (pypi-uri "sniffio" version))
9554 (sha256
9555 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9556 (build-system python-build-system)
9557 (arguments
9558 `(#:phases
9559 (modify-phases %standard-phases
9560 (replace 'check
9561 (lambda _
9562 (invoke "pytest" "-vv"))))))
9563 (native-inputs
9564 `(("python-curio" ,python-curio)
9565 ("python-pytest" ,python-pytest)
9566 ("python-pytest-cov" ,python-pytest-cov)))
9567 (home-page "https://github.com/python-trio/sniffio")
9568 (synopsis "Detect which async library a program is running under")
9569 (description "This package detects which async library a program is
9570 running under. It supports multiple async I/O packages, like Trio, and
9571 asyncio.")
9572 ;; Either license applies.
9573 (license (list license:expat license:asl2.0))))
9574
9575 (define-public python-pytest-black
9576 (package
9577 (name "python-pytest-black")
9578 (version "0.3.8")
9579 (source
9580 (origin
9581 (method url-fetch)
9582 (uri (pypi-uri "pytest-black" version))
9583 (sha256
9584 (base32
9585 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9586 (build-system python-build-system)
9587 (propagated-inputs
9588 `(("python-pytest" ,python-pytest)
9589 ("python-black" ,python-black)
9590 ("python-toml" ,python-toml)))
9591 (native-inputs
9592 `(("python-setuptools-scm" ,python-setuptools-scm)))
9593 (home-page "https://github.com/shopkeep/pytest-black")
9594 (synopsis "Pytest plugin to enable format checking with black")
9595 (description
9596 "This package provides a pytest plugin to enable format checking with the
9597 Python code formatter \"black\".")
9598 (license license:expat)))
9599
9600 (define-public python-get-version
9601 (package
9602 (name "python-get-version")
9603 (version "2.1")
9604 (source
9605 (origin
9606 (method url-fetch)
9607 (uri (pypi-uri "get_version" version))
9608 (sha256
9609 (base32
9610 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9611 (build-system python-build-system)
9612 (propagated-inputs
9613 `(("python-pygments" ,python-pygments)
9614 ("python-pytest" ,python-pytest)
9615 ("python-pytest-black" ,python-pytest-black)
9616 ("python-pytest-cov" ,python-pytest-cov)
9617 ("python-setuptools" ,python-setuptools)
9618 ("python-testpath" ,python-testpath)))
9619 (home-page "https://github.com/flying-sheep/get_version")
9620 (synopsis "Version helper in the spirit of versioneer")
9621 (description
9622 "This package provides a version helper that lets you automatically use
9623 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9624 also supports getting the version from Python source distributions or, once
9625 your package is installed, via @code{pkg_resources} (part of
9626 @code{setuptools}).")
9627 (license license:gpl3+)))
9628
9629 (define-public python-legacy-api-wrap
9630 (package
9631 (name "python-legacy-api-wrap")
9632 (version "1.2")
9633 (source
9634 (origin
9635 (method url-fetch)
9636 (uri (pypi-uri "legacy-api-wrap" version))
9637 (sha256
9638 (base32
9639 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9640 (build-system python-build-system)
9641 (propagated-inputs
9642 `(("python-get-version" ,python-get-version)
9643 ("python-pytest" ,python-pytest)
9644 ("python-pytest-black" ,python-pytest-black)
9645 ("python-pytest-cov" ,python-pytest-cov)
9646 ("python-setuptools" ,python-setuptools)))
9647 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9648 (synopsis "Legacy API wrapper")
9649 (description "This module defines a decorator to wrap legacy APIs. The
9650 primary use case is APIs defined before keyword-only parameters existed.")
9651 (license license:gpl3+)))
9652
9653 (define-public python-pyasn1
9654 (package
9655 (name "python-pyasn1")
9656 (version "0.4.8")
9657 (source
9658 (origin
9659 (method url-fetch)
9660 (uri (pypi-uri "pyasn1" version))
9661 (sha256
9662 (base32
9663 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9664 (build-system python-build-system)
9665 (home-page "http://pyasn1.sourceforge.net/")
9666 (synopsis "ASN.1 types and codecs")
9667 (description
9668 "This is an implementation of ASN.1 types and codecs in Python. It is
9669 suitable for a wide range of protocols based on the ASN.1 specification.")
9670 (license license:bsd-2)))
9671
9672 (define-public python2-pyasn1
9673 (package-with-python2 python-pyasn1))
9674
9675 (define-public python-pyasn1-modules
9676 (package
9677 (name "python-pyasn1-modules")
9678 (version "0.2.2")
9679 (source
9680 (origin
9681 (method url-fetch)
9682 (uri (pypi-uri "pyasn1-modules" version))
9683 (sha256
9684 (base32
9685 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9686 (build-system python-build-system)
9687 (propagated-inputs
9688 `(("python-pyasn1" ,python-pyasn1)))
9689 (home-page "https://sourceforge.net/projects/pyasn1/")
9690 (synopsis "ASN.1 codec implementations")
9691 (description
9692 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9693 implementations of ASN.1-based codecs and protocols.")
9694 (license license:bsd-3)))
9695
9696 (define-public python2-pyasn1-modules
9697 (package-with-python2 python-pyasn1-modules))
9698
9699 (define-public python-ipaddress
9700 (package
9701 (name "python-ipaddress")
9702 (version "1.0.22")
9703 (source (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "ipaddress" version))
9706 (sha256
9707 (base32
9708 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9709 (build-system python-build-system)
9710 (home-page "https://github.com/phihag/ipaddress")
9711 (synopsis "IP address manipulation library")
9712 (description
9713 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9714 in Python. This library is used to create, poke at, and manipulate IPv4 and
9715 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9716 module to older versions of Python.")
9717 (license license:psfl)))
9718
9719 (define-public python2-ipaddress
9720 (package-with-python2 python-ipaddress))
9721
9722 (define-public python2-ipaddr
9723 (package
9724 (name "python2-ipaddr")
9725 (version "2.1.11")
9726 (source
9727 (origin
9728 (method url-fetch)
9729 (uri (pypi-uri "ipaddr" version))
9730 (sha256
9731 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9732 (build-system python-build-system)
9733 (arguments
9734 `(#:python ,python-2 ;version 2 only
9735 #:phases
9736 (modify-phases %standard-phases
9737 (replace 'check
9738 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9739 (home-page "https://github.com/google/ipaddr-py")
9740 (synopsis "IP address manipulation library")
9741 (description
9742 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9743 IPv6 addresses and networks.
9744
9745 For new implementations you may prefer to use the standard module
9746 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9747 versions of Python.")
9748 (license license:asl2.0)))
9749
9750 (define-public python-idna
9751 (package
9752 (name "python-idna")
9753 (version "2.10")
9754 (source
9755 (origin
9756 (method url-fetch)
9757 (uri (pypi-uri "idna" version))
9758 (sha256
9759 (base32
9760 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9761 (build-system python-build-system)
9762 (home-page "https://github.com/kjd/idna")
9763 (synopsis "Internationalized domain names in applications")
9764 (description
9765 "This is a library to support the Internationalised Domain Names in
9766 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9767 protocol is often referred to as “IDNA2008” and can produce different results
9768 from the earlier standard from 2003. The library is also intended to act as a
9769 suitable drop-in replacement for the “encodings.idna” module that comes with
9770 the Python standard library but currently only supports the older 2003
9771 specification.")
9772 (license license:bsd-4)))
9773
9774 (define-public python-idna-2.7
9775 (package (inherit python-idna)
9776 (version "2.7")
9777 (source (origin
9778 (method url-fetch)
9779 (uri (pypi-uri "idna" version))
9780 (sha256
9781 (base32
9782 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9783
9784
9785 (define-public python2-idna
9786 (package-with-python2 python-idna))
9787
9788 (define-public python-libsass
9789 (package
9790 (name "python-libsass")
9791 (version "0.20.1")
9792 (source
9793 (origin
9794 ;; PyPI tarball is missing some test files.
9795 (method git-fetch)
9796 (uri (git-reference
9797 (url "https://github.com/sass/libsass-python")
9798 (commit version)))
9799 (file-name (git-file-name name version))
9800 (sha256
9801 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9802 (build-system python-build-system)
9803 (arguments
9804 `(#:phases
9805 (modify-phases %standard-phases
9806 ;; Use Guix package of libsass instead of compiling from a checkout.
9807 (add-before 'build 'set-libsass
9808 (lambda _
9809 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9810 #t))
9811 (replace 'check
9812 (lambda* (#:key inputs outputs #:allow-other-keys)
9813 (add-installed-pythonpath inputs outputs)
9814 (invoke "pytest" "sasstests.py"))))))
9815 (native-inputs
9816 `(("python-pytest" ,python-pytest)
9817 ("python-werkzeug" ,python-werkzeug)))
9818 (inputs
9819 `(("libsass" ,libsass)))
9820 (propagated-inputs
9821 `(("python-six" ,python-six)))
9822 (home-page "https://sass.github.io/libsass-python/")
9823 (synopsis "Straightforward binding of libsass for Python")
9824 (description
9825 "This package provides a simple Python extension module @code{sass} which
9826 is binding LibSass.")
9827 (license license:expat)))
9828
9829 (define-public python-idna-ssl
9830 (package
9831 (name "python-idna-ssl")
9832 (version "1.0.1")
9833 (source
9834 (origin
9835 (method url-fetch)
9836 (uri (pypi-uri "idna-ssl" version))
9837 (sha256
9838 (base32
9839 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9840 (build-system python-build-system)
9841 (arguments
9842 `(#:tests? #f)) ;circular dependency with python-aiohttp
9843 (home-page "https://github.com/aio-libs/idna-ssl")
9844 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9845 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9846 domains support.")
9847 (license license:expat)))
9848
9849 (define-public python-pretend
9850 (package
9851 (name "python-pretend")
9852 (version "1.0.9")
9853 (source
9854 (origin
9855 (method url-fetch)
9856 (uri (pypi-uri "pretend" version))
9857 (sha256
9858 (base32
9859 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9860 (build-system python-build-system)
9861 (home-page "https://github.com/alex/pretend")
9862 (synopsis "Library for stubbing in Python")
9863 (description
9864 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9865 technique for writing tests. You may hear the term mixed up with mocks,
9866 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9867 responses, rather than doing any computation.")
9868 (license license:bsd-3)))
9869
9870 (define-public python2-pretend
9871 (package-with-python2 python-pretend))
9872
9873 (define-public python-pip
9874 (package
9875 (name "python-pip")
9876 (version "20.2.4")
9877 (source
9878 (origin
9879 (method url-fetch)
9880 (uri (pypi-uri "pip" version))
9881 (sha256
9882 (base32
9883 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9884 (build-system python-build-system)
9885 (arguments
9886 '(#:tests? #f)) ; there are no tests in the pypi archive.
9887 (home-page "https://pip.pypa.io/")
9888 (synopsis "Package manager for Python software")
9889 (description
9890 "Pip is a package manager for Python software, that finds packages on the
9891 Python Package Index (PyPI).")
9892 (license license:expat)))
9893
9894 (define-public python2-pip
9895 (package-with-python2 python-pip))
9896
9897 (define-public python-tlsh
9898 (package
9899 (name "python-tlsh")
9900 (version "3.4.5")
9901 (home-page "https://github.com/trendmicro/tlsh")
9902 (source
9903 (origin
9904 (method git-fetch)
9905 (uri (git-reference
9906 (url "https://github.com/trendmicro/tlsh")
9907 (commit (string-append "v" version))))
9908 (file-name (git-file-name name version))
9909 (sha256
9910 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9911 (build-system cmake-build-system)
9912 (arguments
9913 '(#:out-of-source? #f
9914 #:phases (modify-phases %standard-phases
9915 (replace
9916 'install
9917 (lambda* (#:key outputs #:allow-other-keys)
9918 ;; Build and install the Python bindings. The underlying
9919 ;; C++ library is apparently not meant to be installed.
9920 (let ((out (assoc-ref outputs "out")))
9921 (with-directory-excursion "py_ext"
9922 (and (system* "python" "setup.py" "build")
9923 (system* "python" "setup.py" "install"
9924 (string-append "--prefix=" out))))))))))
9925 (inputs `(("python" ,python-wrapper))) ;for the bindings
9926 (synopsis "Fuzzy matching library for Python")
9927 (description
9928 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9929 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9930 value which can be used for similarity comparisons. Similar objects have
9931 similar hash values, which allows for the detection of similar objects by
9932 comparing their hash values. The byte stream should have a sufficient amount
9933 of complexity; for example, a byte stream of identical bytes will not generate
9934 a hash value.")
9935 (license license:asl2.0)))
9936
9937 (define-public python2-tlsh
9938 (package/inherit python-tlsh
9939 (name "python2-tlsh")
9940 (inputs `(("python" ,python-2)))))
9941
9942 (define-public python-termcolor
9943 (package
9944 (name "python-termcolor")
9945 (version "1.1.0")
9946 (source
9947 (origin
9948 (method url-fetch)
9949 (uri (pypi-uri "termcolor" version))
9950 (sha256
9951 (base32
9952 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9953 (build-system python-build-system)
9954 (arguments
9955 ;; There are no tests.
9956 `(#:tests? #f))
9957 (home-page "https://pypi.org/project/termcolor/")
9958 (synopsis "ANSII Color formatting for terminal output")
9959 (description
9960 "This package provides ANSII Color formatting for output in terminals.")
9961 (license license:expat)))
9962
9963 (define-public python2-termcolor
9964 (package-with-python2 python-termcolor))
9965
9966 (define-public python-terminaltables
9967 (package
9968 (name "python-terminaltables")
9969 (version "3.1.0")
9970 (source
9971 (origin
9972 (method url-fetch)
9973 (uri (pypi-uri "terminaltables" version))
9974 (sha256
9975 (base32
9976 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9977 (build-system python-build-system)
9978 (home-page "https://github.com/Robpol86/terminaltables")
9979 (synopsis
9980 "Generate simple tables in terminals from a nested list of strings")
9981 (description
9982 "This package makes it easy to draw tables in terminal/console
9983 applications from a list of lists of strings. It supports multi-line rows.")
9984 (license license:expat)))
9985
9986 (define-public python-libarchive-c
9987 (package
9988 (name "python-libarchive-c")
9989 (version "2.9")
9990 (source (origin
9991 (method url-fetch)
9992 (uri (pypi-uri "libarchive-c" version))
9993 (sha256
9994 (base32
9995 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9996 (build-system python-build-system)
9997 (arguments
9998 '(#:phases (modify-phases %standard-phases
9999 (add-before
10000 'build 'reference-libarchive
10001 (lambda* (#:key inputs #:allow-other-keys)
10002 ;; Retain the absolute file name of libarchive.so.
10003 (let ((libarchive (assoc-ref inputs "libarchive")))
10004 (substitute* "libarchive/ffi.py"
10005 (("find_library\\('archive'\\)")
10006 (string-append "'" libarchive
10007 "/lib/libarchive.so'"))))))
10008 (replace 'check
10009 (lambda _ (invoke "pytest" "-vv"))))))
10010 (native-inputs
10011 `(("python-mock" ,python-mock)
10012 ("python-pytest" ,python-pytest)))
10013 (inputs
10014 `(("libarchive" ,libarchive)))
10015 (home-page "https://github.com/Changaco/python-libarchive-c")
10016 (synopsis "Python interface to libarchive")
10017 (description
10018 "This package provides Python bindings to libarchive, a C library to
10019 access possibly compressed archives in many different formats. It uses
10020 Python's @code{ctypes} foreign function interface (FFI).")
10021 (license license:lgpl2.0+)))
10022
10023 (define-public python2-libarchive-c
10024 (package-with-python2 python-libarchive-c))
10025
10026 (define-public python-file
10027 (package/inherit file
10028 (name "python-file")
10029 (build-system python-build-system)
10030 (arguments
10031 '(#:tests? #f ;no tests
10032 #:configure-flags '("--single-version-externally-managed" "--root=/")
10033 #:phases (modify-phases %standard-phases
10034 (add-before 'build 'change-directory
10035 (lambda _
10036 (chdir "python")
10037 #t))
10038 (add-before 'build 'set-library-file-name
10039 (lambda* (#:key inputs #:allow-other-keys)
10040 (let ((file (assoc-ref inputs "file")))
10041 (substitute* "magic.py"
10042 (("find_library\\('magic'\\)")
10043 (string-append "'" file "/lib/libmagic.so'")))
10044 #t))))))
10045 (inputs `(("file" ,file)))
10046 (native-inputs (if (%current-target-system)
10047 `(("self" ,this-package))
10048 '()))
10049 (synopsis "Python bindings to the libmagic file type guesser")
10050 (description "This package provides Python bindings to the libmagic file
10051 type guesser.
10052
10053 Note that this module and the @code{python-magic} module both provide a
10054 @file{magic.py} file; these two modules, which are different and were
10055 developed separately, both serve the same purpose: provide Python bindings for
10056 libmagic.")))
10057
10058 (define-public python2-file
10059 (package-with-python2 python-file))
10060
10061 (define-public python-debian
10062 (package
10063 (name "python-debian")
10064 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10065 (version "0.1.36")
10066 (source
10067 (origin
10068 ;; Use git-fetch, as pypi doesn't include test suite.
10069 (method git-fetch)
10070 (uri (git-reference
10071 (url home-page)
10072 (commit version)))
10073 (file-name (git-file-name name version))
10074 (sha256
10075 (base32
10076 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10077 (build-system python-build-system)
10078 (arguments
10079 `(#:phases (modify-phases %standard-phases
10080 (add-after 'unpack 'remove-debian-specific-tests
10081 ;; python-apt, apt and dpkg are not yet available in guix,
10082 ;; and these tests heavily depend on them.
10083 (lambda _
10084 (delete-file "lib/debian/tests/test_deb822.py")
10085 (delete-file "lib/debian/tests/test_debfile.py")
10086 #t)))))
10087 (propagated-inputs
10088 `(("python-six" ,python-six)
10089 ("python-chardet" ,python-chardet)))
10090 (synopsis "Debian package related modules")
10091 (description
10092 ;; XXX: Use @enumerate instead of @itemize to work around
10093 ;; <http://bugs.gnu.org/21772>.
10094 "This package provides Python modules that abstract many formats of
10095 Debian-related files, such as:
10096
10097 @enumerate
10098 @item Debtags information;
10099 @item @file{debian/changelog} files;
10100 @item packages files, pdiffs;
10101 @item control files of single or multiple RFC822-style paragraphs---e.g.
10102 @file{debian/control}, @file{.changes}, @file{.dsc};
10103 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10104 contained files and meta-information.
10105 @end enumerate\n")
10106
10107 ;; Modules are either GPLv2+ or GPLv3+.
10108 (license license:gpl3+)))
10109
10110 (define-public python-nbformat
10111 (package
10112 (name "python-nbformat")
10113 (version "4.4.0")
10114 (source
10115 (origin
10116 (method url-fetch)
10117 (uri (pypi-uri "nbformat" version))
10118 (sha256
10119 (base32
10120 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10121 (build-system python-build-system)
10122 (arguments `(#:tests? #f)) ; no test target
10123 (propagated-inputs
10124 `(("python-ipython-genutils" ,python-ipython-genutils)
10125 ("python-jsonschema" ,python-jsonschema)
10126 ("python-jupyter-core" ,python-jupyter-core)
10127 ("python-traitlets" ,python-traitlets)))
10128 (home-page "https://jupyter.org")
10129 (synopsis "Jupyter Notebook format")
10130 (description "This package provides the reference implementation of the
10131 Jupyter Notebook format and Python APIs for working with notebooks.")
10132 (license license:bsd-3)))
10133
10134 (define-public python2-nbformat
10135 (package-with-python2 python-nbformat))
10136
10137 (define-public python-bleach
10138 (package
10139 (name "python-bleach")
10140 (version "3.1.5")
10141 (source
10142 (origin
10143 (method url-fetch)
10144 (uri (pypi-uri "bleach" version))
10145 (sha256
10146 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10147 (build-system python-build-system)
10148 (propagated-inputs
10149 `(("python-webencodings" ,python-webencodings)
10150 ("python-six" ,python-six)))
10151 (native-inputs
10152 `(("python-datrie" ,python-datrie)
10153 ("python-genshi" ,python-genshi)
10154 ("python-lxml" ,python-lxml)
10155 ("python-pytest" ,python-pytest)))
10156 (home-page "https://github.com/mozilla/bleach")
10157 (synopsis "Whitelist-based HTML-sanitizing tool")
10158 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10159 (license license:asl2.0)))
10160
10161 (define-public python2-bleach
10162 (package-with-python2 python-bleach))
10163
10164 (define-public python-entrypoints
10165 (package
10166 (name "python-entrypoints")
10167 (version "0.3")
10168 (source
10169 (origin
10170 (method url-fetch)
10171 (uri (pypi-uri "entrypoints" version))
10172 (sha256
10173 (base32
10174 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10175 (build-system python-build-system)
10176 ;; The package does not come with a setup.py file, so we have to generate
10177 ;; one ourselves.
10178 (arguments
10179 `(#:tests? #f
10180 #:phases
10181 (modify-phases %standard-phases
10182 (add-after 'unpack 'create-setup.py
10183 (lambda _
10184 (call-with-output-file "setup.py"
10185 (lambda (port)
10186 (format port "\
10187 from setuptools import setup
10188 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10189 " ,version))))))))
10190 (home-page "https://github.com/takluyver/entrypoints")
10191 (synopsis "Discover and load entry points from installed Python packages")
10192 (description "Entry points are a way for Python packages to advertise
10193 objects with some common interface. The most common examples are
10194 @code{console_scripts} entry points, which define shell commands by
10195 identifying a Python function to run. The @code{entrypoints} module contains
10196 functions to find and load entry points.")
10197 (license license:expat)))
10198
10199 (define-public python2-entrypoints
10200 (package-with-python2 python-entrypoints))
10201
10202 (define-public python-epc
10203 (package
10204 (name "python-epc")
10205 (version "0.0.5")
10206 (source
10207 (origin
10208 (method url-fetch)
10209 (uri (pypi-uri "epc" version))
10210 (sha256
10211 (base32
10212 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10213 (build-system python-build-system)
10214 (propagated-inputs
10215 `(("python-sexpdata" ,python-sexpdata)))
10216 (native-inputs
10217 `(("python-nose" ,python-nose)))
10218 (home-page "https://github.com/tkf/python-epc")
10219 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10220 (description
10221 "Python-EPC can call elisp functions from Python and Python functions
10222 from elisp.")
10223 (license license:gpl3)))
10224
10225 (define-public python-forex-python
10226 (package
10227 (name "python-forex-python")
10228 (version "1.5")
10229 (source
10230 (origin
10231 (method url-fetch)
10232 (uri (pypi-uri "forex-python" version))
10233 (sha256
10234 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10235 (build-system python-build-system)
10236 (arguments
10237 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10238 ;; repository require online data.
10239 `(#:tests? #f))
10240 (propagated-inputs
10241 `(("python-requests" ,python-requests)
10242 ("python-simplejson" ,python-simplejson)))
10243 (home-page "https://github.com/MicroPyramid/forex-python")
10244 (synopsis "Foreign exchange rates and currency conversion")
10245 (description
10246 "@code{python-forex-python} can be used to manipulate foreign
10247 exchange rates and to operate currency conversions.
10248
10249 Features:
10250 @itemize
10251 @item List all currency rates.
10252 @item BitCoin price for all currencies.
10253 @item Converting amount to BitCoins.
10254 @item Get historical rates for any day since 1999.
10255 @item Conversion rate for one currency(ex; USD to INR).
10256 @item Convert amount from one currency to other.('USD 10$' to INR).
10257 @item Currency symbols.
10258 @item Currency names.
10259 @end itemize")
10260 (license license:expat)))
10261
10262 (define-public python-simpleeval
10263 (package
10264 (name "python-simpleeval")
10265 (version "0.9.10")
10266 (source
10267 (origin
10268 (method url-fetch)
10269 (uri (pypi-uri "simpleeval" version))
10270 (sha256
10271 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10272 (build-system python-build-system)
10273 (home-page "https://github.com/danthedeckie/simpleeval")
10274 (synopsis "Simple, safe single expression evaluator library")
10275 (description
10276 "This package provides a quick single file library for easily adding
10277 evaluatable expressions into python projects. Say you want to allow a user
10278 to set an alarm volume, which could depend on the time of day, alarm level,
10279 how many previous alarms had gone off, and if there is music playing at the
10280 time.")
10281 (license license:expat)))
10282
10283 (define-public python-nbconvert
10284 (package
10285 (name "python-nbconvert")
10286 (version "5.0.0b1")
10287 (source
10288 (origin
10289 (method url-fetch)
10290 (uri (pypi-uri "nbconvert" version))
10291 (sha256
10292 (base32
10293 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10294 (build-system python-build-system)
10295 (arguments
10296 `(;; The "bdist_egg" target is disabled by default, causing the installation
10297 ;; to fail.
10298 #:configure-flags (list "bdist_egg")
10299 ;; FIXME: 5 failures, 40 errors.
10300 #:tests? #f))
10301 ;; #:phases
10302 ;; (modify-phases %standard-phases
10303 ;; (replace 'check
10304 ;; (lambda _
10305 ;; (zero? (system* "py.test" "-v")))))
10306 (native-inputs
10307 `(("python-pytest" ,python-pytest)))
10308 (propagated-inputs
10309 `(("python-bleach" ,python-bleach)
10310 ("python-entrypoints" ,python-entrypoints)
10311 ("python-jinja2" ,python-jinja2)
10312 ("python-jupyter-core" ,python-jupyter-core)
10313 ("python-mistune" ,python-mistune)
10314 ("python-nbformat" ,python-nbformat)
10315 ("python-pygments" ,python-pygments)
10316 ("python-traitlets" ,python-traitlets)))
10317 (home-page "https://jupyter.org")
10318 (synopsis "Converting Jupyter Notebooks")
10319 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10320 notebooks to various other formats via Jinja templates. It allows you to
10321 convert an @code{.ipynb} notebook file into various static formats including:
10322
10323 @enumerate
10324 @item HTML
10325 @item LaTeX
10326 @item PDF
10327 @item Reveal JS
10328 @item Markdown (md)
10329 @item ReStructured Text (rst)
10330 @item executable script
10331 @end enumerate\n")
10332 (license license:bsd-3)))
10333
10334 (define-public python2-nbconvert
10335 (package-with-python2 python-nbconvert))
10336
10337 (define-public python-notebook
10338 (package
10339 (name "python-notebook")
10340 (version "5.7.4")
10341 (source (origin
10342 (method url-fetch)
10343 (uri (pypi-uri "notebook" version))
10344 (sha256
10345 (base32
10346 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10347 (build-system python-build-system)
10348 (arguments
10349 `(#:phases
10350 (modify-phases %standard-phases
10351 (replace 'check
10352 (lambda _
10353 ;; These tests require a browser
10354 (delete-file-recursively "notebook/tests/selenium")
10355 ;; Some tests need HOME
10356 (setenv "HOME" "/tmp")
10357 ;; This file contains "warningfilters", which are not supported
10358 ;; by this version of nose.
10359 (delete-file "setup.cfg")
10360 (with-directory-excursion "/tmp"
10361 (invoke "nosetests" "-v"))
10362 #t)))))
10363 (propagated-inputs
10364 `(("python-jupyter-core" ,python-jupyter-core)
10365 ("python-nbformat" ,python-nbformat)
10366 ("python-nbconvert" ,python-nbconvert)
10367 ("python-prometheus-client" ,python-prometheus-client)
10368 ("python-send2trash" ,python-send2trash)
10369 ("python-terminado" ,python-terminado)))
10370 (native-inputs
10371 `(("python-nose" ,python-nose)
10372 ("python-sphinx" ,python-sphinx)
10373 ("python-requests" ,python-requests)))
10374 (home-page "https://jupyter.org/")
10375 (synopsis "Web-based notebook environment for interactive computing")
10376 (description
10377 "The Jupyter HTML notebook is a web-based notebook environment for
10378 interactive computing.")
10379 (properties `((python2-variant . ,(delay python2-notebook))))
10380 (license license:bsd-3)))
10381
10382 (define-public python2-notebook
10383 (let ((base (package-with-python2
10384 (strip-python2-variant python-notebook))))
10385 (package/inherit base
10386 (native-inputs
10387 `(("python2-mock" ,python2-mock)
10388 ,@(package-native-inputs base)))
10389 (arguments
10390 (substitute-keyword-arguments (package-arguments base)
10391 ((#:phases phases)
10392 `(modify-phases ,phases
10393 (add-before 'check 'disable-test-case
10394 ;; The test requires network access to localhost. Curiously it
10395 ;; fails with Python 2 only. Simply make the test-case return
10396 ;; immediately.
10397 (lambda _
10398 (substitute*
10399 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10400 (("formats = self.nbconvert_api") "return #")))))))))))
10401
10402 (define-public python-widgetsnbextension
10403 (package
10404 (name "python-widgetsnbextension")
10405 (version "3.5.1")
10406 (source
10407 (origin
10408 (method url-fetch)
10409 (uri (pypi-uri "widgetsnbextension" version))
10410 (sha256
10411 (base32
10412 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10413 (build-system python-build-system)
10414 (propagated-inputs
10415 `(("python-ipykernel" ,python-ipykernel)
10416 ("python-notebook" ,python-notebook)))
10417 (native-inputs
10418 `(("python-certifi" ,python-certifi)
10419 ("python-nose" ,python-nose)))
10420 (home-page "https://ipython.org")
10421 (synopsis "IPython HTML widgets for Jupyter")
10422 (description "This package provides interactive HTML widgets for Jupyter
10423 notebooks.")
10424 (license license:bsd-3)))
10425
10426 (define-public python2-widgetsnbextension
10427 (package-with-python2 python-widgetsnbextension))
10428
10429 (define-public python-ipywidgets
10430 (package
10431 (name "python-ipywidgets")
10432 (version "7.5.1")
10433 (source
10434 (origin
10435 (method url-fetch)
10436 (uri (pypi-uri "ipywidgets" version))
10437 (sha256
10438 (base32
10439 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10440 (build-system python-build-system)
10441 (propagated-inputs
10442 `(("python-ipython" ,python-ipython)
10443 ("python-traitlets" ,python-traitlets)
10444 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10445 (native-inputs
10446 `(("python-nose" ,python-nose)
10447 ("python-pytest" ,python-pytest)))
10448 (home-page "https://ipython.org")
10449 (synopsis "IPython HTML widgets for Jupyter")
10450 (description "Ipywidgets are interactive HTML widgets for Jupyter
10451 notebooks and the IPython kernel. Notebooks come alive when interactive
10452 widgets are used. Users gain control of their data and can visualize changes
10453 in the data.")
10454 (license license:bsd-3)))
10455
10456 (define-public python2-ipywidgets
10457 (package-with-python2 python-ipywidgets))
10458
10459 (define-public python-jupyter-console
10460 (package
10461 (name "python-jupyter-console")
10462 (version "6.1.0")
10463 (source
10464 (origin
10465 (method url-fetch)
10466 (uri (pypi-uri "jupyter_console" version))
10467 (sha256
10468 (base32
10469 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10470 (build-system python-build-system)
10471 (propagated-inputs
10472 `(("python-ipykernel" ,python-ipykernel)
10473 ("python-jupyter-client" ,python-jupyter-client)
10474 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10475 ("python-pygments" ,python-pygments)))
10476 (native-inputs
10477 `(("python-nose" ,python-nose)))
10478 (home-page "https://jupyter.org")
10479 (synopsis "Jupyter terminal console")
10480 (description "This package provides a terminal-based console frontend for
10481 Jupyter kernels. It also allows for console-based interaction with non-Python
10482 Jupyter kernels such as IJulia and IRKernel.")
10483 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10484 (license license:bsd-3)))
10485
10486 (define-public python2-jupyter-console
10487 (package
10488 (name "python2-jupyter-console")
10489 (version "5.2.0")
10490 (source
10491 (origin
10492 (method url-fetch)
10493 (uri (pypi-uri "jupyter_console" version))
10494 (sha256
10495 (base32
10496 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10497 (build-system python-build-system)
10498 (arguments
10499 `(#:python ,python-2
10500 #:tests? #f)) ; Tests only run in a TTY.
10501 (propagated-inputs
10502 `(("python2-ipykernel" ,python2-ipykernel)
10503 ("python2-jupyter-client" ,python2-jupyter-client)
10504 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10505 ("python2-pygments" ,python2-pygments)))
10506 (native-inputs
10507 `(("python2-nose" ,python2-nose)))
10508 (home-page "https://jupyter.org")
10509 (synopsis "Jupyter terminal console")
10510 (description "This package provides a terminal-based console frontend for
10511 Jupyter kernels. It also allows for console-based interaction with non-Python
10512 Jupyter kernels such as IJulia and IRKernel.")
10513 (license license:bsd-3)))
10514
10515 ;; The python-ipython and python-jupyter-console require each other. To get
10516 ;; the functionality in both packages working, strip down the
10517 ;; python-jupyter-console package when using it as an input to python-ipython.
10518 (define python-jupyter-console-minimal
10519 (package/inherit python-jupyter-console
10520 (name "python-jupyter-console-minimal")
10521 (arguments
10522 (substitute-keyword-arguments
10523 (package-arguments python-jupyter-console)
10524 ((#:phases phases)
10525 `(modify-phases ,phases
10526 (add-after 'install 'delete-bin
10527 (lambda* (#:key outputs #:allow-other-keys)
10528 ;; Delete the bin files, to avoid conflicts in profiles
10529 ;; where python-ipython and python-jupyter-console are
10530 ;; both present.
10531 (delete-file-recursively
10532 (string-append
10533 (assoc-ref outputs "out") "/bin"))))))))
10534 ;; Remove the python-ipython propagated input, to avoid the cycle
10535 (propagated-inputs
10536 (alist-delete
10537 "python-ipython"
10538 (package-propagated-inputs python-jupyter-console)))))
10539
10540 (define-public python-qtconsole
10541 (package
10542 (name "python-qtconsole")
10543 (version "4.4.3")
10544 (source
10545 (origin
10546 (method url-fetch)
10547 (uri (pypi-uri "qtconsole" version))
10548 (sha256
10549 (base32
10550 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10551 (build-system python-build-system)
10552 (arguments
10553 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10554 ;; but we only have the LTS version 5.x. This means that there might be
10555 ;; runtime errors, but since this is a dependency of the Jupyter package,
10556 ;; and Jupyter can be used without the qtconsole we can overlook this for
10557 ;; now.
10558 `(#:tests? #f
10559 #:phases
10560 (modify-phases %standard-phases
10561 (add-before 'check 'pre-check
10562 (lambda _
10563 (setenv "QT_QPA_PLATFORM" "offscreen")
10564 #t)))))
10565 (propagated-inputs
10566 `(("python-ipykernel" ,python-ipykernel)
10567 ("python-ipython" ,python-ipython)))
10568 (native-inputs
10569 `(("python-pytest" ,python-pytest)))
10570 (home-page "https://jupyter.org")
10571 (synopsis "Jupyter Qt console")
10572 (description "This package provides a Qt-based console for Jupyter with
10573 support for rich media output.")
10574 (license license:bsd-3)))
10575
10576 (define-public python-jsbeautifier
10577 (package
10578 (name "python-jsbeautifier")
10579 (version "1.10.2")
10580 (home-page "https://github.com/beautify-web/js-beautify")
10581 (source (origin
10582 (method git-fetch)
10583 (uri (git-reference
10584 (url home-page)
10585 (commit (string-append "v" version))))
10586 (file-name (git-file-name name version))
10587 (sha256
10588 (base32
10589 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10590 (build-system python-build-system)
10591 (arguments
10592 `(#:phases (modify-phases %standard-phases
10593 (add-after 'unpack 'chdir
10594 (lambda _
10595 ;; The upstream Git repository contains all the code,
10596 ;; but this package only builds the python code.
10597 (chdir "python")
10598 #t))
10599 (add-after 'unpack 'patch-python-six-requirements
10600 (lambda _
10601 (substitute* "python/setup.py"
10602 (("six>=1.12.0")
10603 "six>=1.11.0"))
10604 #t)))))
10605 (propagated-inputs
10606 `(("python-editorconfig" ,python-editorconfig)
10607 ("python-six" ,python-six)))
10608 (native-inputs
10609 `(("python-pytest" ,python-pytest)))
10610 (synopsis "JavaScript unobfuscator and beautifier")
10611 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10612 popular online obfuscators.")
10613 (license license:expat)))
10614
10615 (define-public jupyter
10616 (package
10617 (name "jupyter")
10618 (version "1.0.0")
10619 (source
10620 (origin
10621 (method url-fetch)
10622 (uri (pypi-uri "jupyter" version))
10623 (sha256
10624 (base32
10625 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10626 (build-system python-build-system)
10627 (arguments '(#:tests? #f)) ; there are none.
10628 (propagated-inputs
10629 `(("python-ipykernel" ,python-ipykernel)
10630 ("python-ipywidgets" ,python-ipywidgets)
10631 ("python-jupyter-console" ,python-jupyter-console)
10632 ("python-nbconvert" ,python-nbconvert)
10633 ("python-notebook" ,python-notebook)
10634 ("python-qtconsole" ,python-qtconsole)))
10635 (native-search-paths
10636 (list (search-path-specification
10637 (variable "JUPYTER_PATH")
10638 (files '("share/jupyter")))))
10639 (home-page "https://jupyter.org")
10640 (synopsis "Web application for interactive documents")
10641 (description
10642 "The Jupyter Notebook is a web application that allows you to create and
10643 share documents that contain live code, equations, visualizations and
10644 explanatory text. Uses include: data cleaning and transformation, numerical
10645 simulation, statistical modeling, machine learning and much more.")
10646 (license license:bsd-3)))
10647
10648 (define-public python-chardet
10649 (package
10650 (name "python-chardet")
10651 (version "3.0.4")
10652 (source
10653 (origin
10654 (method url-fetch)
10655 (uri (pypi-uri "chardet" version))
10656 (sha256
10657 (base32
10658 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10659 (native-inputs
10660 `(("python-hypothesis" ,python-hypothesis)
10661 ("python-pytest" ,python-pytest)
10662 ("python-pytest-runner" ,python-pytest-runner)))
10663 (build-system python-build-system)
10664 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10665 (arguments `(#:tests? #f))
10666 (home-page "https://github.com/chardet/chardet")
10667 (synopsis "Universal encoding detector for Python 2 and 3")
10668 (description
10669 "This package provides @code{chardet}, a Python module that can
10670 automatically detect a wide range of file encodings.")
10671 (license license:lgpl2.1+)))
10672
10673 (define-public python2-chardet
10674 (package-with-python2 python-chardet))
10675
10676 (define-public python-docopt
10677 (package
10678 (name "python-docopt")
10679 (version "0.6.2")
10680 (source
10681 (origin
10682 (method git-fetch)
10683 ;; The release on PyPI does not include tests.
10684 (uri (git-reference
10685 (url "https://github.com/docopt/docopt")
10686 (commit version)))
10687 (file-name (git-file-name name version))
10688 (sha256
10689 (base32
10690 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10691 (build-system python-build-system)
10692 (native-inputs
10693 `(("python-pytest" ,python-pytest)))
10694 (arguments
10695 `(#:phases
10696 (modify-phases %standard-phases
10697 (replace 'check
10698 (lambda _ (invoke "py.test"))))))
10699 (home-page "http://docopt.org")
10700 (synopsis "Command-line interface description language for Python")
10701 (description "This library allows the user to define a command-line
10702 interface from a program's help message rather than specifying it
10703 programmatically with command-line parsers like @code{getopt} and
10704 @code{argparse}.")
10705 (license license:expat)))
10706
10707 (define-public python2-docopt
10708 (package-with-python2 python-docopt))
10709
10710 (define-public python-pythondialog
10711 (package
10712 (name "python-pythondialog")
10713 (version "3.4.0")
10714 (source
10715 (origin
10716 (method url-fetch)
10717 (uri (pypi-uri "pythondialog" version))
10718 (sha256
10719 (base32
10720 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10721 (build-system python-build-system)
10722 (arguments
10723 `(#:phases
10724 (modify-phases %standard-phases
10725 (add-after 'unpack 'patch-path
10726 (lambda* (#:key inputs #:allow-other-keys)
10727 (let* ((dialog (assoc-ref inputs "dialog")))
10728 ;; Since this library really wants to grovel the search path, we
10729 ;; must hardcode dialog's store path into it.
10730 (substitute* "dialog.py"
10731 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10732 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10733 #t))))
10734 #:tests? #f)) ; no test suite
10735 (propagated-inputs
10736 `(("dialog" ,dialog)))
10737 (home-page "http://pythondialog.sourceforge.net/")
10738 (synopsis "Python interface to the UNIX dialog utility")
10739 (description "A Python wrapper for the dialog utility. Its purpose is to
10740 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10741 This allows one to make simple text-mode user interfaces on Unix-like systems")
10742 (license license:lgpl2.1)
10743 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10744
10745 (define-public python2-pythondialog
10746 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10747 (package
10748 (inherit base)
10749 (version (package-version python-pythondialog))
10750 (source (origin
10751 (method url-fetch)
10752 (uri (pypi-uri "python2-pythondialog" version))
10753 (sha256
10754 (base32
10755 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10756
10757 (define-public python-configobj
10758 (package
10759 (name "python-configobj")
10760 (version "5.0.6")
10761 (source (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "configobj" version))
10764 (sha256
10765 (base32
10766 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10767 ;; Patch setup.py so it looks for python-setuptools, which is
10768 ;; required to parse the keyword 'install_requires' in setup.py.
10769 (patches (search-patches "python-configobj-setuptools.patch"))))
10770 (build-system python-build-system)
10771 (propagated-inputs
10772 `(("python-six" ,python-six)))
10773 (synopsis "Config file reading, writing and validation")
10774 (description "ConfigObj is a simple but powerful config file reader and
10775 writer: an ini file round tripper. Its main feature is that it is very easy to
10776 use, with a straightforward programmer’s interface and a simple syntax for
10777 config files.")
10778 (home-page "https://github.com/DiffSK/configobj")
10779 (license license:bsd-3)))
10780
10781 (define-public python2-configobj
10782 (package-with-python2 python-configobj))
10783
10784 (define-public python-configargparse
10785 (package
10786 (name "python-configargparse")
10787 (version "1.2.3")
10788 (source (origin
10789 (method url-fetch)
10790 (uri (pypi-uri "ConfigArgParse" version))
10791 (sha256
10792 (base32
10793 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10794 (build-system python-build-system)
10795 (native-inputs
10796 `(("python-pyyaml" ,python-pyyaml)))
10797 (arguments
10798 `(#:phases
10799 (modify-phases %standard-phases
10800 (replace 'check
10801 (lambda _
10802 ;; Bypass setuptools-shim because one test relies on "setup.py"
10803 ;; being the first argument passed to the python call.
10804 ;;
10805 ;; NOTE: Many tests do not run because they rely on Python's
10806 ;; built-in test.test_argparse, but we remove the unit tests from
10807 ;; our Python installation.
10808 (invoke "python" "setup.py" "test"))))))
10809 (synopsis "Replacement for argparse")
10810 (description "A drop-in replacement for argparse that allows options to also
10811 be set via config files and/or environment variables.")
10812 (home-page "https://github.com/bw2/ConfigArgParse")
10813 (license license:expat)))
10814
10815 (define-public python-argparse-manpage
10816 (package
10817 (name "python-argparse-manpage")
10818 (version "1.1")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "argparse-manpage" version))
10823 (sha256
10824 (base32
10825 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10826 (build-system python-build-system)
10827 (home-page "https://github.com/praiskup/argparse-manpage")
10828 (synopsis "Build manual page from Python's ArgumentParser object")
10829 (description
10830 "This package provides tools to build manual pages from Python's
10831 @code{ArgumentParser} object.")
10832 (license license:asl2.0)))
10833
10834 (define-public python-contextlib2
10835 (package
10836 (name "python-contextlib2")
10837 (version "0.6.0.post1")
10838 (source
10839 (origin
10840 (method url-fetch)
10841 (uri (pypi-uri "contextlib2" version))
10842 (sha256
10843 (base32
10844 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10845 (build-system python-build-system)
10846 (home-page "https://contextlib2.readthedocs.org/")
10847 (synopsis "Tools for decorators and context managers")
10848 (description "This module is primarily a backport of the Python
10849 3.2 contextlib to earlier Python versions. Like contextlib, it
10850 provides utilities for common tasks involving decorators and context
10851 managers. It also contains additional features that are not part of
10852 the standard library.")
10853 (properties `((python2-variant . ,(delay python2-contextlib2))))
10854 (license license:psfl)))
10855
10856 (define-public python2-contextlib2
10857 (let ((base (package-with-python2
10858 (strip-python2-variant python-contextlib2))))
10859 (package/inherit base
10860 (arguments
10861 (substitute-keyword-arguments (package-arguments base)
10862 ((#:phases phases)
10863 `(modify-phases ,phases
10864 (replace 'check
10865 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10866 (native-inputs
10867 `(("python2-unittest2" ,python2-unittest2))))))
10868
10869 ;; This package is used by python2-pytest via python2-importlib-metadata,
10870 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10871 (define-public python2-contextlib2-bootstrap
10872 (hidden-package
10873 (package/inherit
10874 python2-contextlib2
10875 (name "python2-contextlib2-bootstrap")
10876 (arguments
10877 `(#:tests? #f
10878 ,@(package-arguments python2-contextlib2)))
10879 (native-inputs '()))))
10880
10881 (define-public python-texttable
10882 (package
10883 (name "python-texttable")
10884 (version "1.6.2")
10885 (source
10886 (origin
10887 (method url-fetch)
10888 (uri (pypi-uri "texttable" version))
10889 (sha256
10890 (base32
10891 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10892 (build-system python-build-system)
10893 (arguments
10894 `(#:phases
10895 (modify-phases %standard-phases
10896 (replace 'check
10897 (lambda _ (invoke "pytest" "tests.py"))))))
10898 (native-inputs
10899 `(("python-pytest" ,python-pytest)))
10900 (home-page "https://github.com/foutaise/texttable/")
10901 (synopsis "Python module for creating simple ASCII tables")
10902 (description "Texttable is a Python module for creating simple ASCII
10903 tables.")
10904 (license license:expat)))
10905
10906 (define-public python2-texttable
10907 (package-with-python2 python-texttable))
10908
10909 (define-public python-atomicwrites
10910 (package
10911 (name "python-atomicwrites")
10912 (version "1.3.0")
10913 (source (origin
10914 (method url-fetch)
10915 (uri (pypi-uri "atomicwrites" version))
10916 (sha256
10917 (base32
10918 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10919 (build-system python-build-system)
10920 (synopsis "Atomic file writes in Python")
10921 (description "Library for atomic file writes using platform dependent tools
10922 for atomic file system operations.")
10923 (home-page "https://github.com/untitaker/python-atomicwrites")
10924 (license license:expat)))
10925
10926 (define-public python2-atomicwrites
10927 (package-with-python2 python-atomicwrites))
10928
10929 (define-public python-click-threading
10930 (package
10931 (name "python-click-threading")
10932 (version "0.4.4")
10933 (source (origin
10934 (method url-fetch)
10935 (uri (pypi-uri "click-threading" version))
10936 (sha256
10937 (base32
10938 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10939 (build-system python-build-system)
10940 (propagated-inputs
10941 `(("python-click" ,python-click)))
10942 (synopsis "Utilities for multithreading in Click")
10943 (description "This package provides utilities for multithreading in Click
10944 applications.")
10945 (home-page "https://github.com/click-contrib/click-threading")
10946 (license license:expat)))
10947
10948 (define-public python-click-log
10949 (package
10950 (name "python-click-log")
10951 (version "0.3.2")
10952 (source (origin
10953 (method url-fetch)
10954 (uri (pypi-uri "click-log" version))
10955 (sha256
10956 (base32
10957 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10958 (build-system python-build-system)
10959 (propagated-inputs
10960 `(("python-click" ,python-click)))
10961 (synopsis "Logging for click applications")
10962 (description "This package provides a Python library for logging Click
10963 applications.")
10964 (home-page "https://github.com/click-contrib/click-log")
10965 (license license:expat)))
10966
10967 (define-public python-click-default-group
10968 (package
10969 (name "python-click-default-group")
10970 (version "1.2.2")
10971 (source (origin
10972 (method url-fetch)
10973 (uri (pypi-uri "click-default-group" version))
10974 (sha256
10975 (base32
10976 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
10977 (build-system python-build-system)
10978 (arguments
10979 `(#:tests? #f)) ; no target
10980 (propagated-inputs
10981 `(("python-click" ,python-click)))
10982 (synopsis "Extends click.Group")
10983 (description "This package extends click.Group to invoke a command without
10984 explicit subcommand name.")
10985 (home-page "https://github.com/click-contrib/click-default-group")
10986 (license license:bsd-3)))
10987
10988 (define-public python-structlog
10989 (package
10990 (name "python-structlog")
10991 (version "20.2.0")
10992 (source
10993 (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "structlog" version))
10996 (sha256
10997 (base32
10998 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
10999 (build-system python-build-system)
11000 (arguments
11001 `(#:phases
11002 (modify-phases %standard-phases
11003 (replace 'check
11004 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11005 (when tests?
11006 (add-installed-pythonpath inputs outputs)
11007 (invoke "pytest"))
11008 #t)))))
11009 (native-inputs
11010 `(("python-coverage" ,python-coverage)
11011 ("python-freezegun" ,python-freezegun)
11012 ("python-pretend" ,python-pretend)
11013 ("python-pytest" ,python-pytest)
11014 ("python-pytest-asyncio" ,python-pytest-asyncio)
11015 ("python-simplejson" ,python-simplejson)
11016 ("python-twisted" ,python-twisted)))
11017 (home-page "https://www.structlog.org/")
11018 (synopsis "Structured Logging for Python")
11019 (description "@code{structlog} changes logging in Python by adding structure
11020 to your log entries.")
11021 (license (list license:asl2.0 license:expat))))
11022
11023 (define-public python-apipkg
11024 (package
11025 (name "python-apipkg")
11026 (version "1.5")
11027 (source (origin
11028 (method url-fetch)
11029 (uri (pypi-uri "apipkg" version))
11030 (sha256
11031 (base32
11032 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11033 (build-system python-build-system)
11034 (native-inputs
11035 `(("python-pytest" ,python-pytest)
11036 ("python-setuptools-scm" ,python-setuptools-scm)))
11037 (synopsis "Namespace control and lazy-import mechanism")
11038 (description "With apipkg you can control the exported namespace of a Python
11039 package and greatly reduce the number of imports for your users. It is a small
11040 pure Python module that works on virtually all Python versions.")
11041 (home-page "https://github.com/pytest-dev/apipkg")
11042 (license license:expat)))
11043
11044 (define-public python-execnet
11045 (package
11046 (name "python-execnet")
11047 (version "1.4.1")
11048 (source (origin
11049 (method url-fetch)
11050 (uri (pypi-uri "execnet" version))
11051 (sha256
11052 (base32
11053 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11054 (build-system python-build-system)
11055 (arguments
11056 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11057 ;; The two test failures are caused by the lack of an `ssh` executable.
11058 ;; The test suite can be run with pytest after the 'install' phase.
11059 #:tests? #f))
11060 (native-inputs
11061 `(("python-pytest" ,python-pytest)
11062 ("python-setuptools-scm" ,python-setuptools-scm)))
11063 (propagated-inputs
11064 `(("python-apipkg" ,python-apipkg)))
11065 (synopsis "Rapid multi-Python deployment")
11066 (description "Execnet provides a share-nothing model with
11067 channel-send/receive communication for distributing execution across many
11068 Python interpreters across version, platform and network barriers. It has a
11069 minimal and fast API targeting the following uses:
11070 @enumerate
11071 @item distribute tasks to (many) local or remote CPUs
11072 @item write and deploy hybrid multi-process applications
11073 @item write scripts to administer multiple environments
11074 @end enumerate")
11075 (home-page "https://codespeak.net/execnet/")
11076 (license license:expat)))
11077
11078 (define-public python2-execnet
11079 (package-with-python2 python-execnet))
11080
11081 (define-public python-icalendar
11082 (package
11083 (name "python-icalendar")
11084 (version "4.0.5")
11085 (source (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "icalendar" version))
11088 (sha256
11089 (base32
11090 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
11091 (build-system python-build-system)
11092 (propagated-inputs
11093 `(("python-dateutil" ,python-dateutil)
11094 ("python-pytz" ,python-pytz)))
11095 (synopsis "Python library for parsing iCalendar files")
11096 (description "The icalendar package is a parser/generator of iCalendar
11097 files for use with Python.")
11098 (home-page "https://github.com/collective/icalendar")
11099 (license license:bsd-2)))
11100
11101 (define-public python-args
11102 (package
11103 (name "python-args")
11104 (version "0.1.0")
11105 (source (origin
11106 (method url-fetch)
11107 (uri (pypi-uri "args" version))
11108 (sha256
11109 (base32
11110 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11111 (build-system python-build-system)
11112 (home-page "https://github.com/kennethreitz/args")
11113 (synopsis "Command-line argument parser")
11114 (description
11115 "This library provides a Python module to parse command-line arguments.")
11116 (license license:bsd-3)))
11117
11118 (define-public python2-args
11119 (package-with-python2 python-args))
11120
11121 (define-public python-clint
11122 (package
11123 (name "python-clint")
11124 (version "0.5.1")
11125 (source (origin
11126 (method url-fetch)
11127 (uri (pypi-uri "clint" version))
11128 (sha256
11129 (base32
11130 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11131 (build-system python-build-system)
11132 (arguments
11133 '(#:phases
11134 (modify-phases %standard-phases
11135 (replace 'check
11136 (lambda _ (invoke "py.test" "-v"))))))
11137 (native-inputs
11138 `(("python-pytest" ,python-pytest)))
11139 (propagated-inputs
11140 `(("python-args" ,python-args)))
11141 (home-page "https://github.com/kennethreitz/clint")
11142 (synopsis "Command-line interface tools")
11143 (description
11144 "Clint is a Python module filled with a set of tools for developing
11145 command-line applications, including tools for colored and indented
11146 output, progress bar display, and pipes.")
11147 (license license:isc)))
11148
11149 (define-public python2-clint
11150 (package-with-python2 python-clint))
11151
11152 (define-public python-rply
11153 (package
11154 (name "python-rply")
11155 (version "0.7.5")
11156 (source (origin
11157 (method url-fetch)
11158 (uri (pypi-uri "rply" version))
11159 (sha256
11160 (base32
11161 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11162 (build-system python-build-system)
11163 (propagated-inputs
11164 `(("python-appdirs" ,python-appdirs)))
11165 (home-page "https://github.com/alex/rply")
11166 (synopsis "Parser generator for Python")
11167 (description
11168 "This package provides a pure Python based parser generator, that also
11169 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11170 with a new public API, and RPython support.")
11171 (license license:bsd-3)))
11172
11173 (define-public python2-rply
11174 (package-with-python2 python-rply))
11175
11176 (define-public python-hy
11177 (package
11178 (name "python-hy")
11179 (version "0.18.0")
11180 (source (origin
11181 (method url-fetch)
11182 (uri (pypi-uri "hy" version))
11183 (sha256
11184 (base32
11185 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11186 (build-system python-build-system)
11187 (arguments
11188 '(#:phases
11189 (modify-phases %standard-phases
11190 (add-before 'install 'set-HOME
11191 (lambda _
11192 (setenv "HOME" "/tmp") #t))
11193 (replace 'check
11194 (lambda _
11195 ;; Tests require write access to HOME.
11196 (setenv "HOME" "/tmp")
11197 (invoke "nosetests"))))))
11198 (native-inputs
11199 `(("python-coverage" ,python-coverage)
11200 ("python-nose" ,python-nose)))
11201 (propagated-inputs
11202 `(("python-astor" ,python-astor)
11203 ("python-colorama" ,python-colorama)
11204 ("python-rply" ,python-rply)
11205 ("python-funcparserlib"
11206 ,python-funcparserlib)))
11207 (home-page "http://hylang.org/")
11208 (synopsis "Lisp frontend to Python")
11209 (description
11210 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11211 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11212 Python at your fingertips, in Lisp form.")
11213 (license license:expat)))
11214
11215 (define-public python2-functools32
11216 (package
11217 (name "python2-functools32")
11218 (version "3.2.3-2")
11219 (source
11220 (origin
11221 (method url-fetch)
11222 (uri (pypi-uri "functools32" version))
11223 (sha256
11224 (base32
11225 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11226 (build-system python-build-system)
11227 (arguments
11228 `(#:python ,python-2
11229 #:tests? #f)) ; no test target
11230 (home-page "https://github.com/MiCHiLU/python-functools32")
11231 (synopsis
11232 "Backport of the functools module from Python 3.2.3")
11233 (description
11234 "This package is a backport of the @code{functools} module from Python
11235 3.2.3 for use with older versions of Python and PyPy.")
11236 (license license:expat)))
11237
11238 (define-public python2-subprocess32
11239 (package
11240 (name "python2-subprocess32")
11241 (version "3.2.7")
11242 (source (origin
11243 (method url-fetch)
11244 (uri (pypi-uri "subprocess32" version))
11245 (sha256
11246 (base32
11247 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11248 (patches
11249 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11250 (build-system python-build-system)
11251 (arguments
11252 `(#:python ,python-2
11253 ;; The test suite fails with Python > 2.7.13:
11254 ;; import test.support
11255 ;; ImportError: No module named support
11256 #:tests? #f
11257 #:phases
11258 (modify-phases %standard-phases
11259 (add-after 'unpack 'patch-/bin/sh
11260 (lambda _
11261 (substitute* '("subprocess32.py"
11262 "test_subprocess32.py")
11263 (("/bin/sh") (which "sh")))
11264 #t)))))
11265 (home-page "https://github.com/google/python-subprocess32")
11266 (synopsis "Backport of the subprocess module from Python 3.2")
11267 (description
11268 "This is a backport of the @code{subprocess} standard library module
11269 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11270 new features. On POSIX systems it is guaranteed to be reliable when used
11271 in threaded applications. It includes timeout support from Python 3.3 but
11272 otherwise matches 3.2’s API.")
11273 (license license:psfl)))
11274
11275 (define-public python2-futures
11276 (package
11277 (name "python2-futures")
11278 (version "3.2.0")
11279 (source
11280 (origin
11281 (method url-fetch)
11282 (uri (pypi-uri "futures" version))
11283 (sha256
11284 (base32
11285 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11286 (build-system python-build-system)
11287 (arguments
11288 `(#:python ,python-2
11289 #:phases
11290 (modify-phases %standard-phases
11291 (replace 'check
11292 (lambda _
11293 (invoke "python" "test_futures.py")
11294 #t)))))
11295 (home-page "https://github.com/agronholm/pythonfutures")
11296 (synopsis
11297 "Backport of the concurrent.futures package from Python 3.2")
11298 (description
11299 "The concurrent.futures module provides a high-level interface for
11300 asynchronously executing callables. This package backports the
11301 concurrent.futures package from Python 3.2")
11302 (license license:bsd-3)))
11303
11304 (define-public python-promise
11305 (package
11306 (name "python-promise")
11307 (version "0.4.2")
11308 (source
11309 (origin
11310 (method url-fetch)
11311 (uri (pypi-uri "promise" version))
11312 (sha256
11313 (base32
11314 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11315 (build-system python-build-system)
11316 ;; Tests wants python-futures, which is a python2 only program, and
11317 ;; can't be found by python-promise at test time.
11318 (arguments `(#:tests? #f))
11319 (home-page "https://github.com/syrusakbary/promise")
11320 (synopsis "Promises/A+ implementation for Python")
11321 (description
11322 "Promises/A+ implementation for Python")
11323 (properties `((python2-variant . ,(delay python2-promise))))
11324 (license license:expat)))
11325
11326 (define-public python2-promise
11327 (let ((promise (package-with-python2
11328 (strip-python2-variant python-promise))))
11329 (package/inherit promise
11330 (arguments (substitute-keyword-arguments (package-arguments promise)
11331 ((#:tests? _) #t)))
11332 (native-inputs
11333 `(("python2-futures" ,python2-futures)
11334 ("python2-pytest" ,python2-pytest)
11335 ,@(package-native-inputs promise))))))
11336
11337 (define-public python-progressbar2
11338 (package
11339 (name "python-progressbar2")
11340 (version "3.51.3")
11341 (source
11342 (origin
11343 (method url-fetch)
11344 (uri (pypi-uri "progressbar2" version))
11345 (sha256
11346 (base32
11347 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11348 (build-system python-build-system)
11349 (propagated-inputs
11350 `(("python-six" ,python-six)
11351 ("python-utils" ,python-utils)))
11352 (native-inputs
11353 `(("python-flake8" ,python-flake8)
11354 ("python-freezegun" ,python-freezegun)
11355 ("python-pycodestyle" ,python-pycodestyle)
11356 ("python-pytest" ,python-pytest)
11357 ("python-pytest-cache" ,python-pytest-cache)
11358 ("python-pytest-cov" ,python-pytest-cov)
11359 ("python-pytest-flakes" ,python-pytest-flakes)
11360 ("python-pytest-pep8" ,python-pytest-pep8)
11361 ("python-sphinx" ,python-sphinx)))
11362 (home-page "https://github.com/WoLpH/python-progressbar")
11363 (synopsis "Text progress bar library for Python")
11364 (description
11365 "This package provides a Python progressbar library to provide
11366 visual (yet text based) progress to long running operations.")
11367 (license license:bsd-3)))
11368
11369 (define-public python-progressbar33
11370 (package
11371 (name "python-progressbar33")
11372 (version "2.4")
11373 (source
11374 (origin
11375 (method url-fetch)
11376 (uri (pypi-uri "progressbar33" version))
11377 (sha256
11378 (base32
11379 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11380 (build-system python-build-system)
11381 (home-page "https://github.com/germangh/python-progressbar")
11382 (synopsis "Text progress bar library for Python")
11383 (description
11384 "This package provides a text progress bar library for Python. This
11385 version only differs from the original @code{progressbar} package in that it
11386 uses relative package imports instead of absolute imports, which is necessary
11387 for the module to work under Python 3.3.")
11388 ;; Either or both of these licenses may be selected.
11389 (license (list license:lgpl2.1+ license:bsd-3))))
11390
11391 (define-public python-colorama
11392 (package
11393 (name "python-colorama")
11394 (version "0.4.4")
11395 (source
11396 (origin
11397 (method url-fetch)
11398 (uri (pypi-uri "colorama" version))
11399 (sha256
11400 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11401 (build-system python-build-system)
11402 (synopsis "Colored terminal text rendering for Python")
11403 (description "Colorama is a Python library for rendering colored terminal
11404 text.")
11405 (home-page "https://pypi.org/project/colorama/")
11406 (license license:bsd-3)))
11407
11408 (define-public python2-colorama
11409 (package-with-python2 python-colorama))
11410
11411 (define-public python-moto
11412 (package
11413 (name "python-moto")
11414 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11415 (version "1.3.16.dev134")
11416 (source (origin
11417 (method url-fetch)
11418 (uri (pypi-uri "moto" version))
11419 (sha256
11420 (base32
11421 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11422 (build-system python-build-system)
11423 (arguments
11424 `(#:phases (modify-phases %standard-phases
11425 (add-after 'unpack 'patch-hardcoded-executable-names
11426 (lambda _
11427 (substitute* "moto/batch/models.py"
11428 (("/bin/sh")
11429 (which "sh")))
11430 (substitute* (find-files "tests" "\\.py$")
11431 (("#!/bin/bash")
11432 (string-append "#!" (which "bash"))))
11433 #t))
11434 (replace 'check
11435 (lambda _
11436 (setenv "PYTHONPATH" (string-append "./build/lib:"
11437 (getenv "PYTHONPATH")))
11438 (invoke "pytest" "-vv" "-m" "not network"
11439 ;; These tests require Docker.
11440 "-k" "not test_terminate_job \
11441 and not test_invoke_function_from_sqs_exception"))))))
11442 (native-inputs
11443 `(("python-flask" ,python-flask)
11444 ("python-flask-cors" ,python-flask-cors)
11445 ("python-freezegun" ,python-freezegun)
11446 ("python-parameterized" ,python-parameterized)
11447 ("python-pytest" ,python-pytest)
11448 ("python-sure" ,python-sure)))
11449 (propagated-inputs
11450 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11451 ("python-boto" ,python-boto)
11452 ("python-boto3" ,python-boto3)
11453 ("python-botocore" ,python-botocore)
11454 ("python-cfn-lint" ,python-cfn-lint)
11455 ("python-cryptography" ,python-cryptography)
11456 ("python-dateutil" ,python-dateutil)
11457 ("python-docker" ,python-docker)
11458 ("python-idna" ,python-idna)
11459 ("python-jinja2" ,python-jinja2)
11460 ("python-jose" ,python-jose)
11461 ("python-jsondiff" ,python-jsondiff)
11462 ("python-mock" ,python-mock)
11463 ("python-pytz" ,python-pytz)
11464 ("python-pyyaml" ,python-pyyaml)
11465 ("python-requests" ,python-requests)
11466 ("python-responses" ,python-responses)
11467 ("python-six" ,python-six)
11468 ("python-sshpubkeys" ,python-sshpubkeys)
11469 ("python-werkzeug" ,python-werkzeug)
11470 ("python-xmltodict" ,python-xmltodict)))
11471 (home-page "https://github.com/spulec/moto")
11472 (synopsis "Mock out the boto library")
11473 (description
11474 "@code{moto} is a library designed to easily mock out the
11475 @code{boto} library.")
11476 (license license:asl2.0)))
11477
11478 (define-public python-rsa
11479 (package
11480 (name "python-rsa")
11481 (version "3.4.2")
11482 (source
11483 (origin
11484 (method url-fetch)
11485 (uri (pypi-uri "rsa" version))
11486 (sha256
11487 (base32
11488 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11489 (build-system python-build-system)
11490 (propagated-inputs
11491 `(("python-pyasn1" ,python-pyasn1)))
11492 (synopsis "Pure-Python RSA implementation")
11493 (description "Python-RSA is a pure-Python RSA implementation. It supports
11494 encryption and decryption, signing and verifying signatures, and key
11495 generation according to PKCS#1 version 1.5. It can be used as a Python
11496 library as well as on the command line.")
11497 (home-page "https://stuvel.eu/rsa")
11498 (license license:asl2.0)))
11499
11500 (define-public python2-rsa
11501 (package-with-python2 python-rsa))
11502
11503 (define-public python-pluggy
11504 (package
11505 (name "python-pluggy")
11506 (version "0.13.1")
11507 (source
11508 (origin
11509 (method url-fetch)
11510 (uri (pypi-uri "pluggy" version))
11511 (sha256
11512 (base32
11513 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11514 (build-system python-build-system)
11515 (native-inputs
11516 `(("python-setuptools-scm" ,python-setuptools-scm)))
11517 (synopsis "Plugin and hook calling mechanism for Python")
11518 (description "Pluggy is an extraction of the plugin manager as used by
11519 Pytest but stripped of Pytest specific details.")
11520 (home-page "https://pypi.org/project/pluggy/")
11521 (properties `((python2-variant . ,(delay python2-pluggy))))
11522 (license license:expat)))
11523
11524 (define-public python2-pluggy
11525 (let ((base (package-with-python2 (strip-python2-variant
11526 python-pluggy))))
11527 (package/inherit
11528 base
11529 (propagated-inputs
11530 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11531
11532 ;; This package requires python2-importlib-metadata, but that package
11533 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11534 ;; variant to solve the circular dependency.
11535 (define-public python2-pluggy-bootstrap
11536 (hidden-package
11537 (package/inherit
11538 python2-pluggy
11539 (name "python2-pluggy-bootstrap")
11540 (arguments
11541 `(#:tests? #f
11542 ,@(package-arguments python2-pluggy)))
11543 (propagated-inputs
11544 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11545
11546 (define-public python-tox
11547 (package
11548 (name "python-tox")
11549 (version "3.20.0")
11550 (source
11551 (origin
11552 (method url-fetch)
11553 (uri (pypi-uri "tox" version))
11554 (sha256
11555 (base32
11556 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11557 (build-system python-build-system)
11558 (arguments
11559 ;; FIXME: Tests require pytest-timeout, which itself requires
11560 ;; pytest>=2.8.0 for installation.
11561 '(#:tests? #f))
11562 (propagated-inputs
11563 `(("python-filelock" ,python-filelock)
11564 ("python-packaging" ,python-packaging)
11565 ("python-pluggy" ,python-pluggy)
11566 ("python-py" ,python-py)
11567 ("python-six" ,python-six)
11568 ("python-toml" ,python-toml)
11569 ("python-virtualenv" ,python-virtualenv)))
11570 (native-inputs
11571 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11572 ("python-pytest" ,python-pytest) ; >= 2.3.5
11573 ("python-setuptools-scm" ,python-setuptools-scm)))
11574 (home-page "https://tox.readthedocs.io")
11575 (synopsis "Virtualenv-based automation of test activities")
11576 (description "Tox is a generic virtualenv management and test command line
11577 tool. It can be used to check that a package installs correctly with
11578 different Python versions and interpreters, or run tests in each type of
11579 supported environment, or act as a frontend to continuous integration
11580 servers.")
11581 (license license:expat)))
11582
11583 (define-public python-jmespath
11584 (package
11585 (name "python-jmespath")
11586 (version "0.9.4")
11587 (source
11588 (origin
11589 (method url-fetch)
11590 (uri (pypi-uri "jmespath" version))
11591 (sha256
11592 (base32
11593 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11594 (build-system python-build-system)
11595 (native-inputs
11596 `(("python-nose" ,python-nose)))
11597 (synopsis "JSON Matching Expressions")
11598 (description "JMESPath (pronounced “james path”) is a Python library that
11599 allows one to declaratively specify how to extract elements from a JSON
11600 document.")
11601 (home-page "https://github.com/jmespath/jmespath.py")
11602 (license license:expat)))
11603
11604 (define-public python2-jmespath
11605 (package-with-python2 python-jmespath))
11606
11607 (define-public python-symengine
11608 (package
11609 (name "python-symengine")
11610 (version "0.6.1")
11611 (source
11612 (origin
11613 (method url-fetch)
11614 (uri (pypi-uri "symengine" version))
11615 (sha256
11616 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11617 (build-system python-build-system)
11618 (native-inputs
11619 `(("cmake" ,cmake)
11620 ("python-cython" ,python-cython)))
11621 (inputs
11622 `(("symengine" ,symengine)))
11623 (home-page "https://github.com/symengine/symengine.py")
11624 (synopsis "Python library providing wrappers to SymEngine")
11625 (description
11626 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11627 manipulation library.")
11628 (license license:expat)))
11629
11630 (define-public python-uncertainties
11631 (package
11632 (name "python-uncertainties")
11633 (version "3.1.5")
11634 (source
11635 (origin
11636 (method url-fetch)
11637 (uri (pypi-uri "uncertainties" version))
11638 (sha256
11639 (base32
11640 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11641 (build-system python-build-system)
11642 ;; While there are test files, there is no "tests" directory, so the tests
11643 ;; fail.
11644 (arguments '(#:tests? #false))
11645 (propagated-inputs
11646 `(("python-future" ,python-future)))
11647 (native-inputs
11648 `(("python-nose" ,python-nose)
11649 ("python-numpy" ,python-numpy)))
11650 (home-page "https://uncertainties-python-package.readthedocs.io/")
11651 (synopsis "Calculations with uncertainties")
11652 (description
11653 "The uncertainties package transparently handles calculations with
11654 numbers with uncertainties. It can also yield the derivatives of any
11655 expression.")
11656 (license license:bsd-3)))
11657
11658 (define-public python-asteval
11659 (package
11660 (name "python-asteval")
11661 (version "0.9.23")
11662 (source
11663 (origin
11664 (method url-fetch)
11665 (uri (pypi-uri "asteval" version))
11666 (sha256
11667 (base32
11668 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11669 (build-system python-build-system)
11670 (native-inputs
11671 `(("python-pytest" ,python-pytest)))
11672 (home-page "https://github.com/newville/asteval")
11673 (synopsis "Minimalistic evaluator of Python expressions")
11674 (description
11675 "This package provides a minimalistic evaluator of Python expression
11676 using the @code{ast} module")
11677 (license license:expat)))
11678
11679 (define-public python-lmfit
11680 (package
11681 (name "python-lmfit")
11682 (version "1.0.2")
11683 (source
11684 (origin
11685 (method url-fetch)
11686 (uri (pypi-uri "lmfit" version))
11687 (sha256
11688 (base32
11689 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11690 (build-system python-build-system)
11691 (propagated-inputs
11692 `(("python-asteval" ,python-asteval)
11693 ("python-numpy" ,python-numpy)
11694 ("python-scipy" ,python-scipy)
11695 ("python-uncertainties" ,python-uncertainties)))
11696 (native-inputs
11697 `(("python-pytest" ,python-pytest)))
11698 (home-page "https://lmfit.github.io/lmfit-py/")
11699 (synopsis "Least-Squares minimization with bounds and constraints")
11700 (description
11701 "Lmfit provides a high-level interface to non-linear optimization and
11702 curve fitting problems for Python. It builds on and extends many of the
11703 optimization methods of @code{scipy.optimize}. Initially inspired by (and
11704 named for) extending the Levenberg-Marquardt method from
11705 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
11706 enhancements to optimization and data fitting problems.")
11707 (license license:bsd-3)))
11708
11709 (define-public python-boto
11710 (package
11711 (name "python-boto")
11712 (version "2.49.0")
11713 (source (origin
11714 (method url-fetch)
11715 (uri (pypi-uri "boto" version))
11716 (sha256
11717 (base32
11718 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11719 (build-system python-build-system)
11720 (arguments
11721 ;; XXX: This package is unmaintained and has problems with newer versions
11722 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11723 ;; subset of this library, so keep it around for now, but disable tests.
11724 '(#:tests? #f))
11725 (propagated-inputs
11726 `(("python-paramiko" ,python-paramiko)
11727 ("python-requests" ,python-requests)))
11728 (home-page "https://github.com/boto/boto")
11729 (synopsis "Python interfaces for Amazon Web Services")
11730 (description
11731 "This package provides various facilities for interacting with Amazon
11732 Web Services through Python.
11733
11734 This software is unmaintained, and new projects should use @code{boto3} instead.")
11735 (license license:expat)))
11736
11737 (define-public python-botocore
11738 ;; Note: When updating botocore, also make sure that boto3 and awscli
11739 ;; are compatible.
11740 (package
11741 (name "python-botocore")
11742 (version "1.19.22")
11743 (source
11744 (origin
11745 (method url-fetch)
11746 (uri (pypi-uri "botocore" version))
11747 (sha256
11748 (base32
11749 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11750 (build-system python-build-system)
11751 (arguments
11752 ;; FIXME: Many tests are failing.
11753 '(#:tests? #f))
11754 (propagated-inputs
11755 `(("python-dateutil" ,python-dateutil)
11756 ("python-jmespath" ,python-jmespath)
11757 ("python-urllib3" ,python-urllib3)))
11758 (home-page "https://github.com/boto/botocore")
11759 (synopsis "Low-level interface to AWS")
11760 (description "Botocore is a Python library that provides a low-level
11761 interface to the Amazon Web Services (AWS) API.")
11762 (license license:asl2.0)))
11763
11764 (define-public python2-botocore
11765 (package-with-python2 python-botocore))
11766
11767 (define-public python-boto3
11768 (package
11769 (name "python-boto3")
11770 (version "1.16.22")
11771 (home-page "https://github.com/boto/boto3")
11772 (source (origin
11773 (method git-fetch)
11774 (uri (git-reference (url home-page) (commit version)))
11775 (file-name (git-file-name name version))
11776 (sha256
11777 (base32
11778 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11779 (arguments
11780 `(#:phases
11781 (modify-phases %standard-phases
11782 (add-after 'unpack 'delete-network-tests
11783 ;; Deleting integration tests because they are trying to connect to AWS.
11784 (lambda _
11785 (delete-file-recursively "tests/integration")
11786 #t)))))
11787 (build-system python-build-system)
11788 (native-inputs
11789 `(("python-nose" ,python-nose)
11790 ("python-mock" ,python-mock)))
11791 (propagated-inputs
11792 `(("python-botocore" ,python-botocore)
11793 ("python-jmespath" ,python-jmespath)
11794 ("python-s3transfer" ,python-s3transfer)))
11795 (synopsis "AWS SDK for Python")
11796 (description
11797 "Boto3 is a Python library for writing programs that interact with
11798 @acronym{AWS,Amazon Web Services}.")
11799 (license license:asl2.0)))
11800
11801 (define-public python-pyfiglet
11802 (package
11803 (name "python-pyfiglet")
11804 (version "0.8.post1")
11805 (source
11806 (origin
11807 (method url-fetch)
11808 (uri (pypi-uri "pyfiglet" version))
11809 (sha256
11810 (base32
11811 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11812 (build-system python-build-system)
11813 (home-page "https://github.com/pwaller/pyfiglet")
11814 (synopsis "Draw ASCII art big letters in Python")
11815 (description "This module lets you draw large letter from ordinary characters
11816 in pure Python.")
11817 (license license:expat)))
11818
11819 (define-public python-xdo
11820 (package
11821 (name "python-xdo")
11822 (version "0.3")
11823 (source (origin
11824 (method url-fetch)
11825 (uri (string-append
11826 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11827 "python-xdo_" version ".orig.tar.gz"))
11828 (sha256
11829 (base32
11830 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11831 (build-system python-build-system)
11832 (arguments
11833 '(#:phases
11834 (modify-phases %standard-phases
11835 (add-before 'install 'patch-libxdo-path
11836 ;; Hardcode the path of dynamically loaded libxdo library.
11837 (lambda* (#:key inputs #:allow-other-keys)
11838 (let ((libxdo (string-append
11839 (assoc-ref inputs "xdotool")
11840 "/lib/libxdo.so")))
11841 (substitute* "xdo/_xdo.py"
11842 (("find_library\\(\"xdo\"\\)")
11843 (simple-format #f "\"~a\"" libxdo)))
11844 #t))))
11845 #:tests? #f)) ; no tests provided
11846 (propagated-inputs
11847 `(("python-six" ,python-six)))
11848 (inputs
11849 `(("xdotool" ,xdotool)
11850 ("libX11" ,libx11)))
11851 (home-page "https://tracker.debian.org/pkg/python-xdo")
11852 (synopsis "Python library for simulating X11 keyboard/mouse input")
11853 (description "Provides bindings to libxdo for manipulating X11 via simulated
11854 input. (Note that this is mostly a legacy library; you may wish to look at
11855 python-xdo for newer bindings.)")
11856 (license license:bsd-3)))
11857
11858 (define-public python2-xdo
11859 (package-with-python2 python-xdo))
11860
11861 (define-public python-mako
11862 (package
11863 (name "python-mako")
11864 (version "1.1.3")
11865 (source
11866 (origin
11867 (method url-fetch)
11868 (uri (pypi-uri "Mako" version))
11869 (sha256
11870 (base32
11871 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11872 (build-system python-build-system)
11873 (arguments
11874 `(#:phases (modify-phases %standard-phases
11875 (replace 'check
11876 (lambda* (#:key tests? #:allow-other-keys)
11877 (if tests?
11878 (invoke "nosetests" "-v")
11879 (format #t "test suite not run~%"))
11880 #t)))))
11881 (propagated-inputs
11882 `(("python-markupsafe" ,python-markupsafe)))
11883 (native-inputs
11884 `(("python-mock" ,python-mock)
11885 ("python-nose" ,python-nose)))
11886 (home-page "https://www.makotemplates.org/")
11887 (synopsis "Templating language for Python")
11888 (description "Mako is a templating language for Python that compiles
11889 templates into Python modules.")
11890 (license license:expat)))
11891
11892 (define-public python2-mako
11893 (package-with-python2 python-mako))
11894
11895 (define-public python-waitress
11896 (package
11897 (name "python-waitress")
11898 (version "1.1.0")
11899 (source
11900 (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "waitress" version))
11903 (patches (search-patches "python-waitress-fix-tests.patch"))
11904 (sha256
11905 (base32
11906 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11907 (build-system python-build-system)
11908 (home-page "https://github.com/Pylons/waitress")
11909 (synopsis "Waitress WSGI server")
11910 (description "Waitress is meant to be a production-quality pure-Python WSGI
11911 server with very acceptable performance.")
11912 (license license:zpl2.1)))
11913
11914 (define-public python2-waitress
11915 (package-with-python2 python-waitress))
11916
11917 (define-public python-whichcraft
11918 (package
11919 (name "python-whichcraft")
11920 (version "0.6.1")
11921 (source
11922 (origin
11923 (method url-fetch)
11924 (uri (pypi-uri "whichcraft" version))
11925 (sha256
11926 (base32
11927 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11928 (build-system python-build-system)
11929 (native-inputs
11930 `(("python-pytest" ,python-pytest)))
11931 (home-page "https://github.com/pydanny/whichcraft")
11932 (synopsis "Cross-platform cross-python shutil.which functionality")
11933 (description
11934 "This package provides a shim of the shutil.which function that's
11935 designed to work across multiple versions of Python.")
11936 (license license:bsd-3)))
11937
11938 (define-public python-cookiecutter
11939 (package
11940 (name "python-cookiecutter")
11941 (version "1.7.2")
11942 (source
11943 (origin
11944 (method url-fetch)
11945 (uri (pypi-uri "cookiecutter" version))
11946 (sha256
11947 (base32
11948 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11949 (build-system python-build-system)
11950 (native-inputs
11951 `(("python-freezegun" ,python-freezegun)
11952 ("python-pytest" ,python-pytest)
11953 ("python-pytest-catchlog" ,python-pytest-catchlog)
11954 ("python-pytest-cov" ,python-pytest-cov)
11955 ("python-pytest-mock" ,python-pytest-mock)))
11956 (propagated-inputs
11957 `(("python-binaryornot" ,python-binaryornot)
11958 ("python-click" ,python-click)
11959 ("python-future" ,python-future)
11960 ("python-jinja2" ,python-jinja2)
11961 ("python-jinja2-time" ,python-jinja2-time)
11962 ("python-poyo" ,python-poyo)
11963 ("python-requests" ,python-requests)
11964 ("python-slugify" ,python-slugify)
11965 ("python-text-unidecode" ,python-text-unidecode)
11966 ("python-whichcraft" ,python-whichcraft)))
11967 (home-page "https://github.com/cookiecutter/cookiecutter")
11968 (synopsis
11969 "Command-line utility that creates projects from project templates")
11970 (description
11971 "This package provides a command-line utility that creates projects from
11972 project templates, e.g. creating a Python package project from a Python package
11973 project template.")
11974 (license license:bsd-3)))
11975
11976 (define-public python-pyquery
11977 (package
11978 (name "python-pyquery")
11979 (version "1.2.17")
11980 (source
11981 (origin
11982 (method url-fetch)
11983 (uri (pypi-uri "pyquery" version))
11984 (sha256
11985 (base32
11986 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11987 (build-system python-build-system)
11988 (native-inputs
11989 `(("python-webob" ,python-webob)
11990 ("python-webtest" ,python-webtest)))
11991 (propagated-inputs
11992 `(("python-lxml" ,python-lxml)
11993 ("python-cssselect" ,python-cssselect)))
11994 (home-page "https://github.com/gawel/pyquery")
11995 (synopsis "Make jQuery-like queries on xml documents")
11996 (description "pyquery allows you to make jQuery queries on xml documents.
11997 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11998 fast xml and html manipulation.")
11999 (license license:bsd-3)))
12000
12001 (define-public python-anyjson
12002 (package
12003 (name "python-anyjson")
12004 (version "0.3.3")
12005 (source
12006 (origin
12007 (method url-fetch)
12008 (uri (pypi-uri "anyjson" version))
12009 (sha256
12010 (base32
12011 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12012 (build-system python-build-system)
12013 (arguments
12014 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12015 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12016 ;; whatever) so this transformation needs to be done before the tests
12017 ;; can be run. Maybe we could add a build step to transform beforehand
12018 ;; but it could be annoying/difficult.
12019 ;; We can enable tests for the Python 2 version, though, and do below.
12020 #:tests? #f))
12021 (home-page "https://bitbucket.org/runeh/anyjson/")
12022 (synopsis
12023 "Wraps best available JSON implementation in a common interface")
12024 (description
12025 "Anyjson loads whichever is the fastest JSON module installed
12026 and provides a uniform API regardless of which JSON implementation is used.")
12027 (license license:bsd-3)
12028 (properties `((python2-variant . ,(delay python2-anyjson))))))
12029
12030 (define-public python2-anyjson
12031 (let ((anyjson (package-with-python2
12032 (strip-python2-variant python-anyjson))))
12033 (package/inherit anyjson
12034 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12035 #:tests? #t
12036 ,@(package-arguments anyjson)))
12037 (native-inputs `(("python2-nose" ,python2-nose))))))
12038
12039 (define-public python-amqp
12040 (package
12041 (name "python-amqp")
12042 (version "2.3.2")
12043 (source
12044 (origin
12045 (method url-fetch)
12046 (uri (pypi-uri "amqp" version))
12047 (sha256
12048 (base32
12049 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12050 (build-system python-build-system)
12051 (native-inputs
12052 `(("python-case" ,python-case)
12053 ("python-pytest-sugar" ,python-pytest-sugar)
12054 ("python-mock" ,python-mock)))
12055 (propagated-inputs
12056 `(("python-vine" ,python-vine)))
12057 (home-page "https://github.com/celery/py-amqp")
12058 (synopsis
12059 "Low-level AMQP client for Python (fork of amqplib)")
12060 (description
12061 "This is a fork of amqplib which was originally written by Barry Pederson.
12062 It is maintained by the Celery project, and used by kombu as a pure python
12063 alternative when librabbitmq is not available.")
12064 (license license:lgpl2.1+)
12065 (properties `((python2-variant . ,(delay python2-amqp))))))
12066
12067 (define-public python2-amqp
12068 (let ((amqp (package-with-python2
12069 (strip-python2-variant python-amqp))))
12070 (package/inherit amqp
12071 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12072 ;; unmaintained. Weirdly, does not do this on the python 3
12073 ;; version?
12074 #:tests? #f
12075 ,@(package-arguments amqp))))))
12076
12077 (define-public python-txamqp
12078 (package
12079 (name "python-txamqp")
12080 (version "0.8.2")
12081 (source
12082 (origin
12083 (method url-fetch)
12084 (uri (pypi-uri "txAMQP" version))
12085 (sha256
12086 (base32
12087 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12088 (build-system python-build-system)
12089 (propagated-inputs
12090 `(("python-six" ,python-six)
12091 ("python-twisted" ,python-twisted)))
12092 (home-page "https://github.com/txamqp/txamqp")
12093 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12094 (description
12095 "This package provides a Python library for communicating with AMQP peers
12096 and brokers using the asynchronous networking framework Twisted. It contains
12097 all the necessary code to connect, send and receive messages to/from an
12098 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12099 also includes support for using Thrift RPC over AMQP in Twisted
12100 applications.")
12101 (license license:asl2.0)))
12102
12103 (define-public python2-txamqp
12104 (package-with-python2 python-txamqp))
12105
12106 (define-public python-kombu
12107 (package
12108 (name "python-kombu")
12109 (version "4.2.2")
12110 (source
12111 (origin
12112 (method url-fetch)
12113 (uri (pypi-uri "kombu" version))
12114 (sha256
12115 (base32
12116 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12117 (build-system python-build-system)
12118 (native-inputs
12119 `(("python-mock" ,python-mock)
12120 ("python-case" ,python-case)
12121 ("python-pyro4" ,python-pyro4)
12122 ("python-pytest-sugar" ,python-pytest-sugar)
12123 ("python-pytz" ,python-pytz)))
12124 (propagated-inputs
12125 `(("python-anyjson" ,python-anyjson)
12126 ("python-amqp" ,python-amqp)
12127 ("python-redis" ,python-redis)))
12128 (home-page "https://kombu.readthedocs.io")
12129 (synopsis "Message passing library for Python")
12130 (description "The aim of Kombu is to make messaging in Python as easy as
12131 possible by providing an idiomatic high-level interface for the AMQ protocol,
12132 and also provide proven and tested solutions to common messaging problems.
12133 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12134 message orientation, queuing, routing, reliability and security, for which the
12135 RabbitMQ messaging server is the most popular implementation.")
12136 (license license:bsd-3)
12137 (properties `((python2-variant . ,(delay python2-kombu))))))
12138
12139 (define-public python2-kombu
12140 (let ((kombu (package-with-python2
12141 (strip-python2-variant python-kombu))))
12142 (package/inherit kombu
12143 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12144 ;; It works fine on the python3 variant.
12145 #:tests? #f
12146 ,@(package-arguments kombu)))
12147 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12148 ,@(package-native-inputs kombu))))))
12149
12150 (define-public python-billiard
12151 (package
12152 (name "python-billiard")
12153 (version "3.5.0.5")
12154 (source
12155 (origin
12156 (method url-fetch)
12157 (uri (pypi-uri "billiard" version))
12158 (sha256
12159 (base32
12160 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12161 (build-system python-build-system)
12162 (native-inputs
12163 `(("python-case" ,python-case)
12164 ("python-pytest" ,python-pytest)))
12165 (home-page "https://github.com/celery/billiard")
12166 (synopsis
12167 "Python multiprocessing fork with improvements and bugfixes")
12168 (description
12169 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12170 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12171 pyprocessing package. This standalone variant is intended to be compatible with
12172 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12173 (license license:bsd-3)
12174 (properties `((python2-variant . ,(delay python2-billiard))))))
12175
12176 (define-public python2-billiard
12177 (let ((billiard (package-with-python2
12178 (strip-python2-variant python-billiard))))
12179 (package/inherit billiard
12180 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12181 ("python2-mock" ,python2-mock)
12182 ,@(package-native-inputs billiard))))))
12183
12184 (define-public python-celery
12185 (package
12186 (name "python-celery")
12187 (version "4.2.1")
12188 (source
12189 (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "celery" version))
12192 (sha256
12193 (base32
12194 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12195 (build-system python-build-system)
12196 (arguments
12197 '(;; TODO The tests fail with Python 3.7
12198 ;; https://github.com/celery/celery/issues/4849
12199 #:tests? #f
12200 #:phases
12201 (modify-phases %standard-phases
12202 (add-after 'unpack 'patch-requirements
12203 (lambda _
12204 (substitute* "requirements/test.txt"
12205 (("pytest>=3\\.0,<3\\.3")
12206 "pytest>=3.0"))
12207 #t)))))
12208 (native-inputs
12209 `(("python-case" ,python-case)
12210 ("python-pytest" ,python-pytest)))
12211 (propagated-inputs
12212 `(("python-pytz" ,python-pytz)
12213 ("python-billiard" ,python-billiard)
12214 ("python-kombu" ,python-kombu)))
12215 (home-page "https://celeryproject.org")
12216 (synopsis "Distributed Task Queue")
12217 (description "Celery is an asynchronous task queue/job queue based on
12218 distributed message passing. It is focused on real-time operation, but
12219 supports scheduling as well. The execution units, called tasks, are executed
12220 concurrently on a single or more worker servers using multiprocessing,
12221 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12222 synchronously (wait until ready).")
12223 (license license:bsd-3)
12224 (properties `((python2-variant . ,(delay python2-celery))))))
12225
12226 (define-public python2-celery
12227 (let ((celery (package-with-python2
12228 (strip-python2-variant python-celery))))
12229 (package/inherit celery
12230 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12231 ("python2-mock" ,python2-mock)
12232 ,@(package-native-inputs celery))))))
12233
12234 (define-public python-translitcodec
12235 (package
12236 (name "python-translitcodec")
12237 (version "0.4.0")
12238 (source
12239 (origin
12240 (method url-fetch)
12241 (uri (pypi-uri "translitcodec" version))
12242 (sha256
12243 (base32
12244 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12245 (build-system python-build-system)
12246 (arguments
12247 `(#:tests? #f)) ; no tests provided
12248 (home-page
12249 "https://github.com/claudep/translitcodec")
12250 (synopsis
12251 "Unicode to 8-bit charset transliteration codec")
12252 (description
12253 "This package contains codecs for transliterating ISO 10646 texts into
12254 best-effort representations using smaller coded character sets (ASCII,
12255 ISO 8859, etc.).")
12256 (license license:expat)))
12257
12258 (define-public python2-translitcodec
12259 (package-with-python2 python-translitcodec))
12260
12261 (define-public python-editor
12262 (package
12263 (name "python-editor")
12264 (version "1.0.4")
12265 (source
12266 (origin
12267 (method url-fetch)
12268 (uri (pypi-uri "python-editor" version))
12269 (sha256
12270 (base32
12271 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12272 (build-system python-build-system)
12273 (arguments
12274 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12275 (home-page "https://github.com/fmoo/python-editor")
12276 (synopsis "Programmatically open an editor, capture the result")
12277 (description
12278 "python-editor is a library that provides the editor module for
12279 programmatically interfacing with your system's $EDITOR.")
12280 (license license:asl2.0)))
12281
12282 (define-public python2-editor
12283 (package-with-python2 python-editor))
12284
12285 (define-public python-multiprocessing-logging
12286 (package
12287 (name "python-multiprocessing-logging")
12288 (version "0.3.1")
12289 (home-page "https://github.com/jruere/multiprocessing-logging")
12290 (source (origin
12291 (method git-fetch)
12292 (uri (git-reference
12293 (url home-page)
12294 (commit (string-append "v" version))))
12295 (file-name (git-file-name name version))
12296 (sha256
12297 (base32
12298 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12299 (build-system python-build-system)
12300 (synopsis "Manage logs from multiple processes")
12301 (description
12302 "This Python module implements a multiprocessing-aware @code{Handler}
12303 that, when set on the root @code{Logger}, will tunnel log records to the
12304 main process so that they are handled correctly.")
12305 (license license:lgpl3+)))
12306
12307 (define-public python-vobject
12308 (package
12309 (name "python-vobject")
12310 (version "0.9.6.1")
12311 (source (origin
12312 (method url-fetch)
12313 (uri (pypi-uri "vobject" version))
12314 (sha256
12315 (base32
12316 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12317 (build-system python-build-system)
12318 (arguments
12319 '(;; The test suite relies on some non-portable Windows interfaces.
12320 #:tests? #f))
12321 (propagated-inputs
12322 `(("python-dateutil" ,python-dateutil)
12323 ("python-pyicu" ,python-pyicu)))
12324 (synopsis "Parse and generate vCard and vCalendar files")
12325 (description "Vobject is intended to be a full featured Python package for
12326 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12327 are supported and well tested. vCard 3.0 files are supported, and all data
12328 should be imported, but only a few components are understood in a sophisticated
12329 way.")
12330 (home-page "https://eventable.github.io/vobject/")
12331 (license license:asl2.0)))
12332
12333 (define-public python2-vobject
12334 (package-with-python2 python-vobject))
12335
12336 (define-public python-munkres
12337 (package
12338 (name "python-munkres")
12339 (version "1.0.8")
12340 (source (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "munkres" version))
12343 (sha256
12344 (base32
12345 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12346 (build-system python-build-system)
12347 (arguments
12348 '(#:tests? #f)) ; no test suite
12349 (home-page "https://software.clapper.org/munkres/")
12350 (synopsis "Implementation of the Munkres algorithm")
12351 (description "The Munkres module provides an implementation of the Munkres
12352 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12353 useful for solving the Assignment Problem.")
12354 (license license:bsd-3)))
12355
12356 (define-public python2-munkres
12357 (package-with-python2 python-munkres))
12358
12359 (define-public python-whoosh
12360 (package
12361 (name "python-whoosh")
12362 (version "2.7.4")
12363 (source
12364 (origin
12365 (method url-fetch)
12366 (uri (pypi-uri "Whoosh" version))
12367 (sha256
12368 (base32
12369 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12370 (build-system python-build-system)
12371 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12372 (native-inputs
12373 `(("python-pytest" ,python-pytest)))
12374 (home-page "https://bitbucket.org/mchaput/whoosh")
12375 (synopsis "Full text indexing, search, and spell checking library")
12376 (description
12377 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12378 checking library.")
12379 (license license:bsd-2)))
12380
12381 (define-public python2-whoosh
12382 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12383 (package/inherit whoosh
12384 (propagated-inputs
12385 `(("python2-backport-ssl-match-hostname"
12386 ,python2-backport-ssl-match-hostname)
12387 ,@(package-propagated-inputs whoosh))))))
12388
12389 (define-public python-pathlib
12390 (package
12391 (name "python-pathlib")
12392 (version "1.0.1")
12393 (source (origin
12394 (method url-fetch)
12395 (uri (pypi-uri "pathlib" version))
12396 (sha256
12397 (base32
12398 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12399 (build-system python-build-system)
12400 ;; The tests depend on the internal "test" module, which does not provide
12401 ;; a stable interface.
12402 (arguments `(#:tests? #f))
12403 (home-page "https://pathlib.readthedocs.org/")
12404 (synopsis "Object-oriented file system paths")
12405 (description "Pathlib offers a set of classes to handle file system paths.
12406 It offers the following advantages over using string objects:
12407
12408 @enumerate
12409 @item No more cumbersome use of os and os.path functions. Everything can
12410 be done easily through operators, attribute accesses, and method calls.
12411 @item Embodies the semantics of different path types. For example,
12412 comparing Windows paths ignores casing.
12413 @item Well-defined semantics, eliminating any inconsistencies or
12414 ambiguities (forward vs. backward slashes, etc.).
12415 @end enumerate
12416
12417 Note: In Python 3.4, pathlib is now part of the standard library. For other
12418 Python versions please consider python-pathlib2 instead, which tracks the
12419 standard library module. This module (python-pathlib) isn't maintained
12420 anymore.")
12421 (license license:expat)))
12422
12423 (define-public python2-pathlib
12424 (package-with-python2 python-pathlib))
12425
12426 (define-public python2-pathlib2
12427 (package
12428 (name "python2-pathlib2")
12429 (version "2.3.5")
12430 (source (origin
12431 (method url-fetch)
12432 (uri (pypi-uri "pathlib2" version))
12433 (sha256
12434 (base32
12435 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12436 (build-system python-build-system)
12437 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12438 ;; version is 3.4 which already includes this package as part of the
12439 ;; standard library.
12440 (arguments
12441 `(#:python ,python-2))
12442 (propagated-inputs
12443 `(("python2-scandir" ,python2-scandir)
12444 ("python2-six" ,python2-six)))
12445 (home-page "https://pypi.org/project/pathlib2/")
12446 (synopsis "Object-oriented file system paths - backport of standard
12447 pathlib module")
12448 (description "The goal of pathlib2 is to provide a backport of standard
12449 pathlib module which tracks the standard library module, so all the newest
12450 features of the standard pathlib can be used also on older Python versions.
12451
12452 Pathlib offers a set of classes to handle file system paths. It offers the
12453 following advantages over using string objects:
12454
12455 @enumerate
12456 @item No more cumbersome use of os and os.path functions. Everything can
12457 be done easily through operators, attribute accesses, and method calls.
12458 @item Embodies the semantics of different path types. For example,
12459 comparing Windows paths ignores casing.
12460 @item Well-defined semantics, eliminating any inconsistencies or
12461 ambiguities (forward vs. backward slashes, etc.).
12462 @end enumerate")
12463 (license license:expat)))
12464
12465 (define-public python2-pathlib2-bootstrap
12466 (hidden-package
12467 (package
12468 (inherit python2-pathlib2)
12469 (name "python2-pathlib2-bootstrap")
12470 (propagated-inputs
12471 `(("python2-scandir" ,python2-scandir)
12472 ("python2-six" ,python2-six-bootstrap))))))
12473
12474 (define-public python-jellyfish
12475 (package
12476 (name "python-jellyfish")
12477 (version "0.5.6")
12478 (source (origin
12479 (method url-fetch)
12480 (uri (pypi-uri "jellyfish" version))
12481 (sha256
12482 (base32
12483 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12484 (build-system python-build-system)
12485 (native-inputs
12486 `(("python-pytest" ,python-pytest)))
12487 (home-page "https://github.com/jamesturk/jellyfish")
12488 (synopsis "Approximate and phonetic matching of strings")
12489 (description "Jellyfish uses a variety of string comparison and phonetic
12490 encoding algorithms to do fuzzy string matching.")
12491 (license license:bsd-2)
12492 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12493
12494 (define-public python2-jellyfish
12495 (let ((jellyfish (package-with-python2
12496 (strip-python2-variant python-jellyfish))))
12497 (package/inherit jellyfish
12498 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12499 ,@(package-native-inputs jellyfish))))))
12500
12501 (define-public python2-unicodecsv
12502 (package
12503 (name "python2-unicodecsv")
12504 (version "0.14.1")
12505 (source (origin
12506 (method git-fetch)
12507 ;; The test suite is not included in the PyPi release.
12508 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12509 (uri (git-reference
12510 (url "https://github.com/jdunck/python-unicodecsv")
12511 (commit version)))
12512 (file-name (git-file-name name version))
12513 (sha256
12514 (base32
12515 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12516 (build-system python-build-system)
12517 (arguments
12518 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12519 #:python ,python-2))
12520 (native-inputs
12521 `(("python2-unittest2" ,python2-unittest2)))
12522 (home-page "https://github.com/jdunck/python-unicodecsv")
12523 (synopsis "Unicode CSV module for Python 2")
12524 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12525 module, adding support for Unicode strings.")
12526 (license license:bsd-2)))
12527
12528 (define-public python-pdfminer-six
12529 (package
12530 (name "python-pdfminer-six")
12531 (version "20201018")
12532 ;; There are no tests in the PyPI tarball.
12533 (source
12534 (origin
12535 (method git-fetch)
12536 (uri (git-reference
12537 (url "https://github.com/pdfminer/pdfminer.six")
12538 (commit version)))
12539 (file-name (git-file-name name version))
12540 (sha256
12541 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12542 (build-system python-build-system)
12543 (arguments
12544 `(#:phases
12545 (modify-phases %standard-phases
12546 ;; Tests write to the source tree.
12547 (add-after 'unpack 'make-git-checkout-writable
12548 (lambda _
12549 (for-each make-file-writable (find-files "."))
12550 #t))
12551 (replace 'check
12552 (lambda _
12553 (invoke "make" "test")))
12554 (add-before 'reset-gzip-timestamps 'make-files-writable
12555 (lambda* (#:key outputs #:allow-other-keys)
12556 (let ((out (assoc-ref outputs "out")))
12557 (for-each make-file-writable
12558 (find-files out "\\.gz$"))
12559 #t))))))
12560 (propagated-inputs
12561 `(("python-chardet" ,python-chardet)
12562 ("python-cryptography" ,python-cryptography)
12563 ("python-sortedcontainers" ,python-sortedcontainers)))
12564 (native-inputs
12565 `(("python-nose" ,python-nose)
12566 ("python-tox" ,python-tox)))
12567 (home-page "https://github.com/pdfminer/pdfminer.six")
12568 (synopsis "PDF parser and analyzer")
12569 (description "@code{pdfminer.six} is a community maintained fork of
12570 the original PDFMiner. It is a tool for extracting information from PDF
12571 documents. It focuses on getting and analyzing text data. Pdfminer.six
12572 extracts the text from a page directly from the sourcecode of the PDF. It
12573 can also be used to get the exact location, font or color of the text.")
12574 (license license:expat)))
12575
12576 (define-public python-rarfile
12577 (package
12578 (name "python-rarfile")
12579 (version "2.8")
12580 (source (origin
12581 (method url-fetch)
12582 (uri (pypi-uri "rarfile" version))
12583 (sha256
12584 (base32
12585 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12586 (build-system python-build-system)
12587 (arguments
12588 '(#:phases
12589 (modify-phases %standard-phases
12590 (replace 'check
12591 ;; Many tests fail, but the installation proceeds.
12592 (lambda _ (invoke "make" "-C" "test" "test"))))))
12593 (native-inputs
12594 `(("which" ,which))) ; required for tests
12595 (propagated-inputs
12596 `(("libarchive" ,libarchive)))
12597 (home-page "https://github.com/markokr/rarfile")
12598 (synopsis "RAR archive reader for Python")
12599 (description "This is Python module for RAR archive reading. The interface
12600 is made as zipfile like as possible.")
12601 (license license:isc)))
12602
12603 (define-public python2-rarfile
12604 (package-with-python2 python-rarfile))
12605
12606 (define-public python-magic
12607 (package
12608 (name "python-magic")
12609 (version "0.4.15")
12610 (source
12611 (origin
12612 (method url-fetch)
12613 (uri (pypi-uri "python-magic" version))
12614 (sha256
12615 (base32
12616 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12617 (file-name (string-append name "-" version "-checkout"))))
12618 (build-system python-build-system)
12619 (arguments
12620 ;; The tests are unreliable, so don't run them. The tests fail
12621 ;; under Python3 because they were written for Python2 and
12622 ;; contain import statements that do not work in Python3. One of
12623 ;; the tests fails under Python2 because its assertions are
12624 ;; overly stringent; it relies on comparing output strings which
12625 ;; are brittle and can change depending on the version of
12626 ;; libmagic being used and the system on which the test is
12627 ;; running. In my case, under GuixSD 0.10.0, only one test
12628 ;; failed, and it seems to have failed only because the version
12629 ;; of libmagic that is packaged in Guix outputs a slightly
12630 ;; different (but not wrong) string than the one that the test
12631 ;; expected.
12632 '(#:tests? #f
12633 #:phases (modify-phases %standard-phases
12634 ;; Replace a specific method call with a hard-coded
12635 ;; path to the necessary libmagic.so file in the
12636 ;; store. If we don't do this, then the method call
12637 ;; will fail to find the libmagic.so file, which in
12638 ;; turn will cause any application using
12639 ;; python-magic to fail.
12640 (add-before 'build 'hard-code-path-to-libmagic
12641 (lambda* (#:key inputs #:allow-other-keys)
12642 (let ((file (assoc-ref inputs "file")))
12643 (substitute* "magic.py"
12644 (("ctypes.util.find_library\\('magic'\\)")
12645 (string-append "'" file "/lib/libmagic.so'")))
12646 #t)))
12647 (add-before 'install 'disable-egg-compression
12648 (lambda _
12649 (let ((port (open-file "setup.cfg" "a")))
12650 (display "\n[easy_install]\nzip_ok = 0\n"
12651 port)
12652 (close-port port)
12653 #t))))))
12654 (inputs
12655 ;; python-magic needs to be able to find libmagic.so.
12656 `(("file" ,file)))
12657 (home-page
12658 "https://github.com/ahupp/python-magic")
12659 (synopsis
12660 "File type identification using libmagic")
12661 (description
12662 "This module uses ctypes to access the libmagic file type
12663 identification library. It makes use of the local magic database and
12664 supports both textual and MIME-type output. Note that this module and
12665 the python-file module both provide a \"magic.py\" file; these two
12666 modules, which are different and were developed separately, both serve
12667 the same purpose: to provide Python bindings for libmagic.")
12668 (license license:expat)))
12669
12670 (define-public python2-magic
12671 (package-with-python2 python-magic))
12672
12673 (define-public python2-s3cmd
12674 (package
12675 (name "python2-s3cmd")
12676 (version "1.6.1")
12677 (source
12678 (origin
12679 (method url-fetch)
12680 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12681 "s3cmd-" version ".tar.gz"))
12682 (sha256
12683 (base32
12684 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12685 (build-system python-build-system)
12686 (arguments
12687 ;; s3cmd is written for python2 only and contains no tests.
12688 `(#:python ,python-2
12689 #:tests? #f))
12690 (propagated-inputs
12691 `(("python2-dateutil" ,python2-dateutil)
12692 ;; The python-file package also provides a magic.py module.
12693 ;; This is an unfortunate state of affairs; however, s3cmd
12694 ;; fails to install if it cannot find specifically the
12695 ;; python-magic package. Thus we include it, instead of using
12696 ;; python-file. Ironically, s3cmd sometimes works better
12697 ;; without libmagic bindings at all:
12698 ;; https://github.com/s3tools/s3cmd/issues/198
12699 ("python2-magic" ,python2-magic)))
12700 (home-page "https://s3tools.org/s3cmd")
12701 (synopsis "Command line tool for S3-compatible storage services")
12702 (description
12703 "S3cmd is a command line tool for uploading, retrieving and managing data
12704 in storage services that are compatible with the Amazon Simple Storage
12705 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12706 GnuPG encryption, and more. It also supports management of Amazon's
12707 CloudFront content delivery network.")
12708 (license license:gpl2+)))
12709
12710 (define-public python-pkgconfig
12711 (package
12712 (name "python-pkgconfig")
12713 (version "1.3.1")
12714 (source
12715 (origin
12716 (method url-fetch)
12717 (uri (pypi-uri "pkgconfig" version))
12718 (sha256
12719 (base32
12720 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12721 (build-system python-build-system)
12722 (native-inputs
12723 `(("python-nose" ,python-nose)))
12724 (inputs
12725 `(("pkg-config" ,pkg-config)))
12726 (arguments
12727 `(#:phases
12728 (modify-phases %standard-phases
12729 (add-before 'build 'patch
12730 ;; Hard-code the path to pkg-config.
12731 (lambda _
12732 (substitute* "pkgconfig/pkgconfig.py"
12733 (("cmd = 'pkg-config")
12734 (string-append "cmd = '" (which "pkg-config"))))
12735 #t))
12736 (replace 'check
12737 (lambda _
12738 (invoke "nosetests" "test.py"))))))
12739 (home-page "https://github.com/matze/pkgconfig")
12740 (synopsis "Python interface for pkg-config")
12741 (description "This module provides a Python interface to pkg-config. It
12742 can be used to find all pkg-config packages, check if a package exists,
12743 check if a package meets certain version requirements, query CFLAGS and
12744 LDFLAGS and parse the output to build extensions with setup.py.")
12745 (license license:expat)))
12746
12747 (define-public python2-pkgconfig
12748 (package-with-python2 python-pkgconfig))
12749
12750 (define-public python-bz2file
12751 (package
12752 (name "python-bz2file")
12753 (version "0.98")
12754 (source
12755 (origin
12756 (method url-fetch)
12757 (uri (pypi-uri "bz2file" version))
12758 (sha256
12759 (base32
12760 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12761 (build-system python-build-system)
12762 (arguments
12763 `(#:tests? #f)) ; Tests use deprecated python modules.
12764 (home-page "https://github.com/nvawda/bz2file")
12765 (synopsis "Read and write bzip2-compressed files")
12766 (description
12767 "Bz2file is a Python library for reading and writing bzip2-compressed
12768 files. It contains a drop-in replacement for the I/O interface in the
12769 standard library's @code{bz2} module, including features from the latest
12770 development version of CPython that are not available in older releases.")
12771 (license license:asl2.0)))
12772
12773 (define-public python2-bz2file
12774 (package-with-python2 python-bz2file))
12775
12776 (define-public python-future
12777 (package
12778 (name "python-future")
12779 (version "0.17.1")
12780 (source
12781 (origin
12782 (method url-fetch)
12783 (uri (pypi-uri "future" version))
12784 (sha256
12785 (base32
12786 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12787 (build-system python-build-system)
12788 ;; Many tests connect to the network or are otherwise flawed.
12789 ;; https://github.com/PythonCharmers/python-future/issues/210
12790 (arguments
12791 `(#:tests? #f))
12792 (home-page "https://python-future.org")
12793 (synopsis "Single-source support for Python 3 and 2")
12794 (description
12795 "@code{python-future} is the missing compatibility layer between Python 2 and
12796 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12797 to support both Python 2 and Python 3 with minimal overhead.")
12798 (license license:expat)))
12799
12800 (define-public python2-future
12801 (package-with-python2 python-future))
12802
12803 (define-public python-cysignals
12804 (package
12805 (name "python-cysignals")
12806 (version "1.9.0")
12807 (source
12808 (origin
12809 (method url-fetch)
12810 (uri (pypi-uri "cysignals" version))
12811 (sha256
12812 (base32
12813 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12814 (build-system python-build-system)
12815 (native-inputs
12816 `(("python-cython" ,python-cython)
12817 ("python-sphinx" ,python-sphinx)))
12818 (inputs
12819 `(("pari-gp" ,pari-gp)))
12820 (arguments
12821 `(#:modules ((guix build python-build-system)
12822 ((guix build gnu-build-system) #:prefix gnu:)
12823 (guix build utils))
12824 ;; FIXME: Tests are executed after installation and currently fail
12825 ;; when not installing into standard locations; the author is working
12826 ;; on a fix.
12827 #:tests? #f
12828 #:phases
12829 (modify-phases %standard-phases
12830 (add-before
12831 'build 'configure
12832 (assoc-ref gnu:%standard-phases 'configure)))))
12833 (home-page
12834 "https://github.com/sagemath/cysignals")
12835 (synopsis
12836 "Handling of interrupts and signals for Cython")
12837 (description
12838 "The cysignals package provides mechanisms to handle interrupts (and
12839 other signals and errors) in Cython code, using two related approaches,
12840 for mixed Cython/Python code or external C libraries and pure Cython code,
12841 respectively.")
12842 (license license:lgpl3+)))
12843
12844 (define-public python2-cysignals
12845 (package-with-python2 python-cysignals))
12846
12847 (define-public python2-shedskin
12848 (package
12849 (name "python2-shedskin")
12850 (version "0.9.4")
12851 (source
12852 (origin
12853 (method url-fetch)
12854 (uri (string-append "https://github.com/shedskin/shedskin/"
12855 "releases/download/v" version
12856 "/shedskin-" version ".tgz"))
12857 (sha256
12858 (base32
12859 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12860 (build-system python-build-system)
12861 (arguments
12862 `(#:python ,python-2
12863 #:phases (modify-phases %standard-phases
12864 (add-after 'unpack 'fix-resulting-include-libs
12865 (lambda* (#:key inputs #:allow-other-keys)
12866 (let ((libgc (assoc-ref inputs "libgc"))
12867 (pcre (assoc-ref inputs "pcre")))
12868 (substitute* "shedskin/makefile.py"
12869 (("variable == 'CCFLAGS':[ ]*")
12870 (string-append "variable == 'CCFLAGS':\n"
12871 " line += ' -I " pcre "/include"
12872 " -I " libgc "/include'"))
12873 (("variable == 'LFLAGS':[ ]*")
12874 (string-append "variable == 'LFLAGS':\n"
12875 " line += ' -L" pcre "/lib"
12876 " -L " libgc "/lib'")))
12877 #t))))))
12878 (inputs `(("pcre" ,pcre)
12879 ("libgc" ,libgc)))
12880 (home-page "https://shedskin.github.io/")
12881 (synopsis "Experimental Python-2 to C++ Compiler")
12882 (description (string-append "This is an experimental compiler for a subset of
12883 Python. It generates C++ code and a Makefile."))
12884 (license (list license:gpl3 license:bsd-3 license:expat))))
12885
12886 (define-public python2-rope
12887 (package
12888 (name "python2-rope")
12889 (version "0.11.0")
12890 (source
12891 (origin
12892 (method url-fetch)
12893 (uri (pypi-uri "rope" version))
12894 (sha256
12895 (base32
12896 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12897 (arguments
12898 ;; Rope has only partial python3 support, see `python-rope'
12899 `(#:python ,python-2))
12900 (build-system python-build-system)
12901 (native-inputs
12902 `(("python2-unittest2" ,python2-unittest2)))
12903 (home-page "https://github.com/python-rope/rope")
12904 (synopsis "Refactoring library for Python")
12905 (description "Rope is a refactoring library for Python. It facilitates
12906 the renaming, moving and extracting of attributes, functions, modules, fields
12907 and parameters in Python 2 source code. These refactorings can also be applied
12908 to occurrences in strings and comments.")
12909 (license license:gpl2)))
12910
12911 (define-public python-rope
12912 (package/inherit python2-rope
12913 (name "python-rope")
12914 (arguments `(#:python ,python-wrapper
12915 ;; XXX: Only partial python3 support, results in some failing
12916 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12917 #:tests? #f))
12918 (properties `((python2-variant . ,(delay python2-rope))))))
12919
12920 (define-public python-py3status
12921 (package
12922 (name "python-py3status")
12923 (version "3.21")
12924 (source
12925 (origin
12926 (method url-fetch)
12927 (uri (pypi-uri "py3status" version))
12928 (sha256
12929 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12930 (build-system python-build-system)
12931 (inputs
12932 `(("file" ,file)))
12933 (arguments
12934 '(#:phases
12935 (modify-phases %standard-phases
12936 ;; 'file' is used for detection of configuration file encoding
12937 ;; let's make link the dependency to particular input
12938 (add-before 'build 'patch-file-path
12939 (lambda* (#:key inputs #:allow-other-keys)
12940 (let ((file-path (assoc-ref inputs "file")))
12941 (substitute* "py3status/parse_config.py"
12942 (("\\[\"file\", \"-b\"")
12943 (string-append "['" file-path "/bin/file', '-b'")))
12944 #t))))
12945 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12946 (home-page "https://github.com/ultrabug/py3status")
12947 (synopsis "Extensible i3status wrapper written in Python")
12948 (description "py3status is an i3status wrapper which extends i3status
12949 functionality in a modular way, allowing you to extend your panel with your
12950 own code, responding to click events and updating clock every second.")
12951 (license license:bsd-3)))
12952
12953 (define-public python2-selectors2
12954 (package
12955 (name "python2-selectors2")
12956 (version "2.0.1")
12957 (source (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "selectors2" version))
12960 (sha256
12961 (base32
12962 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12963 (build-system python-build-system)
12964 (arguments
12965 `(#:python ,python-2))
12966 (native-inputs
12967 `(("python2-mock" ,python2-mock)
12968 ("python2-psutil" ,python2-psutil)))
12969 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12970 (synopsis "Backport of the selectors module from Python 3.5+")
12971 (description
12972 "This package provides a drop-in replacement for the @code{selectors}
12973 module in Python 3.5 and later.")
12974 (license license:expat)))
12975
12976 (define-public python-tblib
12977 (package
12978 (name "python-tblib")
12979 (version "1.6.0")
12980 (source (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "tblib" version))
12983 (sha256
12984 (base32
12985 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12986 (build-system python-build-system)
12987 (arguments
12988 `(#:phases
12989 (modify-phases %standard-phases
12990 (replace 'check
12991 (lambda _
12992 ;; Upstream runs tests after installation and the package itself
12993 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12994 ;; found.
12995 (setenv "PYTHONPATH"
12996 (string-append (getcwd) "/build/lib:"
12997 (getenv "PYTHONPATH")))
12998 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12999 (native-inputs
13000 `(("python-pytest" ,python-pytest)
13001 ("python-six" ,python-six)))
13002 (home-page "https://github.com/ionelmc/python-tblib")
13003 (synopsis "Traceback serialization library")
13004 (description
13005 "Traceback serialization allows you to:
13006
13007 @enumerate
13008 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
13009 different processes. This allows better error handling when running code over
13010 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
13011
13012 @item Parse traceback strings and raise with the parsed tracebacks.
13013 @end enumerate\n")
13014 (license license:bsd-3)))
13015
13016 (define-public python2-tblib
13017 (package-with-python2 python-tblib))
13018
13019 (define-public python-greenlet
13020 (package
13021 (name "python-greenlet")
13022 (version "1.0.0")
13023 (source (origin
13024 (method url-fetch)
13025 (uri (pypi-uri "greenlet" version))
13026 (sha256
13027 (base32
13028 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13029 (build-system python-build-system)
13030 (home-page "https://greenlet.readthedocs.io/")
13031 (synopsis "Lightweight in-process concurrent programming")
13032 (description
13033 "Greenlet package is a spin-off of Stackless, a version of CPython
13034 that supports micro-threads called \"tasklets\". Tasklets run
13035 pseudo-concurrently (typically in a single or a few OS-level threads) and
13036 are synchronized with data exchanges on \"channels\".")
13037 (license (list license:psfl license:expat))))
13038
13039 (define-public python-objgraph
13040 (package
13041 (name "python-objgraph")
13042 (version "3.4.1")
13043 (source
13044 (origin
13045 (method url-fetch)
13046 (uri (pypi-uri "objgraph" version))
13047 (sha256
13048 (base32
13049 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13050 (build-system python-build-system)
13051 (propagated-inputs
13052 `(("python-graphviz" ,python-graphviz)))
13053 (native-inputs
13054 `(("python-mock" ,python-mock)
13055 ("graphviz" ,graphviz)))
13056 (home-page "https://mg.pov.lt/objgraph/")
13057 (synopsis "Draw Python object reference graphs with graphviz")
13058 (description
13059 "This package provides tools to draw Python object reference graphs with
13060 graphviz.")
13061 (license license:expat)))
13062
13063 (define-public python2-objgraph
13064 (package-with-python2 python-objgraph))
13065
13066 (define-public python-gevent
13067 (package
13068 (name "python-gevent")
13069 (version "21.1.2")
13070 (source (origin
13071 (method url-fetch)
13072 (uri (pypi-uri "gevent" version))
13073 (sha256
13074 (base32
13075 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13076 (modules '((guix build utils)))
13077 (snippet
13078 '(begin
13079 ;; unbunding libev and c-ares
13080 (delete-file-recursively "deps")))))
13081 (build-system python-build-system)
13082 (arguments
13083 `(#:modules ((ice-9 ftw)
13084 (ice-9 match)
13085 (srfi srfi-26)
13086 (guix build utils)
13087 (guix build python-build-system))
13088 #:phases (modify-phases %standard-phases
13089 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13090 (lambda _
13091 (substitute* "src/gevent/subprocess.py"
13092 (("/bin/sh") (which "sh")))
13093 (for-each (lambda (file)
13094 (substitute* file
13095 (("/bin/sh") (which "sh"))
13096 (("/bin/true") (which "true"))))
13097 (find-files "src/greentest" "\\.py$"))))
13098 (add-before 'build 'do-not-use-bundled-sources
13099 (lambda _
13100 (setenv "GEVENTSETUP_EMBED" "0")
13101
13102 ;; Prevent building bundled libev.
13103 (substitute* "setup.py"
13104 (("run_make=_BUILDING")
13105 "run_make=False"))))
13106 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13107 (lambda* (#:key inputs #:allow-other-keys)
13108 (let ((greenlet (string-append
13109 (assoc-ref inputs "python-greenlet")
13110 "/include")))
13111 (match (scandir greenlet
13112 (lambda (item)
13113 (string-prefix? "python" item)))
13114 ((python)
13115 (setenv "C_INCLUDE_PATH"
13116 (string-append greenlet "/" python ":"
13117 (or (getenv "C_INCLUDE_PATH")
13118 ""))))))))
13119 (add-before 'check 'pretend-to-be-CI
13120 (lambda _
13121 ;; A few tests are skipped due to network constraints or
13122 ;; get longer timeouts when running in a CI environment.
13123 ;; Piggy-back on that, as we need the same adjustments.
13124 (setenv "TRAVIS" "1")
13125 (setenv "APPVEYOR" "1")))
13126 (add-before 'check 'adjust-tests
13127 (lambda _
13128 (let ((disabled-tests
13129 '(;; These tests relies on networking which is
13130 ;; not available in the build container.
13131 "test__getaddrinfo_import.py"
13132 "test__server_pywsgi.py"
13133 ;; XXX: These tests borrow functionality from the
13134 ;; Python builtin 'test' module, but it is not
13135 ;; installed with the Guix Python distribution.
13136 "test_smtpd.py"
13137 "test_wsgiref.py"
13138 "test_urllib2.py"
13139 "test_thread.py"
13140 "test_threading.py"
13141 "test__threading_2.py"
13142 ;; These tests rely on KeyboardInterrupts which do not
13143 ;; work inside the build container for some reason
13144 ;; (lack of controlling terminal?).
13145 "test_subprocess.py"
13146 "test__issues461_471.py"
13147 ;; TODO: Patch out the tests that use getprotobyname, etc
13148 ;; instead of disabling all the tests from these files.
13149 "test__resolver_dnspython.py"
13150 "test__doctests.py"
13151 "test__all__.py"
13152 "test___config.py"
13153 "test__execmodules.py")))
13154 (call-with-output-file "skipped_tests.txt"
13155 (lambda (port)
13156 (format port "~a~%"
13157 (string-join disabled-tests "\n")))))))
13158 (replace 'check
13159 (lambda _
13160 ;; Make sure the build directory is on PYTHONPATH.
13161 (setenv "PYTHONPATH"
13162 (string-append
13163 (getenv "PYTHONPATH") ":"
13164 (getcwd) "/build/"
13165 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13166
13167 ;; Use the build daemons configured number of workers.
13168 (setenv "NWORKERS" (number->string (parallel-job-count)))
13169
13170 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13171 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13172 (propagated-inputs
13173 `(("python-greenlet" ,python-greenlet)
13174 ("python-objgraph" ,python-objgraph)
13175 ("python-zope.event" ,python-zope-event)
13176 ("python-zope.interface" ,python-zope-interface)))
13177 (native-inputs
13178 `(("python-six" ,python-six)
13179
13180 ;; For tests.
13181 ("python-dnspython" ,python-dnspython)
13182 ("python-psutil" ,python-psutil)))
13183 (inputs
13184 `(("c-ares" ,c-ares)
13185 ("libev" ,libev)))
13186 (home-page "https://www.gevent.org/")
13187 (synopsis "Coroutine-based network library")
13188 (description
13189 "@code{gevent} is a coroutine-based Python networking library that uses
13190 @code{greenlet} to provide a high-level synchronous API on top of the
13191 @code{libev} event loop.")
13192 (license license:expat)))
13193
13194 (define-public python-fastimport
13195 (package
13196 (name "python-fastimport")
13197 (version "0.9.8")
13198 (source
13199 (origin
13200 (method url-fetch)
13201 (uri (pypi-uri "fastimport" version))
13202 (sha256
13203 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
13204 (build-system python-build-system)
13205 (home-page "https://github.com/jelmer/python-fastimport")
13206 (synopsis "VCS fastimport parser and generator in Python")
13207 (description "This package provides a parser for and generator of the Git
13208 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13209 format.")
13210 (license license:gpl2+)))
13211
13212 (define-public python2-fastimport
13213 (package-with-python2 python-fastimport))
13214
13215 (define-public python-twisted
13216 (package
13217 (name "python-twisted")
13218 (version "19.7.0")
13219 (source (origin
13220 (method url-fetch)
13221 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13222 (sha256
13223 (base32
13224 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13225 (build-system python-build-system)
13226 (arguments
13227 '(#:tests? #f)) ; FIXME: some tests fail
13228 (propagated-inputs
13229 `(("python-zope-interface" ,python-zope-interface)
13230 ("python-pyhamcrest" ,python-pyhamcrest)
13231 ("python-incremental" ,python-incremental)
13232 ("python-hyperlink" ,python-hyperlink)
13233 ("python-constantly" ,python-constantly)
13234 ("python-automat" ,python-automat)))
13235 (home-page "https://twistedmatrix.com/")
13236 (synopsis "Asynchronous networking framework written in Python")
13237 (description
13238 "Twisted is an extensible framework for Python programming, with special
13239 focus on event-based network programming and multiprotocol integration.")
13240 (license license:expat)))
13241
13242 (define-public python2-twisted
13243 (package-with-python2 python-twisted))
13244
13245 (define-public python-pika
13246 (package
13247 (name "python-pika")
13248 (version "0.12.0")
13249 (source
13250 (origin
13251 (method url-fetch)
13252 (uri (pypi-uri "pika" version))
13253 (sha256
13254 (base32
13255 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13256 (build-system python-build-system)
13257 (native-inputs
13258 `(("python-pyev" ,python-pyev)
13259 ("python-tornado" ,python-tornado)
13260 ("python-twisted" ,python-twisted)))
13261 (home-page "https://pika.readthedocs.org")
13262 (synopsis "Pure Python AMQP Client Library")
13263 (description
13264 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13265 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13266 network support library.")
13267 (license license:bsd-3)))
13268
13269 (define-public python2-pika
13270 (package-with-python2 python-pika))
13271
13272 (define-public python-ply
13273 (package
13274 (name "python-ply")
13275 (version "3.11")
13276 (source
13277 (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "ply" version))
13280 (sha256
13281 (base32
13282 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13283 (build-system python-build-system)
13284 (home-page "http://www.dabeaz.com/ply/")
13285 (synopsis "Python Lex & Yacc")
13286 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13287 It uses LR parsing and does extensive error checking.")
13288 (license license:bsd-3)))
13289
13290 (define-public python-tabulate
13291 (package
13292 (name "python-tabulate")
13293 (version "0.8.7")
13294 (source (origin
13295 (method url-fetch)
13296 (uri (pypi-uri "tabulate" version))
13297 (sha256
13298 (base32
13299 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
13300 (build-system python-build-system)
13301 (arguments
13302 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13303 ;; and the latest release is not tagged in the upstream repository.
13304 '(#:tests? #f))
13305 (home-page "https://bitbucket.org/astanin/python-tabulate")
13306 (synopsis "Pretty-print tabular data")
13307 (description
13308 "Tabulate is a library and command-line utility to pretty-print tabular
13309 data in Python.")
13310 (license license:expat)))
13311
13312 (define-public python2-tabulate
13313 (package-with-python2 python-tabulate))
13314
13315 (define-public python-kazoo
13316 (package
13317 (name "python-kazoo")
13318 (version "2.4.0")
13319 (source
13320 (origin
13321 (method url-fetch)
13322 (uri (pypi-uri "kazoo" version))
13323 (sha256
13324 (base32
13325 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13326 (build-system python-build-system)
13327 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13328 (propagated-inputs
13329 `(("python-six" ,python-six)))
13330 (home-page "https://kazoo.readthedocs.org")
13331 (synopsis "High-level Zookeeper client library")
13332 (description
13333 "Kazoo is a Python client library for the Apache Zookeeper distributed
13334 application service. It is designed to be easy to use and to avoid common
13335 programming errors.")
13336 (license license:asl2.0)))
13337
13338 (define-public python2-kazoo
13339 (package-with-python2 python-kazoo))
13340
13341 (define-public python-pykafka
13342 (package
13343 (name "python-pykafka")
13344 (version "2.4.0")
13345 (source (origin
13346 (method url-fetch)
13347 (uri (pypi-uri "pykafka" version))
13348 (sha256
13349 (base32
13350 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13351 (build-system python-build-system)
13352 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13353 (propagated-inputs
13354 `(("python-gevent" ,python-gevent)
13355 ("python-kazoo" ,python-kazoo)
13356 ("python-tabulate" ,python-tabulate)))
13357 (inputs
13358 `(("librdkafka" ,librdkafka)))
13359 (home-page "https://pykafka.readthedocs.io/")
13360 (synopsis "Apache Kafka client for Python")
13361 (description
13362 "PyKafka is a client for the Apache Kafka distributed messaging system.
13363 It includes Python implementations of Kafka producers and consumers, which
13364 are optionally backed by a C extension built on librdkafka.")
13365 (license license:asl2.0)))
13366
13367 (define-public python-wcwidth
13368 (package
13369 (name "python-wcwidth")
13370 (version "0.1.8")
13371 (source (origin
13372 (method url-fetch)
13373 (uri (pypi-uri "wcwidth" version))
13374 (sha256
13375 (base32
13376 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13377 (build-system python-build-system)
13378 (home-page "https://github.com/jquast/wcwidth")
13379 (synopsis "Measure number of terminal column cells of wide-character codes")
13380 (description "Wcwidth measures the number of terminal column cells of
13381 wide-character codes. It is useful for those implementing a terminal emulator,
13382 or programs that carefully produce output to be interpreted by one. It is a
13383 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13384 specified in POSIX.1-2001 and POSIX.1-2008.")
13385 (license license:expat)))
13386
13387 (define-public python2-wcwidth
13388 (package-with-python2 python-wcwidth))
13389
13390 (define-public python2-jsonrpclib
13391 (package
13392 (name "python2-jsonrpclib")
13393 (version "0.1.7")
13394 (source (origin
13395 (method url-fetch)
13396 (uri (pypi-uri "jsonrpclib" version))
13397 (sha256
13398 (base32
13399 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13400 (build-system python-build-system)
13401 (arguments
13402 `(#:tests? #f
13403 #:python ,python-2))
13404 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13405 (synopsis "Implementation of JSON-RPC specification for Python")
13406 (description
13407 "This library is an implementation of the JSON-RPC specification.
13408 It supports both the original 1.0 specification, as well as the
13409 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13410 etc.")
13411 (license license:asl2.0)))
13412
13413 (define-public python-chai
13414 (package
13415 (name "python-chai")
13416 (version "1.1.2")
13417 (source (origin
13418 (method url-fetch)
13419 (uri (pypi-uri "chai" version))
13420 (sha256
13421 (base32
13422 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13423 (build-system python-build-system)
13424 (home-page "https://github.com/agoragames/chai")
13425 (synopsis "Mocking framework for Python")
13426 (description
13427 "Chai provides an api for mocking, stubbing and spying your python
13428 objects, patterned after the Mocha library for Ruby.")
13429 (license license:bsd-3)))
13430
13431 (define-public python2-chai
13432 (package-with-python2 python-chai))
13433
13434 (define-public python-inflection
13435 (package
13436 (name "python-inflection")
13437 (version "0.3.1")
13438 (source
13439 (origin (method url-fetch)
13440 (uri (pypi-uri "inflection" version))
13441 (sha256
13442 (base32
13443 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13444 (build-system python-build-system)
13445 (native-inputs
13446 `(("python-pytest" ,python-pytest)))
13447 (home-page "https://github.com/jpvanhal/inflection")
13448 (synopsis "Python string transformation library")
13449 (description
13450 "Inflection is a string transformation library. It singularizes
13451 and pluralizes English words, and transforms strings from CamelCase to
13452 underscored string.")
13453 (license license:expat)))
13454
13455 (define-public python2-inflection
13456 (package-with-python2 python-inflection))
13457
13458 (define-public python-pylev
13459 (package
13460 (name "python-pylev")
13461 (version "1.3.0")
13462 (source (origin
13463 (method url-fetch)
13464 (uri (pypi-uri "pylev" version))
13465 (sha256
13466 (base32
13467 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13468 (build-system python-build-system)
13469 (home-page "https://github.com/toastdriven/pylev")
13470 (synopsis "Levenshtein distance implementation in Python")
13471 (description "Pure Python Levenshtein implementation, based off the
13472 Wikipedia code samples at
13473 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13474 (license license:bsd-3)))
13475
13476 (define-public python2-pylev
13477 (package-with-python2 python-pylev))
13478
13479 (define-public python-cleo
13480 (package
13481 (name "python-cleo")
13482 (version "0.8.1")
13483 (source (origin
13484 (method url-fetch)
13485 (uri (pypi-uri "cleo" version))
13486 (sha256
13487 (base32
13488 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13489 (build-system python-build-system)
13490 (native-inputs
13491 `( ;; For testing
13492 ("python-mock" ,python-mock)
13493 ("python-pytest-mock" ,python-pytest-mock)
13494 ("python-pytest" ,python-pytest)))
13495 (propagated-inputs
13496 `(("python-backpack" ,python-backpack)
13497 ("python-clikit" ,python-clikit)
13498 ("python-pastel" ,python-pastel)
13499 ("python-pylev" ,python-pylev)))
13500 (home-page "https://github.com/sdispater/cleo")
13501 (synopsis "Command-line arguments library for Python")
13502 (description
13503 "Cleo allows you to create command-line commands with signature in
13504 docstring and colored output.")
13505 (license license:expat)))
13506
13507 (define-public python2-cleo
13508 (package-with-python2 python-cleo))
13509
13510 (define-public python-tomlkit
13511 (package
13512 (name "python-tomlkit")
13513 (version "0.7.0")
13514 (source
13515 (origin
13516 (method url-fetch)
13517 (uri (pypi-uri "tomlkit" version))
13518 (sha256
13519 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13520 (build-system python-build-system)
13521 (native-inputs
13522 `(("python-pytest" ,python-pytest)
13523 ("python-pyyaml" ,python-pyyaml)))
13524 (home-page "https://github.com/sdispater/tomlkit")
13525 (synopsis "Style-preserving TOML library")
13526 (description
13527 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13528 preserves all comments, indentations, whitespace and internal element ordering,
13529 and makes them accessible and editable via an intuitive API. It can also
13530 create new TOML documents from scratch using the provided helpers. Part of the
13531 implementation has been adapted, improved, and fixed from Molten.")
13532 (license license:expat)))
13533
13534 (define-public python-shellingham
13535 (package
13536 (name "python-shellingham")
13537 (version "1.3.2")
13538 (source
13539 (origin
13540 (method url-fetch)
13541 (uri (pypi-uri "shellingham" version))
13542 (sha256
13543 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13544 (build-system python-build-system)
13545 (arguments
13546 `(#:phases
13547 (modify-phases %standard-phases
13548 (add-after 'unpack 'restore-setup.py
13549 ;; setup.py will return in the next release.
13550 ;; <https://github.com/sarugaku/shellingham/issues/33>
13551 (lambda _
13552 (with-output-to-file "setup.py"
13553 (lambda _
13554 (display "from setuptools import setup\nsetup()\n")))
13555 #t)))))
13556 (home-page "https://github.com/sarugaku/shellingham")
13557 (synopsis "Tool to detect surrounding shell")
13558 (description
13559 "Shellingham detects what shell the current Python executable is
13560 running in.")
13561 (license license:isc)))
13562
13563 (define-public python-memcached
13564 (package
13565 (name "python-memcached")
13566 (version "1.59")
13567 (source
13568 (origin
13569 (method url-fetch)
13570 (uri (pypi-uri "python-memcached" version))
13571 (sha256
13572 (base32
13573 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13574 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13575 (build-system python-build-system)
13576 (propagated-inputs `(("python-six" ,python-six)))
13577 (home-page
13578 "https://github.com/linsomniac/python-memcached")
13579 (synopsis "Pure python memcached client")
13580 (description
13581 "This software is a pure Python interface to the memcached memory cache
13582 daemon. It is the client side software which allows storing values in one or
13583 more, possibly remote, memcached servers.")
13584 (license license:psfl)))
13585
13586 (define-public python-clikit
13587 (package
13588 (name "python-clikit")
13589 (version "0.6.2")
13590 (source
13591 (origin
13592 (method url-fetch)
13593 (uri (pypi-uri "clikit" version))
13594 (sha256
13595 (base32
13596 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13597 (build-system python-build-system)
13598 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13599 (propagated-inputs
13600 `(("python-crashtest" ,python-crashtest)
13601 ("python-pastel" ,python-pastel)
13602 ("python-pylev" ,python-pylev)))
13603 (home-page "https://github.com/sdispater/clikit")
13604 (synopsis "Group of utilities to build command line interfaces")
13605 (description
13606 "CliKit is a group of utilities to build testable command line
13607 interfaces.")
13608 (properties `((python2-variant . ,(delay python2-clikit))))
13609 (license license:expat)))
13610
13611 (define-public python2-clikit
13612 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13613 (package/inherit
13614 base
13615 (propagated-inputs
13616 `(("python-enum34" ,python2-enum34)
13617 ("python-typing" ,python2-typing)
13618 ,@(package-propagated-inputs base))))))
13619
13620 (define-public python-msgpack-python
13621 (package
13622 (name "python-msgpack-python")
13623 (version "0.5.6")
13624 (source
13625 (origin
13626 (method url-fetch)
13627 (uri (pypi-uri "msgpack-python" version))
13628 (sha256
13629 (base32
13630 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13631 (build-system python-build-system)
13632 (home-page "https://msgpack.org/")
13633 (synopsis "Package to deserialize messages in MessagePack binary format")
13634 (description
13635 "MessagePack is an efficient binary serialization format. It lets you
13636 exchange data among multiple languages like JSON. But it's faster and
13637 smaller. Small integers are encoded into a single byte, and typical short
13638 strings require only one extra byte in addition to the strings themselves.")
13639 (license license:asl2.0)))
13640
13641 (define-public python-cachy
13642 (package
13643 (name "python-cachy")
13644 (version "0.3.0")
13645 (source
13646 (origin
13647 (method url-fetch)
13648 (uri (pypi-uri "cachy" version))
13649 (sha256
13650 (base32
13651 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13652 (build-system python-build-system)
13653 (arguments
13654 '(#:phases
13655 (modify-phases %standard-phases
13656 (replace 'check
13657 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13658 "pytest"))))))
13659 (native-inputs
13660 `(("memcached" ,memcached)
13661 ("python-fakeredis" ,python-fakeredis)
13662 ("python-flexmock" ,python-flexmock)
13663 ("python-pifpaf" ,python-pifpaf)
13664 ("python-pytest" ,python-pytest)))
13665 (propagated-inputs
13666 `(("python-memcached" ,python-memcached)
13667 ("python-msgpack-python" ,python-msgpack-python)
13668 ("python-redis" ,python-redis)))
13669 (home-page "https://github.com/sdispater/cachy")
13670 (synopsis "Simple yet effective caching library")
13671 (description
13672 "Cachy provides a simple yet effective caching library. A simple but
13673 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13674 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13675 (license license:expat)))
13676
13677 (define-public poetry
13678 (package
13679 (name "poetry")
13680 (version "1.1.5")
13681 ;; Poetry can only be built from source with Poetry.
13682 (source
13683 (origin
13684 (method url-fetch)
13685 (uri (pypi-uri "poetry" version))
13686 (sha256
13687 (base32
13688 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13689 (build-system python-build-system)
13690 (arguments
13691 `(#:tests? #f ;; Pypi does not have tests.
13692 #:phases
13693 (modify-phases %standard-phases
13694 (add-before 'build 'patch-setup-py
13695 (lambda _
13696 (substitute* "setup.py"
13697 ;; Allow newer versions of python-keyring.
13698 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13699 ;; TODO: remove after the next release cycle,
13700 ;; when packaging has been updated.
13701 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13702 #t)))))
13703 (propagated-inputs
13704 `(("python-cachecontrol" ,python-cachecontrol)
13705 ("python-cachy" ,python-cachy)
13706 ("python-cleo" ,python-cleo)
13707 ("python-clikit" ,python-clikit)
13708 ("python-html5lib" ,python-html5lib)
13709 ("python-keyring" ,python-keyring)
13710 ("python-msgpack-transitional" ,python-msgpack-transitional)
13711 ("python-packaging" ,python-packaging)
13712 ("python-pexpect" ,python-pexpect)
13713 ("python-pip" ,python-pip)
13714 ("python-pkginfo" ,python-pkginfo)
13715 ("python-poetry-core" ,python-poetry-core)
13716 ("python-requests" ,python-requests)
13717 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13718 ("python-shellingham" ,python-shellingham)
13719 ("python-tomlkit" ,python-tomlkit)
13720 ("python-virtualenv" ,python-virtualenv)))
13721 (home-page "https://python-poetry.org")
13722 (synopsis "Python dependency management and packaging made easy")
13723 (description "Poetry is a tool for dependency management and packaging
13724 in Python. It allows you to declare the libraries your project depends on and
13725 it will manage (install/update) them for you.")
13726 (license license:expat)))
13727
13728 (define-public python-lark-parser
13729 (package
13730 (name "python-lark-parser")
13731 (version "0.9.0")
13732 (source (origin
13733 (method url-fetch)
13734 (uri (pypi-uri "lark-parser" version))
13735 (sha256
13736 (base32
13737 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13738 (build-system python-build-system)
13739 (home-page "https://github.com/lark-parser/lark")
13740 (synopsis "Multi-language parser for Python")
13741 (description
13742 "Lark is a parser built with a focus on ergonomics, performance and
13743 resilience. Lark can parse all context-free languages. That means it is
13744 capable of parsing almost any programming language out there, and to
13745 some degree most natural languages too.")
13746 (license license:expat)))
13747
13748 (define-public python-libcst
13749 (package
13750 (name "python-libcst")
13751 (version "0.3.8")
13752 (source (origin
13753 (method url-fetch)
13754 (uri (pypi-uri "libcst" version))
13755 (sha256
13756 (base32
13757 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13758 (build-system python-build-system)
13759 (arguments
13760 `(#:phases
13761 (modify-phases %standard-phases
13762 (add-after 'unpack 'remove-failing-tests
13763 (lambda _
13764 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13765 (delete-file "libcst/tests/test_fuzz.py")
13766 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13767 (delete-file "libcst/tests/test_pyre_integration.py")
13768 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13769 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13770 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13771 #t))
13772 (add-before 'check 'generate-test-data
13773 (lambda _
13774 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13775 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13776 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13777 (replace 'check
13778 (lambda _
13779 (invoke "python" "-m" "unittest")
13780 #t)))))
13781 (native-inputs
13782 `(("python-black" ,python-black)
13783 ("python-isort" ,python-isort)))
13784 (propagated-inputs
13785 `(("python-typing-extensions" ,python-typing-extensions)
13786 ("python-typing-inspect" ,python-typing-inspect)
13787 ("python-pyyaml" ,python-pyyaml)))
13788 (home-page "https://github.com/Instagram/LibCST")
13789 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13790 (description
13791 "LibCST parses Python source code as a CST tree that keeps all
13792 formatting details (comments, whitespaces, parentheses, etc). It's useful
13793 for building automated refactoring (codemod) applications and linters.
13794 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13795 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13796 naming node types and fields, LibCST creates a lossless CST that looks and
13797 feels like an AST.")
13798 (license (list license:expat
13799 ;; Some files unde libcst/_parser/ are under Python Software
13800 ;; Foundation license (see LICENSE file for details)
13801 license:psfl
13802 ;; libcst/_add_slots.py
13803 license:asl2.0))))
13804
13805 (define-public python-typing-inspect
13806 (package
13807 (name "python-typing-inspect")
13808 (version "0.6.0")
13809 (source (origin
13810 (method url-fetch)
13811 (uri (pypi-uri "typing_inspect" version))
13812 (sha256
13813 (base32
13814 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13815 (build-system python-build-system)
13816 (propagated-inputs
13817 `(("python-mypy-extensions" ,python-mypy-extensions)
13818 ("python-typing-extensions" ,python-typing-extensions)))
13819 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13820 (synopsis "API for inspection of types in the Python @code{typing} module")
13821 (description
13822 "The @code{typing_inspect} module defines experimental API for runtime
13823 inspection of types defined in the Python standard typing module.")
13824 (license license:expat)))
13825
13826 (define-public python-lazy-object-proxy
13827 (package
13828 (name "python-lazy-object-proxy")
13829 (version "1.5.1")
13830 (source (origin
13831 (method url-fetch)
13832 (uri (pypi-uri "lazy-object-proxy" version))
13833 (sha256
13834 (base32
13835 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13836 (native-inputs
13837 `(("python-setuptools-scm" ,python-setuptools-scm)))
13838 (build-system python-build-system)
13839 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13840 (synopsis "Lazy object proxy for python")
13841 (description
13842 "Lazy object proxy is an object that wraps a callable but defers the call
13843 until the object is actually required, and caches the result of said call.")
13844 (license license:bsd-2)))
13845
13846 (define-public python2-lazy-object-proxy
13847 (package-with-python2 python-lazy-object-proxy))
13848
13849 (define-public python-dnspython
13850 (package
13851 (name "python-dnspython")
13852 (version "2.0.0")
13853 (source (origin
13854 (method url-fetch)
13855 (uri (pypi-uri "dnspython" version ".zip"))
13856 (sha256
13857 (base32
13858 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13859 (build-system python-build-system)
13860 (native-inputs `(("unzip" ,unzip)))
13861 (arguments '(#:tests? #f)) ; XXX: requires internet access
13862 (home-page "https://www.dnspython.org")
13863 (synopsis "DNS toolkit for Python")
13864 (description
13865 "dnspython is a DNS toolkit for Python. It supports almost all record
13866 types. It can be used for queries, zone transfers, and dynamic updates.
13867 It supports TSIG authenticated messages and EDNS0.")
13868 (license license:expat)))
13869
13870 (define-public python-dnspython-1.16
13871 (package
13872 (inherit python-dnspython)
13873 (version "1.16.0")
13874 (source (origin
13875 (method url-fetch)
13876 (uri (string-append "http://www.dnspython.org/kits/"
13877 version "/dnspython-" version ".tar.gz"))
13878 (sha256
13879 (base32
13880 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13881 (native-inputs '())))
13882
13883 (define-public python2-dnspython-1.16
13884 (package-with-python2 python-dnspython-1.16))
13885
13886 (define-public python-py3dns
13887 (package
13888 (name "python-py3dns")
13889 (version "3.2.1")
13890 (source
13891 (origin
13892 (method url-fetch)
13893 (uri (pypi-uri "py3dns" version))
13894 (sha256
13895 (base32
13896 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13897 (build-system python-build-system)
13898 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13899 ;; removing functionality so we copy from Nix and "just don't build it".
13900 (arguments
13901 `(#:phases
13902 (modify-phases %standard-phases
13903 (add-after 'unpack 'patch-source
13904 (lambda _
13905 (substitute* "setup.py"
13906 (("import DNS") "")
13907 (("DNS.__version__") (string-append "\"" ,version "\"")))
13908 #t)))
13909 #:tests? #f)) ; Also skip the tests.
13910 (home-page "https://launchpad.net/py3dns")
13911 (synopsis "Python 3 DNS library")
13912 (description "This Python 3 module provides a DNS API for looking up DNS
13913 entries from within Python 3 modules and applications. This module is a
13914 simple, lightweight implementation.")
13915 (license license:psfl)))
13916
13917 (define-public python-email-validator
13918 (package
13919 (name "python-email-validator")
13920 (version "1.0.2")
13921 (source
13922 (origin (method url-fetch)
13923 (uri (pypi-uri "email_validator" version))
13924 (sha256
13925 (base32
13926 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13927 (build-system python-build-system)
13928 (arguments
13929 '(#:phases
13930 (modify-phases %standard-phases
13931 (add-before 'build 'use-dnspython
13932 (lambda _
13933 (substitute* "setup.py"
13934 (("dnspython3") "dnspython"))
13935 #t)))))
13936 (propagated-inputs
13937 `(("python-dnspython" ,python-dnspython)
13938 ("python-idna" ,python-idna)))
13939 (home-page "https://github.com/JoshData/python-email-validator")
13940 (synopsis "Email address validation library for Python")
13941 (description
13942 "This library validates email address syntax and deliverability.")
13943 (license license:cc0)))
13944
13945 (define-public python2-email-validator
13946 (package-with-python2 python-email-validator))
13947
13948 (define-public python-ukpostcodeparser
13949 (package
13950 (name "python-ukpostcodeparser")
13951 (version "1.0.3")
13952 (source (origin
13953 (method url-fetch)
13954 (uri (pypi-uri "UkPostcodeParser" version))
13955 (sha256
13956 (base32
13957 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13958 (build-system python-build-system)
13959 (home-page "https://github.com/hamstah/ukpostcodeparser")
13960 (synopsis "UK Postcode parser for Python")
13961 (description
13962 "This library provides the @code{parse_uk_postcode} function for
13963 parsing UK postcodes.")
13964 (license license:expat)))
13965
13966 (define-public python2-ukpostcodeparser
13967 (package-with-python2 python-ukpostcodeparser))
13968
13969 (define-public python-faker
13970 (package
13971 (name "python-faker")
13972 (version "4.0.2")
13973 (source (origin
13974 (method url-fetch)
13975 (uri (pypi-uri "Faker" version))
13976 (sha256
13977 (base32
13978 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13979 (build-system python-build-system)
13980 (arguments
13981 '(#:phases
13982 (modify-phases %standard-phases
13983 (replace 'check
13984 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13985 (native-inputs
13986 `(;; For testing
13987 ("python-freezegun" ,python-freezegun)
13988 ("python-pytest" ,python-pytest)
13989 ("python-random2" ,python-random2)
13990 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13991 ("python-validators" ,python-validators)))
13992 (propagated-inputs
13993 `(("python-dateutil" ,python-dateutil)
13994 ("python-text-unidecode" ,python-text-unidecode)))
13995 (home-page "https://github.com/joke2k/faker")
13996 (synopsis "Python package that generates fake data")
13997 (description
13998 "Faker is a Python package that generates fake data such as names,
13999 addresses, and phone numbers.")
14000 (license license:expat)
14001 (properties `((python2-variant . ,(delay python2-faker))))))
14002
14003 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
14004 (define-public python2-faker
14005 (let ((base (package-with-python2 (strip-python2-variant
14006 python-faker))))
14007 (package
14008 (inherit base)
14009 (version "3.0.1")
14010 (source (origin
14011 (method url-fetch)
14012 (uri (pypi-uri "Faker" version))
14013 (sha256
14014 (base32
14015 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14016 (native-inputs
14017 `(("python-mock" ,python2-mock)
14018 ,@(package-native-inputs base)))
14019 (propagated-inputs
14020 `(("python2-ipaddress" ,python2-ipaddress)
14021 ("python2-six" ,python2-six)
14022 ,@(package-propagated-inputs base))))))
14023
14024 (define-public python-pyaml
14025 (package
14026 (name "python-pyaml")
14027 (version "18.11.0")
14028 (source (origin
14029 (method url-fetch)
14030 (uri (pypi-uri "pyaml" version))
14031 (sha256
14032 (base32
14033 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14034 (build-system python-build-system)
14035 (native-inputs
14036 `(("python-unidecode" ,python-unidecode)))
14037 (propagated-inputs
14038 `(("python-pyyaml" ,python-pyyaml)))
14039 (home-page "https://github.com/mk-fg/pretty-yaml")
14040 (synopsis "YAML pretty-print library for Python")
14041 (description
14042 "pyaml is a PyYAML based python module to produce pretty and readable
14043 YAML-serialized data.")
14044 (license license:wtfpl2)))
14045
14046 (define-public python2-pyaml
14047 (package-with-python2 python-pyaml))
14048
14049 (define-public python-backpack
14050 (package
14051 (name "python-backpack")
14052 (version "0.1")
14053 (source
14054 (origin
14055 (method url-fetch)
14056 (uri (pypi-uri "backpack" version))
14057 (sha256
14058 (base32
14059 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14060 (build-system python-build-system)
14061 (native-inputs
14062 `(("python-pytest" ,python-pytest)
14063 ("python-nose" ,python-nose)))
14064 (propagated-inputs
14065 `(("python-simplejson" ,python-simplejson)))
14066 (home-page "https://github.com/sdispater/backpack")
14067 (synopsis "Utilities for working with Python collections")
14068 (description "Backpack provides some useful utilities for working with
14069 collections of data.")
14070 (license license:expat)))
14071
14072 (define-public python2-backpack
14073 (package-with-python2 python-backpack))
14074
14075 (define-public python-prompt-toolkit
14076 (package
14077 (name "python-prompt-toolkit")
14078 (version "3.0.9")
14079 (source
14080 (origin
14081 (method url-fetch)
14082 (uri (pypi-uri "prompt_toolkit" version))
14083 (sha256
14084 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14085 (build-system python-build-system)
14086 (arguments
14087 `(#:phases
14088 (modify-phases %standard-phases
14089 (delete 'check)
14090 (add-after 'install 'post-install-check
14091 (lambda* (#:key inputs outputs #:allow-other-keys)
14092 ;; HOME is needed for the test
14093 ;; "test_pathcompleter_can_expanduser".
14094 (setenv "HOME" "/tmp")
14095 (add-installed-pythonpath inputs outputs)
14096 (invoke "py.test"))))))
14097 (propagated-inputs
14098 `(("python-wcwidth" ,python-wcwidth)))
14099 (native-inputs
14100 `(("python-pytest" ,python-pytest)))
14101 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14102 (synopsis "Library for building command line interfaces in Python")
14103 (description
14104 "Prompt-Toolkit is a library for building interactive command line
14105 interfaces in Python. It's like GNU Readline but it also features syntax
14106 highlighting while typing, out-of-the-box multi-line input editing, advanced
14107 code completion, incremental search, support for Chinese double-width
14108 characters, mouse support, and auto suggestions.")
14109 (license license:bsd-3)
14110 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14111
14112 (define-public python-prompt-toolkit-2
14113 (package (inherit python-prompt-toolkit)
14114 (name "python-prompt-toolkit")
14115 (version "2.0.7")
14116 (source
14117 (origin
14118 (method url-fetch)
14119 (uri (pypi-uri "prompt_toolkit" version))
14120 (sha256
14121 (base32
14122 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14123 (propagated-inputs
14124 `(("python-wcwidth" ,python-wcwidth)
14125 ("python-six" ,python-six)
14126 ("python-pygments" ,python-pygments)))
14127 (properties '())))
14128
14129 (define-public python2-prompt-toolkit
14130 (package-with-python2 python-prompt-toolkit-2))
14131
14132 (define-public python-prompt-toolkit-1
14133 (package (inherit python-prompt-toolkit-2)
14134 (version "1.0.15")
14135 (source
14136 (origin
14137 (method url-fetch)
14138 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14139 (sha256
14140 (base32
14141 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14142
14143 (define-public python2-prompt-toolkit-1
14144 (package-with-python2 python-prompt-toolkit-1))
14145
14146 (define-public python-jedi
14147 (package
14148 (name "python-jedi")
14149 (version "0.17.2")
14150 (source
14151 (origin
14152 (method url-fetch)
14153 (uri (pypi-uri "jedi" version))
14154 (sha256
14155 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14156 (build-system python-build-system)
14157 (arguments
14158 `(#:phases
14159 (modify-phases %standard-phases
14160 (replace 'check
14161 (lambda* (#:key tests? #:allow-other-keys)
14162 (when tests?
14163 (setenv "HOME" "/tmp")
14164 (invoke "python" "-m" "pytest" "-vv"))
14165 #t)))))
14166 (native-inputs
14167 `(("python-pytest" ,python-pytest)
14168 ("python-docopt" ,python-docopt)))
14169 (propagated-inputs
14170 `(("python-parso" ,python-parso)))
14171 (home-page "https://github.com/davidhalter/jedi")
14172 (synopsis "Autocompletion and static analysis library for Python")
14173 (description
14174 "Jedi is a static analysis tool for Python that can be used in Integrated
14175 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14176 on a deeper level than many other static analysis frameworks for Python.
14177
14178 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14179 well.")
14180 (license license:expat)))
14181
14182 (define-public python2-jedi
14183 (package-with-python2 python-jedi))
14184
14185 (define-public ptpython
14186 (package
14187 (name "ptpython")
14188 (version "3.0.5")
14189 (source (origin
14190 (method url-fetch)
14191 (uri (pypi-uri "ptpython" version))
14192 (sha256
14193 (base32
14194 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14195 (build-system python-build-system)
14196 (arguments
14197 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14198 (propagated-inputs
14199 `(("python-appdirs" ,python-appdirs)
14200 ("python-jedi" ,python-jedi)
14201 ("python-prompt-toolkit" ,python-prompt-toolkit)
14202 ("python-pygments" ,python-pygments)))
14203 (home-page "https://github.com/jonathanslenders/ptpython")
14204 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14205 (description
14206 "ptpython is a Python read-eval-print loop with IDE-like features.
14207 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14208 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14209 etc.")
14210 (license license:bsd-3)
14211 (properties `((python2-variant . ,(delay ptpython-2))))))
14212
14213 (define-public ptpython-2
14214 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14215 (package/inherit base
14216 (name "ptpython2"))))
14217
14218 (define-public python-stem
14219 (package
14220 (name "python-stem")
14221 (version "1.8.0")
14222 (source
14223 (origin
14224 (method url-fetch)
14225 (uri (pypi-uri "stem" version))
14226 (sha256
14227 (base32
14228 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14229 (build-system python-build-system)
14230 (arguments
14231 `(#:phases
14232 (modify-phases %standard-phases
14233 (replace 'check
14234 (lambda _
14235 (invoke "./run_tests.py" "--unit")
14236 #t)))))
14237 (native-inputs
14238 `(("python-mock" ,python-mock)
14239 ("python-pycodestyle" ,python-pycodestyle)
14240 ("python-pyflakes" ,python-pyflakes)))
14241 (home-page "https://stem.torproject.org/")
14242 (synopsis
14243 "Python controller library that allows applications to interact with Tor")
14244 (description
14245 "Stem is a Python controller library for Tor. With it you can use Tor's
14246 control protocol to script against the Tor process and read descriptor data
14247 relays publish about themselves.")
14248 (license license:lgpl3)))
14249
14250 (define-public python2-stem
14251 (package-with-python2 python-stem))
14252
14253 (define-public python-pyserial
14254 (package
14255 (name "python-pyserial")
14256 (version "3.4")
14257 (source
14258 (origin
14259 (method url-fetch)
14260 (uri (pypi-uri "pyserial" version))
14261 (sha256
14262 (base32
14263 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
14264 (build-system python-build-system)
14265 (arguments
14266 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14267 ;; #:phases
14268 ;; (modify-phases %standard-phases
14269 ;; (replace 'check
14270 ;; (lambda _
14271 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14272 (home-page
14273 "https://github.com/pyserial/pyserial")
14274 (synopsis "Python Serial Port Bindings")
14275 (description "@code{pyserial} provide serial port bindings for Python. It
14276 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14277 and/or Xon/Xoff. The port is accessed in RAW mode.")
14278 (license license:bsd-3)))
14279
14280 (define-public python2-pyserial
14281 (package-with-python2 python-pyserial))
14282
14283 (define-public python-kivy
14284 (package
14285 (name "python-kivy")
14286 (version "1.10.1")
14287 (source
14288 (origin
14289 (method url-fetch)
14290 (uri (pypi-uri "Kivy" version))
14291 (file-name (string-append name "-" version ".tar.gz"))
14292 (sha256
14293 (base32
14294 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14295 (build-system python-build-system)
14296 (arguments
14297 `(#:tests? #f ; Tests require many optional packages
14298 #:phases
14299 (modify-phases %standard-phases
14300 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14301 (lambda* (#:key inputs #:allow-other-keys)
14302 (setenv "KIVY_SDL2_PATH"
14303 (string-append (assoc-ref inputs "sdl-union")
14304 "/include/SDL2"))
14305 #t)))))
14306 (native-inputs
14307 `(("pkg-config" ,pkg-config)
14308 ("python-cython" ,python-cython)))
14309 (inputs
14310 `(("gstreamer" ,gstreamer)
14311 ("mesa" ,mesa)
14312 ("sdl-union"
14313 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14314 (home-page "https://kivy.org")
14315 (synopsis
14316 "Multitouch application framework")
14317 (description
14318 "A software library for rapid development of
14319 hardware-accelerated multitouch applications.")
14320 (license license:expat)))
14321
14322 (define-public python2-kivy
14323 (package-with-python2 python-kivy))
14324
14325 (define-public python-binaryornot
14326 (package
14327 (name "python-binaryornot")
14328 (version "0.4.4")
14329 (source (origin
14330 (method url-fetch)
14331 (uri (pypi-uri "binaryornot" version))
14332 (sha256
14333 (base32
14334 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14335 (build-system python-build-system)
14336 (arguments
14337 `(#:phases
14338 (modify-phases %standard-phases
14339 (add-after 'unpack 'patch-tests
14340 (lambda _
14341 ;; TypeError: binary() got an unexpected keyword argument
14342 ;; 'average_size'.
14343 (substitute* "tests/test_check.py"
14344 (("average_size=512") ""))
14345 #t)))))
14346 (propagated-inputs
14347 `(("python-chardet" ,python-chardet)
14348 ("python-hypothesis" ,python-hypothesis)))
14349 (home-page "https://github.com/audreyr/binaryornot")
14350 (synopsis "Package to check if a file is binary or text")
14351 (description "Ultra-lightweight pure Python package to check if a file is
14352 binary or text.")
14353 (license license:bsd-3)
14354 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14355
14356 (define-public python2-binaryornot
14357 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14358 (package/inherit base
14359 (propagated-inputs
14360 `(("python2-enum34" ,python2-enum34)
14361 ,@(package-propagated-inputs base))))))
14362
14363 (define-public python-binwalk
14364 (package
14365 (name "python-binwalk")
14366 (version "2.2.0")
14367 (source
14368 (origin
14369 (method git-fetch)
14370 (uri (git-reference
14371 (url "https://github.com/ReFirmLabs/binwalk")
14372 (commit (string-append "v" version))))
14373 (file-name (git-file-name name version))
14374 (sha256
14375 (base32
14376 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14377 (build-system python-build-system)
14378 (arguments
14379 `(#:phases
14380 (modify-phases %standard-phases
14381 (add-before 'check 'set-pythonpath
14382 (lambda _
14383 (setenv "PYTHONPATH"
14384 (string-append
14385 (getcwd) "/src/"
14386 ":" (getenv "PYTHONPATH")))
14387 (setenv "HOME" "")
14388 #t)))))
14389 (native-inputs
14390 `(("python-coverage" ,python-coverage)
14391 ("python-nose" ,python-nose)))
14392 (home-page "https://github.com/ReFirmLabs/binwalk")
14393 (synopsis "Firmware analysis tool")
14394 (description "Binwalk is a tool for analyzing, reverse engineering, and
14395 extracting firmware images")
14396 (license license:expat)))
14397
14398 (define-public python-nltk
14399 (package
14400 (name "python-nltk")
14401 (version "3.2.1")
14402 (source (origin
14403 (method url-fetch)
14404 (uri (pypi-uri "nltk" version))
14405 (sha256
14406 (base32
14407 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14408 (build-system python-build-system)
14409 (arguments
14410 '(;; The tests require some extra resources to be downloaded.
14411 ;; TODO Try packaging these resources.
14412 #:tests? #f))
14413 (home-page "http://nltk.org/")
14414 (synopsis "Natural Language Toolkit")
14415 (description "It provides interfaces to over 50 corpora and lexical
14416 resources such as WordNet, along with a suite of text processing libraries
14417 for classification, tokenization, stemming, tagging, parsing, and semantic
14418 reasoning, wrappers for natural language processing libraries.")
14419 (license license:asl2.0)))
14420
14421 (define-public python2-nltk
14422 (package-with-python2 python-nltk))
14423
14424 (define-public python-pymongo
14425 (package
14426 (name "python-pymongo")
14427 (version "3.7.2")
14428 (source (origin
14429 (method url-fetch)
14430 (uri (pypi-uri "pymongo" version))
14431 (sha256
14432 (base32
14433 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14434 (build-system python-build-system)
14435 (propagated-inputs
14436 `(("python-certifi" ,python-certifi)))
14437 (home-page "https://github.com/mongodb/mongo-python-driver")
14438 (synopsis "Python driver for MongoDB")
14439 (description "Python driver for MongoDB.")
14440 (license license:asl2.0)))
14441
14442 (define-public python2-pymongo
14443 (package-with-python2 python-pymongo))
14444
14445 (define-public python-consul
14446 (package
14447 (name "python-consul")
14448 (version "0.6.1")
14449 (source
14450 (origin
14451 (method url-fetch)
14452 (uri (pypi-uri "python-consul" version))
14453 (sha256
14454 (base32
14455 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14456 (build-system python-build-system)
14457 (arguments
14458 '(#:tests? #f)) ; The tests are not distributed
14459 (propagated-inputs
14460 `(("python-requests" ,python-requests)
14461 ("python-six" ,python-six)))
14462 (home-page "https://github.com/cablehead/python-consul")
14463 (synopsis "Python client for Consul")
14464 (description
14465 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14466 discovery, monitoring and configuration.")
14467 (license license:expat)))
14468
14469 (define-public python2-consul
14470 (package-with-python2 python-consul))
14471
14472 (define-public python-schematics
14473 (package
14474 (name "python-schematics")
14475 (version "1.1.1")
14476 (source
14477 (origin
14478 (method git-fetch)
14479 (uri (git-reference
14480 (url "https://github.com/schematics/schematics")
14481 (commit (string-append "v" version))))
14482 (file-name (git-file-name name version))
14483 (sha256
14484 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14485 (build-system python-build-system)
14486 (propagated-inputs
14487 `(("python-six" ,python-six)))
14488 (arguments
14489 ;; The tests require a bunch of not very nice packages with fixed
14490 ;; version requirements (e.g. python-coveralls).
14491 `(#:tests? #f))
14492 (home-page "https://github.com/schematics/schematics")
14493 (synopsis "Python Data Structures for Humans")
14494 (description "Python Data Structures for Humans.")
14495 (license license:bsd-3)))
14496
14497 (define-public python2-schematics
14498 (package-with-python2 python-schematics))
14499
14500 (define-public python-odfpy
14501 (package
14502 (name "python-odfpy")
14503 (version "1.4.1")
14504 (source (origin
14505 (method url-fetch)
14506 (uri (pypi-uri "odfpy" version))
14507 (sha256
14508 (base32
14509 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14510 (arguments
14511 `(#:phases
14512 (modify-phases %standard-phases
14513 (replace 'check
14514 (lambda _
14515 (setenv "PYTHONPATH" (string-append "./build/lib:"
14516 (getenv "PYTHONPATH")))
14517 (invoke "pytest" "-vv"))))))
14518 (build-system python-build-system)
14519 (native-inputs
14520 `(("python-pytest" ,python-pytest)))
14521 (propagated-inputs
14522 `(("python-defusedxml" ,python-defusedxml)))
14523 (home-page "https://github.com/eea/odfpy")
14524 (synopsis "Python API and tools to manipulate OpenDocument files")
14525 (description "Collection of libraries and utility programs written in
14526 Python to manipulate OpenDocument 1.2 files.")
14527 (license
14528 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14529 ;; number of files with other licenses.
14530 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14531
14532 (define-public python2-odfpy
14533 (package-with-python2 python-odfpy))
14534
14535 (define-public python-natsort
14536 (package
14537 (name "python-natsort")
14538 (version "7.0.1")
14539 (source (origin
14540 (method url-fetch)
14541 (uri (pypi-uri "natsort" version))
14542 (sha256
14543 (base32
14544 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14545 (build-system python-build-system)
14546 (arguments
14547 `(#:modules ((guix build utils)
14548 (guix build python-build-system)
14549 (srfi srfi-1)
14550 (srfi srfi-26)
14551 (ice-9 ftw))
14552 #:phases
14553 (modify-phases %standard-phases
14554 (add-before 'check 'set-cachedir
14555 ;; Tests require write access to $HOME by default
14556 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14557 (replace 'check
14558 (lambda _
14559 (let ((cwd (getcwd)))
14560 (setenv "PYTHONPATH"
14561 (string-append
14562 cwd "/build/"
14563 (find (cut string-prefix? "lib" <>)
14564 (scandir (string-append cwd "/build")))
14565 ":"
14566 (getenv "PYTHONPATH")))
14567 (invoke "pytest" "-v")))))))
14568 (native-inputs
14569 `(("python-hypothesis" ,python-hypothesis)
14570 ("python-pytest-cov" ,python-pytest-cov)
14571 ("python-pytest-mock" ,python-pytest-mock)
14572 ("python-pytest" ,python-pytest)))
14573 (propagated-inputs ; TODO: Add python-fastnumbers.
14574 `(("python-pyicu" ,python-pyicu)))
14575 (home-page "https://github.com/SethMMorton/natsort")
14576 (synopsis "Natural sorting for python and shell")
14577 (description
14578 "Natsort lets you apply natural sorting on lists instead of
14579 lexicographical. If you use the built-in @code{sorted} method in python
14580 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14581 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14582 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14583 identifies numbers and sorts them separately from strings. It can also sort
14584 version numbers, real numbers, mixed types and more, and comes with a shell
14585 command @command{natsort} that exposes this functionality in the command line.")
14586 (license license:expat)
14587 (properties `((python2-variant . ,(delay python2-natsort))))))
14588
14589 ;; Natsort 6.x are the last versions with support for Python 2.
14590 (define-public python2-natsort
14591 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14592 (package (inherit base)
14593 (version "6.2.1")
14594 (source (origin
14595 (method url-fetch)
14596 (uri (pypi-uri "natsort" version))
14597 (sha256
14598 (base32
14599 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14600 (native-inputs
14601 `(("python2-pathlib" ,python2-pathlib)
14602 ,@(package-native-inputs base))))))
14603
14604 (define-public glances
14605 (package
14606 (name "glances")
14607 (version "3.1.6")
14608 (source
14609 (origin
14610 (method url-fetch)
14611 (uri (pypi-uri "Glances" version))
14612 (sha256
14613 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14614 (modules '((guix build utils)))
14615 (snippet
14616 '(begin
14617 ;; Glances phones PyPI for weekly update checks by default.
14618 ;; Disable these. The user can re-enable them if desired.
14619 (substitute* "glances/outdated.py"
14620 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14621 (string-append indentation
14622 "self.args.disable_check_update = True\n"
14623 line)))
14624 #t))))
14625 (build-system python-build-system)
14626 (propagated-inputs
14627 `(("python-future" ,python-future)
14628 ("python-psutil" ,python-psutil)))
14629 (home-page "https://github.com/nicolargo/glances")
14630 (synopsis "Cross-platform curses-based monitoring tool")
14631 (description
14632 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14633 Glances uses the PsUtil library to get information from your system. It
14634 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14635 (license license:lgpl3+)))
14636
14637 (define-public python-glances
14638 (deprecated-package "python-glances" glances))
14639
14640 (define-public python-graphql-core
14641 (package
14642 (name "python-graphql-core")
14643 (version "3.1.2")
14644 (source
14645 (origin
14646 (method url-fetch)
14647 (uri (pypi-uri "graphql-core" version))
14648 (sha256
14649 (base32
14650 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14651 (build-system python-build-system)
14652 (arguments
14653 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14654 #:phases
14655 (modify-phases %standard-phases
14656 (add-after 'unpack 'patch-hardcoded-version
14657 (lambda _ (substitute*
14658 "setup.py"
14659 (("'gevent==1.1rc1'") "'gevent'"))
14660 #t)))))
14661 (native-inputs
14662 `(("python-gevent" ,python-gevent)
14663 ("python-mock" ,python-mock)
14664 ("python-pytest-mock" ,python-pytest-mock)))
14665 (propagated-inputs
14666 `(("python-promise" ,python-promise)
14667 ("python-six" ,python-six)))
14668 (home-page "https://github.com/graphql-python/graphql-core")
14669 (synopsis "GraphQL implementation for Python")
14670 (description
14671 "GraphQL implementation for Python. GraphQL is a data query language and
14672 runtime designed and used to request and deliver data to mobile and web apps.
14673 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14674 to Python.")
14675 (license license:expat)))
14676
14677 (define-public python2-graphql-core
14678 (package-with-python2 python-graphql-core))
14679
14680 (define-public python-graphql-relay
14681 (package
14682 (name "python-graphql-relay")
14683 (version "0.4.5")
14684 (source
14685 (origin
14686 (method url-fetch)
14687 (uri (pypi-uri "graphql-relay" version))
14688 (sha256
14689 (base32
14690 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14691 (build-system python-build-system)
14692 (arguments
14693 '(#:tests? #f)) ; The tests are not distributed
14694 (propagated-inputs
14695 `(("python-graphql-core" ,python-graphql-core)
14696 ("python-promise" ,python-promise)
14697 ("python-six" ,python-six)))
14698 (home-page "https://github.com/graphql-python/graphql-relay-py")
14699 (synopsis "Relay implementation for Python")
14700 (description
14701 "This is a library to allow the easy creation of Relay-compliant servers
14702 using the GraphQL Python reference implementation of a GraphQL server. It
14703 should be noted that the code is a exact port of the original
14704 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14705 from Facebook.")
14706 (license license:expat)))
14707
14708 (define-public python-graphene
14709 (package
14710 (name "python-graphene")
14711 (version "0.10.2")
14712 (source
14713 (origin
14714 (method url-fetch)
14715 (uri (pypi-uri "graphene" version))
14716 (sha256
14717 (base32
14718 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14719 (build-system python-build-system)
14720 (propagated-inputs
14721 `(("python-graphql-core" ,python-graphql-core)
14722 ("python-graphql-relay" ,python-graphql-relay)
14723 ("python-iso8601" ,python-iso8601)
14724 ("python-promise" ,python-promise)
14725 ("python-six" ,python-six)))
14726 (arguments
14727 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14728 (home-page "https://graphene-python.org/")
14729 (synopsis "GraphQL Framework for Python")
14730 (description
14731 "Graphene is a Python library for building GraphQL schemas/types.
14732 A GraphQL schema describes your data model, and provides a GraphQL server
14733 with an associated set of resolve methods that know how to fetch data.")
14734 (license license:expat)))
14735
14736 (define-public python-nautilus
14737 (package
14738 (name "python-nautilus")
14739 (version "0.4.9")
14740 (source
14741 (origin
14742 (method url-fetch)
14743 (uri (pypi-uri "nautilus" version))
14744 (sha256
14745 (base32
14746 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14747 (build-system python-build-system)
14748 (arguments `(#:tests? #f)) ; fails to import test modules
14749 (propagated-inputs
14750 `(("python-bcrypt" ,python-bcrypt)
14751 ("python-click" ,python-click)
14752 ("python-consul" ,python-consul)
14753 ("python-graphene" ,python-graphene)
14754 ("python-jinja2" ,python-jinja2)
14755 ("python-peewee" ,python-peewee)
14756 ("python-pika" ,python-pika)
14757 ("python-tornado" ,python-tornado)
14758 ("python-wtforms" ,python-wtforms)))
14759 (native-inputs
14760 `(("python-nose2" ,python-nose2)))
14761 (home-page "https://github.com/AlecAivazis/nautilus")
14762 (synopsis "Library for creating microservice applications")
14763 (description
14764 "Nautilus is a framework for flux based microservices that looks to
14765 provide extendible implementations of common aspects of a cloud so that you can
14766 focus on building massively scalable web applications.")
14767 (license license:expat)))
14768
14769 (define-public python-random2
14770 (package
14771 (name "python-random2")
14772 (version "1.0.1")
14773 (source (origin
14774 (method url-fetch)
14775 (uri (pypi-uri "random2" version ".zip"))
14776 (sha256
14777 (base32
14778 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14779 (build-system python-build-system)
14780 (native-inputs `(("unzip" ,unzip)))
14781 (home-page "http://pypi.python.org/pypi/random2")
14782 (synopsis "Python 3 version of the Python 2 @code{random} module")
14783 (description
14784 "This package provides a Python 3 ported version of Python 2.7’s
14785 @code{random} module. It has also been back-ported to work in Python 2.6.
14786
14787 In Python 3, the implementation of @code{randrange()} was changed, so that
14788 even with the same seed you get different sequences in Python 2 and 3.
14789
14790 This package closes that gap, allowing stable random number generation
14791 between the different Python versions.")
14792 (license license:psfl)))
14793
14794 (define-public python2-random2
14795 (package-with-python2 python-random2))
14796
14797 (define-public python-snowballstemmer
14798 (package
14799 (name "python-snowballstemmer")
14800 (version "2.0.0")
14801 (source (origin
14802 (method url-fetch)
14803 (uri (pypi-uri "snowballstemmer" version))
14804 (sha256
14805 (base32
14806 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14807 (build-system python-build-system)
14808 (arguments
14809 `(;; No tests exist
14810 #:tests? #f))
14811 (home-page "https://github.com/shibukawa/snowball_py")
14812 (synopsis "Snowball stemming library collection for Python")
14813 (description "This package provides 16 word stemmer algorithms generated
14814 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14815 English stemmer.")
14816 (license license:bsd-3)))
14817
14818 (define-public python2-snowballstemmer
14819 (package-with-python2 python-snowballstemmer))
14820
14821 (define-public python-setproctitle
14822 (package
14823 (name "python-setproctitle")
14824 (version "1.1.10")
14825 (source
14826 (origin
14827 (method url-fetch)
14828 (uri (pypi-uri "setproctitle" version))
14829 (sha256
14830 (base32
14831 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14832 (build-system python-build-system)
14833 (arguments
14834 '(#:phases
14835 (modify-phases %standard-phases
14836 (add-before 'check 'patch-Makefile
14837 ;; Stricly this is only required for the python2 variant.
14838 ;; But adding a phase in an inherited package seems to be
14839 ;; cumbersum. So we patch even for python3.
14840 (lambda _
14841 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14842 (when nose
14843 (substitute* "Makefile"
14844 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14845 (string-append nose "/bin/nosetests "))))
14846 #t)))
14847 (replace 'check
14848 (lambda _
14849 (setenv "PYTHON" (or (which "python3") (which "python")))
14850 (setenv "PYCONFIG" (if (which "python3-config")
14851 "python3-config --embed"
14852 "python-config"))
14853 (setenv "CC" "gcc")
14854 ;; No need to extend PYTHONPATH to find the built package, since
14855 ;; the Makefile will build anyway
14856 (invoke "make" "check"))))))
14857 (native-inputs
14858 `(("procps" ,procps))) ; required for tests
14859 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14860 (synopsis
14861 "Setproctitle implementation for Python to customize the process title")
14862 (description "The library allows a process to change its title (as displayed
14863 by system tools such as ps and top).
14864
14865 Changing the title is mostly useful in multi-process systems, for
14866 example when a master process is forked: changing the children's title
14867 allows identifying the task each process is busy with. The technique
14868 is used by PostgreSQL and the OpenSSH Server for example.")
14869 (license license:bsd-3)
14870 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14871
14872 (define-public python2-setproctitle
14873 (let ((base (package-with-python2
14874 (strip-python2-variant python-setproctitle))))
14875 (package/inherit base
14876 (native-inputs `(("python2-nose" ,python2-nose)
14877 ,@(package-native-inputs base))))))
14878
14879 (define-public python-validictory
14880 (package
14881 (name "python-validictory")
14882 (version "1.0.1")
14883 (source
14884 (origin
14885 (method url-fetch)
14886 (uri (pypi-uri "validictory" version))
14887 (sha256
14888 (base32
14889 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14890 (build-system python-build-system)
14891 (arguments
14892 '(#:phases
14893 (modify-phases %standard-phases
14894 (add-after 'unpack 'bootstrap
14895 ;; Move the tests out of the package directory to avoid
14896 ;; packaging them.
14897 (lambda* _
14898 (rename-file "validictory/tests" "tests")
14899 (delete-file "tests/__init__.py")))
14900 (replace 'check
14901 (lambda _
14902 ;; Extend PYTHONPATH so the built package will be found.
14903 (setenv "PYTHONPATH"
14904 (string-append (getcwd) "/build/lib:"
14905 (getenv "PYTHONPATH")))
14906 (invoke "py.test" "-vv" ))))))
14907 (native-inputs
14908 `(("python-pytest" ,python-pytest)))
14909 (home-page
14910 "https://github.com/jamesturk/validictory")
14911 (synopsis "General purpose Python data validator")
14912 (description "It allows validation of arbitrary Python data structures.
14913
14914 The schema format is based on the JSON Schema
14915 proposal (http://json-schema.org), so combined with json the library is also
14916 useful as a validator for JSON data.")
14917 (license license:expat)))
14918
14919 (define-public python2-validictory
14920 (package-with-python2 python-validictory))
14921
14922 (define-public python-pyelftools
14923 (package
14924 (name "python-pyelftools")
14925 (version "0.25")
14926 (source
14927 (origin
14928 (method url-fetch)
14929 (uri (pypi-uri "pyelftools" version))
14930 (sha256
14931 (base32
14932 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14933 (build-system python-build-system)
14934 (arguments
14935 `(#:phases
14936 (modify-phases %standard-phases
14937 (add-before 'check 'set-pythonpath
14938 (lambda _
14939 (setenv "PYTHONPATH"
14940 (string-append
14941 (getcwd) "/test/"
14942 ":" (getenv "PYTHONPATH")))
14943 #t)))))
14944 (home-page
14945 "https://github.com/eliben/pyelftools")
14946 (synopsis
14947 "Analyze binary and library file information")
14948 (description "This Python library provides interfaces for parsing and
14949 analyzing two binary and library file formats; the Executable and Linking
14950 Format (ELF), and debugging information in the Debugging With Attributed
14951 Record Format (DWARF).")
14952 (license license:public-domain)))
14953
14954 (define-public python-pyev
14955 (package
14956 (name "python-pyev")
14957 (version "0.9.0")
14958 (source
14959 (origin
14960 (method url-fetch)
14961 (uri (pypi-uri "pyev" version))
14962 (sha256
14963 (base32
14964 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14965 (build-system python-build-system)
14966 (arguments
14967 `(#:tests? #f ; no test suite
14968 #:phases
14969 (modify-phases %standard-phases
14970 (add-after 'unpack 'patch
14971 (lambda* (#:key inputs #:allow-other-keys)
14972 (let ((libev (string-append (assoc-ref inputs "libev")
14973 "/lib/libev.so.4")))
14974 (substitute* "setup.py"
14975 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14976 (string-append "libev_dll_name = \"" libev "\"")))))))))
14977 (inputs
14978 `(("libev" ,libev)))
14979 (home-page "https://github.com/gabrielfalcao/pyev")
14980 (synopsis "Python libev interface")
14981 (description "Pyev provides a Python interface to libev.")
14982 (license license:gpl3)))
14983
14984 (define-public python2-pyev
14985 (package-with-python2 python-pyev))
14986
14987 (define-public python-imagesize
14988 (package
14989 (name "python-imagesize")
14990 (version "1.2.0")
14991 (source
14992 (origin
14993 (method url-fetch)
14994 (uri (pypi-uri "imagesize" version))
14995 (sha256
14996 (base32
14997 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14998 (build-system python-build-system)
14999 (home-page "https://github.com/shibukawa/imagesize_py")
15000 (synopsis "Gets image size of files in various formats in Python")
15001 (description
15002 "This package allows determination of image size from
15003 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
15004 (license license:expat)))
15005
15006 (define-public python2-imagesize
15007 (package-with-python2 python-imagesize))
15008
15009 (define-public python-termstyle
15010 (package
15011 (name "python-termstyle")
15012 (version "0.1.11")
15013 (source
15014 (origin
15015 (method url-fetch)
15016 (uri (pypi-uri "termstyle" version))
15017 (sha256
15018 (base32
15019 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15020 (build-system python-build-system)
15021 (arguments
15022 '(#:phases
15023 (modify-phases %standard-phases
15024 (replace 'check
15025 (lambda _
15026 (invoke "python" "test3.py"))))))
15027 (home-page "https://github.com/gfxmonk/termstyle")
15028 (synopsis "Console text coloring for Python")
15029 (description "This package provides console text coloring for Python.")
15030 (license license:bsd-3)))
15031
15032 (define-public python-argcomplete
15033 (package
15034 (name "python-argcomplete")
15035 (version "1.11.1")
15036 (source
15037 (origin
15038 (method url-fetch)
15039 (uri (pypi-uri "argcomplete" version))
15040 (sha256
15041 (base32
15042 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15043 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15044 (build-system python-build-system)
15045 (native-inputs
15046 `(("python-coverage" ,python-coverage)
15047 ("python-flake8" ,python-flake8)
15048 ("python-pexpect" ,python-pexpect)
15049 ("python-wheel" ,python-wheel)
15050 ("tcsh" ,tcsh)
15051 ("fish" ,fish)
15052 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15053 (home-page "https://github.com/kislyuk/argcomplete")
15054 (synopsis "Shell tab completion for Python argparse")
15055 (description "argcomplete provides extensible command line tab completion
15056 of arguments and options for Python scripts using @code{argparse}. It's
15057 particularly useful for programs with many options or sub-parsers that can
15058 dynamically suggest completions; for example, when browsing resources over the
15059 network.")
15060 (license license:asl2.0)
15061 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15062
15063 (define-public python2-argcomplete
15064 (let ((variant (package-with-python2
15065 (strip-python2-variant python-argcomplete))))
15066 (package/inherit variant
15067 (arguments
15068 (substitute-keyword-arguments (package-arguments variant)
15069 ((#:phases phases '%standard-phases)
15070 `(modify-phases ,phases
15071 (add-after 'unpack 'set-my-HOME
15072 (lambda _ (setenv "HOME" "/tmp")))))))
15073 (native-inputs
15074 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15075 ,@(package-native-inputs variant))))))
15076
15077 (define-public python-csscompressor
15078 (package
15079 (name "python-csscompressor")
15080 (version "0.9.5")
15081 (source
15082 (origin
15083 (method url-fetch)
15084 (uri (pypi-uri "csscompressor" version))
15085 (sha256
15086 (base32
15087 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15088 (build-system python-build-system)
15089 (arguments
15090 '(#:phases
15091 (modify-phases %standard-phases
15092 (replace 'check
15093 (lambda _
15094 (invoke "py.test"))))))
15095 (native-inputs
15096 `(("python-pytest" ,python-pytest)))
15097 (home-page "https://github.com/sprymix/csscompressor")
15098 (synopsis "Python port of YUI CSS Compressor")
15099 (description
15100 "This package provides a python port of YUI CSS Compressor.")
15101 (license license:bsd-3)))
15102
15103 (define-public python-rcssmin
15104 (package
15105 (name "python-rcssmin")
15106 (version "1.0.6")
15107 (source
15108 (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "rcssmin" version))
15111 (sha256
15112 (base32
15113 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15114 (build-system python-build-system)
15115 (arguments
15116 '(#:phases
15117 (modify-phases %standard-phases
15118 (replace 'check
15119 (lambda _
15120 (invoke "python" "run_tests.py" "tests"))))))
15121 (home-page "http://opensource.perlig.de/rcssmin/")
15122 (synopsis "CSS Minifier")
15123 (description "The minifier is based on the semantics of the YUI compressor,
15124 which itself is based on the rule list by Isaac Schlueter.")
15125 (license license:asl2.0)))
15126
15127 (define-public python-rjsmin
15128 (package
15129 (name "python-rjsmin")
15130 (version "1.1.0")
15131 (source
15132 (origin
15133 (method url-fetch)
15134 (uri (pypi-uri "rjsmin" version))
15135 (sha256
15136 (base32
15137 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15138 (modules '((guix build utils)))
15139 (snippet
15140 '(begin
15141 (for-each delete-file (find-files "bench" "\\.js$"))
15142 #t))))
15143 (build-system python-build-system)
15144 (arguments
15145 '(#:tests? #f ; Not all test files included.
15146 #:phases
15147 (modify-phases %standard-phases
15148 (replace 'check
15149 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15150 (add-installed-pythonpath inputs outputs)
15151 (if tests?
15152 (invoke "py.test" "-vv" "tests")
15153 #t))))))
15154 (native-inputs
15155 `(("python-pytest" ,python-pytest)))
15156 (home-page "http://opensource.perlig.de/rjsmin/")
15157 (synopsis "Javascript Minifier")
15158 (description "@code{rJSmin} is a javascript minifier written in Python. The
15159 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15160 is a re-implementation aiming for speed, so it can be used at runtime (rather
15161 than during a preprocessing step).")
15162 (license license:asl2.0)))
15163
15164 (define-public python-xopen
15165 (package
15166 (name "python-xopen")
15167 (version "0.5.0")
15168 (source
15169 (origin
15170 (method url-fetch)
15171 (uri (pypi-uri "xopen" version))
15172 (sha256
15173 (base32
15174 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15175 (build-system python-build-system)
15176 (propagated-inputs
15177 `(("python-setuptools-scm" ,python-setuptools-scm)))
15178 (home-page "https://github.com/marcelm/xopen/")
15179 (synopsis "Open compressed files transparently")
15180 (description "This module provides an @code{xopen} function that works like
15181 Python's built-in @code{open} function, but can also deal with compressed files.
15182 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15183 recognized by their file extensions. The focus is on being as efficient as
15184 possible on all supported Python versions.")
15185 (license license:expat)))
15186
15187 (define-public python2-xopen
15188 (let ((base (package-with-python2
15189 (strip-python2-variant python-xopen))))
15190 (package/inherit base
15191 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15192 ,@(package-propagated-inputs base))))))
15193
15194 (define-public python-cheetah
15195 (package
15196 (name "python-cheetah")
15197 (version "3.2.4")
15198 (source
15199 (origin
15200 (method url-fetch)
15201 (uri (pypi-uri "Cheetah3" version))
15202 (sha256
15203 (base32
15204 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15205 (build-system python-build-system)
15206 (arguments
15207 `(#:modules ((guix build utils)
15208 (guix build python-build-system)
15209 (ice-9 ftw)
15210 (srfi srfi-1)
15211 (srfi srfi-26))
15212 #:phases (modify-phases %standard-phases
15213 (add-after 'unpack 'use-absolute-python
15214 (lambda _
15215 (substitute* "Cheetah/CheetahWrapper.py"
15216 (("#!/usr/bin/env python")
15217 (string-append "#!" (which "python"))))
15218 #t))
15219 (add-after 'unpack 'fix-tests
15220 (lambda _
15221 (substitute* "Cheetah/Tests/ImportHooks.py"
15222 (("os.path.dirname\\(__file__\\)")
15223 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15224 #t))
15225 (replace 'check
15226 (lambda _
15227 (let ((cwd (getcwd)))
15228 (setenv "PYTHONPATH"
15229 (string-append
15230 cwd "/build/"
15231 (find (cut string-prefix? "lib" <>)
15232 (scandir (string-append cwd "/build")))
15233 ":" (getenv "PYTHONPATH")))
15234 (setenv "PATH"
15235 (string-append (getenv "PATH")
15236 ":" cwd "/bin"))
15237 (setenv "TMPDIR" "/tmp")
15238
15239 (substitute* "Cheetah/Tests/Test.py"
15240 (("unittest.TextTestRunner\\(\\)")
15241 "unittest.TextTestRunner(verbosity=2)"))
15242
15243 (invoke "python" "Cheetah/Tests/Test.py")))))))
15244 (propagated-inputs
15245 `(("python-markdown" ,python-markdown))) ;optional
15246 (home-page "https://cheetahtemplate.org/")
15247 (synopsis "Template engine")
15248 (description "Cheetah is a text-based template engine and Python code
15249 generator.
15250
15251 Cheetah can be used as a standalone templating utility or referenced as
15252 a library from other Python applications. It has many potential uses,
15253 but web developers looking for a viable alternative to ASP, JSP, PHP and
15254 PSP are expected to be its principle user group.
15255
15256 Features:
15257 @enumerate
15258 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15259 text-based format.
15260 @item Cleanly separates content, graphic design, and program code.
15261 @item Blends the power and flexibility of Python with a simple template language
15262 that non-programmers can understand.
15263 @item Gives template writers full access to any Python data structure, module,
15264 function, object, or method in their templates.
15265 @item Makes code reuse easy by providing an object-orientated interface to
15266 templates that is accessible from Python code or other Cheetah templates.
15267 One template can subclass another and selectively reimplement sections of it.
15268 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15269 improve the performance of a dynamic website.
15270 @item Compiles templates into optimized, yet readable, Python code.
15271 @end enumerate")
15272 (license (license:x11-style "file://LICENSE"))))
15273
15274 (define-public python2-cheetah
15275 (package-with-python2 python-cheetah))
15276
15277 (define-public python-dulwich
15278 (package
15279 (name "python-dulwich")
15280 (version "0.19.16")
15281 (source
15282 (origin
15283 (method url-fetch)
15284 (uri (list (string-append "https://www.dulwich.io/releases/"
15285 "dulwich-" version ".tar.gz")
15286 (pypi-uri "dulwich" version)))
15287 (sha256
15288 (base32
15289 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15290 (build-system python-build-system)
15291 (arguments
15292 `(#:phases
15293 (modify-phases %standard-phases
15294 (add-before 'check 'fix-tests
15295 (lambda* (#:key inputs #:allow-other-keys)
15296 ;; The tests use Popen with a custom environment which doesn't
15297 ;; include PATH.
15298 (substitute* "dulwich/tests/compat/utils.py"
15299 (("'git'") (string-append "'"
15300 (which "git")
15301 "'")))
15302 (substitute* '("dulwich/tests/test_repository.py"
15303 "dulwich/tests/test_hooks.py")
15304 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15305 (setenv "TEST_RUNNER" "unittest")
15306 (setenv "PYTHONHASHSEED" "random")
15307 #t)))))
15308 (propagated-inputs
15309 `(("python-fastimport" ,python-fastimport)
15310 ("python-urllib3" ,python-urllib3)))
15311 (native-inputs
15312 `(("python-mock" ,python-mock)
15313 ("python-geventhttpclient" ,python-geventhttpclient)
15314 ("git" ,git)))
15315 (home-page "https://www.dulwich.io/")
15316 (synopsis "Git implementation in Python")
15317 (description "Dulwich is an implementation of the Git file formats and
15318 protocols written in pure Python.")
15319 ;; Can be used with either license.
15320 (license (list license:asl2.0 license:gpl2+))))
15321
15322 (define-public python2-dulwich
15323 (package-with-python2 python-dulwich))
15324
15325 (define-public python-pbkdf2
15326 (package
15327 (name "python-pbkdf2")
15328 (version "1.3")
15329 (source
15330 (origin
15331 (method url-fetch)
15332 (uri (pypi-uri "pbkdf2" version))
15333 (sha256
15334 (base32
15335 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15336 (build-system python-build-system)
15337 (arguments
15338 '(#:phases
15339 (modify-phases %standard-phases
15340 (replace 'check
15341 (lambda _
15342 (setenv "PYTHONPATH"
15343 (string-append (getcwd) "/build/lib:"
15344 (getenv "PYTHONPATH")))
15345 (invoke "python" "test/test_pbkdf2.py"))))))
15346 (propagated-inputs
15347 `(("python-pycrypto" ,python-pycrypto))) ; optional
15348 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15349 (synopsis "Password-based key derivation")
15350 (description "This module implements the password-based key derivation
15351 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15352
15353 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15354 is part of the RSA Public Key Cryptography Standards series. The provided
15355 implementation takes a password or a passphrase and a salt value (and
15356 optionally a iteration count, a digest module, and a MAC module) and provides
15357 a file-like object from which an arbitrarily-sized key can be read.")
15358 (license license:expat)))
15359
15360 (define-public python2-pbkdf2
15361 (package-with-python2 python-pbkdf2))
15362
15363 (define-public python-qrcode
15364 (package
15365 (name "python-qrcode")
15366 (version "6.1")
15367 (source
15368 (origin
15369 (method url-fetch)
15370 (uri (pypi-uri "qrcode" version))
15371 (sha256
15372 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15373 (build-system python-build-system)
15374 (arguments
15375 ;; FIXME: Tests require packaging 'pymaging'.
15376 '(#:tests? #f))
15377 (propagated-inputs
15378 `(("python-lxml" ,python-lxml) ; for SVG output
15379 ("python-pillow" ,python-pillow) ; for PNG output
15380 ("python-six" ,python-six)))
15381 (home-page "https://github.com/lincolnloop/python-qrcode")
15382 (synopsis "QR Code image generator")
15383 (description "This package provides a pure Python QR Code generator
15384 module. It uses the Python Imaging Library (PIL) to allow for the generation
15385 of QR Codes.
15386
15387 In addition this package provides a command line tool to generate QR codes and
15388 either write these QR codes to a file or do the output as ascii art at the
15389 console.")
15390 (license license:bsd-3)))
15391
15392 (define-public python2-qrcode
15393 (package-with-python2 python-qrcode))
15394
15395 (define-public python-rst2ansi
15396 (package
15397 (name "python-rst2ansi")
15398 (version "0.1.5")
15399 (source
15400 (origin
15401 (method url-fetch)
15402 (uri (pypi-uri "rst2ansi" version))
15403 (sha256
15404 (base32
15405 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15406 (build-system python-build-system)
15407 (propagated-inputs
15408 `(("python-docutils" ,python-docutils)))
15409 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15410 (synopsis "Convert RST to ANSI-decorated console output")
15411 (description
15412 "Python module dedicated to rendering RST (reStructuredText) documents
15413 to ansi-escaped strings suitable for display in a terminal.")
15414 (license license:expat)))
15415
15416 (define-public python-ansi2html
15417 (package
15418 (name "python-ansi2html")
15419 (version "1.2.0")
15420 (source
15421 (origin
15422 (method url-fetch)
15423 (uri (pypi-uri "ansi2html" version))
15424 (sha256
15425 (base32
15426 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15427 (build-system python-build-system)
15428 (native-inputs
15429 `(("python-mock" ,python-mock)
15430 ("python-nose" ,python-nose)))
15431 (propagated-inputs
15432 `(("python-six" ,python-six)))
15433 (home-page "https://github.com/ralphbean/ansi2html")
15434 (synopsis "Convert ANSI-decorated console output to HTML")
15435 (description
15436 "@command{ansi2html} is a Python library and command line utility for
15437 converting text with ANSI color codes to HTML or LaTeX.")
15438 (license license:gpl3+)))
15439
15440 (define-public python2-ansi2html
15441 (package-with-python2 python-ansi2html))
15442
15443 (define-public python-ddt
15444 (package
15445 (name "python-ddt")
15446 (version "1.4.1")
15447 (source
15448 (origin
15449 (method url-fetch)
15450 (uri (pypi-uri "ddt" version))
15451 (sha256
15452 (base32
15453 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15454 (build-system python-build-system)
15455 (native-inputs
15456 `(("python-pytest" ,python-pytest)))
15457 (propagated-inputs
15458 `(("python-pyyaml" ,python-pyyaml)))
15459 (home-page "https://github.com/datadriventests/ddt")
15460 (synopsis "Data-Driven Tests")
15461 (description
15462 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15463 running it with different test data, and make it appear as multiple test
15464 cases.")
15465 (license license:expat)))
15466
15467 (define-public python-pycountry
15468 (package
15469 (name "python-pycountry")
15470 (version "18.5.26")
15471 (source
15472 (origin
15473 (method url-fetch)
15474 (uri (pypi-uri "pycountry" version))
15475 (sha256
15476 (base32
15477 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15478 (build-system python-build-system)
15479 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15480 (synopsis "ISO databases for languages, countries, currencies, etc.")
15481 (description
15482 "@code{pycountry} provides the ISO databases for the standards:
15483 @enumerate
15484 @item 639-3 (Languages)
15485 @item 3166 (Countries)
15486 @item 3166-3 (Deleted Countries)
15487 @item 3166-2 (Subdivisions of countries)
15488 @item 4217 (Currencies)
15489 @item 15924 (Scripts)
15490 @end enumerate
15491 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15492 through a Python API.")
15493 (license license:lgpl2.1+)))
15494
15495 (define-public python2-pycountry
15496 (package-with-python2 python-pycountry))
15497
15498 (define-public python-pycosat
15499 (package
15500 (name "python-pycosat")
15501 (version "0.6.3")
15502 (source
15503 (origin
15504 (method url-fetch)
15505 (uri (pypi-uri "pycosat" version ".zip"))
15506 (sha256
15507 (base32
15508 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15509 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15510 (build-system python-build-system)
15511 (native-inputs
15512 `(("unzip" ,unzip)))
15513 (home-page "https://github.com/ContinuumIO/pycosat")
15514 (synopsis "Bindings to picosat (a SAT solver)")
15515 (description
15516 "This package provides efficient Python bindings to @code{picosat} on
15517 the C level. When importing pycosat, the @code{picosat} solver becomes part
15518 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15519 Problem} (SAT) solver.")
15520 (license license:expat)))
15521
15522 (define-public python2-pycosat
15523 (package-with-python2 python-pycosat))
15524
15525 (define-public python2-ruamel.ordereddict
15526 (package
15527 (name "python2-ruamel.ordereddict")
15528 (version "0.4.9")
15529 (source
15530 (origin
15531 (method url-fetch)
15532 (uri (pypi-uri "ruamel.ordereddict" version))
15533 (sha256
15534 (base32
15535 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15536 (build-system python-build-system)
15537 (arguments
15538 `(#:python ,python-2
15539 #:phases
15540 (modify-phases %standard-phases
15541 (delete 'check)
15542 (add-after 'install 'check
15543 (lambda* (#:key inputs outputs #:allow-other-keys)
15544 (add-installed-pythonpath inputs outputs)
15545 (invoke "python" "test/testordereddict.py"))))))
15546 (home-page "https://bitbucket.org/ruamel/ordereddict")
15547 (synopsis "Version of dict that keeps keys in insertion order")
15548 (description
15549 "This is an implementation of an ordered dictionary with @dfn{Key
15550 Insertion Order} (KIO: updates of values do not affect the position of the
15551 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15552 removed and put at the back). The standard library module @code{OrderedDict},
15553 implemented later, implements a subset of @code{ordereddict} functionality.
15554 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15555 Order} (KSO, no sorting function can be specified, but a transform can be
15556 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15557 (license license:expat)))
15558
15559 (define-public python-pypeg2
15560 (package
15561 (name "python-pypeg2")
15562 (version "2.15.2")
15563 (source
15564 (origin
15565 (method url-fetch)
15566 (uri (pypi-uri "pyPEG2" version))
15567 (sha256
15568 (base32
15569 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15570 (build-system python-build-system)
15571 (propagated-inputs `(("python-lxml" ,python-lxml)))
15572 (arguments
15573 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15574 '(#:tests? #f))
15575 (home-page "https://fdik.org/pyPEG/")
15576 (synopsis "Parsering Expression Grammars in Python")
15577 (description "PyPEG is an intrinsic parser interpreter framework for
15578 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15579 parse many formal languages.")
15580 (license license:gpl2)))
15581
15582 (define-public python-incremental
15583 (package
15584 (name "python-incremental")
15585 (version "17.5.0")
15586 (source
15587 (origin
15588 (method url-fetch)
15589 (uri (pypi-uri "incremental" version))
15590 (sha256
15591 (base32
15592 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15593 (build-system python-build-system)
15594 (home-page "https://github.com/hawkowl/incremental")
15595 (synopsis "Library for versioning Python projects")
15596 (description "Incremental is a small library that versions your Python
15597 projects.")
15598 (license license:expat)))
15599
15600 (define-public python2-incremental
15601 (package-with-python2 python-incremental))
15602
15603 (define-public python-invoke
15604 (package
15605 (name "python-invoke")
15606 (home-page "https://www.pyinvoke.org/")
15607 (version "1.5.0")
15608 (source (origin
15609 (method url-fetch)
15610 (uri (pypi-uri "invoke" version))
15611 (sha256
15612 (base32
15613 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15614 (build-system python-build-system)
15615 (arguments
15616 ;; XXX: Requires many dependencies that are not yet in Guix.
15617 `(#:tests? #f
15618 #:phases
15619 (modify-phases %standard-phases
15620 (add-after 'unpack 'fix-bash-path
15621 (lambda* (#:key inputs #:allow-other-keys)
15622 (let ((bash (assoc-ref inputs "bash")))
15623 (substitute* "invoke/config.py"
15624 (("shell = \"/bin/bash\"")
15625 (string-append "shell = \"" bash "/bin/bash\""))
15626 )
15627 #t))))))
15628 (inputs
15629 `(("bash" ,bash-minimal)))
15630 (synopsis "Pythonic task execution")
15631 (description
15632 "Invoke is a Python task execution tool and library, drawing inspiration
15633 from various sources to arrive at a powerful and clean feature set. It is
15634 evolved from the Fabric project, but focuses on local and abstract concerns
15635 instead of servers and network commands.")
15636 (license license:bsd-3)))
15637
15638 (define-public python2-invoke
15639 (package-with-python2 python-invoke))
15640
15641 (define-public python-automat
15642 (package
15643 (name "python-automat")
15644 (version "20.2.0")
15645 (source (origin
15646 (method url-fetch)
15647 (uri (pypi-uri "Automat" version))
15648 (sha256
15649 (base32
15650 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15651 (build-system python-build-system)
15652 ;; We disable the tests because they require python-twisted, while
15653 ;; python-twisted depends on python-automat. Twisted is optional, but the
15654 ;; tests fail if it is not available. Also see
15655 ;; <https://github.com/glyph/automat/issues/71>.
15656 (arguments '(#:tests? #f))
15657 (native-inputs
15658 `(("python-m2r" ,python-m2r)
15659 ("python-setuptools-scm" ,python-setuptools-scm)
15660 ("python-graphviz" ,python-graphviz)))
15661 (propagated-inputs
15662 `(("python-six" ,python-six)
15663 ("python-attrs" ,python-attrs)))
15664 (home-page "https://github.com/glyph/Automat")
15665 (synopsis "Self-service finite-state machines")
15666 (description "Automat is a library for concise, idiomatic Python
15667 expression of finite-state automata (particularly deterministic finite-state
15668 transducers).")
15669 (license license:expat)))
15670
15671 (define-public python2-automat
15672 (package-with-python2 python-automat))
15673
15674 (define-public python-m2r
15675 (package
15676 (name "python-m2r")
15677 (version "0.2.1")
15678 (source (origin
15679 (method url-fetch)
15680 (uri (pypi-uri "m2r" version))
15681 (sha256
15682 (base32
15683 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15684 (build-system python-build-system)
15685 (propagated-inputs
15686 `(("python-docutils" ,python-docutils)
15687 ("python-mistune" ,python-mistune)))
15688 (native-inputs
15689 `(("python-pygments" ,python-pygments)
15690 ("python-mock" ,python-mock)))
15691 (home-page "https://github.com/miyakogi/m2r")
15692 (synopsis "Markdown to reStructuredText converter")
15693 (description "M2R converts a markdown file including reST markups to valid
15694 reST format.")
15695 (license license:expat)))
15696
15697 (define-public python2-m2r
15698 (package-with-python2 python-m2r))
15699
15700 (define-public python-constantly
15701 (package
15702 (name "python-constantly")
15703 (version "15.1.0")
15704 (source (origin
15705 (method url-fetch)
15706 (uri (pypi-uri "constantly" version))
15707 (sha256
15708 (base32
15709 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15710 (build-system python-build-system)
15711 (home-page "https://github.com/twisted/constantly")
15712 (synopsis "Symbolic constants in Python")
15713 (description "Constantly is a Python library that provides symbolic
15714 constant support. It includes collections and constants with text, numeric,
15715 and bit flag values.")
15716 (license license:expat)))
15717
15718 (define-public python2-constantly
15719 (package-with-python2 python-constantly))
15720
15721 (define-public python-attrs
15722 (package
15723 (name "python-attrs")
15724 (version "19.3.0")
15725 (source (origin
15726 (method url-fetch)
15727 (uri (pypi-uri "attrs" version))
15728 (sha256
15729 (base32
15730 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15731 (build-system python-build-system)
15732 (arguments
15733 `(#:modules ((guix build utils)
15734 (guix build python-build-system)
15735 (ice-9 ftw)
15736 (srfi srfi-1)
15737 (srfi srfi-26))
15738 #:phases (modify-phases %standard-phases
15739 (replace 'check
15740 (lambda _
15741 (let ((cwd (getcwd)))
15742 (setenv "PYTHONPATH"
15743 (string-append
15744 cwd "/build/"
15745 (find (cut string-prefix? "lib" <>)
15746 (scandir (string-append cwd "/build")))
15747 ":"
15748 (getenv "PYTHONPATH")))
15749 (invoke "python" "-m" "pytest")))))))
15750 (native-inputs
15751 `(("python-coverage" ,python-coverage)
15752 ("python-hypothesis" ,python-hypothesis)
15753 ("python-pympler" ,python-pympler)
15754 ("python-pytest" ,python-pytest)
15755 ("python-six" ,python-six)
15756 ("python-sphinx" ,python-sphinx)
15757 ("python-zope-interface" ,python-zope-interface)))
15758 (home-page "https://github.com/python-attrs/attrs/")
15759 (synopsis "Attributes without boilerplate")
15760 (description "@code{attrs} is a Python package with class decorators that
15761 ease the chores of implementing the most common attribute-related object
15762 protocols.")
15763 (license license:expat)))
15764
15765 (define-public python2-attrs
15766 (package-with-python2 python-attrs))
15767
15768 (define-public python-attrs-bootstrap
15769 (package
15770 (inherit python-attrs)
15771 (name "python-attrs-bootstrap")
15772 (native-inputs `())
15773 (arguments `(#:tests? #f))))
15774
15775 (define-public python2-attrs-bootstrap
15776 (package-with-python2 python-attrs-bootstrap))
15777
15778 (define-public python2-cliapp
15779 (package
15780 (name "python2-cliapp")
15781 (version "1.20180812.1")
15782 (source
15783 (origin
15784 (method url-fetch)
15785 (uri (string-append
15786 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15787 version ".tar.gz"))
15788 (sha256
15789 (base32
15790 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15791 (build-system python-build-system)
15792 (arguments
15793 `(#:python ,python-2
15794 #:phases
15795 (modify-phases %standard-phases
15796 ;; check phase needs to be run before the build phase. If not,
15797 ;; coverage-test-runner looks for tests for the built source files,
15798 ;; and fails.
15799 (delete 'check)
15800 (add-before 'build 'check
15801 (lambda _
15802 ;; Disable python3 tests
15803 (substitute* "check"
15804 (("python3") "# python3"))
15805 (invoke "./check"))))))
15806 (native-inputs
15807 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15808 ("python2-pep8" ,python2-pep8)))
15809 (propagated-inputs
15810 `(("python2-pyaml" ,python2-pyaml)))
15811 (home-page "https://liw.fi/cliapp/")
15812 (synopsis "Python framework for command line programs")
15813 (description "@code{python2-cliapp} is a python framework for
15814 command line programs. It contains the typical stuff such programs
15815 need to do, such as parsing the command line for options, and
15816 iterating over input files.")
15817 (license license:gpl2+)))
15818
15819 (define-public python2-ttystatus
15820 (package
15821 (name "python2-ttystatus")
15822 (version "0.38")
15823 (source
15824 (origin
15825 (method git-fetch)
15826 (uri (git-reference
15827 (url "http://git.liw.fi/ttystatus")
15828 ;; There are no tags after ttystatus-0.36.
15829 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15830 (sha256
15831 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15832 (file-name (git-file-name name version))))
15833 (build-system python-build-system)
15834 (native-inputs
15835 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15836 ("python2-pep8" ,python2-pep8)))
15837 (arguments
15838 `(#:python ,python-2
15839 #:phases
15840 (modify-phases %standard-phases
15841 ;; check phase needs to be run before the build phase. If not,
15842 ;; coverage-test-runner looks for tests for the built source files,
15843 ;; and fails.
15844 (delete 'check)
15845 (add-before 'build 'check
15846 (lambda _ (invoke "make" "check"))))))
15847 (home-page "https://liw.fi/ttystatus/")
15848 (synopsis "Python library for showing progress reporting and
15849 status updates on terminals")
15850 (description "@code{python2-ttystatus} is a python library for
15851 showing progress reporting and status updates on terminals, for
15852 command line programs. Output is automatically adapted to the width
15853 of the terminal: truncated if it does not fit, and resized if the
15854 terminal size changes.")
15855 (license license:gpl3+)))
15856
15857 (define-public python2-tracing
15858 (package
15859 (name "python2-tracing")
15860 (version "0.10")
15861 (source
15862 (origin
15863 (method url-fetch)
15864 (uri (string-append
15865 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15866 version ".tar.gz"))
15867 (sha256
15868 (base32
15869 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15870 (build-system python-build-system)
15871 (arguments
15872 `(#:python ,python-2))
15873 (home-page "https://liw.fi/tracing/")
15874 (synopsis "Python debug logging helper")
15875 (description "@code{python2-tracing} is a python library for
15876 logging debug messages. It provides a way to turn debugging messages
15877 on and off, based on the filename they occur in. It is much faster
15878 than using @code{logging.Filter} to accomplish the same thing, which
15879 matters when code is run in production mode. The actual logging still
15880 happens using the @code{logging} library.")
15881 (license license:gpl3+)))
15882
15883 (define-public python2-larch
15884 (package
15885 (name "python2-larch")
15886 (version "1.20151025")
15887 (source
15888 (origin
15889 (method url-fetch)
15890 (uri (string-append
15891 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15892 version ".tar.gz"))
15893 (patches (search-patches
15894 "python2-larch-coverage-4.0a6-compatibility.patch"))
15895 (sha256
15896 (base32
15897 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15898 (build-system python-build-system)
15899 (arguments
15900 `(#:python ,python-2
15901 #:phases
15902 (modify-phases %standard-phases
15903 ;; check phase needs to be run before the build phase. If not,
15904 ;; coverage-test-runner looks for tests for the built source files,
15905 ;; and fails.
15906 (delete 'check)
15907 (add-before 'build 'check
15908 (lambda _ (invoke "make" "check"))))))
15909 (native-inputs
15910 `(("cmdtest" ,cmdtest)
15911 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15912 (propagated-inputs
15913 `(("python2-tracing" ,python2-tracing)))
15914 (home-page "https://liw.fi/larch/")
15915 (synopsis "Python copy-on-write B-tree library")
15916 (description "@code{python2-larch} is an implementation of
15917 particular kind of B-tree, based on research by Ohad Rodeh. See
15918 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15919 on the data structure.
15920
15921 The distinctive feature of this B-tree is that a node is never
15922 (conceptually) modified. Instead, all updates are done by
15923 copy-on-write. This makes it easy to clone a tree, and modify only the
15924 clone, while other processes access the original tree.")
15925 (license license:gpl3+)))
15926
15927 (define-public python-astroid
15928 (package
15929 (name "python-astroid")
15930 (version "2.4.2")
15931 (source
15932 (origin
15933 (method url-fetch)
15934 (uri (pypi-uri "astroid" version))
15935 (sha256
15936 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15937 (modules '((guix build utils)))
15938 (snippet
15939 '(begin
15940 ;; Check to see if the version pinning has been removed.
15941 (substitute* "astroid/__pkginfo__.py"
15942 (("==1\\.4\\.\\*") ">=1.4.0"))
15943 #t))))
15944 (build-system python-build-system)
15945 (propagated-inputs
15946 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15947 ("python-six" ,python-six)
15948 ("python-wrapt" ,python-wrapt)))
15949 (native-inputs
15950 `(("python-dateutil" ,python-dateutil)
15951 ("python-pytest" ,python-pytest)
15952 ("python-pytest-runner" ,python-pytest-runner)))
15953 (home-page "https://github.com/PyCQA/astroid")
15954 (synopsis "Common base representation of python source code for pylint and
15955 other projects")
15956 (description "@code{python-astroid} provides a common base representation
15957 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15958
15959 It provides a compatible representation which comes from the _ast module. It
15960 rebuilds the tree generated by the builtin _ast module by recursively walking
15961 down the AST and building an extended ast. The new node classes have
15962 additional methods and attributes for different usages. They include some
15963 support for static inference and local name scopes. Furthermore, astroid
15964 builds partial trees by inspecting living objects.")
15965 (license license:lgpl2.1+)
15966 (properties `((python2-variant . ,(delay python2-astroid))))))
15967
15968 (define-public python2-astroid
15969 (let ((base (package-with-python2
15970 (strip-python2-variant python-astroid))))
15971 (package (inherit base)
15972 ;; Version 2.x removes python2 support.
15973 (version "1.6.5")
15974 (source
15975 (origin
15976 (method url-fetch)
15977 (uri (pypi-uri "astroid" version))
15978 (sha256
15979 (base32
15980 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15981 (arguments
15982 (substitute-keyword-arguments (package-arguments base)
15983 ((#:phases phases)
15984 `(modify-phases ,phases
15985 (add-after 'unpack 'remove-spurious-test
15986 (lambda _
15987 ;; https://github.com/PyCQA/astroid/issues/276
15988 (delete-file "astroid/tests/unittest_brain.py")
15989 #t))
15990 (replace 'check
15991 (lambda _
15992 (invoke"python" "-m" "unittest" "discover"
15993 "-p" "unittest*.py")))))))
15994 (native-inputs `())
15995 (propagated-inputs
15996 `(("python2-backports-functools-lru-cache"
15997 ,python2-backports-functools-lru-cache)
15998 ("python2-enum34" ,python2-enum34)
15999 ("python2-singledispatch" ,python2-singledispatch)
16000 ,@(alist-delete "python-typed-ast"
16001 (package-propagated-inputs base)))))))
16002
16003 (define-public python-isbnlib
16004 (package
16005 (name "python-isbnlib")
16006 (version "3.10.4")
16007 (source
16008 (origin
16009 (method url-fetch)
16010 (uri (pypi-uri "isbnlib" version))
16011 (sha256
16012 (base32
16013 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16014 (build-system python-build-system)
16015 (arguments '(#:tests? #f)) ; No test
16016 (home-page "https://github.com/xlcnd/isbnlib")
16017 (synopsis "Python library to work with ISBN strings")
16018 (description "@code{python-isbnlib} is a (pure) python library that provides
16019 several useful methods and functions to validate, clean, transform, hyphenate and
16020 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16021 version, is suitable to be include as a dependency in other projects.")
16022 (license license:lgpl3+)))
16023
16024 (define-public python-isort
16025 (package
16026 (name "python-isort")
16027 (version "4.3.4")
16028 (source
16029 (origin
16030 (method git-fetch)
16031 (uri (git-reference
16032 ;; Tests pass only from the Github sources
16033 (url "https://github.com/timothycrosley/isort")
16034 (commit version)))
16035 (file-name (git-file-name name version))
16036 (sha256
16037 (base32
16038 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16039 (build-system python-build-system)
16040 (native-inputs
16041 `(("python-mock" ,python-mock)
16042 ("python-pytest" ,python-pytest)))
16043 (home-page "https://github.com/timothycrosley/isort")
16044 (synopsis "Python utility/library to sort python imports")
16045 (description "@code{python-isort} is a python utility/library to sort
16046 imports alphabetically, and automatically separated into sections. It
16047 provides a command line utility, a python library and plugins for various
16048 editors.")
16049 (license license:expat)
16050 (properties `((python2-variant . ,(delay python2-isort))))))
16051
16052 (define-public python2-isort
16053 (let ((base (package-with-python2
16054 (strip-python2-variant python-isort))))
16055 (package/inherit base
16056 (native-inputs
16057 `(("python2-futures" ,python2-futures)
16058 ,@(package-native-inputs base))))))
16059
16060 (define-public python2-backports-functools-lru-cache
16061 (package
16062 (name "python2-backports-functools-lru-cache")
16063 (version "1.6.1")
16064 (source
16065 (origin
16066 (method url-fetch)
16067 ;; only the pypi tarballs contain the necessary metadata
16068 (uri (pypi-uri "backports.functools_lru_cache" version))
16069 (sha256
16070 (base32
16071 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16072 (build-system python-build-system)
16073 (native-inputs
16074 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16075 (arguments
16076 `(#:python ,python-2))
16077 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16078 (synopsis "Backport of functools.lru_cache from Python 3.3")
16079 (description "@code{python2-backports-functools-lru-cache} is a backport
16080 of @code{functools.lru_cache} from python 3.3.")
16081 (license license:expat)))
16082
16083 (define-public python-configparser
16084 (package
16085 (name "python-configparser")
16086 (version "4.0.2")
16087 (source
16088 (origin
16089 (method url-fetch)
16090 (uri (pypi-uri "configparser" version))
16091 (sha256
16092 (base32
16093 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16094 (native-inputs
16095 `(("python-setuptools_scm" ,python-setuptools-scm)))
16096 (build-system python-build-system)
16097 (home-page "https://github.com/jaraco/configparser/")
16098 (synopsis "Backport of configparser from python 3.5")
16099 (description "@code{python-configparser} is a backport of
16100 @code{configparser} from Python 3.5 so that it can be used directly
16101 in other versions.")
16102 (license license:expat)))
16103
16104 (define-public python2-configparser
16105 (package-with-python2 python-configparser))
16106
16107 (define-public python-iniconfig
16108 (package
16109 (name "python-iniconfig")
16110 (version "1.1.1")
16111 (source
16112 (origin
16113 (method url-fetch)
16114 (uri (pypi-uri "iniconfig" version))
16115 (sha256
16116 (base32
16117 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16118 (build-system python-build-system)
16119 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16120 (synopsis "Simple INI-file parser")
16121 (description "The @code{iniconfig} package provides a small and simple
16122 INI-file parser module having a unique set of features; @code{iniconfig}
16123 @itemize
16124 @item maintains the order of sections and entries;
16125 @item supports multi-line values with or without line-continuations;
16126 @item supports \"#\" comments everywhere;
16127 @item raises errors with proper line-numbers;
16128 @item raises an error when two sections have the same name.
16129 @end itemize")
16130 (license license:expat)))
16131
16132 (define-public python-mamba
16133 (package
16134 (name "python-mamba")
16135 (version "0.11.2")
16136 (source (origin
16137 (method url-fetch)
16138 (uri (pypi-uri "mamba" version))
16139 (sha256
16140 (base32
16141 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16142 (build-system python-build-system)
16143 (arguments `(#:tests? #f)) ; No test
16144 (propagated-inputs
16145 `(("python-clint" ,python-clint)
16146 ("python-coverage" ,python-coverage)))
16147 (home-page "https://nestorsalceda.com/mamba/")
16148 (synopsis "Test runner for Python")
16149 (description
16150 "Mamba is a Behaviour-Driven Development tool for Python developers.
16151 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16152 (license license:expat)))
16153
16154 (define-public python-mando
16155 (package
16156 (name "python-mando")
16157 (version "0.6.4")
16158 (source (origin
16159 (method url-fetch)
16160 (uri (pypi-uri "mando" version))
16161 (sha256
16162 (base32
16163 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16164 (build-system python-build-system)
16165 (propagated-inputs
16166 `(("python-rst2ansi" ,python-rst2ansi)
16167 ("python-six" ,python-six)))
16168 (native-inputs
16169 `(("python-pytest" ,python-pytest)))
16170 (home-page "https://mando.readthedocs.org/")
16171 (synopsis
16172 "Wrapper around argparse, allowing creation of complete CLI applications")
16173 (description
16174 "This package is a wrapper around argparse, allowing you to write complete CLI
16175 applications in seconds while maintaining all the flexibility.")
16176 (license license:expat)))
16177
16178 (define-public python2-mando
16179 (package-with-python2 python-mando))
16180
16181 (define-public python2-argparse
16182 (package
16183 (name "python2-argparse")
16184 (version "1.4.0")
16185 (source
16186 (origin
16187 (method url-fetch)
16188 (uri (pypi-uri "argparse" version))
16189 (sha256
16190 (base32
16191 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16192 (build-system python-build-system)
16193 (arguments
16194 `(#:python ,python-2))
16195 (home-page "https://github.com/ThomasWaldmann/argparse/")
16196 (synopsis "Python command-line parsing library")
16197 (description
16198 "This package is mostly for people who want to have @code{argparse} on
16199 older Pythons because it was not part of the standard library back then.")
16200 (license license:psfl)))
16201
16202 (define-public python-fudge
16203 (package
16204 (name "python-fudge")
16205 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16206 ;; package, which is currently the only use of this package.
16207 (version "0.9.6")
16208 (source
16209 (origin
16210 (method url-fetch)
16211 (uri (pypi-uri "fudge" version))
16212 (sha256
16213 (base32
16214 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16215 (build-system python-build-system)
16216 (arguments
16217 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16218 (home-page "https://github.com/fudge-py/fudge")
16219 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16220 (description
16221 "Fudge is a Python module for using fake objects (mocks and stubs) to
16222 test real ones.
16223
16224 In readable Python code, you declare the methods available on your fake object
16225 and how they should be called. Then you inject that into your application and
16226 start testing. This declarative approach means you don’t have to record and
16227 playback actions and you don’t have to inspect your fakes after running code.
16228 If the fake object was used incorrectly then you’ll see an informative
16229 exception message with a traceback that points to the culprit.")
16230 (license license:expat)))
16231
16232 (define-public python2-fudge
16233 (package-with-python2 python-fudge))
16234
16235 (define-public python-mwclient
16236 (package
16237 (name "python-mwclient")
16238 (version "0.10.1")
16239 (source
16240 (origin
16241 (method git-fetch)
16242 ;; The PyPI version wouldn't contain tests.
16243 (uri (git-reference
16244 (url "https://github.com/mwclient/mwclient")
16245 (commit (string-append "v" version))))
16246 (file-name (git-file-name name version))
16247 (sha256
16248 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16249 (build-system python-build-system)
16250 (propagated-inputs
16251 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16252 ("python-six" ,python-six)))
16253 (native-inputs
16254 `(("python-mock" ,python-mock)
16255 ("python-pytest" ,python-pytest)
16256 ("python-pytest-cov" ,python-pytest-cov)
16257 ("python-pytest-runner" ,python-pytest-runner)
16258 ("python-responses" ,python-responses)))
16259 (home-page "https://github.com/btongminh/mwclient")
16260 (synopsis "MediaWiki API client")
16261 (description "This package provides a MediaWiki API client.")
16262 (license license:expat)))
16263
16264 (define-public python-utils
16265 (package
16266 (name "python-utils")
16267 (version "2.4.0")
16268 (source (origin
16269 (method url-fetch)
16270 (uri (pypi-uri "python-utils" version))
16271 (sha256
16272 (base32
16273 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16274 (build-system python-build-system)
16275 (arguments
16276 `(#:phases
16277 (modify-phases %standard-phases
16278 (replace 'check
16279 (lambda* (#:key inputs outputs #:allow-other-keys)
16280 (add-installed-pythonpath inputs outputs)
16281 (delete-file "pytest.ini")
16282 (invoke "pytest" "-vv"))))))
16283 (native-inputs
16284 `(("pytest-runner" ,python-pytest-runner)
16285 ("pytest" ,python-pytest)
16286 ("six" ,python-six)))
16287 (home-page "https://github.com/WoLpH/python-utils")
16288 (synopsis "Convenient utilities not included with the standard Python install")
16289 (description
16290 "Python Utils is a collection of small Python functions and classes which
16291 make common patterns shorter and easier.")
16292 (license license:bsd-2)))
16293
16294 (define-public python2-utils
16295 (package-with-python2 python-utils))
16296
16297 (define-public python-diff-match-patch
16298 (package
16299 (name "python-diff-match-patch")
16300 (version "20121119")
16301 (source
16302 (origin
16303 (method url-fetch)
16304 (uri (pypi-uri "diff-match-patch" version))
16305 (sha256
16306 (base32
16307 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16308 (build-system python-build-system)
16309 (home-page "https://code.google.com/p/google-diff-match-patch")
16310 (synopsis "Synchronize plain text")
16311 (description "Diff Match and Patch libraries offer robust algorithms to
16312 perform the operations required for synchronizing plain text.")
16313 (license license:asl2.0)))
16314
16315 (define-public python2-diff-match-patch
16316 (package-with-python2 python-diff-match-patch))
16317
16318 (define-public python-dirsync
16319 (package
16320 (name "python-dirsync")
16321 (version "2.2.5")
16322 (source
16323 (origin
16324 (method url-fetch)
16325 (uri (pypi-uri "dirsync" version))
16326 (sha256
16327 (base32
16328 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16329 (build-system python-build-system)
16330 (propagated-inputs
16331 `(("six" ,python-six)))
16332 (home-page "https://github.com/tkhyn/dirsync")
16333 (synopsis "Advanced directory tree synchronisation tool")
16334 (description "Advanced directory tree synchronisation tool.")
16335 (license license:expat)))
16336
16337 (define-public python2-dirsync
16338 (package-with-python2 python-dirsync))
16339
16340 (define-public python-levenshtein
16341 (package
16342 (name "python-levenshtein")
16343 (version "0.12.0")
16344 (source
16345 (origin
16346 (method url-fetch)
16347 (uri (pypi-uri "python-Levenshtein" version))
16348 (sha256
16349 (base32
16350 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16351 (build-system python-build-system)
16352 (home-page "https://github.com/ztane/python-Levenshtein")
16353 (synopsis "Fast computation of Levenshtein distance and string similarity")
16354 (description
16355 "The Levenshtein Python C extension module contains functions for fast computation of
16356 @enumerate
16357 @item Levenshtein (edit) distance, and edit operations
16358 @item string similarity
16359 @item approximate median strings, and generally string averaging
16360 @item string sequence and set similarity
16361 @end enumerate
16362 It supports both normal and Unicode strings.")
16363 (license license:gpl2+)))
16364
16365 (define-public python2-levenshtein
16366 (package-with-python2 python-levenshtein))
16367
16368 (define-public python-scandir
16369 (package
16370 (name "python-scandir")
16371 (version "1.10.0")
16372 (source
16373 (origin
16374 (method url-fetch)
16375 (uri (pypi-uri "scandir" version))
16376 (sha256
16377 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16378 (build-system python-build-system)
16379 (arguments
16380 `(#:phases (modify-phases %standard-phases
16381 (replace 'check
16382 (lambda _
16383 (invoke "python" "test/run_tests.py"))))))
16384 (home-page "https://github.com/benhoyt/scandir")
16385 (synopsis "Directory iteration function")
16386 (description
16387 "Directory iteration function like os.listdir(), except that instead of
16388 returning a list of bare filenames, it yields DirEntry objects that include
16389 file type and stat information along with the name. Using scandir() increases
16390 the speed of os.walk() by 2-20 times (depending on the platform and file
16391 system) by avoiding unnecessary calls to os.stat() in most cases.
16392
16393 This package is part of the Python standard library since version 3.5.")
16394 (license license:bsd-3)))
16395
16396 (define-public python2-scandir
16397 (package-with-python2 python-scandir))
16398
16399 (define-public python2-stemming
16400 (package
16401 (name "python2-stemming")
16402 (version "1.0.1")
16403 (source
16404 (origin
16405 (method url-fetch)
16406 (uri (pypi-uri "stemming" version))
16407 (sha256
16408 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16409 (build-system python-build-system)
16410 (arguments
16411 `(#:python ,python-2))
16412 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16413 (synopsis "Python implementations of various stemming algorithms")
16414 (description
16415 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16416 stemming algorithms for English. These implementations are straightforward and
16417 efficient, unlike some Python versions of the same algorithms available on the
16418 Web. This package is an extraction of the stemming code included in the Whoosh
16419 search engine.")
16420 (license license:public-domain)))
16421
16422 (define-public python-factory-boy
16423 (package
16424 (name "python-factory-boy")
16425 (version "2.8.1")
16426 (source
16427 (origin
16428 (method url-fetch)
16429 (uri (pypi-uri "factory_boy" version))
16430 (sha256
16431 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16432 (build-system python-build-system)
16433 (arguments
16434 ;; Tests are not included in the tarball.
16435 `(#:tests? #f))
16436 (propagated-inputs
16437 `(("faker" ,python-faker)))
16438 (home-page "https://github.com/benhoyt/scandir")
16439 (synopsis "Versatile test fixtures replacement")
16440 (description
16441 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16442
16443 As a fixtures replacement tool, it aims to replace static, hard to maintain
16444 fixtures with easy-to-use factories for complex object.
16445
16446 Instead of building an exhaustive test setup with every possible combination
16447 of corner cases, factory_boy allows you to use objects customized for the
16448 current test, while only declaring the test-specific fields")
16449 (license license:expat)))
16450
16451 (define-public python2-factory-boy
16452 (package-with-python2 python-factory-boy))
16453
16454 (define-public python-translate-toolkit
16455 (package
16456 (name "python-translate-toolkit")
16457 (version "2.1.0")
16458 (source
16459 (origin
16460 (method url-fetch)
16461 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16462 (sha256
16463 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16464 (build-system python-build-system)
16465 (native-inputs
16466 `(("python-pytest" ,python-pytest)
16467 ("python-sphinx" ,python-sphinx)))
16468 (propagated-inputs
16469 `(("python-babel" ,python-babel)
16470 ("python-beautifulsoup4" ,python-beautifulsoup4)
16471 ("python-chardet" ,python-chardet)
16472 ("python-diff-match-patch" ,python-diff-match-patch)
16473 ("python-levenshtein" ,python-levenshtein)
16474 ("python-lxml" ,python-lxml)
16475 ("python-six" ,python-six)
16476 ("python-vobject" ,python-vobject)
16477 ("python-pyyaml" ,python-pyyaml)))
16478 (arguments
16479 ;; TODO: tests are not run, because they end with
16480 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16481 ;; 'parse_funcs'
16482 ;; during test setup.
16483 `(#:tests? #f))
16484 (home-page "https://toolkit.translatehouse.org")
16485 (synopsis "Tools and API for translation and localization engineering")
16486 (description
16487 "Tools and API for translation and localization engineering. It contains
16488 several utilities, as well as an API for building localization tools.")
16489 (license license:gpl2+)))
16490
16491 (define-public python2-translate-toolkit
16492 (package-with-python2 python-translate-toolkit))
16493
16494 (define-public python-packaging
16495 (package
16496 (name "python-packaging")
16497 (version "20.0")
16498 (source
16499 (origin
16500 (method url-fetch)
16501 (uri (pypi-uri "packaging" version))
16502 ;; XXX: The URL in the patch file is wrong, it should be
16503 ;; <https://github.com/pypa/packaging/pull/256>.
16504 (patches (search-patches "python-packaging-test-arch.patch"))
16505 (sha256
16506 (base32
16507 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16508 (build-system python-build-system)
16509 (arguments
16510 `(#:phases (modify-phases %standard-phases
16511 (replace 'check
16512 (lambda* (#:key tests? #:allow-other-keys)
16513 (if tests?
16514 (invoke "py.test" "-vv")
16515 (format #t "test suite not run~%"))
16516 #t)))))
16517 (native-inputs
16518 `(("python-pretend" ,python-pretend)
16519 ("python-pytest" ,python-pytest)))
16520 (propagated-inputs
16521 `(("python-pyparsing" ,python-pyparsing)
16522 ("python-six" ,python-six)))
16523 (home-page "https://github.com/pypa/packaging")
16524 (synopsis "Core utilities for Python packages")
16525 (description "Packaging is a Python module for dealing with Python packages.
16526 It offers an interface for working with package versions, names, and dependency
16527 information.")
16528 ;; From 'LICENSE': This software is made available under the terms of
16529 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16530 ;; Contributions to this software is made under the terms of *both* these
16531 ;; licenses.
16532 (license (list license:asl2.0 license:bsd-2))))
16533
16534 (define-public python2-packaging
16535 (package-with-python2 python-packaging))
16536
16537 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16538 (define-public python-packaging-bootstrap
16539 (hidden-package
16540 (package/inherit
16541 python-packaging
16542 (name "python-packaging-bootstrap")
16543 (native-inputs '())
16544 (propagated-inputs
16545 `(("python-pyparsing" ,python-pyparsing)))
16546 (arguments '(#:tests? #f)))))
16547
16548 (define-public python2-packaging-bootstrap
16549 (hidden-package
16550 (package/inherit
16551 python2-packaging
16552 (name "python2-packaging-bootstrap")
16553 (native-inputs '())
16554 (propagated-inputs
16555 `(("python-pyparsing" ,python2-pyparsing)))
16556 (arguments
16557 `(#:tests? #f
16558 ,@(package-arguments python2-packaging))))))
16559
16560 (define-public python-relatorio
16561 (package
16562 (name "python-relatorio")
16563 (version "0.8.0")
16564 (source
16565 (origin
16566 (method url-fetch)
16567 (uri (pypi-uri "relatorio" version))
16568 (sha256
16569 (base32
16570 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16571 (build-system python-build-system)
16572 (propagated-inputs
16573 `(("python-lxml" ,python-lxml)
16574 ("python-genshi" ,python-genshi)))
16575 (native-inputs
16576 `(("python-magic" ,python-magic)))
16577 (home-page "https://relatorio.tryton.org/")
16578 (synopsis "Templating library able to output ODT and PDF files")
16579 (description "Relatorio is a templating library which provides a way to
16580 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16581 for more filetypes can be easily added by creating plugins for them.")
16582 (license license:gpl3+)))
16583
16584 (define-public python2-relatorio
16585 (package-with-python2 python-relatorio))
16586
16587 (define-public python-radon
16588 (package
16589 (name "python-radon")
16590 (version "4.1.0")
16591 (source
16592 (origin
16593 (method url-fetch)
16594 (uri (pypi-uri "radon" version))
16595 (sha256
16596 (base32
16597 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16598 (build-system python-build-system)
16599 (arguments
16600 `(#:phases (modify-phases %standard-phases
16601 (replace 'check
16602 (lambda _
16603 (invoke "python" "radon/tests/run.py"))))))
16604 (propagated-inputs
16605 `(("python-colorama" ,python-colorama)
16606 ("python-flake8-polyfill" ,python-flake8-polyfill)
16607 ("python-mando" ,python-mando)))
16608 (native-inputs
16609 `(("python-pytest" ,python-pytest)
16610 ("python-pytest-mock" ,python-pytest-mock)))
16611 (home-page "https://radon.readthedocs.org/")
16612 (synopsis "Code Metrics in Python")
16613 (description "Radon is a Python tool which computes various code metrics.
16614 Supported metrics are:
16615 @itemize @bullet
16616 @item raw metrics: SLOC, comment lines, blank lines, &c.
16617 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16618 @item Halstead metrics (all of them)
16619 @item the Maintainability Index (a Visual Studio metric)
16620 @end itemize")
16621 (properties `((python2-variant . ,(delay python2-radon))))
16622 (license license:expat)))
16623
16624 (define-public python2-radon
16625 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16626 (package/inherit base
16627 (propagated-inputs
16628 `(("python-configparser" ,python2-configparser)
16629 ("python-future" ,python2-future)
16630 ,@(package-propagated-inputs base))))))
16631
16632 (define-public python-sure
16633 (package
16634 (name "python-sure")
16635 (version "1.4.11")
16636 (source
16637 (origin
16638 (method url-fetch)
16639 (uri (pypi-uri "sure" version))
16640 (sha256
16641 (base32
16642 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16643 (build-system python-build-system)
16644 (propagated-inputs
16645 `(("python-mock" ,python-mock)
16646 ("python-six" ,python-six)))
16647 (native-inputs
16648 `(("python-nose" ,python-nose)))
16649 (home-page "https://github.com/gabrielfalcao/sure")
16650 (synopsis "Automated testing library in python for python")
16651 (description
16652 "Sure is a python library that leverages a DSL for writing assertions.
16653 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16654 (license license:gpl3+)))
16655
16656 (define-public python2-sure
16657 (package-with-python2 python-sure))
16658
16659 (define-public python2-couleur
16660 ;; This package does not seem to support python3 at all, hence,
16661 ;; only the python2 variant definition is provided.
16662 (package
16663 (name "python2-couleur")
16664 (version "0.6.2")
16665 (source
16666 (origin
16667 (method url-fetch)
16668 (uri (pypi-uri "couleur" version))
16669 (sha256
16670 (base32
16671 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16672 (build-system python-build-system)
16673 (arguments
16674 `(#:python ,python-2))
16675 (home-page "https://github.com/gabrielfalcao/couleur")
16676 (synopsis
16677 "ANSI terminal tool for python, colored shell and other handy fancy features")
16678 (description
16679 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16680 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16681 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16682 ;; https://github.com/gabrielfalcao/couleur/issues/11
16683 (license license:lgpl3+)))
16684
16685 (define-public python-misaka
16686 (package
16687 (name "python-misaka")
16688 (version "2.1.1")
16689 (source
16690 (origin
16691 (method url-fetch)
16692 (uri (pypi-uri "misaka" version))
16693 (sha256
16694 (base32
16695 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16696 (build-system python-build-system)
16697 (arguments
16698 `(;; Line 37 of setup.py calls self.run_command('develop')
16699 ;; in the 'check' phase. This command seems to be trying
16700 ;; to write to
16701 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16702 ;; for which it does not have the permission to write.
16703 #:tests? #f))
16704 (propagated-inputs
16705 `(("python-cffi" ,python-cffi)))
16706 (home-page "https://github.com/FSX/misaka")
16707 (synopsis "Python binding for Hoedown")
16708 (description
16709 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16710 library written in C. It features a fast HTML renderer and functionality to make custom
16711 renderers (e.g. man pages or LaTeX).")
16712 (license license:expat)))
16713
16714 (define-public python2-misaka
16715 (package-with-python2 python-misaka))
16716
16717 (define-public python2-steadymark
16718 ;; This is forced into being a python2 only variant
16719 ;; due to its dependence on couleur that has no support
16720 ;; for python3
16721 (package
16722 (name "python2-steadymark")
16723 (version "0.7.3")
16724 (source
16725 (origin
16726 (method url-fetch)
16727 (uri (pypi-uri "steadymark" version))
16728 (sha256
16729 (base32
16730 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16731 (build-system python-build-system)
16732 (native-inputs
16733 `(("python-couleur" ,python2-couleur)
16734 ("python-sure" ,python2-sure)
16735 ("python-misaka" ,python2-misaka)))
16736 (arguments
16737 `(#:python ,python-2
16738 #:phases
16739 (modify-phases %standard-phases
16740 (add-before 'build 'patch-setup-py
16741 (lambda _
16742 ;; Update requirements from dependency==version
16743 ;; to dependency>=version
16744 (substitute* "setup.py"
16745 (("==") ">="))
16746 #t)))))
16747 (home-page "https://github.com/gabrielfalcao/steadymark")
16748 (synopsis "Markdown-based test runner for python")
16749 (description
16750 "@code{Steadymark} allows documentation to be written in github-flavoured
16751 markdown. The documentation may contain snippets of code surrounded by python
16752 code blocks and @code{Steadymark} will find these snippets and run them, making
16753 sure that there are no old malfunctional examples in the documentation examples.")
16754 (license license:expat)))
16755
16756 (define-public python-jsonpointer
16757 (package
16758 (name "python-jsonpointer")
16759 (version "1.10")
16760 (source
16761 (origin
16762 (method url-fetch)
16763 (uri (pypi-uri "jsonpointer" version))
16764 (sha256
16765 (base32
16766 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16767 (build-system python-build-system)
16768 (home-page "https://github.com/stefankoegl/python-json-pointer")
16769 (synopsis "Identify specific nodes in a JSON document")
16770 (description "@code{jsonpointer} allows you to access specific nodes
16771 by path in a JSON document (see RFC 6901).")
16772 (license license:bsd-3)))
16773
16774 (define-public python2-jsonpointer
16775 (package-with-python2 python-jsonpointer))
16776
16777 (define-public python-jsonpatch
16778 (package
16779 (name "python-jsonpatch")
16780 (version "1.16")
16781 (source
16782 (origin
16783 (method git-fetch)
16784 ;; pypi version lacks tests.js
16785 (uri (git-reference
16786 (url "https://github.com/stefankoegl/python-json-patch")
16787 (commit (string-append "v" version))))
16788 (file-name (git-file-name name version))
16789 (sha256
16790 (base32
16791 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16792 (build-system python-build-system)
16793 (propagated-inputs
16794 `(("python-jsonpointer" ,python-jsonpointer)))
16795 (home-page "https://github.com/stefankoegl/python-json-patch")
16796 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16797 (description "@code{jsonpatch} is a library and program that allows
16798 applying JSON Patches according to RFC 6902.")
16799 (license license:bsd-3)))
16800
16801 (define-public python2-jsonpatch
16802 (package-with-python2 python-jsonpatch))
16803
16804 (define-public python-jsonpatch-0.4
16805 (package (inherit python-jsonpatch)
16806 (name "python-jsonpatch")
16807 (version "0.4")
16808 (source
16809 (origin
16810 (method git-fetch)
16811 (uri (git-reference
16812 (url "https://github.com/stefankoegl/python-json-patch")
16813 (commit (string-append "v" version))))
16814 (file-name (git-file-name name version))
16815 (sha256
16816 (base32
16817 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16818
16819 (define-public python2-jsonpatch-0.4
16820 (package-with-python2 python-jsonpatch-0.4))
16821
16822 (define-public python-rfc3986
16823 (package
16824 (name "python-rfc3986")
16825 (version "1.4.0")
16826 (source (origin
16827 (method url-fetch)
16828 (uri (pypi-uri "rfc3986" version))
16829 (sha256
16830 (base32
16831 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16832 (build-system python-build-system)
16833 (arguments
16834 `(#:modules ((guix build utils)
16835 (guix build python-build-system)
16836 (ice-9 ftw)
16837 (srfi srfi-1)
16838 (srfi srfi-26))
16839 #:phases
16840 (modify-phases %standard-phases
16841 (replace 'check
16842 (lambda _
16843 (let ((cwd (getcwd)))
16844 (setenv "PYTHONPATH"
16845 (string-append cwd "/build/"
16846 (find (cut string-prefix? "lib" <>)
16847 (scandir (string-append cwd "/build")))
16848 ":"
16849 (getenv "PYTHONPATH")))
16850 (invoke "pytest" "-v")))))))
16851 (native-inputs
16852 `(("python-pytest" ,python-pytest)))
16853 (home-page "https://rfc3986.readthedocs.io/")
16854 (synopsis "Parse and validate URI references")
16855 (description
16856 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16857 validation and authority parsing. This module also supports RFC@tie{}6874
16858 which adds support for zone identifiers to IPv6 addresses.")
16859 (license license:asl2.0)))
16860
16861 (define-public python2-rfc3986
16862 (package-with-python2 python-rfc3986))
16863
16864 (define-public python-rfc3987
16865 (package
16866 (name "python-rfc3987")
16867 (version "1.3.7")
16868 (source
16869 (origin
16870 (method url-fetch)
16871 (uri (pypi-uri "rfc3987" version))
16872 (sha256
16873 (base32
16874 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16875 (build-system python-build-system)
16876 (home-page "https://pypi.org/project/rfc3987/")
16877 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16878 (description "@code{rfc3987} provides routines for parsing and
16879 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16880 (license license:gpl3+)))
16881
16882 (define-public python2-rfc3987
16883 (package-with-python2 python-rfc3987))
16884
16885 ;; The latest commit contains fixes for building with both python3 and python2.
16886 (define-public python-rfc6555
16887 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16888 (revision "1"))
16889 (package
16890 (name "python-rfc6555")
16891 (version (git-version "0.0.0" revision commit))
16892 (source (origin
16893 (method git-fetch)
16894 (uri (git-reference
16895 (url "https://github.com/sethmlarson/rfc6555")
16896 (commit commit)))
16897 (file-name (git-file-name name version))
16898 (sha256
16899 (base32
16900 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16901 (build-system python-build-system)
16902 (arguments
16903 '(#:phases
16904 (modify-phases %standard-phases
16905 (replace 'check
16906 (lambda* (#:key tests? #:allow-other-keys)
16907 (if tests?
16908 ;; Other tests require network access.
16909 (invoke "pytest" "tests/test_ipv6.py")
16910 #t))))))
16911 (native-inputs
16912 `(("python-pytest" ,python-pytest)))
16913 (home-page "https://pypi.org/project/rfc6555/")
16914 (synopsis "Python implementation of RFC 6555")
16915 (description
16916 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16917 6555. Provided with a single file and dead-simple API to allow easy vendoring
16918 and integration into other projects.")
16919 (properties `((python2-variant . ,(delay python2-rfc6555))))
16920 (license license:asl2.0))))
16921
16922 (define-public python2-rfc6555
16923 (let ((base (package-with-python2
16924 (strip-python2-variant python-rfc6555))))
16925 (package/inherit base
16926 (propagated-inputs
16927 `(("python2-selectors2" ,python2-selectors2))))))
16928
16929 (define-public python-bagit
16930 (package
16931 (name "python-bagit")
16932 (version "1.7.0")
16933 (source
16934 (origin
16935 (method url-fetch)
16936 (uri (pypi-uri "bagit" version))
16937 (sha256
16938 (base32
16939 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16940 (build-system python-build-system)
16941 (native-inputs
16942 `(("python-setuptools-scm" ,python-setuptools-scm)
16943 ("python-coverage" ,python-coverage)
16944 ("python-mock" ,python-mock)))
16945 (home-page "https://libraryofcongress.github.io/bagit-python/")
16946 (synopsis "Create and validate BagIt packages")
16947 (description "Bagit is a Python library and command line utility for working
16948 with BagIt style packages. BagIt is a minimalist packaging format for digital
16949 preservation.")
16950 (license license:cc0)))
16951
16952 (define-public python-prov
16953 (package
16954 (name "python-prov")
16955 (version "2.0.0")
16956 (source
16957 (origin
16958 (method url-fetch)
16959 (uri (pypi-uri "prov" version))
16960 (sha256
16961 (base32
16962 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16963 (build-system python-build-system)
16964 (propagated-inputs
16965 `(("python-dateutil" ,python-dateutil)
16966 ("python-lxml" ,python-lxml)
16967 ("python-networkx" ,python-networkx)
16968 ("python-rdflib" ,python-rdflib)))
16969 (native-inputs
16970 `(("graphviz" ,graphviz)
16971 ("python-pydot" ,python-pydot)))
16972 (home-page "https://github.com/trungdong/prov")
16973 (synopsis
16974 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16975 (description
16976 "This package provides a library for W3C Provenance Data Model supporting
16977 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16978 (license license:expat)))
16979
16980 (define-public python-arcp
16981 (package
16982 (name "python-arcp")
16983 (version "0.2.1")
16984 (source
16985 (origin
16986 (method url-fetch)
16987 (uri (pypi-uri "arcp" version))
16988 (sha256
16989 (base32
16990 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16991 (build-system python-build-system)
16992 (native-inputs
16993 `(("python-pytest" ,python-pytest)))
16994 (home-page "http://arcp.readthedocs.io/")
16995 (synopsis
16996 "Archive and Package URI parser and generator")
16997 (description
16998 "@acronym{arcp, Archive and Package} provides functions for creating
16999 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
17000 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
17001 consume or reference hypermedia resources bundled inside a file archive or an
17002 application package, as well as to resolve URIs for archive resources within a
17003 programmatic framework. This URI scheme provides mechanisms to generate a
17004 unique base URI to represent the root of the archive, so that relative URI
17005 references in a bundled resource can be resolved within the archive without
17006 having to extract the archive content on the local file system. An arcp URI can
17007 be used for purposes of isolation (e.g. when consuming multiple archives),
17008 security constraints (avoiding \"climb out\" from the archive), or for
17009 externally identiyfing sub-resources referenced by hypermedia formats.")
17010 (license license:asl2.0)))
17011
17012 (define-public python-shellescape
17013 (package
17014 (name "python-shellescape")
17015 (version "3.8.1")
17016 (source
17017 (origin
17018 (method git-fetch)
17019 (uri (git-reference
17020 (url "https://github.com/chrissimpkins/shellescape")
17021 (commit (string-append "v" version))))
17022 (file-name (git-file-name name version))
17023 (sha256
17024 (base32
17025 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17026 (build-system python-build-system)
17027 (arguments
17028 '(#:phases
17029 (modify-phases %standard-phases
17030 (replace 'check
17031 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17032 (when tests?
17033 (add-installed-pythonpath inputs outputs)
17034 (invoke "python" "tests/test_shellescape.py"))
17035 #t)))))
17036 (native-inputs
17037 `(("python-pytest" ,python-pytest)))
17038 (home-page "https://github.com/chrissimpkins/shellescape")
17039 (synopsis
17040 "Shell escape a string to safely use it as a token in a shell command")
17041 (description
17042 "The shellescape Python module defines the @code{shellescape.quote()}
17043 function that returns a shell-escaped version of a Python string. This is a
17044 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17045 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17046 (license license:expat)))
17047
17048 (define-public python-validators
17049 (package
17050 (name "python-validators")
17051 (version "0.14.2")
17052 (source (origin
17053 (method url-fetch)
17054 (uri (pypi-uri "validators" version))
17055 (sha256
17056 (base32
17057 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17058 (build-system python-build-system)
17059 (arguments
17060 '(#:phases (modify-phases %standard-phases
17061 (replace 'check
17062 (lambda _
17063 (invoke "pytest" "-vv"))))))
17064 (propagated-inputs
17065 `(("python-decorator" ,python-decorator)
17066 ("python-six" ,python-six)))
17067 (native-inputs
17068 `(("python-flake8" ,python-flake8)
17069 ("python-isort" ,python-isort)
17070 ("python-pytest" ,python-pytest)))
17071 (home-page "https://github.com/kvesteri/validators")
17072 (synopsis "Data validation library")
17073 (description
17074 "This package contains validators for different things such as email
17075 addresses, IP addresses, URLs, hashes and more. It has been designed to
17076 be easy to use and not require defining a schema or form just to validate
17077 some input.")
17078 (license license:expat)))
17079
17080 (define-public python2-validators
17081 (package-with-python2 python-validators))
17082
17083 (define-public python-validate-email
17084 (package
17085 (name "python-validate-email")
17086 (version "1.3")
17087 (source
17088 (origin
17089 (method url-fetch)
17090 (uri (pypi-uri "validate_email" version))
17091 (sha256
17092 (base32
17093 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17094 (build-system python-build-system)
17095 (home-page "https://github.com/syrusakbary/validate_email")
17096 (synopsis "Verifies if an email address is valid and really exists")
17097 (description "@code{validate_email} can be used to verify if an email
17098 address is valid and really exists.")
17099 (license license:lgpl3+)))
17100
17101 (define-public python2-validate-email
17102 (package-with-python2 python-validate-email))
17103
17104 (define-public python-flex
17105 (package
17106 (name "python-flex")
17107 (version "6.10.0")
17108 (source
17109 (origin
17110 (method url-fetch)
17111 (uri (pypi-uri "flex" version))
17112 (sha256
17113 (base32
17114 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17115 (build-system python-build-system)
17116 (propagated-inputs
17117 `(("python-click" ,python-click)
17118 ("python-iso8601" ,python-iso8601)
17119 ("python-jsonpointer" ,python-jsonpointer)
17120 ("python-pyyaml" ,python-pyyaml)
17121 ("python-requests" ,python-requests)
17122 ("python-rfc3987" ,python-rfc3987)
17123 ("python-six" ,python-six)
17124 ("python-validate-email" ,python-validate-email)))
17125 (home-page "https://github.com/pipermerriam/flex")
17126 (synopsis "Validates Swagger schemata")
17127 (description "@code{flex} can be used to validate Swagger schemata.")
17128 (license license:bsd-3)))
17129
17130 (define-public python2-flex
17131 (package-with-python2 python-flex))
17132
17133 (define-public python-marshmallow
17134 (package
17135 (name "python-marshmallow")
17136 (version "3.9.1")
17137 (source
17138 (origin
17139 (method url-fetch)
17140 (uri (pypi-uri "marshmallow" version))
17141 (sha256
17142 (base32
17143 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17144 (build-system python-build-system)
17145 (propagated-inputs
17146 `(("python-dateutil" ,python-dateutil)
17147 ("python-simplejson" ,python-simplejson)))
17148 (native-inputs
17149 `(("python-pytest" ,python-pytest)
17150 ("python-pytz" ,python-pytz)))
17151 (home-page "https://github.com/marshmallow-code/marshmallow")
17152 (synopsis "Convert complex datatypes to and from native
17153 Python datatypes.")
17154 (description "@code{marshmallow} provides a library for converting
17155 complex datatypes to and from native Python datatypes.")
17156 (license license:expat)))
17157
17158 (define-public python-apispec
17159 (package
17160 (name "python-apispec")
17161 (version "4.0.0")
17162 (source
17163 (origin
17164 (method url-fetch)
17165 (uri (pypi-uri "apispec" version))
17166 (sha256
17167 (base32
17168 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17169 (build-system python-build-system)
17170 (arguments
17171 '(#:phases (modify-phases %standard-phases
17172 (add-after 'unpack 'disable-prance-tests
17173 (lambda _
17174 ;; Disable validation tests since they require the
17175 ;; optional 'prance' library which is not yet in Guix.
17176 (substitute* "tests/test_ext_marshmallow_openapi.py"
17177 (("def test_openapi_tools_validate.*" all)
17178 (string-append "@pytest.mark.xfail\n" all)))))
17179 (replace 'check
17180 (lambda _
17181 (setenv "PYTHONPATH"
17182 (string-append "./build/lib:"
17183 (getenv "PYTHONPATH")))
17184 (invoke "pytest" "-vv"))))))
17185 (propagated-inputs
17186 `(("python-pyyaml" ,python-pyyaml)))
17187 (native-inputs
17188 `(("python-pytest" ,python-pytest)
17189 ("python-marshmallow" ,python-marshmallow)))
17190 (home-page "https://github.com/marshmallow-code/apispec")
17191 (synopsis "Swagger/OpenAPI specification generator")
17192 (description "@code{python-apispec} is a pluggable API specification
17193 generator. It currently supports the OpenAPI specification, formerly known
17194 as Swagger.")
17195 (license license:expat)))
17196
17197 (define-public python-flasgger
17198 (package
17199 (name "python-flasgger")
17200 (version "0.6.3")
17201 (source
17202 (origin
17203 (method git-fetch)
17204 (uri (git-reference
17205 (url "https://github.com/rochacbruno/flasgger")
17206 (commit version)))
17207 (file-name (git-file-name name version))
17208 (sha256
17209 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17210 (build-system python-build-system)
17211 (arguments
17212 `(#:phases
17213 (modify-phases %standard-phases
17214 (replace 'check
17215 (lambda* (#:key inputs outputs #:allow-other-keys)
17216 (substitute* "Makefile"
17217 (("flake8 flasgger --ignore=F403")
17218 "flake8 flasgger --ignore=E731,F403"))
17219 (setenv "PYTHONPATH" (string-append (getcwd)
17220 ":"
17221 (getenv "PYTHONPATH")))
17222 (invoke "py.test"))))))
17223 (propagated-inputs
17224 `(("python-flask" ,python-flask)
17225 ("python-pyyaml" ,python-pyyaml)
17226 ("python-jsonschema" ,python-jsonschema)
17227 ("python-mistune" ,python-mistune)
17228 ("python-six" ,python-six)))
17229 (native-inputs
17230 `(("python-decorator" ,python-decorator)
17231 ("python-flake8" ,python-flake8)
17232 ("python-flask-restful" ,python-flask-restful)
17233 ("python-flex" ,python-flex)
17234 ("python-pytest" ,python-pytest)
17235 ("python-pytest-cov" ,python-pytest-cov)
17236 ("python-marshmallow" ,python-marshmallow)
17237 ("python-apispec" ,python-apispec)))
17238 (home-page "https://github.com/rochacbruno/flasgger/")
17239 (synopsis "Extract Swagger specs from your Flask project")
17240 (description "@code{python-flasgger} allows extracting Swagger specs
17241 from your Flask project. It is a fork of Flask-Swagger.")
17242 (license license:expat)))
17243
17244 (define-public python-swagger-spec-validator
17245 (package
17246 (name "python-swagger-spec-validator")
17247 (version "2.4.3")
17248 (source
17249 (origin
17250 (method url-fetch)
17251 (uri (pypi-uri "swagger-spec-validator" version))
17252 (sha256
17253 (base32
17254 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17255 (build-system python-build-system)
17256 (propagated-inputs
17257 `(("python-jsonschema" ,python-jsonschema)
17258 ("python-pyyaml" ,python-pyyaml)
17259 ("python-six" ,python-six)))
17260 (home-page
17261 "https://github.com/Yelp/swagger_spec_validator")
17262 (synopsis "Validation of Swagger specifications")
17263 (description "@code{swagger_spec_validator} provides a library for
17264 validating Swagger API specifications.")
17265 (license license:asl2.0)))
17266
17267 (define-public python2-swagger-spec-validator
17268 (package-with-python2 python-swagger-spec-validator))
17269
17270 (define-public python-apache-libcloud
17271 (package
17272 (name "python-apache-libcloud")
17273 (version "3.1.0")
17274 (source
17275 (origin
17276 (method url-fetch)
17277 (uri (pypi-uri "apache-libcloud" version))
17278 (sha256
17279 (base32
17280 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17281 (build-system python-build-system)
17282 (arguments
17283 `(#:phases
17284 (modify-phases %standard-phases
17285 (add-after 'unpack 'patch-ssh
17286 (lambda* (#:key inputs #:allow-other-keys)
17287 (substitute* "libcloud/compute/ssh.py"
17288 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17289 "/bin/ssh" "'")))
17290 #t))
17291 (add-after 'unpack 'patch-tests
17292 (lambda _
17293 (substitute* "libcloud/test/compute/test_ssh_client.py"
17294 (("class ShellOutSSHClientTests")
17295 "@unittest.skip(\"Guix container doesn't have ssh service\")
17296 class ShellOutSSHClientTests"))
17297 #t))
17298 (add-before 'check 'copy-secret
17299 (lambda _
17300 (copy-file "libcloud/test/secrets.py-dist"
17301 "libcloud/test/secrets.py")
17302 #t)))))
17303 (inputs
17304 `(("openssh" ,openssh)))
17305 (propagated-inputs
17306 `(("python-paramiko" ,python-paramiko)
17307 ("python-requests" ,python-requests)))
17308 (native-inputs
17309 `(("python-lockfile" ,python-lockfile)
17310 ("python-mock" ,python-mock)
17311 ("python-pytest" ,python-pytest)
17312 ("python-pytest-runner" ,python-pytest-runner)
17313 ("python-requests-mock" ,python-requests-mock)))
17314 (home-page "https://libcloud.apache.org/")
17315 (synopsis "Unified Cloud API")
17316 (description "@code{libcloud} is a Python library for interacting with
17317 many of the popular cloud service providers using a unified API.")
17318 (license license:asl2.0)))
17319
17320 (define-public python-smmap
17321 (package
17322 (name "python-smmap")
17323 (version "3.0.1")
17324 (source
17325 (origin
17326 (method url-fetch)
17327 (uri (pypi-uri "smmap" version))
17328 (sha256
17329 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17330 (build-system python-build-system)
17331 (native-inputs
17332 `(("python-nosexcover" ,python-nosexcover)))
17333 (home-page "https://github.com/Byron/smmap")
17334 (synopsis "Python sliding window memory map manager")
17335 (description "@code{smmap} is a pure Python implementation of a sliding
17336 window memory map manager.")
17337 (license license:bsd-3)))
17338
17339 (define-public python-smmap2
17340 (deprecated-package "python-smmap2" python-smmap))
17341
17342 (define-public python2-smmap
17343 (package-with-python2 python-smmap))
17344
17345 (define-public python2-smmap2
17346 (deprecated-package "python2-smmap2" python2-smmap))
17347
17348 (define-public python-regex
17349 (package
17350 (name "python-regex")
17351 (version "2020.6.8")
17352 (source (origin
17353 (method url-fetch)
17354 (uri (pypi-uri "regex" version))
17355 (sha256
17356 (base32
17357 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17358 (build-system python-build-system)
17359 (arguments
17360 '(#:phases
17361 (modify-phases %standard-phases
17362 (replace 'check
17363 (lambda* (#:key inputs outputs #:allow-other-keys)
17364 (add-installed-pythonpath inputs outputs)
17365 (invoke "python" "-c"
17366 "from regex.test_regex import test_main; test_main()"))))))
17367 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17368 (synopsis "Alternative regular expression module")
17369 (description "This regular expression implementation is backwards-
17370 compatible with the standard @code{re} module, but offers additional
17371 functionality like full case-folding for case-insensitive matches in Unicode.")
17372 (license license:psfl)))
17373
17374 (define-public python2-regex
17375 (package-with-python2 python-regex))
17376
17377 (define-public python-pyopengl
17378 (package
17379 (name "python-pyopengl")
17380 (version "3.1.5")
17381 (source
17382 (origin
17383 (method url-fetch)
17384 (uri (pypi-uri "PyOpenGL" version))
17385 (sha256
17386 (base32
17387 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17388 (build-system python-build-system)
17389 (inputs
17390 `(("mesa" ,mesa)
17391 ("freeglut" ,freeglut)
17392 ("glu" ,glu)))
17393 (arguments
17394 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17395 ;attribute 'OSMesa'
17396 #:phases
17397 (modify-phases %standard-phases
17398 (add-before 'build 'fix-paths
17399 (lambda* (#:key inputs outputs #:allow-other-keys)
17400 (substitute* '("OpenGL/platform/ctypesloader.py")
17401 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17402 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17403 (("'GL'")
17404 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17405 (("'GLU'")
17406 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17407 (("'glut',")
17408 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17409 (("'GLESv1_CM'")
17410 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17411 (("'GLESv2'")
17412 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17413 ;; Not providing libgle. It seems to be very old.
17414 #t)))))
17415 (home-page "http://pyopengl.sourceforge.net")
17416 (synopsis "Standard OpenGL bindings for Python")
17417 (description
17418 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17419 related APIs. The binding is created using the standard @code{ctypes}
17420 library.")
17421 (license license:bsd-3)))
17422
17423 (define-public python-pyopengl-accelerate
17424 (package
17425 (inherit python-pyopengl)
17426 (name "python-pyopengl-accelerate")
17427 (version "3.1.5")
17428 (source
17429 (origin
17430 (method url-fetch)
17431 (uri (pypi-uri "PyOpenGL-accelerate" version))
17432 (sha256
17433 (base32
17434 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17435 (inputs
17436 `(("mesa" ,mesa)
17437 ("python-numpy" ,python-numpy))) ; for cython module
17438 ; numpy_formathandler, thus not propagated
17439 (arguments
17440 `(#:tests? #f
17441 #:phases
17442 (modify-phases %standard-phases
17443 (delete 'fix-paths))))
17444 (synopsis "Acceleration code for PyOpenGL")
17445 (description
17446 "This is the Cython-coded accelerator module for PyOpenGL.")))
17447
17448 (define-public python-rencode
17449 (package
17450 (name "python-rencode")
17451 (version "1.0.5")
17452 (source
17453 (origin
17454 (method url-fetch)
17455 (uri (pypi-uri "rencode" version))
17456 (sha256
17457 (base32
17458 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17459 (build-system python-build-system)
17460 (arguments
17461 `(#:phases
17462 (modify-phases %standard-phases
17463 (add-before 'check 'delete-bogus-test
17464 ;; This test requires /home/aresch/Downloads, which is not provided by
17465 ;; the build environment.
17466 (lambda _
17467 (delete-file "rencode/t.py")
17468 #t)))))
17469 (native-inputs `(("pkg-config" ,pkg-config)
17470 ("python-cython" ,python-cython)))
17471 (home-page "https://github.com/aresch/rencode")
17472 (synopsis "Serialization of heterogeneous data structures")
17473 (description
17474 "The @code{rencode} module is a data structure serialization library,
17475 similar to @code{bencode} from the BitTorrent project. For complex,
17476 heterogeneous data structures with many small elements, r-encoding stake up
17477 significantly less space than b-encodings. This version of rencode is a
17478 complete rewrite in Cython to attempt to increase the performance over the
17479 pure Python module.")
17480 (license license:bsd-3)))
17481
17482 (define-public python2-rencode
17483 (package-with-python2 python-rencode))
17484
17485 (define-public python-xenon
17486 (package
17487 (name "python-xenon")
17488 (version "0.7.0")
17489 (source
17490 (origin
17491 (method url-fetch)
17492 (uri (pypi-uri "xenon" version))
17493 (sha256
17494 (base32
17495 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17496 (build-system python-build-system)
17497 (native-inputs
17498 `(("python-pyyaml" ,python-pyyaml)
17499 ("python-radon" ,python-radon)
17500 ("python-requests" ,python-requests)
17501 ("python-flake8" ,python-flake8)
17502 ("python-tox" ,python-tox)))
17503 (arguments
17504 `(#:tests? #f ;test suite not shipped with the PyPI archive
17505 #:phases
17506 (modify-phases %standard-phases
17507 (add-before 'build 'patch-test-requirements
17508 (lambda _
17509 ;; Remove httpretty dependency for tests.
17510 (substitute* "setup.py"
17511 (("httpretty") ""))
17512 #t)))))
17513 (home-page "https://xenon.readthedocs.org/")
17514 (synopsis "Monitor code metrics for Python on your CI server")
17515 (description
17516 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17517 Ideally, @code{xenon} is run every time code is committed. Through command
17518 line options, various thresholds can be set for the complexity of code. It
17519 will fail (i.e. it will exit with a non-zero exit code) when any of these
17520 requirements is not met.")
17521 (license license:expat)))
17522
17523 (define-public python-pysocks
17524 (package
17525 (name "python-pysocks")
17526 (version "1.7.1")
17527 (source
17528 (origin
17529 (method url-fetch)
17530 (uri (pypi-uri "PySocks" version))
17531 (sha256
17532 (base32
17533 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17534 (build-system python-build-system)
17535 (arguments `(#:tests? #f))
17536 (home-page "https://github.com/Anorov/PySocks")
17537 (synopsis "SOCKS client module")
17538 (description "@code{pysocks} is an updated and semi-actively maintained
17539 version of @code{SocksiPy} with bug fixes and extra features.")
17540 (license license:bsd-3)))
17541
17542 (define-public python2-pysocks
17543 (package-with-python2 python-pysocks))
17544
17545 (define-public python-pydiff
17546 (package
17547 (name "python-pydiff")
17548 (version "0.2")
17549 (source
17550 (origin
17551 (method url-fetch)
17552 (uri (pypi-uri "pydiff" version))
17553 (sha256
17554 (base32
17555 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17556 (build-system python-build-system)
17557 (home-page "https://github.com/myint/pydiff")
17558 (synopsis "Library to diff two Python files at the bytecode level")
17559 (description
17560 "@code{pydiff} makes it easy to look for actual code changes while
17561 ignoring formatting changes.")
17562 (license license:expat)))
17563
17564 (define-public python2-pydiff
17565 (package-with-python2 python-pydiff))
17566
17567 (define-public python-pydub
17568 (package
17569 (name "python-pydub")
17570 (version "0.24.1")
17571 (source
17572 (origin
17573 (method url-fetch)
17574 (uri (pypi-uri "pydub" version))
17575 (sha256
17576 (base32
17577 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17578 (build-system python-build-system)
17579 (arguments
17580 `(#:phases
17581 (modify-phases %standard-phases
17582 (add-after 'unpack 'fix-ffmpeg-path
17583 (lambda* (#:key inputs #:allow-other-keys)
17584 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17585 (substitute* '("pydub/utils.py")
17586 (("return \"ffmpeg\"")
17587 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17588 (("return \"ffplay\"")
17589 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17590 (("return \"ffprobe\"")
17591 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17592 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17593 #t))))))
17594 (home-page "https://pydub.com")
17595 (inputs
17596 `(("ffmpeg" ,ffmpeg)))
17597 (propagated-inputs
17598 `(("python-scipy" ,python-scipy)))
17599 (synopsis "Manipulate audio with a high level interface in Python")
17600 (description
17601 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17602 @code{ffmpeg} to open various audio formats.")
17603 (license license:expat))) ; MIT license
17604
17605 (define-public python-tqdm
17606 (package
17607 (name "python-tqdm")
17608 (version "4.43.0")
17609 (source
17610 (origin
17611 (method url-fetch)
17612 (uri (pypi-uri "tqdm" version))
17613 (sha256
17614 (base32
17615 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17616 (build-system python-build-system)
17617 (arguments
17618 '(#:phases (modify-phases %standard-phases
17619 (replace 'check
17620 (lambda* (#:key inputs outputs #:allow-other-keys)
17621 (add-installed-pythonpath inputs outputs)
17622 ;; This invokation is taken from tox.ini.
17623 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17624 "-d" "-v" "tqdm/"))))))
17625 (native-inputs
17626 `(("python-nose" ,python-nose)))
17627 (home-page "https://github.com/tqdm/tqdm")
17628 (synopsis "Fast, extensible progress meter")
17629 (description
17630 "Make loops show a progress bar on the console by just wrapping any
17631 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17632 design and layout.")
17633 (license (list license:mpl2.0 license:expat))))
17634
17635 (define-public python2-tqdm
17636 (package-with-python2 python-tqdm))
17637
17638 (define-public python-pkginfo
17639 (package
17640 (name "python-pkginfo")
17641 (version "1.7.0")
17642 (source
17643 (origin
17644 (method url-fetch)
17645 (uri (pypi-uri "pkginfo" version))
17646 (sha256
17647 (base32
17648 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17649 (build-system python-build-system)
17650 (arguments
17651 `(#:phases
17652 (modify-phases %standard-phases
17653 (add-before 'check 'patch-tests
17654 (lambda _
17655 (substitute* "pkginfo/tests/test_installed.py"
17656 (("test_ctor_w_package_no_PKG_INFO")
17657 "_test_ctor_w_package_no_PKG_INFO"))
17658 #t)))))
17659 (home-page
17660 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17661 (synopsis
17662 "Query metadatdata from sdists, bdists, and installed packages")
17663 (description
17664 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17665 source distriubtion (an sdist) or a binary distribution (e.g., created by
17666 running bdist_egg). It can also query the EGG-INFO directory of an installed
17667 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17668 created by running @code{python setup.py develop}).")
17669 (license license:expat)))
17670
17671 (define-public python2-pkginfo
17672 (package-with-python2 python-pkginfo))
17673
17674 (define-public python-twine
17675 (package
17676 (name "python-twine")
17677 (version "1.15.0")
17678 (source
17679 (origin
17680 (method url-fetch)
17681 (uri (pypi-uri "twine" version))
17682 (sha256
17683 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17684 (build-system python-build-system)
17685 (propagated-inputs
17686 `(("python-tqdm" ,python-tqdm)
17687 ("python-packaging" ,python-packaging)
17688 ("python-pkginfo" ,python-pkginfo)
17689 ("python-readme-renderer" ,python-readme-renderer)
17690 ("python-requests" ,python-requests)
17691 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17692 (home-page "https://github.com/pypa/twine")
17693 (synopsis "Collection of utilities for interacting with PyPI")
17694 (description
17695 "@code{twine} currently supports registering projects and uploading
17696 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17697 their files and supports any packaging format (including wheels).")
17698 (license license:asl2.0)))
17699
17700 (define-public python2-twine
17701 (package-with-python2 python-twine))
17702
17703 (define-public python-linecache2
17704 (package
17705 (name "python-linecache2")
17706 (version "1.0.0")
17707 (source
17708 (origin
17709 (method url-fetch)
17710 (uri (pypi-uri "linecache2" version))
17711 (sha256
17712 (base32
17713 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17714 (build-system python-build-system)
17715 (arguments
17716 `(;; The tests depend on unittest2, and our version is a bit too old.
17717 #:tests? #f))
17718 (native-inputs
17719 `(("python-pbr" ,python-pbr-minimal)))
17720 (home-page
17721 "https://github.com/testing-cabal/linecache2")
17722 (synopsis "Backports of the linecache module")
17723 (description
17724 "The linecache module allows one to get any line from any file, while
17725 attempting to optimize internally, using a cache, the common case where many
17726 lines are read from a single file.")
17727 (license license:psfl)))
17728
17729 (define-public python2-linecache2
17730 (package-with-python2 python-linecache2))
17731
17732 (define-public python-traceback2
17733 (package
17734 (name "python-traceback2")
17735 (version "1.4.0")
17736 (source
17737 (origin
17738 (method url-fetch)
17739 (uri (pypi-uri "traceback2" version))
17740 (sha256
17741 (base32
17742 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17743 (build-system python-build-system)
17744 (arguments
17745 `(;; python-traceback2 and python-unittest2 depend on one another.
17746 #:tests? #f))
17747 (native-inputs
17748 `(("python-pbr" ,python-pbr-minimal)))
17749 (propagated-inputs
17750 `(("python-linecache2" ,python-linecache2)))
17751 (home-page
17752 "https://github.com/testing-cabal/traceback2")
17753 (synopsis "Backports of the traceback module")
17754 (description
17755 "This module provides a standard interface to extract, format and print
17756 stack traces of Python programs. It exactly mimics the behavior of the Python
17757 interpreter when it prints a stack trace.")
17758 (license license:psfl)))
17759
17760 (define-public python2-traceback2
17761 (package-with-python2 python-traceback2))
17762
17763 (define-public python-ratelimiter
17764 (package
17765 (name "python-ratelimiter")
17766 (version "1.2.0")
17767 (source
17768 (origin
17769 (method url-fetch)
17770 (uri (pypi-uri "ratelimiter" version))
17771 (sha256
17772 (base32
17773 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17774 (build-system python-build-system)
17775 (arguments
17776 '(#:tests? #f)) ; There are no tests in the pypi archive.
17777 (home-page "https://github.com/RazerM/ratelimiter")
17778 (synopsis "Simple rate limiting object")
17779 (description
17780 "The @code{ratelimiter} module ensures that an operation will not be
17781 executed more than a given number of times during a given period.")
17782 (license license:asl2.0)))
17783
17784 (define-public python2-ratelimiter
17785 (package-with-python2 python-ratelimiter))
17786
17787 (define-public python-dukpy
17788 (package
17789 (name "python-dukpy")
17790 (version "0.3")
17791 (source
17792 (origin
17793 (method git-fetch)
17794 (uri (git-reference
17795 (url "https://github.com/kovidgoyal/dukpy")
17796 (commit (string-append "v" version))))
17797 (file-name (git-file-name name version))
17798 (sha256
17799 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17800 (build-system python-build-system)
17801 (home-page "https://github.com/kovidgoyal/dukpy")
17802 (synopsis "Run JavaScript in python")
17803 (description
17804 "dukpy is a JavaScript runtime environment for Python using the duktape
17805 embeddable JavaScript engine.")
17806 ;; Dukpy is licensed under MIT like the embedded duktape library,
17807 ;; with 'errors.c' as GPL3.
17808 (license (list license:expat license:gpl3))))
17809
17810 (define-public python2-dukpy
17811 (package-with-python2 python-dukpy))
17812
17813 (define-public python-jsonrpclib-pelix
17814 (package
17815 (name "python-jsonrpclib-pelix")
17816 (version "0.3.2")
17817 (source
17818 (origin
17819 (method url-fetch)
17820 (uri (pypi-uri "jsonrpclib-pelix" version))
17821 (sha256
17822 (base32
17823 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17824 (build-system python-build-system)
17825 (arguments
17826 `(#:tests? #f)) ; no tests in PyPI tarball
17827 (home-page "https://github.com/tcalmant/jsonrpclib/")
17828 (synopsis "JSON-RPC 2.0 client library for Python")
17829 (description
17830 "This library implements the JSON-RPC v2.0
17831 specification (backwards-compatible) as a client library for Python. This
17832 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17833 services.")
17834 (license license:asl2.0)))
17835
17836 (define-public python2-jsonrpclib-pelix
17837 (package-with-python2 python-jsonrpclib-pelix))
17838
17839 (define-public python-setuptools-scm-git-archive
17840 (package
17841 (name "python-setuptools-scm-git-archive")
17842 (version "1.0")
17843 (source
17844 (origin
17845 (method url-fetch)
17846 (uri (pypi-uri "setuptools_scm_git_archive" version))
17847 (sha256
17848 (base32
17849 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17850 (build-system python-build-system)
17851 (native-inputs
17852 `(("python-pytest" ,python-pytest)))
17853 (propagated-inputs
17854 `(("python-setuptools-scm" ,python-setuptools-scm)))
17855 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17856 (synopsis "Setuptools_scm plugin for git archives")
17857 (description
17858 "The setuptools_scm_git_archive package is a plugin to
17859 setuptools_scm, which supports obtaining versions from git archives that
17860 belong to tagged versions.")
17861 (license license:expat)))
17862
17863 (define-public python2-setuptools-scm-git-archive
17864 (package-with-python2 python-setuptools-scm-git-archive))
17865
17866 (define-public python-setuptools-git
17867 (package
17868 (name "python-setuptools-git")
17869 (version "1.2")
17870 (source
17871 (origin
17872 (method url-fetch)
17873 (uri (pypi-uri "setuptools-git" version))
17874 (sha256
17875 (base32
17876 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17877 (build-system python-build-system)
17878 (arguments
17879 `(#:phases
17880 (modify-phases %standard-phases
17881 ;; This is needed for tests.
17882 (add-after 'unpack 'configure-git
17883 (lambda _
17884 (setenv "HOME" "/tmp")
17885 (invoke "git" "config" "--global" "user.email" "guix")
17886 (invoke "git" "config" "--global" "user.name" "guix")
17887 #t)))))
17888 (native-inputs
17889 `(("git" ,git-minimal)))
17890 (home-page "https://github.com/msabramo/setuptools-git")
17891 (synopsis "Setuptools revision control system plugin for Git")
17892 (description
17893 "This package provides a plugin for Setuptools for revision control with
17894 Git.")
17895 (license license:bsd-3)))
17896
17897 (define-public python-pyclipper
17898 (package
17899 (name "python-pyclipper")
17900 (version "1.1.0.post3")
17901 (source
17902 (origin
17903 (method url-fetch)
17904 (uri (pypi-uri "pyclipper" version ".zip"))
17905 (sha256
17906 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17907 (modules '((guix build utils)))
17908 (snippet
17909 '(begin
17910 ;; This file is generated by Cython.
17911 (delete-file "pyclipper/pyclipper.cpp") #t))))
17912 (build-system python-build-system)
17913 (arguments
17914 `(#:phases
17915 (modify-phases %standard-phases
17916 (add-before 'build 'cythonize-sources
17917 (lambda _
17918 (with-directory-excursion "pyclipper"
17919 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17920 (propagated-inputs
17921 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17922 (native-inputs
17923 `(("python-cython" ,python-cython)
17924 ("python-pytest" ,python-pytest)
17925 ("python-pytest-runner" ,python-pytest-runner)
17926 ("python-unittest2" ,python-unittest2)
17927 ("unzip" ,unzip)))
17928 (home-page "https://github.com/greginvm/pyclipper")
17929 (synopsis "Wrapper for Angus Johnson's Clipper library")
17930 (description
17931 "Pyclipper is a Cython wrapper for the C++ translation of the
17932 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17933 (license license:expat)))
17934
17935 (define-public python2-pyclipper
17936 (package-with-python2 python-pyclipper))
17937
17938 (define-public python2-booleanoperations
17939 (package
17940 (name "python2-booleanoperations")
17941 (version "0.7.1")
17942 (source
17943 (origin
17944 (method url-fetch)
17945 (uri (pypi-uri "booleanOperations" version ".zip"))
17946 (sha256
17947 (base32
17948 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17949 (build-system python-build-system)
17950 (arguments
17951 `(#:python ,python-2))
17952 (native-inputs
17953 `(("unzip" ,unzip)
17954 ("python2-pytest" ,python2-pytest)
17955 ("python2-pytest-runner" ,python2-pytest-runner)))
17956 (propagated-inputs
17957 `(("python-fonttools" ,python2-fonttools)
17958 ("python-pyclipper" ,python2-pyclipper)
17959 ("python-ufolib" ,python2-ufolib)))
17960 (home-page "https://github.com/typemytype/booleanOperations")
17961 (synopsis "Boolean operations on paths")
17962 (description
17963 "BooleanOperations provides a Python library that enables
17964 boolean operations on paths.")
17965 (license license:expat)))
17966
17967 (define-public python-tempdir
17968 (package
17969 (name "python-tempdir")
17970 (version "0.7.1")
17971 (source
17972 (origin
17973 (method url-fetch)
17974 (uri (pypi-uri "tempdir" version))
17975 (sha256
17976 (base32
17977 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17978 (build-system python-build-system)
17979 (home-page "https://pypi.org/project/tempdir/")
17980 (arguments
17981 ;; the package has no tests
17982 '(#:tests? #f))
17983 (synopsis "Python library for managing temporary directories")
17984 (description
17985 "This library manages temporary directories that are automatically
17986 deleted with all their contents when they are no longer needed. It is
17987 particularly convenient for use in tests.")
17988 (license license:expat)))
17989
17990 (define-public python2-tempdir
17991 (package-with-python2 python-tempdir))
17992
17993 (define-public python-activepapers
17994 (package
17995 (name "python-activepapers")
17996 (version "0.2.2")
17997 (source
17998 (origin
17999 (method url-fetch)
18000 (uri (pypi-uri "ActivePapers.Py" version))
18001 (sha256
18002 (base32
18003 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
18004 (build-system python-build-system)
18005 (arguments
18006 `(#:modules ((ice-9 ftw)
18007 (srfi srfi-1)
18008 (guix build utils)
18009 (guix build python-build-system))
18010
18011 #:phases
18012 (modify-phases %standard-phases
18013 (add-after 'unpack 'delete-python2-code
18014 (lambda _
18015 (for-each delete-file
18016 '("lib/activepapers/builtins2.py"
18017 "lib/activepapers/standardlib2.py"
18018 "lib/activepapers/utility2.py"))))
18019 (replace 'check
18020 (lambda _
18021 ;; Deactivate the test cases that download files
18022 (setenv "NO_NETWORK_ACCESS" "1")
18023 ;; For some strange reason, some tests fail if nosetests runs all
18024 ;; test modules in a single execution. They pass if each test
18025 ;; module is run individually.
18026 (for-each (lambda (filename)
18027 (invoke "nosetests"
18028 (string-append "tests/" filename)))
18029 (scandir "tests"
18030 (lambda (filename)
18031 (string-suffix? ".py" filename)))))))))
18032 (native-inputs
18033 `(("python-tempdir" ,python-tempdir)
18034 ("python-nose" ,python-nose)))
18035 (propagated-inputs
18036 `(("python-h5py" ,python-h5py)))
18037 (home-page "https://www.activepapers.org/")
18038 (synopsis "Executable papers for scientific computing")
18039 (description
18040 "ActivePapers is a tool for working with executable papers, which
18041 combine data, code, and documentation in single-file packages,
18042 suitable for publication as supplementary material or on repositories
18043 such as figshare or Zenodo.")
18044 (properties `((python2-variant . ,(delay python2-activepapers))))
18045 (license license:bsd-3)))
18046
18047 (define-public python2-activepapers
18048 (let ((base (package-with-python2
18049 (strip-python2-variant python-activepapers))))
18050 (package/inherit base
18051 (arguments
18052 (substitute-keyword-arguments (package-arguments base)
18053 ((#:phases phases)
18054 `(modify-phases ,phases
18055 (delete 'delete-python2-code)
18056 (add-after 'unpack 'delete-python3-code
18057 (lambda _
18058 (for-each delete-file
18059 '("lib/activepapers/builtins3.py"
18060 "lib/activepapers/standardlib3.py"
18061 "lib/activepapers/utility3.py")))))))))))
18062
18063 (define-public python-semver
18064 (package
18065 (name "python-semver")
18066 (version "2.9.0")
18067 (source
18068 (origin
18069 (method url-fetch)
18070 (uri (pypi-uri "semver" version))
18071 (sha256
18072 (base32
18073 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18074 (build-system python-build-system)
18075 (arguments
18076 `(#:phases (modify-phases %standard-phases
18077 (replace 'check
18078 (lambda _
18079 (delete-file "setup.cfg")
18080 (invoke "py.test"))))))
18081 (native-inputs
18082 `(("python-pytest" ,python-pytest)))
18083 (home-page "https://github.com/k-bx/python-semver")
18084 (synopsis "Python helper for Semantic Versioning")
18085 (description "This package provides a Python library for
18086 @url{Semantic Versioning, http://semver.org/}.")
18087 (license license:bsd-3)))
18088
18089 (define-public python2-semver
18090 (package-with-python2 python-semver))
18091
18092 (define-public python-pyro4
18093 (package
18094 (name "python-pyro4")
18095 (version "4.77")
18096 (source
18097 (origin
18098 (method url-fetch)
18099 (uri (pypi-uri "Pyro4" version))
18100 (sha256
18101 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18102 (build-system python-build-system)
18103 (arguments
18104 '(#:tests? #f)) ;FIXME: Some tests require network access.
18105 (native-inputs
18106 `(("python-cloudpickle" ,python-cloudpickle)
18107 ("python-dill" ,python-dill)
18108 ("python-msgpack" ,python-msgpack)))
18109 (propagated-inputs
18110 `(("python-serpent" ,python-serpent)))
18111 (home-page "https://pyro4.readthedocs.io")
18112 (synopsis "Distributed object middleware for Python")
18113 (description
18114 "Pyro enables you to build applications in which objects can talk to each
18115 other over the network. You can just use normal Python method calls to call
18116 objects on other machines, also known as remote procedure calls (RPC).")
18117 (license license:expat)))
18118
18119 (define-public python2-pyro
18120 (package
18121 (name "python2-pyro")
18122 (version "3.16")
18123 (source
18124 (origin
18125 (method url-fetch)
18126 (uri (pypi-uri "Pyro" version))
18127 (file-name (string-append "Pyro-" version ".tar.gz"))
18128 (sha256
18129 (base32
18130 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18131 (build-system python-build-system)
18132 (arguments
18133 ;; Pyro is not compatible with Python 3
18134 `(#:python ,python-2
18135 ;; Pyro has no test cases for automatic execution
18136 #:tests? #f))
18137 (home-page "https://pythonhosted.org/Pyro/")
18138 (synopsis "Distributed object manager for Python")
18139 (description "Pyro is a Distributed Object Technology system
18140 written in Python that is designed to be easy to use. It resembles
18141 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18142 which is a system and language independent Distributed Object Technology
18143 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18144 longer maintained. New projects should use Pyro4 instead, which
18145 is the new Pyro version that is actively developed.")
18146 (license license:expat)))
18147
18148 (define-public python2-scientific
18149 (package
18150 (name "python2-scientific")
18151 (version "2.9.4")
18152 (source
18153 (origin
18154 (method git-fetch)
18155 (uri (git-reference
18156 (url "https://github.com/khinsen/ScientificPython")
18157 (commit (string-append "rel" version))))
18158 (file-name (git-file-name name version))
18159 (sha256
18160 (base32
18161 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18162 (build-system python-build-system)
18163 (inputs
18164 `(("netcdf" ,netcdf)))
18165 (propagated-inputs
18166 `(("python-numpy" ,python2-numpy-1.8)
18167 ("python-pyro" ,python2-pyro)))
18168 (arguments
18169 ;; ScientificPython is not compatible with Python 3
18170 `(#:python ,python-2
18171 #:tests? #f ; No test suite
18172 #:phases
18173 (modify-phases %standard-phases
18174 (replace 'build
18175 (lambda* (#:key inputs #:allow-other-keys)
18176 (invoke "python" "setup.py" "build"
18177 (string-append "--netcdf_prefix="
18178 (assoc-ref inputs "netcdf"))))))))
18179 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18180 (synopsis "Python modules for scientific computing")
18181 (description "ScientificPython is a collection of Python modules that are
18182 useful for scientific computing. Most modules are rather general (Geometry,
18183 physical units, automatic derivatives, ...) whereas others are more
18184 domain-specific (e.g. netCDF and PDB support). The library is currently
18185 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18186 (license license:cecill-c)))
18187
18188 (define-public python2-mmtk
18189 (package
18190 (name "python2-mmtk")
18191 (version "2.7.12")
18192 (source
18193 (origin
18194 (method git-fetch)
18195 (uri (git-reference
18196 (url "https://github.com/khinsen/MMTK")
18197 (commit (string-append "rel" version))))
18198 (file-name (git-file-name name version))
18199 (sha256
18200 (base32
18201 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18202 (build-system python-build-system)
18203 (native-inputs
18204 `(("netcdf" ,netcdf)))
18205 (propagated-inputs
18206 `(("python-scientific" ,python2-scientific)
18207 ("python-tkinter" ,python-2 "tk")))
18208 (arguments
18209 `(#:python ,python-2
18210 #:tests? #f
18211 #:phases
18212 (modify-phases %standard-phases
18213 (add-before 'build 'includes-from-scientific
18214 (lambda* (#:key inputs #:allow-other-keys)
18215 (mkdir-p "Include/Scientific")
18216 (copy-recursively
18217 (string-append
18218 (assoc-ref inputs "python-scientific")
18219 "/include/python2.7/Scientific")
18220 "Include/Scientific"))))))
18221 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18222 (synopsis "Python library for molecular simulation")
18223 (description "MMTK is a library for molecular simulations with an emphasis
18224 on biomolecules. It provides widely used methods such as Molecular Dynamics
18225 and normal mode analysis, but also basic routines for implementing new methods
18226 for simulation and analysis. The library is currently not actively maintained
18227 and works only with Python 2 and NumPy < 1.9.")
18228 (license license:cecill-c)))
18229
18230 (define-public python-phonenumbers
18231 (package
18232 (name "python-phonenumbers")
18233 (version "8.9.1")
18234 (source
18235 (origin
18236 (method url-fetch)
18237 (uri (pypi-uri "phonenumbers" version))
18238 (sha256
18239 (base32
18240 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18241 (build-system python-build-system)
18242 (home-page
18243 "https://github.com/daviddrysdale/python-phonenumbers")
18244 (synopsis
18245 "Python library for dealing with international phone numbers")
18246 (description
18247 "This package provides a Python port of Google's libphonenumber library.")
18248 (license license:asl2.0)))
18249
18250 (define-public python2-phonenumbers
18251 (package-with-python2 python-phonenumbers))
18252
18253 (define-public python-send2trash
18254 (package
18255 (name "python-send2trash")
18256 (version "1.5.0")
18257 (source
18258 (origin (method git-fetch)
18259 ;; Source tarball on PyPI doesn't include tests.
18260 (uri (git-reference
18261 (url "https://github.com/hsoft/send2trash")
18262 (commit version)))
18263 (file-name (git-file-name name version))
18264 (sha256
18265 (base32
18266 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18267 (build-system python-build-system)
18268 (arguments
18269 '(#:phases
18270 (modify-phases %standard-phases
18271 (add-before 'check 'pre-check
18272 (lambda _
18273 (mkdir-p "/tmp/foo")
18274 (setenv "HOME" "/tmp/foo")
18275 #t)))))
18276 (home-page "https://github.com/hsoft/send2trash")
18277 (synopsis "Send files to the user's @file{~/Trash} directory")
18278 (description "This package provides a Python library to send files to the
18279 user's @file{~/Trash} directory.")
18280 (properties `((python2-variant . ,(delay python2-send2trash))))
18281 (license license:bsd-3)))
18282
18283 (define-public python2-send2trash
18284 (let ((base (package-with-python2
18285 (strip-python2-variant python-send2trash))))
18286 (package/inherit base
18287 (arguments
18288 (substitute-keyword-arguments (package-arguments python-send2trash)
18289 ((#:phases phases)
18290 `(modify-phases ,phases
18291 (add-before 'check 'setenv
18292 (lambda _
18293 (setenv "PYTHONPATH"
18294 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18295 #t)))))))))
18296
18297 (define-public python-pyfavicon
18298 (package
18299 (name "python-pyfavicon")
18300 (version "0.1.1")
18301 (source
18302 (origin
18303 (method url-fetch)
18304 (uri (pypi-uri "pyfavicon" version))
18305 (sha256
18306 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18307 (build-system python-build-system)
18308 (arguments
18309 ;; There are no tests in the PyPI tarball and the tests from the
18310 ;; repository require online data.
18311 '(#:tests? #f))
18312 (propagated-inputs
18313 `(("python-aiohttp" ,python-aiohttp)
18314 ("python-beautifulsoup4" ,python-beautifulsoup4)
18315 ("python-pillow" ,python-pillow)))
18316 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18317 (synopsis "Async favicon fetcher")
18318 (description
18319 "@code{pyfavicon} is an async favicon fetcher.")
18320 (license license:expat)))
18321
18322 (define-public python-yamllint
18323 (package
18324 (name "python-yamllint")
18325 (version "1.26.0")
18326 (source
18327 (origin
18328 (method url-fetch)
18329 (uri (pypi-uri "yamllint" version))
18330 (sha256
18331 (base32 "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h"))))
18332 (build-system python-build-system)
18333 (propagated-inputs
18334 `(("python-pathspec" ,python-pathspec)
18335 ("python-pyyaml" ,python-pyyaml)
18336 ("python-setuptools" ,python-setuptools)))
18337 (home-page "https://github.com/adrienverge/yamllint")
18338 (synopsis "Linter for YAML files")
18339 (description
18340 "Yamllint is a linter for YAML files. yamllint does not only check for
18341 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18342 such as lines length, trailing spaces, indentation, etc.")
18343 (license license:gpl3+)))
18344
18345 (define-public python-yapf
18346 (package
18347 (name "python-yapf")
18348 (version "0.29.0")
18349 (source
18350 (origin
18351 (method url-fetch)
18352 (uri (pypi-uri "yapf" version))
18353 (sha256
18354 (base32
18355 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18356 (build-system python-build-system)
18357 (home-page "https://github.com/google/yapf")
18358 (synopsis "Formatter for Python code")
18359 (description "YAPF is a formatter for Python code. It's based off of
18360 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18361 takes the code and reformats it to the best formatting that conforms to the
18362 style guide, even if the original code didn't violate the style guide.")
18363 (license license:asl2.0)))
18364
18365 (define-public python2-yapf
18366 (package-with-python2 python-yapf))
18367
18368 (define-public python-yq
18369 (package
18370 (name "python-yq")
18371 (version "2.11.1")
18372 (source
18373 (origin
18374 (method url-fetch)
18375 (uri (pypi-uri "yq" version))
18376 (sha256
18377 (base32
18378 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18379 (build-system python-build-system)
18380 (arguments
18381 '(#:phases
18382 (modify-phases %standard-phases
18383 (add-after 'unpack 'patch
18384 (lambda* (#:key inputs #:allow-other-keys)
18385 (substitute* "yq/__init__.py"
18386 (("Popen\\(\\[\"jq")
18387 (string-append
18388 "Popen([\""
18389 (assoc-ref inputs "jq")
18390 "/bin/jq")))
18391 #t)))))
18392 (inputs
18393 `(("python-argcomplete" ,python-argcomplete)
18394 ("python-pyyaml" ,python-pyyaml)
18395 ("python-xmltodict" ,python-xmltodict)
18396 ("jq" ,jq)))
18397 (native-inputs
18398 `(("python-coverage" ,python-coverage)
18399 ("python-flake8" ,python-flake8)
18400 ("python-wheel" ,python-wheel)))
18401 (home-page "https://github.com/kislyuk/yq")
18402 (synopsis "Command-line YAML/XML processor")
18403 (description
18404 "This package provides @command{yq} and @command{xq} for processing YAML
18405 and XML respectively. The processing is done through @command{jq}, @command{jq}
18406 filters can be used to process the data as it passes through.")
18407 (license license:asl2.0)))
18408
18409 (define-public python-gyp
18410 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18411 (revision "0"))
18412 (package
18413 (name "python-gyp")
18414 ;; Google does not release versions,
18415 ;; based on second most recent commit date.
18416 (version (git-version "0.0.0" revision commit))
18417 (source
18418 (origin
18419 ;; Google does not release tarballs,
18420 ;; git checkout is needed.
18421 (method git-fetch)
18422 (uri (git-reference
18423 (url "https://chromium.googlesource.com/external/gyp")
18424 (commit commit)))
18425 (file-name (git-file-name name version))
18426 (sha256
18427 (base32
18428 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18429 (build-system python-build-system)
18430 (home-page "https://gyp.gsrc.io/")
18431 (synopsis "GYP is a Meta-Build system")
18432 (description
18433 "GYP builds build systems for large, cross platform applications.
18434 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18435 files, and Makefiles.")
18436 (license license:bsd-3))))
18437
18438 (define-public python2-gyp
18439 (package-with-python2 python-gyp))
18440
18441 (define-public python-whatever
18442 (package
18443 (name "python-whatever")
18444 (version "0.6")
18445 (source
18446 (origin
18447 (method git-fetch)
18448 (uri (git-reference
18449 (url "https://github.com/Suor/whatever")
18450 (commit version)))
18451 (file-name (git-file-name name version))
18452 (sha256
18453 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18454 (build-system python-build-system)
18455 (arguments
18456 `(#:phases
18457 (modify-phases %standard-phases
18458 (replace 'check
18459 (lambda _
18460 (invoke "py.test"))))))
18461 (native-inputs
18462 `(("python-pytest" ,python-pytest)))
18463 (home-page "https://github.com/Suor/whatever")
18464 (synopsis "Make anonymous functions by partial application of operators")
18465 (description "@code{whatever} provides an easy way to make anonymous
18466 functions by partial application of operators.")
18467 (license license:bsd-3)))
18468
18469 (define-public python2-whatever
18470 (package-with-python2 python-whatever))
18471
18472 (define-public python-funcy
18473 (package
18474 (name "python-funcy")
18475 (version "1.11")
18476 (source
18477 (origin
18478 (method git-fetch)
18479 (uri (git-reference
18480 (url "https://github.com/Suor/funcy")
18481 (commit version)))
18482 (sha256
18483 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18484 (file-name (git-file-name name version))))
18485 (build-system python-build-system)
18486 (arguments
18487 `(#:phases
18488 (modify-phases %standard-phases
18489 (replace 'check
18490 (lambda _
18491 (invoke "py.test"))))))
18492 (native-inputs
18493 `(("python-pytest" ,python-pytest)
18494 ("python-whatever" ,python-whatever)))
18495 (home-page "https://github.com/Suor/funcy")
18496 (synopsis "Functional tools")
18497 (description "@code{funcy} is a library that provides functional tools.
18498 Examples are:
18499 @enumerate
18500 @item merge - Merges collections of the same type
18501 @item walk - Type-preserving map
18502 @item select - Selects a part of a collection
18503 @item take - Takes the first n items of a collection
18504 @item first - Takes the first item of a collection
18505 @item remove - Predicated-removes items of a collection
18506 @item concat - Concatenates two collections
18507 @item flatten - Flattens a collection with subcollections
18508 @item distinct - Returns only distinct items
18509 @item split - Predicated-splits a collection
18510 @item split_at - Splits a collection at a given item
18511 @item group_by - Groups items by group
18512 @item pairwise - Pairs off adjacent items
18513 @item partial - Partially-applies a function
18514 @item curry - Curries a function
18515 @item compose - Composes functions
18516 @item complement - Complements a predicate
18517 @item all_fn - \"all\" with predicate
18518 @end enumerate")
18519 (license license:bsd-3)))
18520
18521 (define-public python2-funcy
18522 (package-with-python2 python-funcy))
18523
18524 (define-public python-isoweek
18525 (package
18526 (name "python-isoweek")
18527 (version "1.3.3")
18528 (source
18529 (origin
18530 (method url-fetch)
18531 (uri (pypi-uri "isoweek" version))
18532 (sha256
18533 (base32
18534 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18535 (build-system python-build-system)
18536 (home-page "https://github.com/gisle/isoweek")
18537 (synopsis "Objects representing a week")
18538 (description "The @code{isoweek} module provide the class Week that
18539 implements the week definition of ISO 8601. This standard also defines
18540 a notation for identifying weeks; yyyyWww (where the W is a literal).
18541 Week instances stringify to this form.")
18542 (license license:bsd-3)))
18543
18544 (define-public python2-isoweek
18545 (package-with-python2 python-isoweek))
18546
18547 (define-public python-pyzbar
18548 (package
18549 (name "python-pyzbar")
18550 (version "0.1.8")
18551 (source
18552 (origin
18553 ;; There's no source tarball on PyPI.
18554 (method git-fetch)
18555 (uri (git-reference
18556 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18557 (commit (string-append "v" version))))
18558 (file-name (git-file-name name version))
18559 (sha256
18560 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18561 (build-system python-build-system)
18562 (arguments
18563 `(#:phases
18564 (modify-phases %standard-phases
18565 (add-after 'unpack 'remove-failing-test
18566 (lambda _
18567 ;; This tests if find_library was called once, but we remove
18568 ;; the call in the stage below to make the library find libzbar.
18569 (delete-file "pyzbar/tests/test_zbar_library.py")
18570 #t))
18571 (add-before 'build 'set-library-file-name
18572 (lambda* (#:key inputs #:allow-other-keys)
18573 (let ((libzbar (assoc-ref inputs "zbar")))
18574 (substitute* "pyzbar/zbar_library.py"
18575 (("find_library\\('zbar'\\)")
18576 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18577 #t))))))
18578 (native-inputs
18579 `(("pkg-config" ,pkg-config)
18580 ("python-numpy" ,python-numpy)
18581 ("python-pillow" ,python-pillow)))
18582 (inputs
18583 `(("zbar" ,zbar)))
18584 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18585 (synopsis "Read one-dimensional barcodes and QR codes")
18586 (description
18587 "Read one-dimensional barcodes and QR codes using the zbar library.
18588
18589 Features:
18590
18591 @itemize
18592 @item Pure python
18593 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18594 @item Decodes locations of barcodes
18595 @item No dependencies, other than the zbar library itself
18596 @end itemize")
18597 (license license:expat)))
18598
18599 (define-public python-tokenize-rt
18600 (package
18601 (name "python-tokenize-rt")
18602 (version "2.0.1")
18603 (source
18604 (origin
18605 (method url-fetch)
18606 (uri (pypi-uri "tokenize-rt" version))
18607 (sha256
18608 (base32
18609 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18610 (build-system python-build-system)
18611 (home-page "https://github.com/asottile/tokenize-rt")
18612 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18613 (description
18614 "This Python library is a wrapper around @code{tokenize} from the Python
18615 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18616 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18617 and @code{tokens_to_src} to roundtrip.")
18618 (license license:expat)))
18619
18620 (define-public python-future-fstrings
18621 (package
18622 (name "python-future-fstrings")
18623 (version "0.4.1")
18624 (source
18625 (origin
18626 (method url-fetch)
18627 (uri (pypi-uri "future_fstrings" version))
18628 (sha256
18629 (base32
18630 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18631 (build-system python-build-system)
18632 (propagated-inputs
18633 `(("python-tokenize-rt" ,python-tokenize-rt)))
18634 (home-page "https://github.com/asottile/future-fstrings")
18635 (synopsis "Backport of fstrings to Python < 3.6")
18636 (description
18637 "This package provides a UTF-8 compatible encoding
18638 @code{future_fstrings}, which performs source manipulation. It decodes the
18639 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18640 @code{f} strings.")
18641 (license license:expat)))
18642
18643 (define-public python-typed-ast
18644 (package
18645 (name "python-typed-ast")
18646 (version "1.4.0")
18647 (source
18648 (origin
18649 (method git-fetch)
18650 (uri (git-reference
18651 (url "https://github.com/python/typed_ast")
18652 (commit version)))
18653 (sha256
18654 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18655 (file-name (git-file-name name version))))
18656 (build-system python-build-system)
18657 (arguments
18658 `(#:modules ((guix build utils)
18659 (guix build python-build-system)
18660 (ice-9 ftw)
18661 (srfi srfi-1)
18662 (srfi srfi-26))
18663 #:phases
18664 (modify-phases %standard-phases
18665 (replace 'check
18666 (lambda _
18667 (let ((cwd (getcwd)))
18668 (setenv "PYTHONPATH"
18669 (string-append cwd "/build/"
18670 (find (cut string-prefix? "lib" <>)
18671 (scandir (string-append cwd "/build")))
18672 ":"
18673 (getenv "PYTHONPATH"))))
18674 (invoke "pytest")
18675 #t)))))
18676 (native-inputs `(("python-pytest" ,python-pytest)))
18677 (home-page "https://github.com/python/typed_ast")
18678 (synopsis "Fork of Python @code{ast} modules with type comment support")
18679 (description "This package provides a parser similar to the standard
18680 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18681 include PEP 484 type comments and are independent of the version of Python
18682 under which they are run. The @code{typed_ast} parsers produce the standard
18683 Python AST (plus type comments), and are both fast and correct, as they are
18684 based on the CPython 2.7 and 3.7 parsers.")
18685 ;; See the file "LICENSE" for the details.
18686 (license (list license:psfl
18687 license:asl2.0
18688 license:expat)))) ;ast27/Parser/spark.py
18689
18690 (define-public python-typer
18691 (package
18692 (name "python-typer")
18693 (version "0.3.2")
18694 (source
18695 (origin
18696 ;; Building `python-typer` from the git repository requires the `flit-core`
18697 ;; Python package that is not installed by `python-flit`.
18698 (method url-fetch)
18699 (uri (pypi-uri "typer" version))
18700 (sha256
18701 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18702 (build-system python-build-system)
18703 (arguments
18704 `(#:phases
18705 (modify-phases %standard-phases
18706 (add-before 'check 'disable-failing-tests
18707 (lambda _
18708 (substitute* "tests/test_completion/test_completion.py"
18709 (("def test_show_completion")
18710 "def _test_show_completion")
18711 (("def test_install_completion")
18712 "def _test_install_completion"))
18713 (substitute* "tests/test_completion/test_completion_install.py"
18714 (("def test_completion_install_bash")
18715 "def _test_completion_install_bash")
18716 (("def test_completion_install_zsh")
18717 "def _test_completion_install_zsh")
18718 (("def test_completion_install_fish")
18719 "def _test_completion_install_fish")
18720 (("def test_completion_install_powershell")
18721 "def _test_completion_install_powershell"))
18722 #t))
18723 (replace 'check
18724 (lambda _
18725 (setenv "PYTHONPATH"
18726 (string-append (getcwd) ":"
18727 (getenv "PYTHONPATH")))
18728 (invoke "python" "-m" "pytest" "tests/")
18729 #t)))))
18730 (propagated-inputs
18731 `(("python-click" ,python-click)))
18732 (native-inputs
18733 `(("python-coverage" ,python-coverage)
18734 ("python-pytest" ,python-pytest)
18735 ("python-shellingham" ,python-shellingham)))
18736 (home-page "https://github.com/tiangolo/typer")
18737 (synopsis
18738 "Typer builds CLI based on Python type hints")
18739 (description
18740 "Typer is a library for building CLI applications. It's based on
18741 Python 3.6+ type hints.")
18742 ;; MIT license
18743 (license license:expat)))
18744
18745 (define-public python-typing
18746 (package
18747 (name "python-typing")
18748 (version "3.7.4.3")
18749 (source
18750 (origin
18751 (method url-fetch)
18752 (uri (pypi-uri "typing" version))
18753 (sha256
18754 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18755 (build-system python-build-system)
18756 (home-page "https://docs.python.org/3/library/typing.html")
18757 (synopsis "Type hints for Python")
18758 (description "This is a backport of the standard library @code{typing}
18759 module to Python versions older than 3.5. Typing defines a standard notation
18760 for Python function and variable type annotations. The notation can be used
18761 for documenting code in a concise, standard format, and it has been designed
18762 to also be used by static and runtime type checkers, static analyzers, IDEs
18763 and other tools.")
18764 (license license:psfl)))
18765
18766 (define-public python2-typing
18767 (package-with-python2 python-typing))
18768
18769 (define-public python-typing-extensions
18770 (package
18771 (name "python-typing-extensions")
18772 (version "3.7.4.3")
18773 (source
18774 (origin
18775 (method url-fetch)
18776 (uri (pypi-uri "typing_extensions" version))
18777 (sha256
18778 (base32
18779 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18780 (build-system python-build-system)
18781 (home-page
18782 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18783 (synopsis "Experimental type hints for Python")
18784 (description
18785 "The typing_extensions module contains additional @code{typing} hints not
18786 yet present in the of the @code{typing} standard library.
18787 Included are implementations of:
18788 @enumerate
18789 @item ClassVar
18790 @item ContextManager
18791 @item Counter
18792 @item DefaultDict
18793 @item Deque
18794 @item NewType
18795 @item NoReturn
18796 @item overload
18797 @item Protocol
18798 @item runtime
18799 @item Text
18800 @item Type
18801 @item TYPE_CHECKING
18802 @item AsyncGenerator
18803 @end enumerate\n")
18804 (license license:psfl)))
18805
18806 (define-public bpython
18807 (package
18808 (name "bpython")
18809 (version "0.20.1")
18810 (source
18811 (origin
18812 (method url-fetch)
18813 (uri (pypi-uri "bpython" version))
18814 (sha256
18815 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18816 (build-system python-build-system)
18817 (arguments
18818 `(#:phases
18819 (modify-phases %standard-phases
18820 (add-after 'unpack 'remove-failing-test
18821 (lambda _
18822 ;; Remove failing test. FIXME: make it pass
18823 (delete-file "bpython/test/test_args.py")
18824 #t))
18825 (add-after 'wrap 'add-aliases
18826 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18827 (lambda* (#:key outputs #:allow-other-keys)
18828 (let ((out (assoc-ref outputs "out")))
18829 (for-each
18830 (lambda (old new)
18831 (symlink old (string-append out "/bin/" new)))
18832 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18833 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18834 #t)))))
18835 (propagated-inputs
18836 `(("python-pygments" ,python-pygments)
18837 ("python-requests" ,python-requests)
18838 ("python-curtsies" ,python-curtsies)
18839 ("python-greenlet" ,python-greenlet)
18840 ("python-six" ,python-six)
18841 ("python-wcwidth" ,python-wcwidth)
18842 ;; optional dependencies
18843 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18844 ("python-watchdog" ,python-watchdog)
18845 ("python-jedi" ,python-jedi)))
18846 (native-inputs
18847 `(("python-sphinx" ,python-sphinx)
18848 ("python-mock" ,python-mock)))
18849 (home-page "https://bpython-interpreter.org/")
18850 (synopsis "Fancy interface to the Python interpreter")
18851 (description "Bpython is a fancy interface to the Python
18852 interpreter. bpython's main features are
18853
18854 @enumerate
18855 @item in-line syntax highlighting,
18856 @item readline-like autocomplete with suggestions displayed as you type,
18857 @item expected parameter list for any Python function,
18858 @item \"rewind\" function to pop the last line of code from memory and
18859 re-evaluate,
18860 @item send the code you've entered off to a pastebin,
18861 @item save the code you've entered to a file, and
18862 @item auto-indentation.
18863 @end enumerate")
18864 (license license:expat)))
18865
18866 (define-public python-pyinotify
18867 (package
18868 (name "python-pyinotify")
18869 (version "0.9.6")
18870 (source (origin
18871 (method url-fetch)
18872 (uri (pypi-uri "pyinotify" version))
18873 (sha256
18874 (base32
18875 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18876 (build-system python-build-system)
18877 (arguments `(#:tests? #f)) ;no tests
18878 (home-page "https://github.com/seb-m/pyinotify")
18879 (synopsis "Python library for monitoring inotify events")
18880 (description
18881 "@code{pyinotify} provides a Python interface for monitoring
18882 file system events on Linux.")
18883 (license license:expat)))
18884
18885 (define-public python2-pyinotify
18886 (package-with-python2 python-pyinotify))
18887
18888 ;; Ada parser uses this version.
18889 (define-public python2-quex-0.67.3
18890 (package
18891 (name "python2-quex")
18892 (version "0.67.3")
18893 (source
18894 (origin
18895 (method url-fetch)
18896 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18897 (version-major+minor version)
18898 "/quex-" version ".zip"))
18899 (sha256
18900 (base32
18901 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18902 (build-system python-build-system)
18903 (native-inputs
18904 `(("unzip" ,unzip)))
18905 (arguments
18906 `(#:python ,python-2
18907 #:tests? #f
18908 #:phases
18909 (modify-phases %standard-phases
18910 (delete 'configure)
18911 (delete 'build)
18912 (replace 'install
18913 (lambda* (#:key outputs #:allow-other-keys)
18914 (let* ((out (assoc-ref outputs "out"))
18915 (share/quex (string-append out "/share/quex"))
18916 (bin (string-append out "/bin")))
18917 (copy-recursively "." share/quex)
18918 (mkdir-p bin)
18919 (symlink (string-append share/quex "/quex-exe.py")
18920 (string-append bin "/quex"))
18921 #t))))))
18922 (native-search-paths
18923 (list (search-path-specification
18924 (variable "QUEX_PATH")
18925 (files '("share/quex")))))
18926 (home-page "http://quex.sourceforge.net/")
18927 (synopsis "Lexical analyzer generator in Python")
18928 (description "@code{quex} is a lexical analyzer generator in Python.")
18929 (license license:lgpl2.1+))) ; Non-military
18930
18931 (define-public python2-quex
18932 (package (inherit python2-quex-0.67.3)
18933 (name "python2-quex")
18934 (version "0.68.1")
18935 (source
18936 (origin
18937 (method url-fetch)
18938 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18939 (sha256
18940 (base32
18941 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18942 (file-name (string-append name "-" version ".tar.gz"))))))
18943
18944 (define-public python-more-itertools
18945 (package
18946 (name "python-more-itertools")
18947 (version "8.2.0")
18948 (source
18949 (origin
18950 (method url-fetch)
18951 (uri (pypi-uri "more-itertools" version))
18952 (sha256
18953 (base32
18954 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18955 (build-system python-build-system)
18956 (home-page "https://github.com/erikrose/more-itertools")
18957 (synopsis "More routines for operating on iterables, beyond itertools")
18958 (description "Python's built-in @code{itertools} module implements a
18959 number of iterator building blocks inspired by constructs from APL, Haskell,
18960 and SML. @code{more-itertools} includes additional building blocks for
18961 working with iterables.")
18962 (properties `((python2-variant . ,(delay python2-more-itertools))))
18963 (license license:expat)))
18964
18965 ;; The 5.x series are the last versions supporting Python 2.7.
18966 (define-public python2-more-itertools
18967 (package
18968 (inherit python-more-itertools)
18969 (name "python2-more-itertools")
18970 (version "5.0.0")
18971 (source (origin
18972 (method url-fetch)
18973 (uri (pypi-uri "more-itertools" version))
18974 (sha256
18975 (base32
18976 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18977 (arguments
18978 `(#:python ,python-2))
18979 (propagated-inputs
18980 `(("python2-six" ,python2-six-bootstrap)))))
18981
18982 (define-public python-latexcodec
18983 (package
18984 (name "python-latexcodec")
18985 (version "1.0.7")
18986 (source
18987 (origin
18988 (method url-fetch)
18989 (uri (pypi-uri "latexcodec" version))
18990 (sha256
18991 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18992 (build-system python-build-system)
18993 (inputs
18994 `(("python-six" ,python-six)))
18995 (home-page "https://readthedocs.org/projects/latexcodec/")
18996 (synopsis "Work with LaTeX code in Python")
18997 (description "Lexer and codec to work with LaTeX code in Python.")
18998 (license license:expat)))
18999
19000 (define-public python-pybtex
19001 (package
19002 (name "python-pybtex")
19003 (version "0.22.2")
19004 (source
19005 (origin
19006 (method url-fetch)
19007 (uri (pypi-uri "pybtex" version))
19008 (sha256
19009 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
19010 (build-system python-build-system)
19011 (native-inputs
19012 `(("python-nose" ,python-nose)))
19013 (inputs
19014 `(("python-latexcodec" ,python-latexcodec)
19015 ("python-pyyaml" ,python-pyyaml)
19016 ("python-six" ,python-six)))
19017 (arguments
19018 `(#:test-target "nosetests"))
19019 (home-page "https://pybtex.org/")
19020 (synopsis "BibTeX-compatible bibliography processor")
19021 (description "Pybtex is a BibTeX-compatible bibliography processor written
19022 in Python. You can simply type pybtex instead of bibtex.")
19023 (license license:expat)))
19024
19025 (define-public python-onetimepass
19026 (package
19027 (name "python-onetimepass")
19028 (version "1.0.1")
19029 (source
19030 (origin
19031 (method url-fetch)
19032 (uri (pypi-uri "onetimepass" version))
19033 (sha256
19034 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19035 (build-system python-build-system)
19036 (propagated-inputs `(("python-six" ,python-six)))
19037 (home-page "https://github.com/tadeck/onetimepass/")
19038 (synopsis "One-time password library")
19039 (description "Python one-time password library for HMAC-based (HOTP) and
19040 time-based (TOTP) passwords.")
19041 (license license:expat)))
19042
19043 (define-public python-parso
19044 (package
19045 (name "python-parso")
19046 (version "0.7.1")
19047 (source
19048 (origin
19049 (method url-fetch)
19050 (uri (pypi-uri "parso" version))
19051 (sha256
19052 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19053 (native-inputs
19054 `(("python-pytest" ,python-pytest)))
19055 (build-system python-build-system)
19056 (arguments
19057 `(#:phases (modify-phases %standard-phases
19058 (replace 'check
19059 (lambda _ (invoke "pytest" "-vv"))))))
19060 (home-page "https://github.com/davidhalter/parso")
19061 (synopsis "Python Parser")
19062 (description "Parso is a Python parser that supports error recovery and
19063 round-trip parsing for different Python versions (in multiple Python versions).
19064 Parso is also able to list multiple syntax errors in your Python file.")
19065 (license license:expat)))
19066
19067 (define-public python2-parso
19068 (package-with-python2 python-parso))
19069
19070 (define-public python-async-generator
19071 (package
19072 (name "python-async-generator")
19073 (version "1.10")
19074 (source
19075 (origin
19076 (method url-fetch)
19077 (uri (pypi-uri "async_generator" version))
19078 (sha256
19079 (base32
19080 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19081 (build-system python-build-system)
19082 (native-inputs
19083 `(("python-pytest" ,python-pytest)))
19084 (home-page "https://github.com/python-trio/async_generator")
19085 (synopsis "Async generators and context managers for Python 3.5+")
19086 (description "@code{async_generator} back-ports Python 3.6's native async
19087 generators and Python 3.7's context managers into Python 3.5.")
19088 ;; Dual licensed.
19089 (license (list license:expat license:asl2.0))))
19090
19091 (define-public python-async-timeout
19092 (package
19093 (name "python-async-timeout")
19094 (version "3.0.1")
19095 (source
19096 (origin
19097 (method url-fetch)
19098 (uri (pypi-uri "async-timeout" version))
19099 (sha256
19100 (base32
19101 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19102 (build-system python-build-system)
19103 (home-page "https://github.com/aio-libs/async_timeout/")
19104 (synopsis "Timeout context manager for asyncio programs")
19105 (description "@code{async-timeout} provides a timeout timeout context
19106 manager compatible with @code{asyncio}.")
19107 (license license:asl2.0)))
19108
19109 (define-public python-glob2
19110 (package
19111 (name "python-glob2")
19112 (version "0.7")
19113 (source
19114 (origin
19115 (method git-fetch)
19116 (uri (git-reference
19117 (url "https://github.com/miracle2k/python-glob2")
19118 (commit (string-append "v" version))))
19119 (file-name (git-file-name name version))
19120 (sha256
19121 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19122 (build-system python-build-system)
19123 (home-page "https://github.com/miracle2k/python-glob2/")
19124 (synopsis "Extended Version of the python buildin glob module")
19125 (description "This is an extended version of the Python
19126 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19127 adds:
19128
19129 @itemize
19130 @item The ability to capture the text matched by glob patterns, and return
19131 those matches alongside the file names.
19132 @item A recursive @code{**} globbing syntax, akin for example to the
19133 @code{globstar} option of Bash.
19134 @item The ability to replace the file system functions used, in order to glob
19135 on virtual file systems.
19136 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19137 @end itemize
19138
19139 Glob2 currently based on the glob code from Python 3.3.1.")
19140 (license license:bsd-2)))
19141
19142 (define-public python2-glob2
19143 (package-with-python2 python-glob2))
19144
19145 (define-public python-gipc
19146 (package
19147 (name "python-gipc")
19148 (version "0.6.0")
19149 (source
19150 (origin
19151 (method url-fetch)
19152 (uri (pypi-uri "gipc" version ".zip"))
19153 (sha256
19154 (base32
19155 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19156 (build-system python-build-system)
19157 (native-inputs
19158 `(("unzip" ,unzip)))
19159 (propagated-inputs
19160 `(("python-gevent" ,python-gevent)))
19161 (home-page "https://gehrcke.de/gipc/")
19162 (synopsis "Child process management in the context of gevent")
19163 (description "Usage of Python's multiprocessing package in a
19164 gevent-powered application may raise problems. With @code{gipc},
19165 process-based child processes can safely be created anywhere within a
19166 gevent-powered application.")
19167 (license license:expat)))
19168
19169 (define-public python-beautifultable
19170 (package
19171 (name "python-beautifultable")
19172 (version "1.0.0")
19173 (source
19174 (origin
19175 (method url-fetch)
19176 (uri (pypi-uri "beautifultable" version))
19177 (sha256
19178 (base32
19179 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19180 (build-system python-build-system)
19181 (propagated-inputs
19182 `(("python-wcwidth" ,python-wcwidth)))
19183 (arguments
19184 `(#:phases
19185 (modify-phases %standard-phases
19186 (add-after 'unpack 'patch-setup.py
19187 (lambda _
19188 (substitute* "setup.py"
19189 (("setup\\(")
19190 "setup(\n test_suite=\"test\",")))))))
19191 (home-page "https://github.com/pri22296/beautifultable")
19192 (synopsis "Print ASCII tables for terminals")
19193 (description "@code{python-beautifultable} provides a class for easily
19194 printing tabular data in a visually appealing ASCII format to a terminal.
19195
19196 Features include, but are not limited to:
19197 @itemize
19198 @item Full customization of the look and feel of the table
19199 @item Row and column accessors.
19200 @item Full support for colors using ANSI sequences or any library.
19201 @item Plenty of predefined styles and option to create custom ones.
19202 @item Support for Unicode characters.
19203 @item Supports streaming table when data is slow to retrieve.
19204 @end itemize")
19205 (license license:expat)))
19206
19207 (define-public python-globber
19208 (package
19209 (name "python-globber")
19210 (version "0.2.1")
19211 (source
19212 (origin
19213 (method git-fetch)
19214 (uri (git-reference
19215 (url "https://github.com/asharov/globber")
19216 (commit version)))
19217 (file-name (git-file-name name version))
19218 (sha256
19219 (base32
19220 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19221 (build-system python-build-system)
19222 (home-page "https://github.com/asharov/globber")
19223 (synopsis "Library for string matching with glob patterns")
19224 (description
19225 "Globber is a Python library for matching file names against glob patterns.
19226 In contrast to other glob-matching libraries, it matches arbitrary strings and
19227 doesn't require the matched names to be existing files. In addition, it
19228 supports the globstar @code{**} operator to match an arbitrary number of
19229 path components.")
19230 (license license:asl2.0)))
19231
19232 (define-public python-git-hammer
19233 (package
19234 (name "python-git-hammer")
19235 (version "0.3.1")
19236 (source
19237 (origin
19238 (method git-fetch)
19239 (uri (git-reference
19240 (url "https://github.com/asharov/git-hammer")
19241 (commit version)))
19242 (file-name (git-file-name name version))
19243 (sha256
19244 (base32
19245 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19246 (build-system python-build-system)
19247 (arguments
19248 `(#:phases
19249 (modify-phases %standard-phases
19250 (add-after 'unpack 'patch-setup.py
19251 (lambda _
19252 (substitute* "setup.py"
19253 (("setup\\(")
19254 "setup(\n test_suite=\"test\",")))))))
19255 (propagated-inputs
19256 `(("python-beautifultable" ,python-beautifultable)
19257 ("python-dateutil" ,python-dateutil)
19258 ("python-gitpython" ,python-gitpython)
19259 ("python-globber" ,python-globber)
19260 ("python-matplotlib" ,python-matplotlib)
19261 ("python-sqlalchemy" ,python-sqlalchemy)
19262 ("python-sqlalchemy-utils"
19263 ,python-sqlalchemy-utils)))
19264 (home-page "https://github.com/asharov/git-hammer")
19265 (synopsis "Provide statistics for git repositories")
19266 (description
19267 "Git Hammer is a statistics tool for projects in git repositories.
19268 Its major feature is tracking the number of lines authored by each person for every
19269 commit, but it also includes some other useful statistics.")
19270 (license license:asl2.0)))
19271
19272 (define-public python-fusepy
19273 (package
19274 (name "python-fusepy")
19275 (version "2.0.4")
19276 (source
19277 (origin
19278 (method url-fetch)
19279 (uri (pypi-uri "fusepy" version))
19280 (sha256
19281 (base32
19282 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19283 (build-system python-build-system)
19284 (arguments
19285 `(#:phases
19286 (modify-phases %standard-phases
19287 (add-before 'build 'set-library-file-name
19288 (lambda* (#:key inputs #:allow-other-keys)
19289 (let ((fuse (assoc-ref inputs "fuse")))
19290 (substitute* "fuse.py"
19291 (("find_library\\('fuse'\\)")
19292 (string-append "'" fuse "/lib/libfuse.so'")))
19293 #t))))))
19294 (propagated-inputs
19295 `(("fuse" ,fuse)))
19296 (home-page "https://github.com/fusepy/fusepy")
19297 (synopsis "Simple ctypes bindings for FUSE")
19298 (description "Python module that provides a simple interface to FUSE and
19299 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19300 (license license:isc)))
19301
19302 (define-public python2-fusepy
19303 (package-with-python2 python-fusepy))
19304
19305 (define-public python-fusepyng
19306 (package
19307 (name "python-fusepyng")
19308 (version "1.0.7")
19309 (source
19310 (origin
19311 (method url-fetch)
19312 (uri (pypi-uri "fusepyng" version))
19313 (sha256
19314 (base32
19315 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19316 (build-system python-build-system)
19317 (arguments
19318 '(#:phases
19319 (modify-phases %standard-phases
19320 (add-after 'unpack 'set-libfuse-path
19321 (lambda* (#:key inputs #:allow-other-keys)
19322 (let ((fuse (assoc-ref inputs "fuse")))
19323 (substitute* "fusepyng.py"
19324 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19325 (string-append "\"" fuse "/lib/libfuse.so\""))))
19326 #t)))))
19327 (inputs
19328 `(("fuse" ,fuse)))
19329 (propagated-inputs
19330 `(("python-paramiko" ,python-paramiko)))
19331 (home-page "https://github.com/rianhunter/fusepyng")
19332 (synopsis "Simple ctypes bindings for FUSE")
19333 (description "@code{fusepyng} is a Python module that provides a simple
19334 interface to FUSE on various operating systems. It's just one file and is
19335 implemented using @code{ctypes}.")
19336 (license license:isc)))
19337
19338 (define-public python-userspacefs
19339 (package
19340 (name "python-userspacefs")
19341 (version "2.0.3")
19342 (source
19343 (origin
19344 (method url-fetch)
19345 (uri (pypi-uri "userspacefs" version))
19346 (sha256
19347 (base32
19348 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19349 (build-system python-build-system)
19350 (propagated-inputs
19351 `(("python-fusepyng" ,python-fusepyng)))
19352 (home-page "https://github.com/rianhunter/userspacefs")
19353 (synopsis "User-space file systems for Python")
19354 (description
19355 "@code{userspacefs} is a library that allows you to easily write
19356 user-space file systems in Python.")
19357 (license license:gpl3+)))
19358
19359 (define-public python-stone
19360 (package
19361 (name "python-stone")
19362 (version "3.2.1")
19363 (source
19364 (origin
19365 (method url-fetch)
19366 (uri (pypi-uri "stone" version))
19367 (sha256
19368 (base32
19369 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19370 (build-system python-build-system)
19371 (arguments
19372 `(#:phases
19373 (modify-phases %standard-phases
19374 (add-after 'unpack 'change-version-requirements
19375 (lambda _
19376 ;; Match the requirement in test/requirements.txt
19377 (substitute* "setup.py"
19378 (("pytest < 5") "pytest < 7"))
19379 ;; We don't care about a coverage report.
19380 (substitute* "test/requirements.txt"
19381 (("coverage.*") "coverage\n"))
19382 #t))
19383 (replace 'check
19384 (lambda* (#:key tests? #:allow-other-keys)
19385 (when tests?
19386 ;; These tests don't import currectly.
19387 (delete-file "test/test_js_client.py")
19388 (delete-file "test/test_tsd_types.py")
19389 (delete-file "test/test_python_gen.py")
19390 (setenv "PYTHONPATH"
19391 (string-append (getcwd) ":"
19392 (getenv "PYTHONPATH")))
19393 (invoke "pytest"))
19394 #t)))))
19395 (propagated-inputs
19396 `(("python-ply" ,python-ply)
19397 ("python-six" ,python-six)))
19398 (native-inputs
19399 `(("python-coverage" ,python-coverage)
19400 ("python-mock" ,python-mock)
19401 ("python-pytest" ,python-pytest)
19402 ("python-pytest-runner" ,python-pytest-runner)))
19403 (home-page "https://github.com/dropbox/stone")
19404 (synopsis "Official Api Spec Language for Dropbox")
19405 (description
19406 "Stone is an interface description language (IDL) for APIs.")
19407 (license license:expat)))
19408
19409 (define-public pybind11
19410 (package
19411 (name "pybind11")
19412 (version "2.6.1")
19413 (source (origin
19414 (method git-fetch)
19415 (uri (git-reference
19416 (url "https://github.com/pybind/pybind11")
19417 (commit (string-append "v" version))))
19418 (sha256
19419 (base32
19420 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19421 (file-name (git-file-name name version))))
19422 (build-system cmake-build-system)
19423 (native-inputs
19424 `(("python" ,python-wrapper)
19425
19426 ;; The following dependencies are used for tests.
19427 ("python-pytest" ,python-pytest)
19428 ("catch" ,catch-framework2-1)
19429 ("eigen" ,eigen)))
19430 (arguments
19431 `(#:configure-flags
19432 (list (string-append "-DCATCH_INCLUDE_DIR="
19433 (assoc-ref %build-inputs "catch")
19434 "/include/catch"))
19435
19436 #:phases (modify-phases %standard-phases
19437 (add-after 'install 'install-python
19438 (lambda* (#:key outputs #:allow-other-keys)
19439 (let ((out (assoc-ref outputs "out")))
19440 (with-directory-excursion "../source"
19441 (setenv "PYBIND11_USE_CMAKE" "yes")
19442 (invoke "python" "setup.py" "install"
19443 "--single-version-externally-managed"
19444 "--root=/"
19445 (string-append "--prefix=" out)))))))
19446
19447 #:test-target "check"))
19448 (home-page "https://github.com/pybind/pybind11/")
19449 (synopsis "Seamless operability between C++11 and Python")
19450 (description
19451 "@code{pybind11} is a lightweight header-only library that exposes C++
19452 types in Python and vice versa, mainly to create Python bindings of existing
19453 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19454 library: to minimize boilerplate code in traditional extension modules by
19455 inferring type information using compile-time introspection.")
19456 (license license:bsd-3)))
19457
19458 (define-public python-pooch
19459 (package
19460 (name "python-pooch")
19461 (version "1.3.0")
19462 (source
19463 (origin
19464 (method url-fetch)
19465 (uri (pypi-uri "pooch" version))
19466 (sha256
19467 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19468 (build-system python-build-system)
19469 (arguments
19470 `(#:tests? #f)) ;requires online data
19471 (propagated-inputs
19472 `(("python-appdirs" ,python-appdirs)
19473 ("python-packaging" ,python-packaging)
19474 ("python-requests" ,python-requests)))
19475 (home-page "https://github.com/fatiando/pooch")
19476 (synopsis "Manage your Python library's sample data files")
19477 (description
19478 "Pooch manages your Python library's sample data files: it automatically
19479 downloads and stores them in a local directory, with support for versioning
19480 and corruption checks.")
19481 (license license:bsd-3)))
19482
19483 (define-public python-fasteners
19484 (package
19485 (name "python-fasteners")
19486 (version "0.15")
19487 (source
19488 (origin
19489 (method url-fetch)
19490 (uri (pypi-uri "fasteners" version))
19491 (sha256
19492 (base32
19493 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19494 (build-system python-build-system)
19495 (propagated-inputs
19496 `(("python-monotonic" ,python-monotonic)
19497 ("python-six" ,python-six)))
19498 (native-inputs
19499 `(("python-testtools" ,python-testtools)))
19500 (home-page "https://github.com/harlowja/fasteners")
19501 (synopsis "Python package that provides useful locks")
19502 (description
19503 "This package provides a Python program that provides following locks:
19504
19505 @itemize
19506 @item Locking decorator
19507 @item Reader-writer locks
19508 @item Inter-process locks
19509 @item Generic helpers
19510 @end itemize\n")
19511 (license license:asl2.0)))
19512
19513 (define-public python-requests-file
19514 (package
19515 (name "python-requests-file")
19516 (version "1.4.3")
19517 (source
19518 (origin
19519 (method url-fetch)
19520 (uri (pypi-uri "requests-file" version))
19521 (sha256
19522 (base32
19523 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19524 (build-system python-build-system)
19525 (propagated-inputs
19526 `(("python-requests" ,python-requests)
19527 ("python-six" ,python-six)))
19528 (home-page
19529 "https://github.com/dashea/requests-file")
19530 (synopsis "File transport adapter for Requests")
19531 (description
19532 "Requests-File is a transport adapter for use with the Requests Python
19533 library to allow local file system access via @code{file://} URLs.")
19534 (license license:asl2.0)))
19535
19536 (define-public python2-requests-file
19537 (package-with-python2 python-requests-file))
19538
19539 (define-public python-identify
19540 (package
19541 (name "python-identify")
19542 (version "1.4.25")
19543 (source
19544 (origin
19545 ;; There are no tests in the PyPI tarball.
19546 (method git-fetch)
19547 (uri (git-reference
19548 (url "https://github.com/chriskuehl/identify")
19549 (commit (string-append "v" version))))
19550 (file-name (git-file-name name version))
19551 (sha256
19552 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19553 (build-system python-build-system)
19554 (arguments
19555 `(#:phases
19556 (modify-phases %standard-phases
19557 (replace 'check
19558 (lambda _
19559 (invoke "pytest" "-vv"))))))
19560 (native-inputs
19561 `(("python-coverage" ,python-coverage)
19562 ("python-pytest" ,python-pytest)))
19563 (propagated-inputs
19564 `(("python-editdistance" ,python-editdistance)))
19565 (home-page "https://github.com/chriskuehl/identify")
19566 (synopsis "File identification library for Python")
19567 (description
19568 "@code{identify} is a file identification library for Python. Given
19569 a file (or some information about a file), return a set of standardized tags
19570 identifying what the file is.")
19571 (license license:expat)))
19572
19573 (define-public python-tldextract
19574 (package
19575 (name "python-tldextract")
19576 (version "2.2.0")
19577 (source
19578 (origin
19579 (method url-fetch)
19580 (uri (pypi-uri "tldextract" version))
19581 (sha256
19582 (base32
19583 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19584 (build-system python-build-system)
19585 (native-inputs
19586 `(("python-pytest" ,python-pytest)
19587 ("python-responses" ,python-responses)))
19588 (propagated-inputs
19589 `(("python-idna" ,python-idna)
19590 ("python-requests" ,python-requests)
19591 ("python-requests-file" ,python-requests-file)))
19592 (home-page
19593 "https://github.com/john-kurkowski/tldextract")
19594 (synopsis
19595 "Separate the TLD from the registered domain and subdomains of a URL")
19596 (description
19597 "TLDExtract accurately separates the TLD from the registered domain and
19598 subdomains of a URL, using the Public Suffix List. By default, this includes
19599 the public ICANN TLDs and their exceptions. It can optionally support the
19600 Public Suffix List's private domains as well.")
19601 (license license:bsd-3)))
19602
19603 (define-public python2-tldextract
19604 (package-with-python2 python-tldextract))
19605
19606 (define-public python-nodeenv
19607 (package
19608 (name "python-nodeenv")
19609 (version "1.4.0")
19610 (source
19611 (origin
19612 ;; There's no tarball in PyPI.
19613 (method git-fetch)
19614 (uri (git-reference
19615 (url "https://github.com/ekalinin/nodeenv")
19616 (commit version)))
19617 (file-name (git-file-name name version))
19618 (sha256
19619 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19620 (build-system python-build-system)
19621 (arguments
19622 `(#:phases
19623 (modify-phases %standard-phases
19624 (replace 'check
19625 (lambda _
19626 ;; This test fails. It tries to open a network socket.
19627 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19628 (native-inputs
19629 `(("python-coverage" ,python-coverage)
19630 ("python-mock" ,python-mock)
19631 ("python-pytest" ,python-pytest)))
19632 (home-page "https://ekalinin.github.io/nodeenv/")
19633 (synopsis "Create isolated node.js environments")
19634 (description
19635 "Nodeenv (node.js virtual environment) is a tool to create isolated
19636 node.js environments. It creates an environment that has its own installation
19637 directories, that doesn't share libraries with other node.js virtual
19638 environments.")
19639 (license license:bsd-3)))
19640
19641 (define-public python-pynamecheap
19642 (package
19643 (name "python-pynamecheap")
19644 (version "0.0.3")
19645 (source
19646 (origin
19647 (method url-fetch)
19648 (uri (pypi-uri "PyNamecheap" version))
19649 (sha256
19650 (base32
19651 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19652 (build-system python-build-system)
19653 (propagated-inputs
19654 `(("python-requests" ,python-requests)))
19655 (home-page
19656 "https://github.com/Bemmu/PyNamecheap")
19657 (synopsis
19658 "Namecheap API client in Python")
19659 (description
19660 "PyNamecheap is a Namecheap API client in Python.")
19661 (license license:expat)))
19662
19663 (define-public python2-pynamecheap
19664 (package-with-python2 python-pynamecheap))
19665
19666 (define-public python-dns-lexicon
19667 (package
19668 (name "python-dns-lexicon")
19669 (version "2.4.0")
19670 (source
19671 (origin
19672 (method url-fetch)
19673 (uri (pypi-uri "dns-lexicon" version))
19674 (sha256
19675 (base32
19676 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19677 (build-system python-build-system)
19678 (arguments
19679 `(#:tests? #f)) ;requires internet access
19680 (propagated-inputs
19681 `(("python-future" ,python-future)
19682 ("python-pynamecheap" ,python-pynamecheap)
19683 ("python-requests" ,python-requests)
19684 ("python-tldextract" ,python-tldextract)
19685 ("python-urllib3" ,python-urllib3)))
19686 (home-page "https://github.com/AnalogJ/lexicon")
19687 (synopsis
19688 "Manipulate DNS records on various DNS providers")
19689 (description
19690 "Lexicon provides a way to manipulate DNS records on multiple DNS
19691 providers in a standardized way. It has a CLI but it can also be used as a
19692 Python library. It was designed to be used in automation, specifically with
19693 Let's Encrypt.")
19694 (license license:expat)))
19695
19696 (define-public python2-dns-lexicon
19697 (package-with-python2 python-dns-lexicon))
19698
19699 (define-public python-cfgv
19700 (package
19701 (name "python-cfgv")
19702 (version "3.1.0")
19703 (source
19704 (origin
19705 ;; There are no tests in the PyPI tarball.
19706 (method git-fetch)
19707 (uri (git-reference
19708 (url "https://github.com/asottile/cfgv")
19709 (commit (string-append "v" version))))
19710 (file-name (git-file-name name version))
19711 (sha256
19712 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19713 (build-system python-build-system)
19714 (arguments
19715 `(#:phases
19716 (modify-phases %standard-phases
19717 (replace 'check
19718 (lambda _
19719 (invoke "pytest" "-vv"))))))
19720 (native-inputs
19721 `(("python-covdefaults" ,python-covdefaults)
19722 ("python-coverage" ,python-coverage)
19723 ("python-pytest" ,python-pytest)))
19724 (home-page "https://github.com/asottile/cfgv")
19725 (synopsis "Configuration validation library")
19726 (description
19727 "This library helps to validate configuration files and produce human
19728 readable error messages.")
19729 (license license:expat)))
19730
19731 (define-public python-commandlines
19732 (package
19733 (name "python-commandlines")
19734 (version "0.4.1")
19735 (source
19736 (origin
19737 (method url-fetch)
19738 (uri (pypi-uri "commandlines" version))
19739 (sha256
19740 (base32
19741 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19742 (build-system python-build-system)
19743 (home-page "https://github.com/chrissimpkins/commandlines")
19744 (synopsis "Command line argument to object parsing library")
19745 (description
19746 "@code{Commandlines} is a Python library for command line application
19747 development that supports command line argument parsing, command string
19748 validation testing and application logic.")
19749 (license license:expat)))
19750
19751 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19752 ;; python-numba. They have a very unflexible relationship.
19753 (define-public python-numba
19754 (package
19755 (name "python-numba")
19756 (version "0.51.2")
19757 (source
19758 (origin
19759 (method url-fetch)
19760 (uri (pypi-uri "numba" version))
19761 (sha256
19762 (base32
19763 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19764 (build-system python-build-system)
19765 (arguments
19766 `(#:phases
19767 (modify-phases %standard-phases
19768 (add-after 'unpack 'disable-proprietary-features
19769 (lambda _
19770 (setenv "NUMBA_DISABLE_HSA" "1")
19771 (setenv "NUMBA_DISABLE_CUDA" "1")
19772 #t))
19773 (replace 'check
19774 (lambda* (#:key inputs outputs #:allow-other-keys)
19775 (add-installed-pythonpath inputs outputs)
19776 ;; Something is wrong with the PYTHONPATH when running the
19777 ;; tests from the build directory, as it complains about not being
19778 ;; able to import certain modules.
19779 (with-directory-excursion "/tmp"
19780 (setenv "HOME" (getcwd))
19781 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19782 (propagated-inputs
19783 `(("python-llvmlite" ,python-llvmlite)
19784 ("python-numpy" ,python-numpy)
19785 ("python-singledispatch" ,python-singledispatch)))
19786 (native-inputs ;for tests
19787 `(("python-jinja2" ,python-jinja2)
19788 ("python-pygments" ,python-pygments)))
19789 (home-page "https://numba.pydata.org")
19790 (synopsis "Compile Python code using LLVM")
19791 (description "Numba gives you the power to speed up your applications with
19792 high performance functions written directly in Python. With a few
19793 annotations, array-oriented and math-heavy Python code can be just-in-time
19794 compiled to native machine instructions, similar in performance to C, C++ and
19795 Fortran, without having to switch languages or Python interpreters.
19796
19797 Numba works by generating optimized machine code using the LLVM compiler
19798 infrastructure at import time, runtime, or statically (using the included pycc
19799 tool).")
19800 (license license:bsd-3)))
19801
19802 (define-public python-numcodecs
19803 (package
19804 (name "python-numcodecs")
19805 (version "0.6.4")
19806 (source
19807 (origin
19808 (method url-fetch)
19809 (uri (pypi-uri "numcodecs" version))
19810 (sha256
19811 (base32
19812 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19813 (build-system python-build-system)
19814 (propagated-inputs
19815 `(("python-numpy" ,python-numpy)
19816 ("python-msgpack" ,python-msgpack)))
19817 (native-inputs
19818 `(("python-pytest" ,python-pytest)
19819 ("python-setuptools-scm" ,python-setuptools-scm)))
19820 (home-page "https://github.com/zarr-developers/numcodecs")
19821 (synopsis "Buffer compression and transformation codecs")
19822 (description
19823 "This Python package provides buffer compression and transformation
19824 codecs for use in data storage and communication applications.")
19825 (license license:expat)))
19826
19827 (define-public python-asciitree
19828 (package
19829 (name "python-asciitree")
19830 (version "0.3.3")
19831 (source
19832 (origin
19833 (method url-fetch)
19834 (uri (pypi-uri "asciitree" version))
19835 (sha256
19836 (base32
19837 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19838 (build-system python-build-system)
19839 (home-page "https://github.com/mbr/asciitree")
19840 (synopsis "Draws ASCII trees")
19841 (description "This package draws tree structures using characters.")
19842 (license license:expat)))
19843
19844 (define-public python-zarr
19845 (package
19846 (name "python-zarr")
19847 (version "2.4.0")
19848 (source
19849 (origin
19850 (method url-fetch)
19851 (uri (pypi-uri "zarr" version))
19852 (sha256
19853 (base32
19854 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19855 (build-system python-build-system)
19856 (arguments
19857 `(#:phases
19858 (modify-phases %standard-phases
19859 (add-after 'unpack 'disable-service-tests
19860 (lambda _
19861 (setenv "ZARR_TEST_ABS" "0")
19862 (setenv "ZARR_TEST_MONGO" "0")
19863 (setenv "ZARR_TEST_REDIS" "0")
19864 #t))
19865 (replace 'check
19866 (lambda _
19867 (invoke "pytest" "-vv" "-k" "not lmdb")
19868 #t)))))
19869 (propagated-inputs
19870 `(("python-asciitree" ,python-asciitree)
19871 ("python-fasteners" ,python-fasteners)
19872 ("python-numcodecs" ,python-numcodecs)
19873 ("python-numpy" ,python-numpy)))
19874 (native-inputs
19875 `(("python-pytest" ,python-pytest)
19876 ("python-setuptools-scm" ,python-setuptools-scm)))
19877 (home-page "https://github.com/zarr-developers/zarr-python")
19878 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19879 (description
19880 "This package provides an implementation of chunked, compressed,
19881 N-dimensional arrays for Python.")
19882 (license license:expat)))
19883
19884 (define-public python-anndata
19885 (package
19886 (name "python-anndata")
19887 (version "0.7.1")
19888 (source
19889 (origin
19890 (method url-fetch)
19891 (uri (pypi-uri "anndata" version))
19892 (sha256
19893 (base32
19894 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19895 (build-system python-build-system)
19896 (arguments
19897 `(#:phases
19898 (modify-phases %standard-phases
19899 (add-after 'unpack 'delete-inconvenient-tests
19900 (lambda _
19901 ;; This test depends on python-scikit-learn.
19902 (delete-file "anndata/tests/test_inplace_subset.py")
19903 #t))
19904 (delete 'check)
19905 (add-after 'install 'check
19906 (lambda* (#:key inputs outputs #:allow-other-keys)
19907 (add-installed-pythonpath inputs outputs)
19908 (invoke "pytest" "-vv"))))))
19909 (propagated-inputs
19910 `(("python-h5py" ,python-h5py)
19911 ("python-importlib-metadata" ,python-importlib-metadata)
19912 ("python-natsort" ,python-natsort)
19913 ("python-numcodecs" ,python-numcodecs)
19914 ("python-packaging" ,python-packaging)
19915 ("python-pandas" ,python-pandas)
19916 ("python-scipy" ,python-scipy)
19917 ("python-zarr" ,python-zarr)))
19918 (native-inputs
19919 `(("python-joblib" ,python-joblib)
19920 ("python-pytest" ,python-pytest)
19921 ("python-setuptools-scm" ,python-setuptools-scm)))
19922 (home-page "https://github.com/theislab/anndata")
19923 (synopsis "Annotated data for data analysis pipelines")
19924 (description "Anndata is a package for simple (functional) high-level APIs
19925 for data analysis pipelines. In this context, it provides an efficient,
19926 scalable way of keeping track of data together with learned annotations and
19927 reduces the code overhead typically encountered when using a mostly
19928 object-oriented library such as @code{scikit-learn}.")
19929 (license license:bsd-3)))
19930
19931 (define-public python-dill
19932 (package
19933 (name "python-dill")
19934 (version "0.3.1.1")
19935 (source
19936 (origin
19937 (method url-fetch)
19938 (uri (pypi-uri "dill" version))
19939 (sha256
19940 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19941 (build-system python-build-system)
19942 (arguments
19943 `(#:phases
19944 (modify-phases %standard-phases
19945 (replace 'check
19946 (lambda _
19947 (with-directory-excursion "/tmp"
19948 (invoke "nosetests" "-v"))
19949 #t)))))
19950 (native-inputs
19951 `(("python-nose" ,python-nose)))
19952 (home-page "https://pypi.org/project/dill/")
19953 (synopsis "Serialize all of Python")
19954 (description "Dill extends Python's @code{pickle} module for serializing
19955 and de-serializing Python objects to the majority of the built-in Python
19956 types. Dill provides the user the same interface as the @code{pickle} module,
19957 and also includes some additional features. In addition to pickling Python
19958 objects, @code{dill} provides the ability to save the state of an interpreter
19959 session in a single command. Hence, it would be feasible to save a
19960 interpreter session, close the interpreter, ship the pickled file to another
19961 computer, open a new interpreter, unpickle the session and thus continue from
19962 the saved state of the original interpreter session.")
19963 (license license:bsd-3)))
19964
19965 (define-public python-multiprocess
19966 (package
19967 (name "python-multiprocess")
19968 (version "0.70.9")
19969 (source
19970 (origin
19971 (method url-fetch)
19972 (uri (pypi-uri "multiprocess" version))
19973 (sha256
19974 (base32
19975 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19976 (build-system python-build-system)
19977 (arguments
19978 `(#:phases
19979 (modify-phases %standard-phases
19980 (add-after 'unpack 'disable-broken-tests
19981 (lambda _
19982 ;; This test is broken as there is no keyboard interrupt.
19983 (substitute* "py3.7/multiprocess/tests/__init__.py"
19984 (("^(.*)def test_wait_result"
19985 line indent)
19986 (string-append indent
19987 "@unittest.skip(\"Disabled by Guix\")\n"
19988 line)))
19989 #t))
19990 ;; Tests must be run after installation.
19991 (delete 'check)
19992 (add-after 'install 'check
19993 (lambda* (#:key inputs outputs #:allow-other-keys)
19994 (add-installed-pythonpath inputs outputs)
19995 (invoke "python" "-m" "multiprocess.tests")
19996 #t)))))
19997 (propagated-inputs
19998 `(("python-dill" ,python-dill)))
19999 (home-page "https://pypi.org/project/multiprocess/")
20000 (synopsis "Multiprocessing and multithreading in Python")
20001 (description
20002 "This package is a fork of the multiprocessing Python package, a package
20003 which supports the spawning of processes using the API of the standard
20004 library's @code{threading} module.")
20005 (license license:bsd-3)))
20006
20007 (define-public python-toolz
20008 (package
20009 (name "python-toolz")
20010 (version "0.9.0")
20011 (source
20012 (origin
20013 (method url-fetch)
20014 (uri (pypi-uri "toolz" version))
20015 (sha256
20016 (base32
20017 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20018 (build-system python-build-system)
20019 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20020 ;; unregistered loader type"
20021 (arguments '(#:tests? #f))
20022 (home-page "https://github.com/pytoolz/toolz/")
20023 (synopsis "List processing tools and functional utilities")
20024 (description
20025 "This package provides a set of utility functions for iterators,
20026 functions, and dictionaries.")
20027 (license license:bsd-3)))
20028
20029 (define-public python2-toolz
20030 (package-with-python2 python-toolz))
20031
20032 (define-public python-cytoolz
20033 (package
20034 (name "python-cytoolz")
20035 (version "0.9.0.1")
20036 (source
20037 (origin
20038 (method url-fetch)
20039 (uri (pypi-uri "cytoolz" version))
20040 (sha256
20041 (base32
20042 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20043 (build-system python-build-system)
20044 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20045 ;; 'exceptions'"
20046 (arguments '(#:tests? #f))
20047 (propagated-inputs
20048 `(("python-toolz" ,python-toolz)))
20049 (native-inputs
20050 `(("python-cython" ,python-cython)))
20051 (home-page "https://github.com/pytoolz/cytoolz")
20052 (synopsis "High performance functional utilities")
20053 (description
20054 "The cytoolz package implements the same API as provided by toolz. The
20055 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20056 that is accessible to other projects developed in Cython.")
20057 (license license:bsd-3)))
20058
20059 (define-public python-sortedcollections
20060 (package
20061 (name "python-sortedcollections")
20062 (version "2.1.0")
20063 (source
20064 (origin
20065 (method url-fetch)
20066 (uri (pypi-uri "sortedcollections" version))
20067 (sha256
20068 (base32
20069 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20070 (build-system python-build-system)
20071 (propagated-inputs
20072 `(("python-sortedcontainers" ,python-sortedcontainers)))
20073 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20074 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20075 (synopsis "Python Sorted Collections")
20076 (description "Sorted Collections is a Python sorted collections library.")
20077 (license license:asl2.0)))
20078
20079 (define-public python-sortedcontainers
20080 (package
20081 (name "python-sortedcontainers")
20082 (version "2.1.0")
20083 (source
20084 (origin
20085 (method url-fetch)
20086 (uri (pypi-uri "sortedcontainers" version))
20087 (sha256
20088 (base32
20089 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20090 (build-system python-build-system)
20091 (arguments
20092 ;; FIXME: Tests require many extra dependencies, and would introduce
20093 ;; a circular dependency on hypothesis, which uses this package.
20094 '(#:tests? #f))
20095 (propagated-inputs
20096 `(("python-appdirs" ,python-appdirs)
20097 ("python-distlib" ,python-distlib)
20098 ("python-filelock" ,python-filelock)
20099 ("python-six" ,python-six-bootstrap)))
20100 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20101 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20102 (description
20103 "This package provides a sorted collections library, written in
20104 pure-Python.")
20105 (license license:asl2.0)))
20106
20107 (define-public python2-sortedcontainers
20108 (package-with-python2 python-sortedcontainers))
20109
20110 (define-public python-cloudpickle
20111 (package
20112 (name "python-cloudpickle")
20113 (version "1.3.0")
20114 (source
20115 (origin
20116 (method url-fetch)
20117 (uri (pypi-uri "cloudpickle" version))
20118 (sha256
20119 (base32
20120 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20121 (build-system python-build-system)
20122 (arguments
20123 '(#:phases (modify-phases %standard-phases
20124 (add-before 'check 'do-not-override-PYTHONPATH
20125 (lambda _
20126 ;; Append to PYTHONPATH instead of overriding it so
20127 ;; that dependencies from Guix can be found.
20128 (substitute* "tests/testutils.py"
20129 (("env\\['PYTHONPATH'\\] = pythonpath")
20130 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20131 #t))
20132 (replace 'check
20133 (lambda* (#:key tests? #:allow-other-keys)
20134 (if tests?
20135 (invoke "pytest" "-s" "-vv")
20136 (format #t "test suite not run~%"))
20137 #t)))))
20138 (native-inputs
20139 `(;; For tests.
20140 ("python-psutil" ,python-psutil)
20141 ("python-pytest" ,python-pytest)
20142 ("python-tornado" ,python-tornado)))
20143 (home-page "https://github.com/cloudpipe/cloudpickle")
20144 (synopsis "Extended pickling support for Python objects")
20145 (description
20146 "Cloudpickle makes it possible to serialize Python constructs not
20147 supported by the default pickle module from the Python standard library. It
20148 is especially useful for cluster computing where Python expressions are
20149 shipped over the network to execute on remote hosts, possibly close to the
20150 data.")
20151 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20152 (license license:bsd-3)))
20153
20154 (define-public python2-cloudpickle
20155 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20156 (package/inherit base
20157 (native-inputs
20158 `(("python-mock" ,python2-mock)
20159 ,@(package-native-inputs base)))
20160 (propagated-inputs
20161 `(("python-futures" ,python2-futures)
20162 ,@(package-propagated-inputs base))))))
20163
20164 (define-public python-locket
20165 (package
20166 (name "python-locket")
20167 (version "0.2.0")
20168 (source
20169 (origin
20170 (method url-fetch)
20171 (uri (pypi-uri "locket" version))
20172 (sha256
20173 (base32
20174 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20175 (build-system python-build-system)
20176 (home-page "https://github.com/mwilliamson/locket.py")
20177 (synopsis "File-based locks for Python")
20178 (description
20179 "Locket implements a lock that can be used by multiple processes provided
20180 they use the same path.")
20181 (license license:bsd-2)))
20182
20183 (define-public python2-locket
20184 (package-with-python2 python-locket))
20185
20186 (define-public python-blosc
20187 (package
20188 (name "python-blosc")
20189 (version "1.5.1")
20190 (source
20191 (origin
20192 (method url-fetch)
20193 (uri (pypi-uri "blosc" version))
20194 (sha256
20195 (base32
20196 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20197 (build-system python-build-system)
20198 ;; FIXME: all tests pass, but then this error is printed:
20199 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20200 (arguments '(#:tests? #f))
20201 (propagated-inputs
20202 `(("python-numpy" ,python-numpy)))
20203 (home-page "https://github.com/blosc/python-blosc")
20204 (synopsis "Python wrapper for the Blosc data compressor library")
20205 (description "Blosc is a high performance compressor optimized for binary
20206 data. It has been designed to transmit data to the processor cache faster
20207 than the traditional, non-compressed, direct memory fetch approach via a
20208 @code{memcpy()} system call.
20209
20210 Blosc works well for compressing numerical arrays that contains data with
20211 relatively low entropy, like sparse data, time series, grids with
20212 regular-spaced values, etc.
20213
20214 This Python package wraps the Blosc library.")
20215 (license license:bsd-3)))
20216
20217 (define-public python2-blosc
20218 (package-with-python2 python-blosc))
20219
20220 (define-public python-partd
20221 (package
20222 (name "python-partd")
20223 (version "0.3.9")
20224 (source
20225 (origin
20226 (method url-fetch)
20227 (uri (pypi-uri "partd" version))
20228 (sha256
20229 (base32
20230 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20231 (build-system python-build-system)
20232 (propagated-inputs
20233 `(("python-blosc" ,python-blosc)
20234 ("python-locket" ,python-locket)
20235 ("python-numpy" ,python-numpy)
20236 ("python-pandas" ,python-pandas)
20237 ("python-pyzmq" ,python-pyzmq)
20238 ("python-toolz" ,python-toolz)))
20239 (home-page "https://github.com/dask/partd/")
20240 (synopsis "Appendable key-value storage")
20241 (description "Partd stores key-value pairs. Values are raw bytes. We
20242 append on old values. Partd excels at shuffling operations.")
20243 (license license:bsd-3)))
20244
20245 (define-public python2-partd
20246 (package-with-python2 python-partd))
20247
20248 (define-public python-fsspec
20249 (package
20250 (name "python-fsspec")
20251 (version "0.6.1")
20252 (source
20253 (origin
20254 (method url-fetch)
20255 (uri (pypi-uri "fsspec" version))
20256 (sha256
20257 (base32
20258 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20259 (build-system python-build-system)
20260 (arguments '(#:tests? #f)) ; there are none
20261 (home-page "https://github.com/intake/filesystem_spec")
20262 (synopsis "File-system specification")
20263 (description "The purpose of this package is to produce a template or
20264 specification for a file-system interface, that specific implementations
20265 should follow, so that applications making use of them can rely on a common
20266 behavior and not have to worry about the specific internal implementation
20267 decisions with any given backend.")
20268 (license license:bsd-3)))
20269
20270 (define-public python-dask
20271 (package
20272 (name "python-dask")
20273 (version "2.14.0")
20274 (source
20275 (origin
20276 (method url-fetch)
20277 (uri (pypi-uri "dask" version))
20278 (sha256
20279 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20280 (build-system python-build-system)
20281 (arguments
20282 `(#:phases
20283 (modify-phases %standard-phases
20284 (add-after 'unpack 'disable-broken-tests
20285 (lambda _
20286 ;; This test is marked as xfail when pytest-xdist is used.
20287 (substitute* "dask/tests/test_threaded.py"
20288 (("def test_interrupt\\(\\)" m)
20289 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20290 m)))
20291 ;; This one fails with a type error:
20292 ;; TypeError: Already tz-aware, use tz_convert to convert.
20293 (substitute* "dask/dataframe/tests/test_shuffle.py"
20294 (("def test_set_index_timestamp\\(\\)" m)
20295 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20296 m)))
20297 #t))
20298 (replace 'check
20299 (lambda _ (invoke "pytest" "-vv"))))))
20300 (propagated-inputs
20301 `(("python-cloudpickle" ,python-cloudpickle)
20302 ("python-fsspec" ,python-fsspec)
20303 ("python-numpy" ,python-numpy)
20304 ("python-packaging" ,python-packaging)
20305 ("python-pandas" ,python-pandas)
20306 ("python-partd" ,python-partd)
20307 ("python-toolz" ,python-toolz)
20308 ("python-pyyaml" ,python-pyyaml)))
20309 (native-inputs
20310 `(("python-pytest" ,python-pytest)
20311 ("python-pytest-runner" ,python-pytest-runner)))
20312 (home-page "https://github.com/dask/dask/")
20313 (synopsis "Parallel computing with task scheduling")
20314 (description
20315 "Dask is a flexible parallel computing library for analytics. It
20316 consists of two components: dynamic task scheduling optimized for computation,
20317 and large data collections like parallel arrays, dataframes, and lists that
20318 extend common interfaces like NumPy, Pandas, or Python iterators to
20319 larger-than-memory or distributed environments. These parallel collections
20320 run on top of the dynamic task schedulers. ")
20321 (license license:bsd-3)))
20322
20323 (define-public python-ilinkedlist
20324 (package
20325 (name "python-ilinkedlist")
20326 (version "0.4.0")
20327 (source
20328 (origin
20329 (method url-fetch)
20330 (uri (pypi-uri "ilinkedlist" version))
20331 (sha256
20332 (base32
20333 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20334 (build-system python-build-system)
20335 (native-inputs `(("python-pytest" ,python-pytest)))
20336 (inputs `(("python" ,python)))
20337 (home-page "https://github.com/luther9/ilinkedlist-py")
20338 (synopsis "Immutable linked list library")
20339 (description
20340 "This is a implementation of immutable linked lists for Python. It
20341 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20342 Since a linked list is treated as immutable, it is hashable, and its length
20343 can be retrieved in constant time. Some of the terminology is inspired by
20344 LISP. It is possible to create an improper list by creating a @code{Pair}
20345 with a non-list @code{cdr}.")
20346 (license license:gpl3+)))
20347
20348 (define-public python-readlike
20349 (package
20350 (name "python-readlike")
20351 (version "0.1.3")
20352 (source
20353 (origin
20354 (method url-fetch)
20355 (uri (pypi-uri "readlike" version))
20356 (sha256
20357 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20358 (build-system python-build-system)
20359 (home-page "https://github.com/jangler/readlike")
20360 (synopsis "GNU Readline-like line editing module")
20361 (description
20362 "This Python module provides line editing functions similar to the default
20363 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20364 @code{readline} package, this one allows access to those capabilities in settings
20365 outside of a standard command-line interface. It is especially well-suited to
20366 interfacing with Urwid, due to a shared syntax for describing key inputs.
20367
20368 Currently, all stateless Readline commands are implemented. Yanking and history
20369 are not supported.")
20370 (license license:expat)))
20371
20372 (define-public python2-readlike
20373 (package-with-python2 python-readlike))
20374
20375 (define-public python-reparser
20376 (package
20377 (name "python-reparser")
20378 (version "1.4.3")
20379 (source
20380 (origin
20381 (method url-fetch)
20382 (uri (pypi-uri "ReParser" version))
20383 (sha256
20384 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20385 (build-system python-build-system)
20386 (home-page "https://github.com/xmikos/reparser")
20387 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20388 (description
20389 "This Python library provides a simple lexer/parser for inline markup based
20390 on regular expressions.")
20391 (license license:expat)))
20392
20393 (define-public python2-reparser
20394 (let ((reparser (package-with-python2
20395 (strip-python2-variant python-reparser))))
20396 (package/inherit reparser
20397 (propagated-inputs
20398 `(("python2-enum34" ,python2-enum34)
20399 ,@(package-propagated-inputs reparser))))))
20400
20401 (define-public python-retrying
20402 (package
20403 (name "python-retrying")
20404 (version "1.3.3")
20405 (source
20406 (origin
20407 (method git-fetch)
20408 (uri (git-reference
20409 (url "https://github.com/rholder/retrying")
20410 (commit (string-append "v" version))))
20411 (file-name (git-file-name name version))
20412 (sha256
20413 (base32
20414 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20415 (build-system python-build-system)
20416 (propagated-inputs
20417 `(("python-six" ,python-six)))
20418 (home-page "https://github.com/rholder/retrying")
20419 (synopsis "Library for adding retry behavior")
20420 (description "Retrying is a general-purpose retrying library to simplify
20421 the task of adding retry behavior to just about anything.
20422
20423 Features:
20424
20425 @itemize
20426 @item Generic Decorator API.
20427 @item Specify stop condition (i.e. limit by number of attempts).
20428 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20429 @item Customize retrying on Exceptions.
20430 @item Customize retrying on expected returned result.
20431 @end itemize")
20432 (license license:asl2.0)))
20433
20434 (define-public python-pre-commit
20435 (package
20436 (name "python-pre-commit")
20437 (version "2.10.0")
20438 (source
20439 (origin
20440 (method url-fetch)
20441 (uri (pypi-uri "pre_commit" version))
20442 (sha256
20443 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20444 (build-system python-build-system)
20445 (arguments
20446 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20447 ;; attribute 'empty_template_setup'".
20448 `(#:tests? #false))
20449 (propagated-inputs
20450 `(("python-cfgv" ,python-cfgv)
20451 ("python-identify" ,python-identify)
20452 ("python-importlib-metadata" ,python-importlib-metadata)
20453 ("python-importlib-resources" ,python-importlib-resources)
20454 ("python-nodeenv" ,python-nodeenv)
20455 ("python-pyyaml" ,python-pyyaml)
20456 ("python-toml" ,python-toml)
20457 ("python-virtualenv" ,python-virtualenv)))
20458 (home-page "https://github.com/pre-commit/pre-commit")
20459 (synopsis "Framework for managing multi-language pre-commit hooks")
20460 (description
20461 "This package provides a framework for managing and maintaining
20462 multi-language pre-commit hooks.")
20463 (license license:expat)))
20464
20465 (define-public python-precis-i18n
20466 (package
20467 (name "python-precis-i18n")
20468 (version "1.0.0")
20469 (source
20470 (origin
20471 (method url-fetch)
20472 (uri (pypi-uri "precis_i18n" version))
20473 (sha256
20474 (base32
20475 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20476 (build-system python-build-system)
20477 (home-page "https://github.com/byllyfish/precis_i18n")
20478 (synopsis "Implementation of the PRECIS framework")
20479 (description
20480 "This module implements the PRECIS Framework as described in RFC 8264,
20481 RFC 8265 and RFC 8266.")
20482 (license license:expat)))
20483
20484 (define-public python-absl-py
20485 (package
20486 (name "python-absl-py")
20487 (version "0.6.1")
20488 (source
20489 (origin
20490 (method url-fetch)
20491 (uri (pypi-uri "absl-py" version))
20492 (sha256
20493 (base32
20494 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20495 (build-system python-build-system)
20496 (propagated-inputs
20497 `(("python-six" ,python-six)))
20498 (home-page "https://github.com/abseil/abseil-py")
20499 (synopsis "Abseil Python common libraries")
20500 (description
20501 "This package provides the Abseil Python Common Libraries, a collection
20502 of Python libraries for building Python applications.")
20503 (license license:asl2.0)))
20504
20505 (define-public python-astor
20506 (package
20507 (name "python-astor")
20508 (version "0.7.1")
20509 (source
20510 (origin
20511 (method url-fetch)
20512 (uri (pypi-uri "astor" version))
20513 (sha256
20514 (base32
20515 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
20516 (build-system python-build-system)
20517 ;; FIXME: There are two errors and two test failures.
20518 (arguments `(#:tests? #f))
20519 (home-page "https://github.com/berkerpeksag/astor")
20520 (synopsis "Read and write Python ASTs")
20521 (description "Astor is designed to allow easy manipulation of Python
20522 source via the Abstract Syntax Tree.")
20523 (license license:bsd-3)))
20524
20525 (define-public python2-astor
20526 (package-with-python2 python-astor))
20527
20528 (define-public python-astunparse
20529 (package
20530 (name "python-astunparse")
20531 (version "1.6.2")
20532 (source
20533 (origin
20534 (method url-fetch)
20535 (uri (pypi-uri "astunparse" version))
20536 (sha256
20537 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20538 (build-system python-build-system)
20539 (arguments '(#:tests? #f)) ; there are none
20540 (propagated-inputs
20541 `(("python-six" ,python-six)
20542 ("python-wheel" ,python-wheel)))
20543 (home-page "https://github.com/simonpercivall/astunparse")
20544 (synopsis "AST unparser for Python")
20545 (description "This package provides an AST unparser for Python. It is a
20546 factored out version of @code{unparse} found in the Python source
20547 distribution.")
20548 (license license:bsd-3)))
20549
20550 (define-public python-gast
20551 (package
20552 (name "python-gast")
20553 (version "0.3.3")
20554 (source
20555 (origin
20556 (method url-fetch)
20557 (uri (pypi-uri "gast" version))
20558 (sha256
20559 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20560 (build-system python-build-system)
20561 (propagated-inputs
20562 `(("python-astunparse" ,python-astunparse)))
20563 (home-page "https://pypi.org/project/gast/")
20564 (synopsis "Generic Python AST that abstracts the underlying Python version")
20565 (description
20566 "GAST provides a compatibility layer between the AST of various Python
20567 versions, as produced by @code{ast.parse} from the standard @code{ast}
20568 module.")
20569 (license license:bsd-3)))
20570
20571 (define-public python-wikidata
20572 (package
20573 (name "python-wikidata")
20574 (version "0.6.1")
20575 (source
20576 (origin
20577 (method url-fetch)
20578 (uri (pypi-uri "Wikidata" version))
20579 (sha256
20580 (base32
20581 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20582 (build-system python-build-system)
20583 (propagated-inputs
20584 `(("python-babel" ,python-babel)))
20585 (home-page "https://github.com/dahlia/wikidata")
20586 (synopsis "Wikidata client library")
20587 (description
20588 "This package provides a Python interface to
20589 @url{https://www.wikidata.org/, Wikidata}.")
20590 (properties '((upstream-name . "Wikidata")))
20591 (license license:gpl3+)))
20592
20593 (define-public python-doctest-ignore-unicode
20594 (package
20595 (name "python-doctest-ignore-unicode")
20596 (version "0.1.2")
20597 (source
20598 (origin
20599 (method url-fetch)
20600 (uri (pypi-uri "doctest-ignore-unicode" version))
20601 (sha256
20602 (base32
20603 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20604 (build-system python-build-system)
20605 (native-inputs
20606 `(("python-nose" ,python-nose)))
20607 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20608 (synopsis "Ignore Unicode literal prefixes in doctests")
20609 (description
20610 "This package adds support for a flag to ignore Unicode literal prefixes
20611 in doctests.")
20612 (license license:asl2.0)))
20613
20614 (define-public python-attr
20615 (package
20616 (name "python-attr")
20617 (version "0.3.1")
20618 (source
20619 (origin
20620 (method url-fetch)
20621 (uri (pypi-uri "attr" version))
20622 (sha256
20623 (base32
20624 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20625 (build-system python-build-system)
20626 (home-page "https://github.com/denis-ryzhkov/attr")
20627 (synopsis "Decorator for attributes of target function or class")
20628 (description "Simple decorator to set attributes of target function or
20629 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20630 (license license:expat)))
20631
20632 (define-public python-construct
20633 (package
20634 (name "python-construct")
20635 (version "2.10.56")
20636 (source
20637 (origin
20638 (method url-fetch)
20639 (uri (pypi-uri "construct" version))
20640 (sha256
20641 (base32
20642 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20643 (build-system python-build-system)
20644 (arguments
20645 `(#:tests? #f)) ; No tests exist.
20646 (propagated-inputs
20647 `(("python-extras" ,python-extras)
20648 ("python-arrow" ,python-arrow)
20649 ("python-numpy" ,python-numpy)
20650 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20651 (home-page "https://construct.readthedocs.io")
20652 (synopsis "Declarative and symmetrical parser and builder for binary data")
20653 (description
20654 "This package provides both simple, atomic constructs (such as
20655 integers of various sizes), as well as composite ones which allow you
20656 form hierarchical and sequential structures of increasing complexity.
20657 It features bit and byte granularity, easy debugging and testing, an
20658 easy-to-extend subclass system, and lots of primitive constructs to
20659 make your work easier.")
20660 (license license:expat)))
20661
20662 (define-public python-outcome
20663 (package
20664 (name "python-outcome")
20665 (version "1.0.1")
20666 (source
20667 (origin
20668 (method url-fetch)
20669 (uri (pypi-uri "outcome" version))
20670 (sha256
20671 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20672 (build-system python-build-system)
20673 (arguments
20674 `(#:phases
20675 (modify-phases %standard-phases
20676 (replace 'check
20677 (lambda* (#:key inputs outputs #:allow-other-keys)
20678 (add-installed-pythonpath inputs outputs)
20679 (invoke "pytest" "-vv"))))))
20680 (native-inputs
20681 `(("python-pytest" ,python-pytest)
20682 ("python-pytest-cov" ,python-pytest-cov)
20683 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20684 (propagated-inputs
20685 `(("python-async-generator" ,python-async-generator)
20686 ("python-attrs" ,python-attrs)))
20687 (home-page "https://github.com/python-trio/outcome")
20688 (synopsis "Capture the outcome of Python function calls")
20689 (description
20690 "Capture the outcome of Python function calls. Extracted from the Trio
20691 project.")
20692 ;; Either license applies.
20693 (license (list license:expat license:asl2.0))))
20694
20695 (define-public python-trio
20696 (package
20697 (name "python-trio")
20698 (version "0.17.0")
20699 (source
20700 (origin
20701 (method url-fetch)
20702 (uri (pypi-uri "trio" version))
20703 (sha256
20704 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20705 (build-system python-build-system)
20706 (arguments
20707 `(#:phases
20708 (modify-phases %standard-phases
20709 (add-before 'check 'change-home
20710 (lambda _
20711 ;; Tests require a writable home.
20712 (setenv "HOME" "/tmp")
20713 #t))
20714 (replace 'check
20715 (lambda _
20716 (invoke "pytest" "-vv" "-k"
20717 (string-append
20718 ;; This test times out.
20719 "not test_ki_protection_works"
20720 ;; Assertion errors.
20721 " and not test_guest_mode_ki"
20722 " and not test_run_in_trio_thread_ki"
20723 ;; These try to raise KeyboardInterrupt which does not work
20724 ;; in the build environment.
20725 " and not test_ki_self"
20726 " and not test_ki_wakes_us_up"
20727 ;; Failure in name resolution.
20728 " and not test_getnameinfo"
20729 " and not test_SocketType_resolve"
20730 ;; OSError: protocol not found.
20731 " and not test_getprotobyname")))))))
20732 (native-inputs
20733 `(("python-astor" ,python-astor)
20734 ("python-ipython" ,python-ipython)
20735 ("python-jedi" ,python-jedi)
20736 ("python-pylint" ,python-pylint)
20737 ("python-pyopenssl" ,python-pyopenssl)
20738 ("python-pytest" ,python-pytest)
20739 ("python-pytest-cov" ,python-pytest-cov)
20740 ("python-trustme" ,python-trustme)))
20741 (propagated-inputs
20742 `(("python-attrs" ,python-attrs)
20743 ("python-idna" ,python-idna)
20744 ("python-outcome" ,python-outcome)
20745 ("python-sniffio" ,python-sniffio)
20746 ("python-sortedcontainers"
20747 ,python-sortedcontainers)))
20748 (home-page "https://github.com/python-trio/trio")
20749 (synopsis "Friendly Python library for async concurrency and I/O")
20750 (description
20751 "Trio strives to be a production-quality, async/await-native I/O library
20752 for Python. Like all async libraries, its main purpose is to help you write
20753 programs that do multiple things at the same time with parallelized I/O.")
20754 ;; Either license applies.
20755 (license (list license:expat license:asl2.0))))
20756
20757 (define-public python-trio-typing
20758 (package
20759 (name "python-trio-typing")
20760 (version "0.5.0")
20761 (source
20762 (origin
20763 (method url-fetch)
20764 (uri (pypi-uri "trio-typing" version))
20765 (sha256
20766 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20767 (build-system python-build-system)
20768 (arguments
20769 `(#:phases
20770 (modify-phases %standard-phases
20771 (replace 'check
20772 (lambda _
20773 (invoke "pytest" "-vv"))))))
20774 (native-inputs
20775 `(("python-attrs" ,python-attrs)
20776 ("python-pytest" ,python-pytest)))
20777 (propagated-inputs
20778 `(("python-mypy" ,python-mypy)
20779 ("python-mypy-extensions"
20780 ,python-mypy-extensions)
20781 ("python-trio" ,python-trio)
20782 ("python-typing-extensions"
20783 ,python-typing-extensions)))
20784 (home-page "https://github.com/python-trio/trio-typing")
20785 (synopsis "Static type checking support for Trio and related projects")
20786 (description
20787 "This package provides:
20788
20789 @itemize
20790 @item PEP 561 typing stubs packages for the Trio project packages:
20791
20792 @itemize
20793 @item trio (@code{trio-stubs})
20794 @item outcome (@code{outcome-stubs})
20795 @item async_generator (@code{async_generator-stubs})
20796 @end itemize
20797
20798 @item A package @code{trio_typing} containing types that Trio programs often
20799 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20800 a mypy plugin that smooths over some limitations in the basic type hints.
20801 @end itemize")
20802 ;; Either license applies.
20803 (license (list license:expat license:asl2.0))))
20804
20805 (define-public python-humanize
20806 (package
20807 (name "python-humanize")
20808 (version "0.5.1")
20809 (source
20810 (origin
20811 (method url-fetch)
20812 (uri (pypi-uri "humanize" version))
20813 (sha256
20814 (base32
20815 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20816 (arguments
20817 '(#:tests? #f)) ; tests not in pypi archive
20818 (build-system python-build-system)
20819 (home-page "https://github.com/jmoiron/humanize")
20820 (synopsis "Print numerical information in a human-readable form")
20821 (description "This package provides a Python module that displays numbers
20822 and dates in \"human readable\" forms. For example, it would display
20823 \"12345591313\" as \"12.3 billion\".")
20824 (license license:expat)))
20825
20826 (define-public python-txaio
20827 (package
20828 (name "python-txaio")
20829 (version "18.8.1")
20830 (source
20831 (origin
20832 (method url-fetch)
20833 (uri (pypi-uri "txaio" version))
20834 (sha256
20835 (base32
20836 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20837 (build-system python-build-system)
20838 (propagated-inputs
20839 `(("python-twisted" ,python-twisted)
20840 ("python-six" ,python-six)))
20841 (home-page "https://github.com/crossbario/txaio")
20842 (synopsis "Compatibility layer between Python asyncio and Twisted")
20843 (description "Txaio provides a compatibility layer between the Python
20844 @code{asyncio} module and @code{Twisted}.")
20845 (license license:expat)))
20846
20847 (define-public python-toolshed
20848 (package
20849 (name "python-toolshed")
20850 (version "0.4.6")
20851 (source
20852 (origin
20853 (method url-fetch)
20854 (uri (pypi-uri "toolshed" version))
20855 (sha256
20856 (base32
20857 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20858 (build-system python-build-system)
20859 (native-inputs
20860 `(("python-nose" ,python-nose)))
20861 (home-page "https://github.com/brentp/toolshed/")
20862 (synopsis "Collection of modules and functions for working with data")
20863 (description "This is a collection of well-tested, simple modules and
20864 functions that aim to reduce boilerplate when working with data.")
20865 (license license:bsd-2)))
20866
20867 (define-public python-annoy
20868 (package
20869 (name "python-annoy")
20870 (version "1.15.1")
20871 (source
20872 (origin
20873 (method url-fetch)
20874 (uri (pypi-uri "annoy" version))
20875 (sha256
20876 (base32
20877 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20878 (build-system python-build-system)
20879 (native-inputs
20880 `(("python-nose" ,python-nose)))
20881 (home-page "https://github.com/spotify/annoy/")
20882 (synopsis "Approximate nearest neighbors library")
20883 (description
20884 "Annoy is a C++ library with Python bindings to search for points in
20885 space that are close to a given query point. It also creates large read-only
20886 file-based data structures that are @code{mmap}ped into memory so that many
20887 processes may share the same data.")
20888 (license license:asl2.0)))
20889
20890 (define-public python-croniter
20891 (package
20892 (name "python-croniter")
20893 (version "0.3.34")
20894 (source (origin
20895 (method url-fetch)
20896 (uri (pypi-uri "croniter" version))
20897 (sha256
20898 (base32
20899 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20900 (build-system python-build-system)
20901 (propagated-inputs
20902 `(("python-dateutil" ,python-dateutil)
20903 ("python-natsort" ,python-natsort)))
20904 (home-page "https://github.com/kiorky/croniter")
20905 (synopsis "Iterate datetime objects with cron-like syntax")
20906 (description
20907 "@code{croniter} provides iteration for datetime object with cron-like
20908 format.")
20909 (license license:expat)))
20910
20911 (define-public python-pylzma
20912 (package
20913 (name "python-pylzma")
20914 (version "0.5.0")
20915 (source
20916 (origin
20917 (method url-fetch)
20918 (uri (pypi-uri "pylzma" version))
20919 (sha256
20920 (base32
20921 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20922 (build-system python-build-system)
20923 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
20924 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20925 (description "This package provides Python bindings for the LZMA library
20926 by Igor Pavlov.")
20927 (license license:lgpl2.1+)))
20928
20929 (define-public python2-pylzma
20930 (package-with-python2 python-pylzma))
20931
20932 (define-public python2-zeroconf
20933 (package
20934 (name "python2-zeroconf")
20935
20936 ;; This is the last version that supports Python 2.x.
20937 (version "0.19.1")
20938 (source
20939 (origin
20940 (method url-fetch)
20941 (uri (pypi-uri "zeroconf" version))
20942 (sha256
20943 (base32
20944 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20945 (build-system python-build-system)
20946 (arguments
20947 `(#:python ,python-2
20948 #:phases
20949 (modify-phases %standard-phases
20950 (add-after 'unpack 'patch-requires
20951 (lambda* (#:key inputs #:allow-other-keys)
20952 (substitute* "setup.py"
20953 (("enum-compat")
20954 "enum34"))
20955 #t)))))
20956 (native-inputs
20957 `(("python2-six" ,python2-six)
20958 ("python2-enum32" ,python2-enum34)
20959 ("python2-netifaces" ,python2-netifaces)
20960 ("python2-typing" ,python2-typing)))
20961 (home-page "https://github.com/jstasiak/python-zeroconf")
20962 (synopsis "Pure Python mDNS service discovery")
20963 (description
20964 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20965 compatible).")
20966 (license license:lgpl2.1+)))
20967
20968 (define-public python-bsddb3
20969 (package
20970 (name "python-bsddb3")
20971 (version "6.2.6")
20972 (source
20973 (origin
20974 (method url-fetch)
20975 (uri (pypi-uri "bsddb3" version))
20976 (sha256
20977 (base32
20978 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20979 (build-system python-build-system)
20980 (inputs
20981 `(("bdb" ,bdb)))
20982 (arguments
20983 '(#:phases
20984 (modify-phases %standard-phases
20985 (add-after 'unpack 'configure-locations
20986 (lambda* (#:key inputs #:allow-other-keys)
20987 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20988 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20989 #t))
20990 (replace 'check
20991 (lambda _
20992 (invoke "python3" "test3.py" "-v"))))))
20993 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20994 (synopsis "Python bindings for Oracle Berkeley DB")
20995 (description
20996 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20997 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20998 Transaction objects, and each of these is exposed as a Python type in the
20999 bsddb3.db module. The database objects can use various access methods: btree,
21000 hash, recno, and queue. Complete support of Berkeley DB distributed
21001 transactions. Complete support for Berkeley DB Replication Manager.
21002 Complete support for Berkeley DB Base Replication. Support for RPC.")
21003 (license license:bsd-3)))
21004
21005 (define-public python-dbfread
21006 (package
21007 (name "python-dbfread")
21008 (version "2.0.7")
21009 (source (origin
21010 (method url-fetch)
21011 (uri (pypi-uri "dbfread" version))
21012 (sha256
21013 (base32
21014 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21015 (build-system python-build-system)
21016 (native-inputs
21017 `(("python-pytest" ,python-pytest)))
21018 (home-page "https://dbfread.readthedocs.io")
21019 (synopsis "Read DBF Files with Python")
21020 (description
21021 "This library reads DBF files and returns the data as native Python data
21022 types for further processing. It is primarily intended for batch jobs and
21023 one-off scripts.")
21024 (license license:expat)))
21025
21026 (define-public python-cached-property
21027 (package
21028 (name "python-cached-property")
21029 (version "1.5.1")
21030 (source
21031 (origin
21032 (method url-fetch)
21033 (uri (pypi-uri "cached-property" version))
21034 (sha256
21035 (base32
21036 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21037 (build-system python-build-system)
21038 (arguments
21039 `(#:phases
21040 (modify-phases %standard-phases
21041 ;; https://github.com/pydanny/cached-property/issues/131
21042 ;; recent versions of freezegun break one test
21043 (add-after 'unpack 'disable-broken-test
21044 (lambda _
21045 (substitute* "tests/test_cached_property.py"
21046 (("def test_threads_ttl_expiry\\(self\\)" m)
21047 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21048 " " m)))
21049 #t)))))
21050 (native-inputs
21051 `(("python-freezegun" ,python-freezegun)))
21052 (home-page
21053 "https://github.com/pydanny/cached-property")
21054 (synopsis
21055 "Decorator for caching properties in classes")
21056 (description
21057 "This package provides a decorator which makes caching
21058 time-or-computationally-expensive properties quick and easy and works in Python
21059 2 or 3.")
21060 (license license:bsd-3)))
21061
21062 (define-public python-folium
21063 (package
21064 (name "python-folium")
21065 (version "0.12.1")
21066 (source
21067 (origin
21068 ;; PyPI has a ".whl" file but not a proper source release.
21069 ;; Thus, fetch code from Git.
21070 (method git-fetch)
21071 (uri (git-reference
21072 (url "https://github.com/python-visualization/folium")
21073 (commit (string-append "v" version))))
21074 (file-name (git-file-name name version))
21075 (sha256
21076 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21077 (build-system python-build-system)
21078 (propagated-inputs
21079 `(("python-branca" ,python-branca)
21080 ("python-jinja2" ,python-jinja2)
21081 ("python-numpy" ,python-numpy)
21082 ("python-requests" ,python-requests)))
21083 (native-inputs
21084 `(("python-pytest" ,python-pytest)))
21085 (home-page "https://github.com/python-visualization/folium")
21086 (synopsis "Make beautiful maps with Leaflet.js & Python")
21087 (description "@code{folium} makes it easy to visualize data that’s been
21088 manipulated in Python on an interactive leaflet map. It enables both the
21089 binding of data to a map for @code{choropleth} visualizations as well as
21090 passing rich vector/raster/HTML visualizations as markers on the map.
21091
21092 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21093 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21094 supports Image, Video, GeoJSON and TopoJSON overlays.")
21095 (license license:expat)))
21096
21097 (define-public jube
21098 (package
21099 ;; This is a command-line tool, so no "python-" prefix.
21100 (name "jube")
21101 (version "2.2.2")
21102 (source (origin
21103 (method url-fetch)
21104 (uri (string-append
21105 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21106 version))
21107 (sha256
21108 (base32
21109 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21110 (file-name (string-append "jube-" version ".tar.gz"))))
21111 (build-system python-build-system)
21112 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21113 (synopsis "Benchmarking environment")
21114 (description
21115 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21116 benchmarked application, benchmark data is stored in a format that allows JUBE
21117 to deduct the desired information. This data can be parsed by automatic pre-
21118 and post-processing scripts that draw information and store it more densely
21119 for manual interpretation.")
21120 (license license:gpl3+)))
21121
21122 (define-public python-pyroutelib3
21123 (package
21124 (name "python-pyroutelib3")
21125 (version "1.3.post1")
21126 (source
21127 (origin
21128 (method url-fetch)
21129 (uri (pypi-uri "pyroutelib3" version))
21130 (sha256
21131 (base32
21132 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21133 (build-system python-build-system)
21134 (propagated-inputs
21135 `(("python-dateutil" ,python-dateutil)))
21136 (home-page "https://github.com/MKuranowski/pyroutelib3")
21137 (synopsis "Library for simple routing on OSM data")
21138 (description "Library for simple routing on OSM data")
21139 (license license:gpl3+)))
21140
21141 (define-public python-bibtexparser
21142 (package
21143 (name "python-bibtexparser")
21144 (version "1.1.0")
21145 (source
21146 (origin
21147 (method url-fetch)
21148 (uri (pypi-uri "bibtexparser" version))
21149 (sha256
21150 (base32
21151 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21152 (build-system python-build-system)
21153 (propagated-inputs
21154 `(("python-pyparsing" ,python-pyparsing)))
21155 (native-inputs
21156 `(("python-future" ,python-future)))
21157 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21158 (synopsis "Python library to parse BibTeX files")
21159 (description "BibtexParser is a Python library to parse BibTeX files.")
21160 (license (list license:bsd-3 license:lgpl3))))
21161
21162 (define-public python-distro
21163 (package
21164 (name "python-distro")
21165 (version "1.4.0")
21166 (source
21167 (origin
21168 (method url-fetch)
21169 (uri (pypi-uri "distro" version))
21170 (sha256
21171 (base32
21172 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21173 (build-system python-build-system)
21174 (native-inputs
21175 `(("python-pytest" ,python-pytest)))
21176 (home-page "https://github.com/nir0s/distro")
21177 (synopsis
21178 "OS platform information API")
21179 (description
21180 "@code{distro} provides information about the OS distribution it runs on,
21181 such as a reliable machine-readable ID, or version information.
21182
21183 It is the recommended replacement for Python's original
21184 `platform.linux_distribution` function (which will be removed in Python 3.8).
21185 @code{distro} also provides a command-line interface to output the platform
21186 information in various formats.")
21187 (license license:asl2.0)))
21188
21189 (define-public python-cairosvg
21190 (package
21191 (name "python-cairosvg")
21192 (version "2.5.0")
21193 (source
21194 (origin
21195 (method url-fetch)
21196 (uri (pypi-uri "CairoSVG" version))
21197 (sha256
21198 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21199 (build-system python-build-system)
21200 (arguments
21201 `(#:phases
21202 (modify-phases %standard-phases
21203 (replace 'check
21204 (lambda _ (invoke "pytest"))))))
21205 (propagated-inputs
21206 `(("python-cairocffi" ,python-cairocffi)
21207 ("python-cssselect2" ,python-cssselect2)
21208 ("python-defusedxml" ,python-defusedxml)
21209 ("python-pillow" ,python-pillow)
21210 ("python-tinycss2" ,python-tinycss2)))
21211 (native-inputs
21212 `(("python-pytest-flake8" ,python-pytest-flake8)
21213 ("python-pytest-isort" ,python-pytest-isort)
21214 ("python-pytest-runner" ,python-pytest-runner)))
21215 (home-page "https://cairosvg.org/")
21216 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21217 (description "CairoSVG is a SVG converter based on Cairo. It can export
21218 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21219 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21220 parsed, the result is drawn to a Cairo surface that can be exported to
21221 qvarious formats: PDF, PostScript, PNG and even SVG.")
21222 (license license:lgpl3+)))
21223
21224 (define-public python-pyphen
21225 (package
21226 (name "python-pyphen")
21227 (version "0.10.0")
21228 (source
21229 (origin
21230 (method url-fetch)
21231 (uri (pypi-uri "Pyphen" version))
21232 (sha256
21233 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21234 (build-system python-build-system)
21235 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21236 ;; embedded set provided by upstream - like Debian does.
21237 (home-page "https://github.com/Kozea/Pyphen")
21238 (synopsis "Pure Python module to hyphenate text")
21239 (description "Pyphen is a pure Python module to hyphenate text using
21240 existing Hunspell hyphenation dictionaries.")
21241 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21242
21243 (define-public python-intelhex
21244 (package
21245 (name "python-intelhex")
21246 (version "2.2.1")
21247 (source
21248 (origin
21249 (method url-fetch)
21250 (uri (pypi-uri "intelhex" version))
21251 (sha256
21252 (base32
21253 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21254 (build-system python-build-system)
21255 (arguments '(#:tests? #f)) ;issue with version
21256 (home-page "https://pypi.org/project/IntelHex/")
21257 (synopsis "Python library for Intel HEX files manipulations")
21258 (description "The Intel HEX file format is widely used in microprocessors
21259 and microcontrollers area (embedded systems etc.) as the de facto standard for
21260 representation of code to be programmed into microelectronic devices. This
21261 package provides an intelhex Python library to read, write, create from
21262 scratch and manipulate data from Intel HEX file format. It also includes
21263 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21264 converters and more, those based on the library itself.")
21265 (license license:bsd-3)))
21266
21267 (define-public python-pykwalify
21268 (package
21269 (name "python-pykwalify")
21270 (version "1.7.0")
21271 (source
21272 (origin
21273 (method url-fetch)
21274 (uri (pypi-uri "pykwalify" version))
21275 (sha256
21276 (base32
21277 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21278 (build-system python-build-system)
21279 (arguments '(#:tests? #f)) ;missing dependencies
21280 (propagated-inputs
21281 `(("python-dateutil" ,python-dateutil)
21282 ("python-docopt" ,python-docopt)
21283 ("python-pyyaml" ,python-pyyaml)))
21284 (home-page "https://github.com/grokzen/pykwalify")
21285 (synopsis
21286 "Python lib/cli for JSON/YAML schema validation")
21287 (description
21288 "This package provides a parser, schema validator, and data binding tool
21289 for YAML and JSON.")
21290 (license license:expat)))
21291
21292 (define-public python-dbusmock
21293 (package
21294 (name "python-dbusmock")
21295 (version "0.18.3")
21296 (source
21297 (origin
21298 (method url-fetch)
21299 (uri (pypi-uri "python-dbusmock" version))
21300 (sha256
21301 (base32
21302 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21303 (build-system python-build-system)
21304 (arguments
21305 '(#:phases
21306 (modify-phases %standard-phases
21307 (add-after 'unpack 'patch-shell-path
21308 (lambda _
21309 (substitute* "tests/test_code.py"
21310 (("/bin/bash") (which "bash")))
21311 #t)))))
21312 (native-inputs
21313 `(;; For tests.
21314 ("dbus" ,dbus) ; for dbus-daemon
21315 ("python-nose" ,python-nose)
21316 ("which" ,which)))
21317 (propagated-inputs
21318 `(("python-dbus" ,python-dbus)
21319 ("python-pygobject" ,python-pygobject)))
21320 (home-page "https://github.com/martinpitt/python-dbusmock")
21321 (synopsis "Python library for mock D-Bus objects")
21322 (description "python-dbusmock allows for the easy creation of mock objects on
21323 D-Bus. This is useful for writing tests for software which talks to D-Bus
21324 services such as upower, systemd, logind, gnome-session or others, and it is
21325 hard (or impossible without root privileges) to set the state of the real
21326 services to what you expect in your tests.")
21327 (license license:lgpl3+)))
21328
21329 (define-public python-jsonplus
21330 (package
21331 (name "python-jsonplus")
21332 (version "0.8.0")
21333 (home-page "https://github.com/randomir/jsonplus")
21334 (source (origin
21335 (method url-fetch)
21336 (uri (pypi-uri "jsonplus" version))
21337 (sha256
21338 (base32
21339 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21340 (build-system python-build-system)
21341 ;; XXX: No tests on PyPI, and the repository has no tags.
21342 (arguments '(#:tests? #f))
21343 (propagated-inputs
21344 `(("python-dateutil" ,python-dateutil)
21345 ("python-simplejson" ,python-simplejson)
21346 ("python-sortedcontainers" ,python-sortedcontainers)))
21347 (synopsis "Serialize Python types to/from JSON")
21348 (description
21349 "This package provides functionality to serialize arbitrary data types
21350 to and from JSON. Common data types are implemented and it is easy to
21351 register custom encoders and decoders.")
21352 (license license:expat)))
21353
21354 (define-public python-ujson
21355 (package
21356 (name "python-ujson")
21357 (version "4.0.2")
21358 (source
21359 (origin
21360 (method url-fetch)
21361 (uri (pypi-uri "ujson" version))
21362 (sha256
21363 (base32
21364 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21365 (modules '((guix build utils)))
21366 (snippet
21367 '(begin (delete-file-recursively "deps") #t))))
21368 (build-system python-build-system)
21369 (arguments
21370 `(#:phases
21371 (modify-phases %standard-phases
21372 (add-after 'unpack 'link-to-system-double-conversion
21373 (lambda* (#:key inputs #:allow-other-keys)
21374 (let ((d-c (assoc-ref inputs "double-conversion")))
21375 (substitute* "setup.py"
21376 (("./deps/double-conversion/double-conversion\"")
21377 (string-append d-c "/include/double-conversion\""))
21378 (("-lstdc++" stdc)
21379 (string-append "-L" d-c "/lib\","
21380 " \"-ldouble-conversion\","
21381 " \"" stdc)))
21382 #t)))
21383 (replace 'check
21384 (lambda* (#:key inputs outputs #:allow-other-keys)
21385 (add-installed-pythonpath inputs outputs)
21386 (invoke "pytest"))))))
21387 (native-inputs
21388 `(("double-conversion" ,double-conversion)
21389 ("python-setuptools-scm" ,python-setuptools-scm)
21390 ("python-pytest" ,python-pytest)))
21391 (home-page "https://github.com/ultrajson/ultrajson")
21392 (synopsis "Ultra fast JSON encoder and decoder for Python")
21393 (description
21394 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21395 bindings for Python 3.")
21396 (license license:bsd-3)))
21397
21398 (define-public python-iocapture
21399 ;; The latest release is more than a year older than this commit.
21400 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21401 (revision "1"))
21402 (package
21403 (name "python-iocapture")
21404 (version "0.1.2")
21405 (source
21406 (origin
21407 (method git-fetch)
21408 (uri (git-reference
21409 (url "https://github.com/oinume/iocapture")
21410 (commit commit)))
21411 (file-name (git-file-name name version))
21412 (sha256
21413 (base32
21414 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21415 (build-system python-build-system)
21416 (arguments
21417 `(#:phases
21418 (modify-phases %standard-phases
21419 (delete 'check)
21420 (add-after 'install 'check
21421 (lambda* (#:key inputs outputs #:allow-other-keys)
21422 (add-installed-pythonpath inputs outputs)
21423 (invoke "py.test" "-v" "tests")
21424 #t)))))
21425 (propagated-inputs
21426 `(("python-flexmock" ,python-flexmock)
21427 ("python-pytest" ,python-pytest)
21428 ("python-pytest-cov" ,python-pytest-cov)
21429 ("python-six" ,python-six)))
21430 (home-page "https://github.com/oinume/iocapture")
21431 (synopsis "Python capturing tool for stdout and stderr")
21432 (description
21433 "This package helps you to capture the standard out (stdout) and the
21434 standard error channel (stderr) in your program.")
21435 (license license:expat))))
21436
21437 (define-public python-argh
21438 ;; There are 21 commits since the latest release containing important
21439 ;; improvements.
21440 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21441 (revision "1"))
21442 (package
21443 (name "python-argh")
21444 (version (git-version "0.26.2" revision commit))
21445 (source
21446 (origin
21447 (method git-fetch)
21448 (uri (git-reference
21449 (url "https://github.com/neithere/argh")
21450 (commit commit)))
21451 (file-name (git-file-name name version))
21452 (sha256
21453 (base32
21454 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21455 (build-system python-build-system)
21456 (propagated-inputs
21457 `(("python-iocapture" ,python-iocapture)
21458 ("python-mock" ,python-mock)
21459 ("python-pytest" ,python-pytest)
21460 ("python-pytest-cov" ,python-pytest-cov)
21461 ("python-pytest-xdist" ,python-pytest-xdist)
21462 ("python-tox" ,python-tox)))
21463 (home-page "https://github.com/neithere/argh/")
21464 (synopsis "Argparse wrapper with natural syntax")
21465 (description
21466 "python-argh is a small library that provides several layers of
21467 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21468 always possible to declare a command with the highest possible (and least
21469 flexible) layer and then tune the behaviour with any of the lower layers
21470 including the native API of @code{python-argparse}.")
21471 (license license:lgpl3+))))
21472
21473 (define-public python-ppft
21474 (package
21475 (name "python-ppft")
21476 (version "1.6.6.1")
21477 (source
21478 (origin
21479 (method url-fetch)
21480 (uri (pypi-uri "ppft" version))
21481 (sha256
21482 (base32
21483 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21484 (build-system python-build-system)
21485 (arguments '(#:tests? #f)) ; there are none
21486 (propagated-inputs
21487 `(("python-six" ,python-six)))
21488 (home-page "https://pypi.org/project/ppft/")
21489 (synopsis "Fork of Parallel Python")
21490 (description
21491 "This package is a fork of Parallel Python. The Parallel Python
21492 module (@code{pp}) provides an easy and efficient way to create
21493 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21494 computers and clusters. It features cross-platform portability and dynamic
21495 load balancing.")
21496 (license license:bsd-3)))
21497
21498 (define-public python-pox
21499 (package
21500 (name "python-pox")
21501 (version "0.2.7")
21502 (source
21503 (origin
21504 (method url-fetch)
21505 (uri (pypi-uri "pox" version))
21506 (sha256
21507 (base32
21508 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21509 (build-system python-build-system)
21510 (arguments
21511 `(#:phases
21512 (modify-phases %standard-phases
21513 (replace 'check
21514 (lambda _
21515 (mkdir-p "/tmp/guix")
21516 (setenv "SHELL" "bash")
21517 (setenv "USERNAME" "guix")
21518 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21519 (invoke "py.test" "-vv")
21520 #t)))))
21521 (native-inputs
21522 `(("python-pytest" ,python-pytest)
21523 ("which" ,which)))
21524 (home-page "https://pypi.org/project/pox/")
21525 (synopsis "Python utilities for file system exploration and automated builds")
21526 (description
21527 "Pox provides a collection of utilities for navigating and manipulating
21528 file systems. This module is designed to facilitate some of the low-level
21529 operating system interactions that are useful when exploring a file system on a
21530 remote host. Pox provides Python equivalents of several shell commands such
21531 as @command{which} and @command{find}. These commands allow automated
21532 discovery of what has been installed on an operating system, and where the
21533 essential tools are located.")
21534 (license license:bsd-3)))
21535
21536 (define-public python-pathos
21537 (package
21538 (name "python-pathos")
21539 (version "0.2.5")
21540 (source
21541 (origin
21542 (method url-fetch)
21543 (uri (pypi-uri "pathos" version))
21544 (sha256
21545 (base32
21546 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21547 (build-system python-build-system)
21548 (arguments
21549 '(#:phases
21550 (modify-phases %standard-phases
21551 (replace 'check
21552 (lambda _
21553 (setenv "PYTHONPATH"
21554 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21555 (invoke "python" "./tests/__main__.py"))))))
21556 (propagated-inputs
21557 `(("python-dill" ,python-dill)
21558 ("python-multiprocess" ,python-multiprocess)
21559 ("python-pox" ,python-pox)
21560 ("python-ppft" ,python-ppft)))
21561 (native-inputs
21562 `(("python-pytest" ,python-pytest)))
21563 (home-page "https://pypi.org/project/pathos/")
21564 (synopsis
21565 "Parallel graph management and execution in heterogeneous computing")
21566 (description
21567 "Python-pathos is a framework for heterogeneous computing. It provides a
21568 consistent high-level interface for configuring and launching parallel
21569 computations across heterogeneous resources. Python-pathos provides configurable
21570 launchers for parallel and distributed computing, where each launcher contains
21571 the syntactic logic to configure and launch jobs in an execution environment.")
21572 (license license:bsd-3)))
21573
21574 (define-public python-flit
21575 (package
21576 (name "python-flit")
21577 (version "3.0.0")
21578 (source
21579 (origin
21580 (method url-fetch)
21581 (uri (pypi-uri "flit" version))
21582 (sha256
21583 (base32
21584 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21585 (build-system python-build-system)
21586 (arguments
21587 `(#:tests? #f)) ; XXX: Check requires network access.
21588 (home-page "https://flit.readthedocs.io/")
21589 (synopsis
21590 "Simple packaging tool for simple packages")
21591 (description
21592 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21593 packages a single importable module or package at a time, using the import
21594 name as the name on PyPI. All subpackages and data files within a package
21595 are included automatically.")
21596 (license license:bsd-3)))
21597
21598 (define-public python-pathtools
21599 (package
21600 (name "python-pathtools")
21601 (version "0.1.2")
21602 (source
21603 (origin
21604 (method url-fetch)
21605 (uri (pypi-uri "pathtools" version))
21606 (sha256
21607 (base32
21608 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21609 (build-system python-build-system)
21610 (home-page
21611 "https://github.com/gorakhargosh/pathtools")
21612 (synopsis "Path utilities for Python")
21613 (description "Pattern matching and various utilities for file systems
21614 paths.")
21615 (license license:expat)))
21616
21617 (define-public python-fastentrypoints
21618 (package
21619 (name "python-fastentrypoints")
21620 (version "0.12")
21621 (source
21622 (origin
21623 (method url-fetch)
21624 (uri (pypi-uri "fastentrypoints" version))
21625 (sha256
21626 (base32
21627 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21628 (build-system python-build-system)
21629 (home-page
21630 "https://github.com/ninjaaron/fast-entry_points")
21631 (synopsis
21632 "Makes entry_points specified in setup.py load more quickly")
21633 (description
21634 "Using entry_points in your setup.py makes scripts that start really
21635 slowly because it imports pkg_resources. This package allows such setup
21636 scripts to load entry points more quickly.")
21637 (license license:bsd-3)))
21638
21639 (define-public python-funcparserlib
21640 (package
21641 (name "python-funcparserlib")
21642 (version "0.3.6")
21643 (source
21644 (origin
21645 (method url-fetch)
21646 (uri (pypi-uri "funcparserlib" version))
21647 (sha256
21648 (base32
21649 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21650 (native-inputs
21651 `(("python-tox" ,python-tox)))
21652 (arguments
21653 `(#:phases
21654 (modify-phases %standard-phases
21655 (replace 'check
21656 (lambda _
21657 (invoke "tox"))))))
21658 (build-system python-build-system)
21659 (home-page
21660 "https://github.com/vlasovskikh/funcparserlib")
21661 (synopsis
21662 "Recursive descent parsing library based on functional combinators")
21663 (description
21664 "This package is a recursive descent parsing library for Python based on
21665 functional combinators. Parser combinators are just higher-order functions
21666 that take parsers as their arguments and return them as result values.")
21667 (license license:expat)))
21668
21669 (define-public python-speg
21670 (package
21671 (name "python-speg")
21672 (version "0.3")
21673 (source
21674 (origin
21675 (method url-fetch)
21676 (uri (pypi-uri "speg" version ".zip"))
21677 (sha256
21678 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21679 (arguments
21680 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21681 (native-inputs
21682 `(("unzip" ,unzip)))
21683 (build-system python-build-system)
21684 (home-page "https://github.com/avakar/speg")
21685 (synopsis "PEG-based parser interpreter with memoization")
21686 (description "This package is a PEG-based parser and interpreter with
21687 memoization.")
21688 (license license:expat)))
21689
21690 (define-public python-cson
21691 (package
21692 (name "python-cson")
21693 (version "0.8")
21694 (source
21695 (origin
21696 (method url-fetch)
21697 (uri (pypi-uri "cson" version))
21698 (sha256
21699 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21700 (build-system python-build-system)
21701 (propagated-inputs
21702 `(("python-speg" ,python-speg)))
21703 (home-page "https://github.com/avakar/pycson")
21704 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21705 (description "This package is a parser for Coffeescript Object
21706 Notation (CSON).")
21707 (license license:expat)))
21708
21709 (define-public python-asynctest
21710 (package
21711 (name "python-asynctest")
21712 (version "0.13.0")
21713 (source
21714 (origin
21715 (method url-fetch)
21716 (uri (pypi-uri "asynctest" version))
21717 (sha256
21718 (base32
21719 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21720 (build-system python-build-system)
21721 (arguments
21722 '(#:phases
21723 (modify-phases %standard-phases
21724 (replace 'check
21725 (lambda _
21726 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21727 (add-after 'unpack 'disable-tests
21728 (lambda* _
21729 ;; XXX: 7 tests fail out of 220. Disable them for now.
21730 (substitute* (list "test/test_selector.py"
21731 "test/test_mock.py")
21732 (("def test_events_watched_outside_test_are_ignored")
21733 "@unittest.skip('disabled by guix')
21734 def test_events_watched_outside_test_are_ignored")
21735 (("def test_awaited_from_autospec_mock.*" line)
21736 (string-append line " return True\n"))
21737 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21738 (string-append line " return True\n"))
21739 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21740 (string-append line " return True\n"))
21741 (("def test_multiple_patches_on_coroutine.*" line)
21742 (string-append line " return True\n"))
21743 (("def test_patch_coroutine_only_when_running.*" line)
21744 (string-append line " return True\n")))
21745 #t)))))
21746 (home-page "https://github.com/Martiusweb/asynctest")
21747 (synopsis "Extension of unittest for testing asyncio libraries")
21748 (description
21749 "The package asynctest is built on top of the standard unittest module
21750 and cuts down boilerplate code when testing libraries for asyncio.")
21751 (license license:asl2.0)))
21752
21753 (define-public python-aionotify
21754 (package
21755 (name "python-aionotify")
21756 (version "0.2.0")
21757 (source
21758 (origin
21759 ;; Source tarball on PyPi lacks tests
21760 (method git-fetch)
21761 (uri (git-reference
21762 (url "https://github.com/rbarrois/aionotify")
21763 (commit (string-append "v" version))))
21764 (file-name (git-file-name name version))
21765 (sha256
21766 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21767 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21768 (build-system python-build-system)
21769 (home-page "https://github.com/rbarrois/aionotify")
21770 (synopsis "Asyncio-powered inotify library")
21771 (description
21772 "@code{aionotify} is a simple, asyncio-based inotify library.")
21773 (license license:bsd-3)))
21774
21775 (define-public python-forbiddenfruit
21776 (package
21777 (name "python-forbiddenfruit")
21778 (version "0.1.3")
21779 (source
21780 (origin
21781 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21782 (method git-fetch)
21783 (uri (git-reference
21784 (url "https://github.com/clarete/forbiddenfruit")
21785 (commit version)))
21786 (file-name (git-file-name name version))
21787 (sha256
21788 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21789 (build-system python-build-system)
21790 (arguments
21791 '(#:phases
21792 (modify-phases %standard-phases
21793 (replace 'check
21794 (lambda _
21795 (invoke "make" "SKIP_DEPS=1"))))))
21796 (native-inputs
21797 `(("python-nose" ,python-nose)
21798 ("python-coverage" ,python-coverage)))
21799 (home-page "https://github.com/clarete/forbiddenfruit")
21800 (synopsis "Patch python built-in objects")
21801 (description "This project allows Python code to extend built-in types.")
21802 (license (list license:gpl3+ license:expat))))
21803
21804 (define-public python-k5test
21805 (package
21806 (name "python-k5test")
21807 (version "0.9.2")
21808 (source
21809 (origin
21810 (method url-fetch)
21811 (uri (pypi-uri "k5test" version))
21812 (sha256
21813 (base32
21814 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21815 (build-system python-build-system)
21816 (propagated-inputs
21817 `(("python-six" ,python-six)
21818 ;; `which`, `kadmin.local` binaries called inside library
21819 ("which" ,which)
21820 ("mit-krb5" ,mit-krb5)))
21821 (native-inputs `(("mit-krb5" ,mit-krb5)))
21822 (arguments
21823 '(#:phases
21824 (modify-phases %standard-phases
21825 (add-after 'unpack 'patch-paths
21826 (lambda* _
21827 (substitute* "k5test/realm.py"
21828 (("'kadmin_local'") "'kadmin.local'")))))))
21829 (home-page "https://github.com/pythongssapi/k5test")
21830 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21831 (description
21832 "@code{k5test} is a library for setting up self-contained Kerberos 5
21833 environments, and running Python unit tests inside those environments. It is
21834 based on the file of the same name found alongside the MIT Kerberos 5 unit
21835 tests.")
21836 (license license:isc)))
21837
21838 (define-public python-gssapi
21839 (package
21840 (name "python-gssapi")
21841 (version "1.6.12")
21842 (source
21843 (origin
21844 (method url-fetch)
21845 (uri (pypi-uri "gssapi" version))
21846 (sha256
21847 (base32
21848 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21849 (build-system python-build-system)
21850 (propagated-inputs
21851 `(("python-decorator" ,python-decorator)
21852 ("python-six" ,python-six)))
21853 (inputs
21854 `(("mit-krb5" ,mit-krb5)))
21855 ;; for tests
21856 (native-inputs
21857 `(("python-parameterized" ,python-parameterized)
21858 ("python-k5test" ,python-k5test)
21859 ("python-nose" ,python-nose)))
21860 (home-page "https://github.com/pythongssapi/python-gssapi")
21861 (synopsis "Python GSSAPI Wrapper")
21862 (description
21863 "Python-GSSAPI provides both low-level and high level wrappers around the
21864 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21865 also be usable with other GSSAPI mechanisms.")
21866 (license license:isc)))
21867
21868 (define-public python-check-manifest
21869 (package
21870 (name "python-check-manifest")
21871 (version "0.37")
21872 (source
21873 (origin
21874 (method url-fetch)
21875 (uri (pypi-uri "check-manifest" version))
21876 (sha256
21877 (base32
21878 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21879 (build-system python-build-system)
21880 (native-inputs
21881 `(("python-mock" ,python-mock)
21882 ("git" ,git)))
21883 (home-page "https://github.com/mgedmin/check-manifest")
21884 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21885 (description "Python package can include a MANIFEST.in file to help with
21886 sending package files to the Python Package Index. This package checks that
21887 file to ensure it completely and accurately describes your project.")
21888 (license license:expat)))
21889
21890 (define-public python-android-stringslib
21891 (package
21892 (name "python-android-stringslib")
21893 (version "0.1.2")
21894 (source
21895 (origin
21896 (method git-fetch)
21897 (uri (git-reference
21898 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21899 (commit (string-append "v" version))))
21900 (file-name (git-file-name name version))
21901 (sha256
21902 (base32
21903 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21904 (build-system python-build-system)
21905 (arguments
21906 `(#:tests? #f))
21907 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21908 (synopsis "Android strings.xml support")
21909 (description "Android Strings Lib provides support for android's strings.xml
21910 files. These files are used to translate strings in android apps.")
21911 (license license:expat)))
21912
21913 (define-public python-watchdog
21914 (package
21915 (name "python-watchdog")
21916 (version "0.9.0")
21917 (source
21918 (origin
21919 (method url-fetch)
21920 (uri (pypi-uri "watchdog" version))
21921 (sha256
21922 (base32
21923 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21924 (build-system python-build-system)
21925 (arguments
21926 `(#:phases
21927 (modify-phases %standard-phases
21928 (add-before 'check 'remove-failing
21929 (lambda _
21930 (delete-file "tests/test_inotify_buffer.py")
21931 (delete-file "tests/test_snapshot_diff.py")
21932 #t)))))
21933 (propagated-inputs
21934 `(("python-argh" ,python-argh)
21935 ("python-pathtools" ,python-pathtools)
21936 ("python-pyyaml" ,python-pyyaml)))
21937 (native-inputs
21938 `(("python-pytest-cov" ,python-pytest-cov)
21939 ("python-pytest-timeout" ,python-pytest-timeout)))
21940 (home-page "https://github.com/gorakhargosh/watchdog")
21941 (synopsis "File system events monitoring")
21942 (description "This package provides a way to monitor file system events
21943 such as a file modification and trigger an action. This is similar to inotify,
21944 but portable.")
21945 (license license:asl2.0)))
21946
21947 (define-public python-watchgod
21948 (package
21949 (name "python-watchgod")
21950 (version "0.6")
21951 (source
21952 (origin
21953 ;; There are no tests in the PyPI tarball.
21954 (method git-fetch)
21955 (uri (git-reference
21956 (url "https://github.com/samuelcolvin/watchgod")
21957 (commit (string-append "v" version))))
21958 (file-name (git-file-name name version))
21959 (sha256
21960 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21961 (build-system python-build-system)
21962 (arguments
21963 `(#:phases
21964 (modify-phases %standard-phases
21965 (replace 'check
21966 (lambda _
21967 (invoke "pytest" "-vv"))))))
21968 (native-inputs
21969 `(("python-coverage" ,python-coverage)
21970 ("python-docutils" ,python-docutils)
21971 ("python-flake8" ,python-flake8)
21972 ("python-isort" ,python-isort)
21973 ("python-pycodestyle" ,python-pycodestyle)
21974 ("python-pyflakes" ,python-pyflakes)
21975 ("python-pygments" ,python-pygments)
21976 ("python-pytest" ,python-pytest)
21977 ("python-pytest-cov" ,python-pytest-cov)
21978 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21979 ("python-pytest-mock" ,python-pytest-mock)
21980 ("python-pytest-sugar" ,python-pytest-sugar)
21981 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21982 (home-page "https://github.com/samuelcolvin/watchgod")
21983 (synopsis "Simple, modern file watching and code reload in Python")
21984 (description
21985 "Simple, modern file watching and code reload in Python inspired by
21986 @code{watchdog}. Among the differences are a unified approach for each
21987 operating systems and an elegant approach to concurrency using threading.")
21988 (license license:expat)))
21989
21990 (define-public python-wget
21991 (package
21992 (name "python-wget")
21993 (version "3.2")
21994 (source
21995 (origin
21996 (method url-fetch)
21997 (uri (pypi-uri "wget" version ".zip"))
21998 (sha256
21999 (base32
22000 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
22001 (build-system python-build-system)
22002 (native-inputs `(("unzip" ,unzip)))
22003 (home-page "https://bitbucket.org/techtonik/python-wget/")
22004 (synopsis "Pure Python download utility")
22005 (description "The python-wget library provides an API to download files
22006 with features similar to the @command{wget} utility.")
22007 (license license:unlicense)))
22008
22009 (define-public offlate
22010 (package
22011 (name "offlate")
22012 (version "0.5")
22013 (source
22014 (origin
22015 (method git-fetch)
22016 (uri (git-reference
22017 (url "https://framagit.org/tyreunom/offlate")
22018 (commit version)))
22019 (file-name (git-file-name name version))
22020 (sha256
22021 (base32
22022 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22023 (build-system python-build-system)
22024 (arguments
22025 ;; No tests
22026 `(#:tests? #f))
22027 (propagated-inputs
22028 `(("python-android-stringslib" ,python-android-stringslib)
22029 ("python-dateutil" ,python-dateutil)
22030 ("python-gitlab" ,python-gitlab)
22031 ("python-lxml" ,python-lxml)
22032 ("python-polib" ,python-polib)
22033 ("python-pyenchant" ,python-pyenchant)
22034 ("python-pygit2" ,python-pygit2)
22035 ("python-pygithub" ,python-pygithub)
22036 ("python-pyqt" ,python-pyqt)
22037 ("python-requests" ,python-requests)
22038 ("python-ruamel.yaml" ,python-ruamel.yaml)
22039 ("python-translation-finder" ,python-translation-finder)
22040 ("python-watchdog" ,python-watchdog)))
22041 (native-inputs
22042 `(("qttools" ,qttools)))
22043 (home-page "https://framagit.org/tyreunom/offlate")
22044 (synopsis "Offline translation interface for online translation tools")
22045 (description "Offlate offers a unified interface for different translation
22046 file formats, as well as many different online translation platforms. You can
22047 use it to get work from online platforms, specialized such as the Translation
22048 Project, or not such a gitlab instance when your upstream doesn't use any
22049 dedicated platform. The tool proposes a unified interface for any format and
22050 an upload option to send your work back to the platform.")
22051 (license license:gpl3+)))
22052
22053 (define-public python-titlecase
22054 (package
22055 (name "python-titlecase")
22056 (version "0.12.0")
22057 (source
22058 (origin
22059 (method url-fetch)
22060 (uri (pypi-uri "titlecase" version))
22061 (sha256
22062 (base32
22063 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22064 (build-system python-build-system)
22065 (native-inputs
22066 `(("python-nose" ,python-nose)))
22067 (home-page "https://github.com/ppannuto/python-titlecase")
22068 (synopsis "Capitalize strings similar to book titles")
22069 (description
22070 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22071 It capitalizes (predominantly English) strings in a way that is similar to
22072 book titles, using the New York Times Manual of Style to leave certain words
22073 lowercase.")
22074 (license license:expat)))
22075
22076 (define-public python-pypng
22077 (package
22078 (name "python-pypng")
22079 (version "0.0.20")
22080 (source
22081 (origin
22082 (method url-fetch)
22083 (uri (pypi-uri "pypng" version))
22084 (sha256
22085 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22086 (build-system python-build-system)
22087 (home-page "https://github.com/drj11/pypng")
22088 (synopsis "Pure Python PNG image encoder/decoder")
22089 (description
22090 "The PyPNG module implements support for PNG images. It reads and writes
22091 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22092 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22093 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22094 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22095 A number of optional chunks can be specified (when writing) and
22096 understood (when reading): tRNS, bKGD, gAMA.
22097
22098 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22099 aim at being a replacement or competitor. Its strength lies in fine-grained
22100 extensive support of PNG features. It can also read and write Netpbm PAM
22101 files, with a focus on its use as an intermediate format for implementing
22102 custom PNG processing.")
22103 (license license:expat)))
22104
22105 (define-public python-fuzzywuzzy
22106 (package
22107 (name "python-fuzzywuzzy")
22108 (version "0.18.0")
22109 (source
22110 (origin
22111 (method url-fetch)
22112 (uri (pypi-uri "fuzzywuzzy" version))
22113 (sha256
22114 (base32
22115 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22116 (build-system python-build-system)
22117 (native-inputs
22118 `(("python-hypothesis" ,python-hypothesis)
22119 ("python-pycodestyle" ,python-pycodestyle)
22120 ("python-pytest" ,python-pytest)))
22121 (propagated-inputs
22122 `(("python-levenshtein" ,python-levenshtein)))
22123 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22124 (synopsis "Fuzzy string matching in Python")
22125 (description "Approximate string matching using
22126 @emph{Levenshtein Distance} to calculate the differences between
22127 sequences.")
22128 (license license:gpl2)))
22129
22130 (define-public python2-fuzzywuzzy
22131 (package-with-python2 python-fuzzywuzzy))
22132
22133 (define-public python-block-tracing
22134 (package
22135 (name "python-block-tracing")
22136 (version "1.0.1")
22137 (source
22138 (origin
22139 (method url-fetch)
22140 (uri (pypi-uri "block_tracing" version))
22141 (sha256
22142 (base32
22143 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22144 (build-system python-build-system)
22145 (arguments '(#:tests? #f)) ; no tests
22146 (home-page "https://github.com/rianhunter/block_tracing")
22147 (synopsis "Protect process memory")
22148 (description
22149 "@code{block_tracing} is a tiny Python library that can be used to
22150 prevent debuggers and other applications from inspecting the memory within
22151 your process.")
22152 (license license:expat)))
22153
22154 (define-public python-gcovr
22155 (package
22156 (name "python-gcovr")
22157 (version "4.2")
22158 (source
22159 (origin
22160 (method url-fetch)
22161 (uri (pypi-uri "gcovr" version))
22162 (sha256
22163 (base32
22164 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22165 (build-system python-build-system)
22166 (propagated-inputs
22167 `(("python-lxml" ,python-lxml)
22168 ("python-jinja2" ,python-jinja2)))
22169 (home-page "https://gcovr.com/")
22170 (synopsis "Utility for generating code coverage results")
22171 (description
22172 "Gcovr provides a utility for managing the use of the GNU gcov
22173 utility and generating summarized code coverage results. It is inspired
22174 by the Python coverage.py package, which provides a similar utility for
22175 Python.")
22176 (license license:bsd-3)))
22177
22178 (define-public python-owslib
22179 (package
22180 (name "python-owslib")
22181 (version "0.19.2")
22182 (source
22183 (origin
22184 (method url-fetch)
22185 (uri (pypi-uri "OWSLib" version))
22186 (sha256
22187 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22188 (build-system python-build-system)
22189 (arguments
22190 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22191 (synopsis "Interface for Open Geospatial Consortium web service")
22192 (description
22193 "OWSLib is a Python package for client programming with Open Geospatial
22194 Consortium (OGC) web service (hence OWS) interface standards, and their related
22195 content models.")
22196 (home-page "https://geopython.github.io/OWSLib/")
22197 (license license:bsd-3)))
22198
22199 (define-public python-docusign-esign
22200 (package
22201 (name "python-docusign-esign")
22202 (version "3.1.0")
22203 (source (origin
22204 (method url-fetch)
22205 (uri (pypi-uri "docusign_esign" version))
22206 (sha256
22207 (base32
22208 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22209 (build-system python-build-system)
22210 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22211 (arguments `(#:tests? #f))
22212 (propagated-inputs
22213 `(("python-certifi" ,python-certifi)
22214 ("python-six" ,python-six)
22215 ("python-dateutil" ,python-dateutil)
22216 ("python-urllib3" ,python-urllib3)
22217 ("python-pyjwt" ,python-pyjwt)
22218 ("python-cryptography" ,python-cryptography)
22219 ("python-nose" ,python-nose)))
22220 (synopsis "DocuSign Python Client")
22221 (description "The Official DocuSign Python Client Library used to interact
22222 with the eSign REST API. Send, sign, and approve documents using this client.")
22223 (home-page "https://www.docusign.com/devcenter")
22224 (license license:expat)))
22225
22226 (define-public python-xattr
22227 (package
22228 (name "python-xattr")
22229 (version "0.9.7")
22230 (source
22231 (origin
22232 (method url-fetch)
22233 (uri (pypi-uri "xattr" version))
22234 (sha256
22235 (base32
22236 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22237 (build-system python-build-system)
22238 (propagated-inputs
22239 `(("python-cffi" ,python-cffi)))
22240 (home-page "https://github.com/xattr/xattr")
22241 (synopsis
22242 "Python wrapper for extended file system attributes")
22243 (description "This package provides a Python wrapper for using extended
22244 file system attributes. Extended attributes extend the basic attributes of files
22245 and directories in the file system. They are stored as name:data pairs
22246 associated with file system objects (files, directories, symlinks, etc).")
22247 (license license:expat)))
22248
22249 (define-public python-json-logger
22250 (package
22251 (name "python-json-logger")
22252 (version "0.1.11")
22253 (source
22254 (origin
22255 (method url-fetch)
22256 (uri (pypi-uri "python-json-logger" version))
22257 (sha256
22258 (base32
22259 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22260 (build-system python-build-system)
22261 (home-page
22262 "https://github.com/madzak/python-json-logger")
22263 (synopsis "JSON log formatter in Python")
22264 (description "This library allows standard Python logging to output log data
22265 as JSON objects. With JSON we can make our logs more readable by machines and
22266 we can stop writing custom parsers for syslog-type records.")
22267 (license license:bsd-3)))
22268
22269 (define-public python-daiquiri
22270 (package
22271 (name "python-daiquiri")
22272 (version "2.1.1")
22273 (source
22274 (origin
22275 (method url-fetch)
22276 (uri (pypi-uri "daiquiri" version))
22277 (sha256
22278 (base32
22279 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22280 (build-system python-build-system)
22281 (propagated-inputs
22282 `(("python-json-logger" ,python-json-logger)))
22283 (native-inputs
22284 `(("python-mock" ,python-mock)
22285 ("python-pytest" ,python-pytest)
22286 ("python-setuptools-scm" ,python-setuptools-scm)
22287 ("python-six" ,python-six)))
22288 (home-page "https://github.com/jd/daiquiri")
22289 (synopsis
22290 "Library to configure Python logging easily")
22291 (description "The daiquiri library provides an easy way to configure
22292 logging in Python. It also provides some custom formatters and handlers.")
22293 (license license:asl2.0)))
22294
22295 (define-public python-pifpaf
22296 (package
22297 (name "python-pifpaf")
22298 (version "2.5.0")
22299 (source
22300 (origin
22301 (method url-fetch)
22302 (uri (pypi-uri "pifpaf" version))
22303 (sha256
22304 (base32
22305 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22306 (build-system python-build-system)
22307 (arguments
22308 '(#:phases
22309 (modify-phases %standard-phases
22310 (replace 'check
22311 (lambda _
22312 (invoke "python" "setup.py" "testr" "--slowest"
22313 "--testr-args=until-failure"))))))
22314 (propagated-inputs
22315 `(("python-click" ,python-click)
22316 ("python-daiquiri" ,python-daiquiri)
22317 ("python-fixtures" ,python-fixtures)
22318 ("python-jinja2" ,python-jinja2)
22319 ("python-pbr" ,python-pbr)
22320 ("python-psutil" ,python-psutil)
22321 ("python-six" ,python-six)
22322 ("python-xattr" ,python-xattr)))
22323 (native-inputs
22324 `(("python-mock" ,python-mock)
22325 ("python-os-testr" ,python-os-testr)
22326 ("python-requests" ,python-requests)
22327 ("python-testrepository" ,python-testrepository)
22328 ("python-testtools" ,python-testtools)))
22329 (home-page "https://github.com/jd/pifpaf")
22330 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22331 (description "Pifpaf is a suite of fixtures and a command-line tool that
22332 starts and stops daemons for a quick throw-away usage. This is typically
22333 useful when needing these daemons to run integration testing. It originally
22334 evolved from its precursor @code{overtest}.")
22335 (license license:asl2.0)))
22336
22337 (define-public python-pytest-check-links
22338 (package
22339 (name "python-pytest-check-links")
22340 (version "0.3.0")
22341 (source
22342 (origin
22343 (method url-fetch)
22344 ;; URI uses underscores
22345 (uri (pypi-uri "pytest_check_links" version))
22346 (sha256
22347 (base32
22348 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22349 (build-system python-build-system)
22350 (propagated-inputs
22351 `(("python-docutils" ,python-docutils)
22352 ("python-html5lib" ,python-html5lib)
22353 ("python-nbconvert" ,python-nbconvert)
22354 ("python-nbformat" ,python-nbformat)
22355 ("python-pytest" ,python-pytest)
22356 ("python-six" ,python-six)))
22357 (native-inputs
22358 `(("python-pbr-minimal" ,python-pbr-minimal)))
22359 (home-page "https://github.com/minrk/pytest-check-links")
22360 (synopsis "Check links in files")
22361 (description "This package provides a pytest plugin that checks URLs for
22362 HTML-containing files.")
22363 (license license:bsd-3)))
22364
22365 (define-public python-json5
22366 (package
22367 (name "python-json5")
22368 (version "0.8.5")
22369 (source
22370 (origin
22371 ;; sample.json5 is missing from PyPi source tarball
22372 (method git-fetch)
22373 (uri (git-reference
22374 (url "https://github.com/dpranke/pyjson5")
22375 (commit (string-append "v" version))))
22376 (file-name (git-file-name name version))
22377 (sha256
22378 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22379 (build-system python-build-system)
22380 (home-page "https://github.com/dpranke/pyjson5")
22381 (synopsis
22382 "Python implementation of the JSON5 data format")
22383 (description
22384 "JSON5 extends the JSON data interchange format to make it slightly more
22385 usable as a configuration language. This Python package implements parsing and
22386 dumping of JSON5 data structures.")
22387 (license license:asl2.0)))
22388
22389 (define-public python-frozendict
22390 (package
22391 (name "python-frozendict")
22392 (version "1.2")
22393 (source
22394 (origin
22395 (method url-fetch)
22396 (uri (pypi-uri "frozendict" version))
22397 (sha256
22398 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22399 (build-system python-build-system)
22400 (home-page "https://github.com/slezica/python-frozendict")
22401 (synopsis "Simple immutable mapping for Python")
22402 (description
22403 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22404 implements the complete mapping interface. It can be used as a drop-in
22405 replacement for dictionaries where immutability is desired.")
22406 (license license:expat)))
22407
22408 (define-public python-unpaddedbase64
22409 (package
22410 (name "python-unpaddedbase64")
22411 (version "1.1.0")
22412 (source
22413 (origin
22414 (method git-fetch)
22415 (uri (git-reference
22416 (url "https://github.com/matrix-org/python-unpaddedbase64")
22417 (commit (string-append "v" version))))
22418 (file-name (git-file-name name version))
22419 (sha256
22420 (base32
22421 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22422 (build-system python-build-system)
22423 (home-page "https://pypi.org/project/unpaddedbase64/")
22424 (synopsis "Encode and decode Base64 without “=” padding")
22425 (description
22426 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22427 using “=” characters. However this conveys no benefit so many protocols
22428 choose to use Base64 without the “=” padding.")
22429 (license license:asl2.0)))
22430
22431 (define-public python-py-cpuinfo
22432 (package
22433 (name "python-py-cpuinfo")
22434 (version "5.0.0")
22435 (source
22436 (origin
22437 (method url-fetch)
22438 (uri (pypi-uri "py-cpuinfo" version))
22439 (sha256
22440 (base32
22441 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22442 (build-system python-build-system)
22443 (home-page "https://github.com/workhorsy/py-cpuinfo")
22444 (synopsis "Get CPU info with Python")
22445 (description
22446 "This Python module returns the CPU info by using the best sources of
22447 information for your operating system.")
22448 (license license:expat)))
22449
22450 (define-public python-canonicaljson
22451 (package
22452 (name "python-canonicaljson")
22453 (version "1.4.0")
22454 (source
22455 (origin
22456 (method url-fetch)
22457 (uri (pypi-uri "canonicaljson" version))
22458 (sha256
22459 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22460 (build-system python-build-system)
22461 (propagated-inputs
22462 `(("python-six" ,python-six)
22463 ("python-frozendict" ,python-frozendict)
22464 ("python-simplejson" ,python-simplejson)))
22465 (home-page "https://github.com/matrix-org/python-canonicaljson")
22466 (synopsis "Canonical JSON")
22467 (description
22468 "Deterministically encode JSON.
22469
22470 @itemize
22471 @item Encodes objects and arrays as RFC 7159 JSON.
22472 @item Sorts object keys so that you get the same result each time.
22473 @item Has no insignificant whitespace to make the output as small as possible.
22474 @item Escapes only the characters that must be escaped, U+0000 to
22475 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22476 @item Uses the shortest escape sequence for each escaped character.
22477 @item Encodes the JSON as UTF-8.
22478 @item Can encode frozendict immutable dictionaries.
22479 @end itemize")
22480 (license license:asl2.0)))
22481
22482 (define-public python-signedjson
22483 (package
22484 (name "python-signedjson")
22485 (version "1.1.1")
22486 (source
22487 (origin
22488 (method url-fetch)
22489 (uri (pypi-uri "signedjson" version))
22490 (sha256
22491 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22492 (build-system python-build-system)
22493 (propagated-inputs
22494 `(("python-canonicaljson" ,python-canonicaljson)
22495 ("python-importlib-metadata" ,python-importlib-metadata)
22496 ("python-pynacl" ,python-pynacl)
22497 ("python-typing-extensions" ,python-typing-extensions)
22498 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22499 (native-inputs
22500 `(("python-setuptools-scm" ,python-setuptools-scm)))
22501 (home-page "https://github.com/matrix-org/python-signedjson")
22502 (synopsis "Sign JSON objects with ED25519 signatures")
22503 (description
22504 "Sign JSON objects with ED25519 signatures.
22505
22506 @itemize
22507 @item More than one entity can sign the same object.
22508 @item Each entity can sign the object with more than one key making it easier to
22509 rotate keys
22510 @item ED25519 can be replaced with a different algorithm.
22511 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22512 key.
22513 @end itemize")
22514 (license license:asl2.0)))
22515
22516 (define-public python-daemonize
22517 (package
22518 (name "python-daemonize")
22519 (version "2.5.0")
22520 (source
22521 (origin
22522 (method url-fetch)
22523 (uri (pypi-uri "daemonize" version))
22524 (sha256
22525 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22526 (build-system python-build-system)
22527 (home-page "https://github.com/thesharp/daemonize")
22528 (synopsis "Library for writing system daemons in Python")
22529 (description "Daemonize is a library for writing system daemons in Python.")
22530 (license license:expat)))
22531
22532 (define-public python-pymacaroons
22533 (package
22534 (name "python-pymacaroons")
22535 (version "0.13.0")
22536 (source
22537 (origin
22538 (method url-fetch)
22539 (uri (pypi-uri "pymacaroons" version))
22540 (sha256
22541 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22542 (build-system python-build-system)
22543 (propagated-inputs
22544 `(("python-six" ,python-six)
22545 ("python-pynacl" ,python-pynacl)))
22546 (home-page "https://github.com/ecordell/pymacaroons")
22547 (synopsis "Python Macaroon Library")
22548 (description
22549 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22550 tokens, macaroons embed caveats that define specific authorization
22551 requirements for the target service, the service that issued the root macaroon
22552 and which is capable of verifying the integrity of macaroons it receives.
22553
22554 Macaroons allow for delegation and attenuation of authorization. They are
22555 simple and fast to verify, and decouple authorization policy from the
22556 enforcement of that policy.")
22557 (license license:expat)))
22558
22559 (define-public python-ldap3
22560 (package
22561 (name "python-ldap3")
22562 (version "2.7")
22563 (home-page "https://github.com/cannatag/ldap3")
22564 (source
22565 (origin
22566 (method git-fetch)
22567 (uri (git-reference (url home-page)
22568 (commit (string-append "v" version))))
22569 (file-name (git-file-name name version))
22570 (sha256
22571 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22572 (build-system python-build-system)
22573 (arguments
22574 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22575 #:phases (modify-phases %standard-phases
22576 (replace 'check
22577 (lambda* (#:key tests? #:allow-other-keys)
22578 (when tests?
22579 (invoke "nosetests" "-s" "test"))
22580 #t)))))
22581 (native-inputs
22582 `(("python-nose" ,python-nose)))
22583 (propagated-inputs
22584 `(("python-gssapi" ,python-gssapi)
22585 ("python-pyasn1" ,python-pyasn1)))
22586 (synopsis "Python LDAP client")
22587 (description
22588 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22589 library.")
22590 (license license:lgpl3+)))
22591
22592 (define-public python-boltons
22593 (package
22594 (name "python-boltons")
22595 (version "20.0.0")
22596 (source
22597 (origin
22598 (method url-fetch)
22599 (uri (pypi-uri "boltons" version))
22600 (sha256
22601 (base32
22602 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22603 (build-system python-build-system)
22604 (home-page "https://github.com/mahmoud/boltons")
22605 (synopsis "Extensions to the Python standard library")
22606 (description
22607 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22608 as — and yet conspicuously missing from — the standard library, including:
22609
22610 @itemize
22611 @item Atomic file saving, bolted on with fileutils
22612 @item A highly-optimized OrderedMultiDict, in dictutils
22613 @item Two types of PriorityQueue, in queueutils
22614 @item Chunked and windowed iteration, in iterutils
22615 @item Recursive data structure iteration and merging, with iterutils.remap
22616 @item Exponential backoff functionality, including jitter, through
22617 iterutils.backoff
22618 @item A full-featured TracebackInfo type, for representing stack traces, in
22619 tbutils
22620 @end itemize")
22621 (license license:bsd-3)))
22622
22623 (define-public python-eliot
22624 (package
22625 (name "python-eliot")
22626 (version "1.12.0")
22627 (source
22628 (origin
22629 (method url-fetch)
22630 (uri (pypi-uri "eliot" version))
22631 (sha256
22632 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22633 (build-system python-build-system)
22634 (arguments
22635 `(#:phases
22636 (modify-phases %standard-phases
22637 (add-after 'unpack 'remove-journald-support
22638 (lambda _
22639 (for-each delete-file
22640 '("eliot/tests/test_journald.py"
22641 "eliot/journald.py"))
22642 #t))
22643 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22644 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22645 ;; be installed and these tests should pass.
22646 (lambda _
22647 (delete-file "eliot/tests/test_prettyprint.py")
22648 #t)))))
22649 (propagated-inputs
22650 `(("python-boltons" ,python-boltons)
22651 ("python-pyrsistent" ,python-pyrsistent)
22652 ("python-six" ,python-six)
22653 ("python-zope-interface" ,python-zope-interface)))
22654 (native-inputs
22655 `(("python-black" ,python-black)
22656 ("python-coverage" ,python-coverage)
22657 ("python-dask" ,python-dask)
22658 ("python-flake8" ,python-flake8)
22659 ("python-hypothesis" ,python-hypothesis)
22660 ("python-pytest" ,python-pytest)
22661 ("python-setuptools" ,python-setuptools)
22662 ("python-sphinx" ,python-sphinx)
22663 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22664 ("python-testtools" ,python-testtools)
22665 ("python-twine" ,python-twine)
22666 ("python-twisted" ,python-twisted)))
22667 (home-page "https://github.com/itamarst/eliot/")
22668 (synopsis "Eliot: the logging system that tells you why it happened")
22669 (description
22670 "@dfn{eliot} is a Python logging system that outputs causal chains of
22671 actions: actions can spawn other actions, and eventually they either succeed
22672 or fail. The resulting logs tell you the story of what your software did: what
22673 happened, and what caused it.")
22674 (license license:asl2.0)))
22675
22676 (define-public python-pem
22677 (package
22678 (name "python-pem")
22679 (version "20.1.0")
22680 (source
22681 (origin
22682 (method url-fetch)
22683 (uri (pypi-uri "pem" version))
22684 (sha256
22685 (base32
22686 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22687 (build-system python-build-system)
22688 (native-inputs
22689 `(("python-certifi" ,python-certifi)
22690 ("python-coverage" ,python-coverage)
22691 ("python-pretend" ,python-pretend)
22692 ("python-pyopenssl" ,python-pyopenssl)
22693 ("python-pytest" ,python-pytest)
22694 ("python-sphinx" ,python-sphinx)
22695 ("python-twisted" ,python-twisted)))
22696 (home-page "https://pem.readthedocs.io/")
22697 (synopsis "Easy PEM file parsing in Python")
22698 (description
22699 "This package provides a Python module for parsing and splitting PEM files.")
22700 (license license:expat)))
22701
22702 (define-public python-txsni
22703 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22704 ;; Python and OpenSSL.
22705 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22706 (revision "0"))
22707 (package
22708 (name "python-txsni")
22709 (version (git-version "0.1.9" revision commit))
22710 (home-page "https://github.com/glyph/txsni")
22711 (source
22712 (origin
22713 (method git-fetch)
22714 (uri (git-reference (url home-page) (commit commit)))
22715 (file-name (git-file-name name version))
22716 (sha256
22717 (base32
22718 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22719 (build-system python-build-system)
22720 (propagated-inputs
22721 `(("python-pyopenssl" ,python-pyopenssl)
22722 ("python-service-identity" ,python-service-identity)
22723 ("python-twisted" ,python-twisted)))
22724 (synopsis "Run TLS servers with Twisted")
22725 (description
22726 "This package provides an easy-to-use SNI endpoint for use
22727 with the Twisted web framework.")
22728 (license license:expat))))
22729
22730 (define-public python-txacme
22731 (package
22732 (name "python-txacme")
22733 (version "0.9.2")
22734 (source
22735 (origin
22736 (method url-fetch)
22737 (uri (pypi-uri "txacme" version))
22738 (sha256
22739 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22740 (build-system python-build-system)
22741 (propagated-inputs
22742 `(("python-acme" ,python-acme)
22743 ("python-attrs" ,python-attrs)
22744 ("python-eliot" ,python-eliot)
22745 ("python-josepy" ,python-josepy)
22746 ("python-pem" ,python-pem)
22747 ("python-treq" ,python-treq)
22748 ("python-twisted" ,python-twisted)
22749 ("python-txsni" ,python-txsni)))
22750 (native-inputs
22751 `(("python-fixtures" ,python-fixtures)
22752 ("python-hypothesis" ,python-hypothesis)
22753 ("python-mock" ,python-mock)
22754 ("python-service-identity"
22755 ,python-service-identity)
22756 ("python-testrepository" ,python-testrepository)
22757 ("python-testscenarios" ,python-testscenarios)
22758 ("python-testtools" ,python-testtools)))
22759 (home-page "https://github.com/twisted/txacme")
22760 (synopsis "Twisted implexmentation of the ACME protocol")
22761 (description
22762 "ACME is Automatic Certificate Management Environment, a protocol that
22763 allows clients and certificate authorities to automate verification and
22764 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22765 Certificate Authority.
22766
22767 txacme is an implementation of the protocol for Twisted, the event-driven
22768 networking engine for Python.")
22769 (license license:expat)))
22770
22771 (define-public python-pysaml2
22772 (package
22773 (name "python-pysaml2")
22774 (version "6.5.1")
22775 (source
22776 (origin
22777 (method url-fetch)
22778 (uri (pypi-uri "pysaml2" version))
22779 (sha256
22780 (base32
22781 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22782 (build-system python-build-system)
22783 (propagated-inputs
22784 `(("python-cryptography" ,python-cryptography)
22785 ("python-dateutil" ,python-dateutil)
22786 ("python-defusedxml" ,python-defusedxml)
22787 ("python-importlib-resources"
22788 ,python-importlib-resources)
22789 ("python-pyopenssl" ,python-pyopenssl)
22790 ("python-pytz" ,python-pytz)
22791 ("python-requests" ,python-requests)
22792 ("python-six" ,python-six)
22793 ("python-xmlschema" ,python-xmlschema)))
22794 (home-page "https://idpy.org")
22795 (synopsis "Python implementation of SAML Version 2 Standard")
22796 (description
22797 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22798 It contains all necessary pieces for building a SAML2 service provider or
22799 an identity provider. The distribution contains examples of both.
22800
22801 This package was originally written to work in a WSGI environment, but
22802 there are extensions that allow you to use it with other frameworks.")
22803 (license license:asl2.0)))
22804
22805 (define-public python-click-plugins
22806 (package
22807 (name "python-click-plugins")
22808 (version "1.1.1")
22809 (source
22810 (origin
22811 (method url-fetch)
22812 (uri (pypi-uri "click-plugins" version))
22813 (sha256
22814 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22815 (build-system python-build-system)
22816 (native-inputs
22817 `(("python-pytest" ,python-pytest)))
22818 (propagated-inputs
22819 `(("python-click" ,python-click)))
22820 (synopsis "Extension for Click to register external CLI commands")
22821 (description "This package provides n extension module for Click to
22822 register external CLI commands via setuptools entry-points.")
22823 (home-page "https://github.com/click-contrib/click-plugins")
22824 (license license:bsd-3)))
22825
22826 (define-public python-diceware
22827 (package
22828 (name "python-diceware")
22829 (version "0.9.6")
22830 (source
22831 (origin
22832 (method url-fetch)
22833 (uri (pypi-uri "diceware" version))
22834 (sha256
22835 (base32
22836 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22837 (build-system python-build-system)
22838 (native-inputs
22839 `(("python-coverage" ,python-coverage)
22840 ("python-pytest" ,python-pytest)
22841 ("python-pytest-runner" ,python-pytest-runner)))
22842 (home-page "https://github.com/ulif/diceware/")
22843 (synopsis "Generates memorable passphrases")
22844 (description "This package generates passphrases by concatenating words
22845 randomly picked from wordlists. It supports several sources of
22846 randomness (including real life dice) and different wordlists (including
22847 cryptographically signed ones).")
22848 (license license:gpl3+)))
22849
22850 (define-public python-dictdiffer
22851 (package
22852 (name "python-dictdiffer")
22853 (version "0.8.1")
22854 (source (origin
22855 (method url-fetch)
22856 (uri (pypi-uri "dictdiffer" version))
22857 (sha256
22858 (base32
22859 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22860 (build-system python-build-system)
22861 (native-inputs
22862 `(("python-check-manifest" ,python-check-manifest)
22863 ("python-coverage" ,python-coverage)
22864 ("python-isort" ,python-isort)
22865 ("python-mock" ,python-mock)
22866 ("python-pydoctstyle" ,python-pydocstyle)
22867 ("python-pytest-cache" ,python-pytest-cache)
22868 ("python-pytest-cov" ,python-pytest-cov)
22869 ("python-pytest-pep8" ,python-pytest-pep8)
22870 ("python-pytest-runner" ,python-pytest-runner)
22871 ("python-pytest" ,python-pytest)
22872 ("python-setuptools-scm" ,python-setuptools-scm)
22873 ("python-tox" ,python-tox)))
22874 (home-page "https://github.com/inveniosoftware/dictdiffer")
22875 (synopsis "Diff and patch Python dictionary objects")
22876 (description
22877 "Dictdiffer is a Python module that helps you to diff and patch
22878 dictionaries.")
22879 (license license:expat)))
22880
22881 (define-public pyzo
22882 (package
22883 (name "pyzo")
22884 (version "4.11.2")
22885 (source
22886 (origin
22887 (method url-fetch)
22888 (uri (pypi-uri "pyzo" version))
22889 (sha256
22890 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22891 (build-system python-build-system)
22892 (arguments
22893 `(#:phases
22894 (modify-phases %standard-phases
22895 (add-before 'check 'fix-home-directory
22896 (lambda _
22897 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22898 (setenv "HOME" "/tmp")
22899 #t)))
22900 ;; Tests fail with "Uncaught Python exception: python: undefined
22901 ;; symbol: objc_getClass".
22902 #:tests? #f))
22903 (propagated-inputs
22904 `(("python-pyqt" ,python-pyqt)))
22905 (home-page "https://pyzo.org")
22906 (synopsis
22907 "Python IDE for scientific computing")
22908 (description
22909 "Pyzo is a Python IDE focused on interactivity and introspection,
22910 which makes it very suitable for scientific computing. Its practical
22911 design is aimed at simplicity and efficiency.
22912
22913 It consists of two main components, the editor and the shell, and uses
22914 a set of pluggable tools to help the programmer in various ways. Some
22915 example tools are source structure, project manager, interactive help,
22916 workspace...")
22917 (license license:bsd-2)))
22918
22919 (define-public python-osc
22920 (package
22921 (name "python-osc")
22922 (version "1.7.4")
22923 (source
22924 (origin
22925 (method url-fetch)
22926 (uri (pypi-uri "python-osc" version))
22927 (sha256
22928 (base32
22929 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22930 (build-system python-build-system)
22931 (home-page "https://github.com/attwad/python-osc")
22932 (synopsis "Open Sound Control server and client implementations")
22933 (description
22934 "@code{python-osc} is a pure Python library with no external
22935 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22936 Open Sound Control 1.0} specification.")
22937 (license license:unlicense)))
22938
22939 (define-public python-voluptuous
22940 (package
22941 (name "python-voluptuous")
22942 (version "0.11.7")
22943 (source
22944 (origin
22945 (method url-fetch)
22946 (uri (pypi-uri "voluptuous" version))
22947 (sha256
22948 (base32
22949 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22950 (build-system python-build-system)
22951 (native-inputs
22952 `(("python-nose" ,python-nose)))
22953 (home-page "https://github.com/alecthomas/voluptuous")
22954 (synopsis "Python data validation library")
22955 (description
22956 "Voluptuous is a Python data validation library. It is primarily
22957 intended for validating data coming into Python as JSON, YAML, etc.")
22958 (license license:bsd-3)))
22959
22960 (define-public python-cmd2
22961 (package
22962 (name "python-cmd2")
22963 (version "1.0.2")
22964 (source
22965 (origin
22966 (method url-fetch)
22967 (uri (pypi-uri "cmd2" version))
22968 (sha256
22969 (base32
22970 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22971 (build-system python-build-system)
22972 (propagated-inputs
22973 `(("python-attrs" ,python-attrs)
22974 ("python-colorama" ,python-colorama)
22975 ("python-pyperclip" ,python-pyperclip)
22976 ("python-wcwidth" ,python-wcwidth)))
22977 (native-inputs
22978 `(("python-codecov" ,python-codecov)
22979 ("python-coverage" ,python-coverage)
22980 ("python-doc8" ,python-doc8)
22981 ("python-flake8" ,python-flake8)
22982 ("python-invoke" ,python-invoke)
22983 ("python-mock" ,python-mock)
22984 ("python-pytest" ,python-pytest)
22985 ("python-pytest-cov" ,python-pytest-cov)
22986 ("python-pytest-mock" ,python-pytest-mock)
22987 ("python-setuptools-scm" ,python-setuptools-scm)
22988 ("python-sphinx" ,python-sphinx)
22989 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22990 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22991 ("python-tox" ,python-tox)
22992 ("python-twine" ,python-twine)
22993 ("which" ,which)))
22994 (home-page "https://github.com/python-cmd2/cmd2")
22995 (synopsis "Tool for building interactive command line applications")
22996 (description
22997 "Cmd2 is a tool for building interactive command line applications in
22998 Python. Its goal is to make it quick and easy for developers to build
22999 feature-rich and user-friendly interactive command line applications. It
23000 provides a simple API which is an extension of Python's built-in @code{cmd}
23001 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
23002 make your life easier and eliminates much of the boilerplate code which would
23003 be necessary when using @code{cmd}.")
23004 (license license:expat)))
23005
23006 (define-public python-pytidylib
23007 (package
23008 (name "python-pytidylib")
23009 (version "0.3.2")
23010 (source (origin
23011 (method url-fetch)
23012 (uri (pypi-uri "pytidylib" version))
23013 (sha256
23014 (base32
23015 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23016 (build-system python-build-system)
23017 (arguments
23018 '(#:phases
23019 (modify-phases %standard-phases
23020 (add-before 'build 'qualify-libtidy
23021 (lambda* (#:key inputs #:allow-other-keys)
23022 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23023 "/lib/libtidy.so")))
23024 (substitute* "tidylib/tidy.py"
23025 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23026 (format #f "'~a'" libtidy)))
23027 #t))))))
23028 (inputs `(("tidy" ,tidy)))
23029 (home-page "https://github.com/countergram/pytidylib")
23030 (synopsis "Python wrapper for HTML Tidy library")
23031 (description
23032 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23033 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23034 (license license:expat)))
23035
23036 (define-public python2-pytidylib
23037 (package-with-python2 python-pytidylib))
23038
23039 (define-public python-mujson
23040 (package
23041 (name "python-mujson")
23042 (version "1.4")
23043 (source
23044 (origin
23045 (method url-fetch)
23046 (uri (pypi-uri "mujson" version))
23047 (sha256
23048 (base32
23049 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23050 (build-system python-build-system)
23051 (home-page "https://github.com/mattgiles/mujson")
23052 (synopsis "Use the fastest JSON functions available at import time")
23053 (description "This package selects the fastest JSON functions available
23054 at import time.")
23055 (license license:expat)))
23056
23057 (define-public python-bashlex
23058 (package
23059 (name "python-bashlex")
23060 (version "0.14")
23061 (source
23062 (origin
23063 (method url-fetch)
23064 (uri (pypi-uri "bashlex" version))
23065 (sha256
23066 (base32
23067 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23068 (build-system python-build-system)
23069 (arguments
23070 `(#:phases
23071 (modify-phases %standard-phases
23072 (add-before 'build 'pregenerate-yacc-tables
23073 (lambda _
23074 ;; parser.py caches tables, which attempts to write to site lib
23075 ;; see https://github.com/idank/bashlex/issues/51
23076 (invoke "python" "-c" "import bashlex"))))))
23077 (home-page
23078 "https://github.com/idank/bashlex")
23079 (synopsis "Python parser for bash")
23080 (description "@code{bashlex} is a Python port of the parser used
23081 internally by GNU bash.
23082
23083 For the most part it's transliterated from C, the major differences are:
23084
23085 @itemize
23086 @item it does not execute anything
23087 @item it is reentrant
23088 @item it generates a complete AST
23089 @end itemize
23090 ")
23091 (license license:gpl3+)))
23092
23093 (define-public python-jinxed
23094 (package
23095 (name "python-jinxed")
23096 (version "1.0.0")
23097 (source
23098 (origin
23099 (method url-fetch)
23100 (uri (pypi-uri "jinxed" version))
23101 (sha256
23102 (base32
23103 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23104 (build-system python-build-system)
23105 (arguments
23106 '(#:phases
23107 (modify-phases %standard-phases
23108 (add-before 'check 'set-environment-variables
23109 (lambda* (#:key inputs #:allow-other-keys)
23110 (let ((ncurses (assoc-ref inputs "ncurses")))
23111 (setenv "TERM" "LINUX")
23112 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23113 #t))))
23114 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23115 (native-inputs
23116 `(("ncurses" ,ncurses)))
23117 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23118 (synopsis "Jinxed Terminal Library")
23119 (description
23120 "Jinxed is an implementation of a subset of the Python curses library.")
23121 (license license:mpl2.0)))
23122
23123 (define-public python-blessed
23124 (package
23125 (name "python-blessed")
23126 (version "1.17.8")
23127 (source
23128 (origin
23129 (method url-fetch)
23130 (uri (pypi-uri "blessed" version))
23131 (sha256
23132 (base32
23133 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23134 (modules '((guix build utils)))
23135 (snippet
23136 '(begin
23137 ;; Don't get hung up on Windows test failures.
23138 (delete-file "blessed/win_terminal.py") #t))))
23139 (build-system python-build-system)
23140 (propagated-inputs
23141 `(("python-jinxed" ,python-jinxed)
23142 ("python-six" ,python-six)
23143 ("python-wcwidth" ,python-wcwidth)))
23144 (native-inputs
23145 `(("python-mock" ,python-mock)
23146 ("python-pytest" ,python-pytest)))
23147 (home-page "https://github.com/jquast/blessed")
23148 (synopsis "Wrapper around terminal capabilities")
23149 (description
23150 "Blessed is a thin, practical wrapper around terminal styling, screen
23151 positioning, and keyboard input.")
23152 (license license:expat)))
23153
23154 (define-public python-readme-renderer
23155 (package
23156 (name "python-readme-renderer")
23157 (version "26.0")
23158 (source
23159 (origin
23160 (method url-fetch)
23161 (uri (pypi-uri "readme_renderer" version))
23162 (sha256
23163 (base32
23164 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23165 (build-system python-build-system)
23166 (propagated-inputs
23167 `(("python-bleach" ,python-bleach)
23168 ("python-docutils" ,python-docutils)
23169 ("python-pygments" ,python-pygments)
23170 ("python-six" ,python-six)))
23171 (native-inputs
23172 `(("python-mock" ,python-mock)
23173 ("python-pytest" ,python-pytest)))
23174 (home-page "https://github.com/pypa/readme_renderer")
23175 (synopsis "Render README files in Warehouse")
23176 (description
23177 "Readme Renderer is a library that will safely render arbitrary README
23178 files into HTML. It is designed to be used in Warehouse to render the
23179 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23180 and plain text.")
23181 (license license:asl2.0)))
23182
23183 (define-public python-lazr-delegates
23184 (package
23185 (name "python-lazr-delegates")
23186 (version "2.0.4")
23187 (source
23188 (origin
23189 (method url-fetch)
23190 (uri (pypi-uri "lazr.delegates" version))
23191 (sha256
23192 (base32
23193 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23194 (build-system python-build-system)
23195 (arguments
23196 '(#:phases
23197 (modify-phases %standard-phases
23198 (replace 'check
23199 (lambda _
23200 (invoke "python" "setup.py" "nosetests"))))))
23201 (native-inputs
23202 `(("python-nose" ,python-nose)))
23203 (propagated-inputs
23204 `(("python-zope-interface" ,python-zope-interface)))
23205 (home-page "https://launchpad.net/lazr.delegates")
23206 (synopsis "Easily write objects that delegate behavior")
23207 (description
23208 "The @code{lazr.delegates} package makes it easy to write objects that
23209 delegate behavior to another object. The new object adds some property or
23210 behavior on to the other object, while still providing the underlying interface,
23211 and delegating behavior.")
23212 (license license:lgpl3)))
23213
23214 (define-public python-lazr-config
23215 (package
23216 (name "python-lazr-config")
23217 (version "2.2.2")
23218 (source
23219 (origin
23220 (method url-fetch)
23221 (uri (pypi-uri "lazr.config" version))
23222 (sha256
23223 (base32
23224 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23225 (build-system python-build-system)
23226 (arguments
23227 '(#:phases
23228 (modify-phases %standard-phases
23229 (replace 'check
23230 (lambda _
23231 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23232 (native-inputs
23233 `(("python-nose" ,python-nose)))
23234 (propagated-inputs
23235 `(("python-lazr-delegates" ,python-lazr-delegates)
23236 ("python-zope-interface" ,python-zope-interface)))
23237 (home-page "https://launchpad.net/lazr.config")
23238 (synopsis "Create configuration schemas and process and validate configurations")
23239 (description
23240 "The LAZR config system is typically used to manage process configuration.
23241 Process configuration is for saying how things change when we run systems on
23242 different machines, or under different circumstances. This system uses ini-like
23243 file format of section, keys, and values. The config file supports inheritance
23244 to minimize duplication of information across files. The format supports schema
23245 validation.")
23246 (license license:lgpl3)))
23247
23248 (define-public python-flufl-bounce
23249 (package
23250 (name "python-flufl-bounce")
23251 (version "3.0.1")
23252 (source
23253 (origin
23254 (method url-fetch)
23255 (uri (pypi-uri "flufl.bounce" version))
23256 (sha256
23257 (base32
23258 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23259 (build-system python-build-system)
23260 (propagated-inputs
23261 `(("python-atpublic" ,python-atpublic)
23262 ("python-zope-interface" ,python-zope-interface)))
23263 (native-inputs
23264 `(("python-nose2" ,python-nose2)))
23265 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23266 (synopsis "Email bounce detectors")
23267 (description "The @code{flufl.bounce} library provides a set of heuristics
23268 and an API for detecting the original bouncing email addresses from a bounce
23269 message. Many formats found in the wild are supported, as are VERP and
23270 RFC 3464.")
23271 (license (list license:asl2.0
23272 license:lgpl3)))) ; only for setup_headers.py
23273
23274 (define-public python-flufl-i18n
23275 (package
23276 (name "python-flufl-i18n")
23277 (version "3.0")
23278 (source
23279 (origin
23280 (method url-fetch)
23281 (uri (pypi-uri "flufl.i18n" version))
23282 (sha256
23283 (base32
23284 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23285 (build-system python-build-system)
23286 (propagated-inputs
23287 `(("python-atpublic" ,python-atpublic)))
23288 (home-page "https://flufli18n.readthedocs.io")
23289 (synopsis "API for Python internationalization")
23290 (description
23291 "This package provides a high-level, convenient API for managing
23292 internationalization/translation contexts in Python applications. There is a
23293 simple API for single-context applications, such as command line scripts which
23294 only need to translate into one language during the entire course of their
23295 execution. There is a more flexible, but still convenient API for multi-context
23296 applications, such as servers, which may need to switch language contexts for
23297 different tasks.")
23298 (license license:asl2.0)))
23299
23300 (define-public python-flufl-lock
23301 (package
23302 (name "python-flufl-lock")
23303 (version "4.0")
23304 (source
23305 (origin
23306 (method url-fetch)
23307 (uri (pypi-uri "flufl.lock" version))
23308 (sha256
23309 (base32
23310 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23311 (build-system python-build-system)
23312 (propagated-inputs
23313 `(("python-atpublic" ,python-atpublic)
23314 ("python-psutil" ,python-psutil)))
23315 (home-page "https://flufllock.readthedocs.io")
23316 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23317 (description
23318 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23319 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23320 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23321 and have a maximum lifetime built-in.")
23322 (license (list license:asl2.0
23323 license:lgpl3)))) ; only for setup_helpers.py
23324
23325 (define-public python-flufl-testing
23326 (package
23327 (name "python-flufl-testing")
23328 (version "0.8")
23329 (source
23330 (origin
23331 (method url-fetch)
23332 (uri (pypi-uri "flufl.testing" version))
23333 (sha256
23334 (base32
23335 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23336 (build-system python-build-system)
23337 (native-inputs
23338 `(("python-nose2" ,python-nose2)))
23339 (home-page "https://gitlab.com/warsaw/flufl.testing")
23340 (synopsis "Collection of test tool plugins")
23341 (description
23342 "This package contains a small collection of test tool plugins for
23343 @code{nose2} and @code{flake8}.")
23344 (license license:asl2.0)))
23345
23346 (define-public python-devtools
23347 (package
23348 (name "python-devtools")
23349 (version "0.6")
23350 (source
23351 (origin
23352 (method git-fetch)
23353 (uri (git-reference
23354 (url "https://github.com/samuelcolvin/python-devtools")
23355 (commit (string-append "v" version))))
23356 (file-name (git-file-name name version))
23357 (sha256
23358 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23359 (build-system python-build-system)
23360 (native-inputs
23361 `(("python-pytest" ,python-pytest)
23362 ("python-pytest-mock" ,python-pytest-mock)))
23363 (propagated-inputs
23364 `(("python-pygments" ,python-pygments)))
23365 (arguments
23366 `(#:phases (modify-phases %standard-phases
23367 (replace 'check
23368 (lambda _
23369 (invoke "pytest")
23370 #t)))))
23371 (home-page "https://github.com/samuelcolvin/python-devtools")
23372 (synopsis "Debug command and development tools")
23373 (description
23374 "This package provides a debug print command and other development tools.
23375 It adds a simple and readable way to print stuff during development.")
23376 (license license:expat)))
23377
23378 (define-public python-dateparser
23379 (package
23380 (name "python-dateparser")
23381 (version "0.7.6")
23382 (source
23383 (origin
23384 (method url-fetch)
23385 (uri (pypi-uri "dateparser" version))
23386 (sha256
23387 (base32
23388 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23389 (build-system python-build-system)
23390 (propagated-inputs
23391 `(("python-dateutil" ,python-dateutil)
23392 ("python-pytz" ,python-pytz)
23393 ("python-regex" ,python-regex)
23394 ("python-ruamel.yaml" ,python-ruamel.yaml)
23395 ("python-tzlocal" ,python-tzlocal)))
23396 (native-inputs
23397 `(("python-mock" ,python-mock)
23398 ("python-parameterized" ,python-parameterized)
23399 ("tzdata" ,tzdata-for-tests)))
23400 (arguments
23401 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23402 #:tests? #f
23403 #:phases
23404 (modify-phases %standard-phases
23405 (add-before 'check 'set-check-environment
23406 (lambda* (#:key inputs #:allow-other-keys)
23407 (setenv "TZ" "UTC")
23408 (setenv "TZDIR"
23409 (string-append (assoc-ref inputs "tzdata")
23410 "/share/zoneinfo"))
23411 #t)))))
23412 (home-page "https://github.com/scrapinghub/dateparser")
23413 (synopsis
23414 "Date parsing library designed to parse dates from HTML pages")
23415 (description
23416 "@code{python-dateparser} provides modules to easily parse localized
23417 dates in almost any string formats commonly found on web pages.")
23418 (license license:bsd-3)))
23419
23420 (define-public python-dparse
23421 (package
23422 (name "python-dparse")
23423 (version "0.5.1")
23424 (source
23425 (origin
23426 (method url-fetch)
23427 (uri (pypi-uri "dparse" version))
23428 (sha256
23429 (base32
23430 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23431 (build-system python-build-system)
23432 (native-inputs
23433 `(("python-pytest" ,python-pytest)))
23434 (propagated-inputs
23435 `(("python-packaging" ,python-packaging)
23436 ("python-pyyaml" ,python-pyyaml)
23437 ("python-toml" ,python-toml)))
23438 (home-page "https://github.com/pyupio/dparse")
23439 (synopsis "Parser for Python dependency files")
23440 (description "This package provides a parser for Python dependency files.")
23441 (license license:expat)))
23442
23443 (define-public python-dpath
23444 (package
23445 (name "python-dpath")
23446 (version "2.0.1")
23447 (source
23448 (origin
23449 (method url-fetch)
23450 (uri (pypi-uri "dpath" version))
23451 (sha256
23452 (base32
23453 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23454 (build-system python-build-system)
23455 (native-inputs
23456 `(("python-hypothesis" ,python-hypothesis)
23457 ("python-mock" ,python-mock)
23458 ("python-nose" ,python-nose)))
23459 (arguments
23460 '(#:phases
23461 (modify-phases %standard-phases
23462 (replace 'check
23463 (lambda* (#:key inputs outputs #:allow-other-keys)
23464 (add-installed-pythonpath inputs outputs)
23465 ;; This invokation is taken from tox.ini.
23466 (invoke "nosetests" "-d" "-v" "tests/"))))))
23467 (home-page "https://github.com/akesterson/dpath-python")
23468 (synopsis "Filesystem-like pathing and searching for dictionaries")
23469 (description
23470 "@code{python-dpath} is a library for accessing and searching
23471 dictionaries via /slashed/paths ala xpath.
23472
23473 Basically it lets you glob over a dictionary as if it were a filesystem. It
23474 allows you to specify globs (ala the bash eglob syntax, through some advanced
23475 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23476 facility for filtering those results.")
23477 (license license:expat)))
23478
23479 (define-public python-safety
23480 (package
23481 (name "python-safety")
23482 (version "1.9.0")
23483 (source
23484 (origin
23485 (method url-fetch)
23486 (uri (pypi-uri "safety" version))
23487 (sha256
23488 (base32
23489 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23490 (build-system python-build-system)
23491 (arguments
23492 `(#:phases
23493 (modify-phases %standard-phases
23494 (add-after 'unpack 'disable-tests
23495 (lambda _
23496 (substitute* "tests/test_safety.py"
23497 ;; requires network
23498 (("def test_check_live") "def _test_check_live"))
23499 #t)))))
23500 (propagated-inputs
23501 `(("python-click" ,python-click)
23502 ("python-dparse" ,python-dparse)
23503 ("python-packaging" ,python-packaging)
23504 ("python-requests" ,python-requests)))
23505 (home-page "https://github.com/pyupio/safety")
23506 (synopsis "Check installed dependencies for known vulnerabilities")
23507 (description "Safety checks installed dependencies for known vulnerabilities.
23508 By default it uses the open Python vulnerability database Safety DB.")
23509 (license license:expat)))
23510
23511 (define-public python-pypandoc
23512 (package
23513 (name "python-pypandoc")
23514 (version "1.5")
23515 (source
23516 (origin
23517 (method url-fetch)
23518 (uri (pypi-uri "pypandoc" version))
23519 (sha256
23520 (base32
23521 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23522 (build-system python-build-system)
23523 (inputs
23524 `(("pandoc" ,pandoc)
23525 ("pandoc-citeproc" ,pandoc-citeproc)))
23526 (propagated-inputs
23527 `(("wheel" ,python-wheel)))
23528 (native-inputs
23529 `(("texlive" ,(texlive-union (list texlive-amsfonts
23530 texlive-fonts-ec
23531 texlive-latex-hyperref
23532 texlive-latex-oberdiek
23533 texlive-lm
23534 texlive-xcolor)))))
23535 (arguments
23536 `(#:phases
23537 (modify-phases %standard-phases
23538 (add-before 'check 'disable-tests
23539 (lambda _
23540 ;; Disable test requiring network access
23541 (substitute* "tests.py"
23542 (("test_basic_conversion_from_http_url")
23543 "skip_test_basic_conversion_from_http_url"))
23544 ;; Needed by texlive-union to generate fonts
23545 (setenv "HOME" "/tmp")
23546 #t)))))
23547 (home-page "https://github.com/bebraw/pypandoc")
23548 (synopsis "Python wrapper for pandoc")
23549 (description "pypandoc is a thin Python wrapper around pandoc
23550 and pandoc-citeproc.")
23551 (license license:expat)))
23552
23553 (define-public python-rnc2rng
23554 (package
23555 (name "python-rnc2rng")
23556 (version "2.6.4")
23557 (source
23558 (origin
23559 (method url-fetch)
23560 (uri (pypi-uri "rnc2rng" version))
23561 (sha256
23562 (base32
23563 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23564 (build-system python-build-system)
23565 (propagated-inputs
23566 `(("python-rply" ,python-rply)))
23567 (arguments
23568 `(#:phases (modify-phases %standard-phases
23569 (replace 'check
23570 (lambda _
23571 (invoke "python" "test.py"))))))
23572 (home-page "https://github.com/djc/rnc2rng")
23573 (synopsis "Convert RELAX NG Compact to regular syntax")
23574 (description
23575 "This package provides the @command{rnc2rng} command-line tool as well as
23576 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23577 equivalent schemata in the XML-based default RELAX NG syntax.")
23578 (license license:expat)))
23579
23580 (define-public python-telethon
23581 (package
23582 (name "python-telethon")
23583 (version "1.17.5")
23584 (source
23585 (origin
23586 (method git-fetch)
23587 (uri (git-reference
23588 (url "https://github.com/LonamiWebs/Telethon")
23589 (commit (string-append "v" version))))
23590 (file-name (git-file-name name version))
23591 (sha256
23592 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23593 (build-system python-build-system)
23594 (arguments
23595 '(#:phases
23596 (modify-phases %standard-phases
23597 (replace 'check
23598 (lambda* (#:key tests? #:allow-other-keys)
23599 (when tests?
23600 (invoke "py.test" "-v"))
23601 #t)))))
23602 (propagated-inputs
23603 `(("python-rsa" ,python-rsa)
23604 ("python-pyaes" ,python-pyaes)))
23605 (native-inputs
23606 `(("python-pytest" ,python-pytest)
23607 ("python-pytest-asyncio" ,python-pytest-asyncio)
23608 ("python-pytest-trio" ,python-pytest-trio)))
23609 (home-page "https://docs.telethon.dev")
23610 (synopsis "Full-featured Telegram client library for Python 3")
23611 (description "This library is designed to make it easy to write Python
23612 programs that can interact with Telegram.")
23613 (license license:expat)))
23614
23615 (define-public python-citeproc-py
23616 (package
23617 (name "python-citeproc-py")
23618 (version "0.5.1")
23619 (source
23620 (origin
23621 (method url-fetch)
23622 (uri (pypi-uri "citeproc-py" version))
23623 (sha256
23624 (base32
23625 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23626 (build-system python-build-system)
23627 (propagated-inputs
23628 `(("python-lxml" ,python-lxml)
23629 ("python-rnc2rng" ,python-rnc2rng)))
23630 (home-page
23631 "https://github.com/brechtm/citeproc-py")
23632 (synopsis "Citations and bibliography formatter")
23633 (description
23634 "Citeproc-py is a CSL processor for Python. It aims to implement the
23635 CSL 1.0.1 specification. citeproc-py can output styled citations and
23636 bibliographies in a number of different output formats. Currently supported
23637 are plain text, reStructuredText and HTML.")
23638 (license license:bsd-2)))
23639
23640 (define-public python-inform
23641 (package
23642 (name "python-inform")
23643 (version "1.23.0")
23644 (source
23645 (origin
23646 (method url-fetch)
23647 (uri (pypi-uri "inform" version))
23648 (sha256
23649 (base32
23650 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23651 (build-system python-build-system)
23652 (arguments
23653 `(#:tests? #f)) ; PyPI tarball lacks tests
23654 (native-inputs
23655 `(("python-hypothesis" ,python-hypothesis)
23656 ("python-pytest-cov" ,python-pytest-cov)
23657 ("python-pytest-runner" ,python-pytest-runner)))
23658 (propagated-inputs
23659 `(("python-arrow" ,python-arrow)
23660 ("python-six" ,python-six)))
23661 (home-page "https://inform.readthedocs.io")
23662 (synopsis "Print & logging utilities for communicating with user")
23663 (description
23664 "Inform is designed to display messages from programs that are typically run from
23665 a console. It provides a collection of ‘print’ functions that allow you to simply and
23666 cleanly print different types of messages.")
23667 (license license:gpl3+)))
23668
23669 (define-public python-nestedtext
23670 (package
23671 (name "python-nestedtext")
23672 (version "1.0.0")
23673 (source
23674 (origin
23675 (method url-fetch)
23676 (uri (pypi-uri "nestedtext" version))
23677 (sha256
23678 (base32
23679 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23680 (build-system python-build-system)
23681 (arguments
23682 `(#:tests? #f)) ; PyPI tarball lacks tests
23683 (propagated-inputs
23684 `(("python-inform" ,python-inform)))
23685 (home-page "https://nestedtext.org")
23686 (synopsis "Human readable and writable data interchange format")
23687 (description
23688 "NestedText is a file format for holding data that is to be entered, edited, or
23689 viewed by people. It allows data to be organized into a nested collection of
23690 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23691 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23692 NestedText is both simple and natural. Only a small number of concepts and rules must
23693 be kept in mind when creating it. It is easily created, modified, or viewed with
23694 a text editor and easily understood and used by both programmers and non-programmers.")
23695 (license license:expat))) ; MIT license
23696
23697 (define-public python-parallel
23698 (package
23699 (name "python-parallel")
23700 (version "1.6.4.4")
23701 (source
23702 (origin
23703 (method url-fetch)
23704 (uri (string-append
23705 "https://www.parallelpython.com/downloads/pp/pp-"
23706 version ".zip"))
23707 (sha256
23708 (base32
23709 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23710 (native-inputs
23711 `(("unzip" ,unzip)))
23712 (build-system python-build-system)
23713 (arguments '(#:tests? #f)) ; No test suite.
23714 (home-page "https://www.parallelpython.com")
23715 (synopsis "Parallel and distributed programming for Python")
23716 (description "Parallel Python module (PP) provides an easy and efficient
23717 way to create parallel-enabled applications for SMP computers and clusters.
23718 PP module features cross-platform portability and dynamic load balancing.
23719 Thus applications written with PP will parallelize efficiently even on
23720 heterogeneous and multi-platform clusters (including clusters running other
23721 applications with variable CPU loads).")
23722 (license license:bsd-3)))
23723
23724 (define-public python2-parallel
23725 (package-with-python2 python-parallel))
23726
23727 (define-public python-djvulibre
23728 (package
23729 (name "python-djvulibre")
23730 (version "0.8.5")
23731 (source
23732 (origin
23733 (method url-fetch)
23734 (uri (pypi-uri "python-djvulibre" version))
23735 (sha256
23736 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23737 (build-system python-build-system)
23738 (native-inputs
23739 `(("ghostscript" ,ghostscript)
23740 ("pkg-config" ,pkg-config)
23741 ("python-nose" ,python-nose)))
23742 (inputs
23743 `(("djvulibre" ,djvulibre)
23744 ("python-cython" ,python-cython)))
23745 (arguments
23746 `(#:phases
23747 (modify-phases %standard-phases
23748 (add-after 'unpack 'fix-tests
23749 (lambda _
23750 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23751 ;; doesn't make sense on GNU/Linux.
23752 (delete-file "djvu/dllpath.py")
23753 #t)))))
23754 (synopsis "Python bindings for DjVuLibre")
23755 (description "This is a set of Python bindings for the DjVuLibre library.")
23756 (home-page "https://jwilk.net/software/python-djvulibre")
23757 (license license:gpl2)))
23758
23759 (define-public python2-djvulibre
23760 (package-with-python2 python-djvulibre))
23761
23762 (define-public python-versioneer
23763 (package
23764 (name "python-versioneer")
23765 (version "0.19")
23766 (source
23767 (origin
23768 (method url-fetch)
23769 (uri (pypi-uri "versioneer" version))
23770 (sha256
23771 (base32
23772 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23773 (build-system python-build-system)
23774 (home-page
23775 "https://github.com/python-versioneer/python-versioneer")
23776 (synopsis
23777 "Version-string management for VCS-controlled trees")
23778 (description
23779 "@code{versioneer} is a tool for managing a recorded version number in
23780 distutils-based python projects. The goal is to remove the tedious and
23781 error-prone \"update the embedded version string\" step from your release
23782 process.")
23783 (license license:public-domain)))
23784
23785 (define-public python2-gamera
23786 (package
23787 (name "python2-gamera")
23788 (version "3.4.4")
23789 (source
23790 (origin
23791 (method url-fetch)
23792 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23793 "gamera-" version ".tar.gz"))
23794 (sha256
23795 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23796 (modules '((guix build utils)))
23797 (snippet
23798 '(begin
23799 ;; Remove bundled libraries.
23800 (for-each delete-file-recursively
23801 '("src/libpng-1.2.5"
23802 "src/libtiff"
23803 "src/zlib-1.2.8"))))))
23804 (build-system python-build-system)
23805 (inputs
23806 `(("libpng" ,libpng)
23807 ("libtiff" ,libtiff)
23808 ("python2-wxpython" ,python2-wxpython)
23809 ("zlib" ,zlib)))
23810 (arguments
23811 `(#:python ,python-2))
23812 (synopsis "Framework for building document analysis applications")
23813 (description
23814 "Gamera is a toolkit for building document image recognition systems.")
23815 (home-page "https://gamera.informatik.hsnr.de/")
23816 (license license:gpl2+)))
23817
23818 (define-public python-contextvars
23819 (package
23820 (name "python-contextvars")
23821 (version "2.4")
23822 (source
23823 (origin
23824 (method url-fetch)
23825 (uri (pypi-uri "contextvars" version))
23826 (sha256
23827 (base32
23828 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23829 (build-system python-build-system)
23830 (propagated-inputs
23831 `(("python-immutables" ,python-immutables)))
23832 (home-page
23833 "https://github.com/MagicStack/contextvars")
23834 (synopsis "PEP 567 Backport")
23835 (description "This package implements a backport of Python 3.7
23836 @code{contextvars} module (see PEP 567) for Python 3.6.")
23837 (license license:asl2.0)))
23838
23839 (define-public python-aiofiles
23840 (package
23841 (name "python-aiofiles")
23842 (version "0.6.0")
23843 (source
23844 (origin
23845 (method url-fetch)
23846 (uri (pypi-uri "aiofiles" version))
23847 (sha256
23848 (base32
23849 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23850 (build-system python-build-system)
23851 (home-page "https://github.com/Tinche/aiofiles")
23852 (synopsis "File support for @code{asyncio}")
23853 (description "@code{python-aiofiles} is a library for handling local
23854 disk files in asyncio applications.")
23855 (license license:asl2.0)))
23856
23857 (define-public python-pyre-extensions
23858 (package
23859 (name "python-pyre-extensions")
23860 (version "0.0.18")
23861 (source
23862 (origin
23863 (method url-fetch)
23864 (uri (pypi-uri "pyre-extensions" version))
23865 (sha256
23866 (base32
23867 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23868 (build-system python-build-system)
23869 (propagated-inputs
23870 `(("python-typing-extensions"
23871 ,python-typing-extensions)
23872 ("python-typing-inspect" ,python-typing-inspect)))
23873 (home-page "https://pyre-check.org")
23874 (synopsis
23875 "Type system extensions for use with @code{python-pyre}")
23876 (description
23877 "@code{python-pyre-extensions} defines extensions to the standard
23878 @code{typing} module that are supported by the Pyre typechecker.")
23879 (license license:expat)))
23880
23881 (define-public python-dataclasses
23882 (package
23883 (name "python-dataclasses")
23884 (version "0.7")
23885 (source
23886 (origin
23887 (method url-fetch)
23888 (uri (pypi-uri "dataclasses" version))
23889 (sha256
23890 (base32
23891 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23892 (build-system python-build-system)
23893 (home-page
23894 "https://github.com/ericvsmith/dataclasses")
23895 (synopsis
23896 "Backport of the @code{dataclasses} module for Python 3.6")
23897 (description
23898 "This is an implementation of PEP 557, Data Classes. It is a
23899 backport of the @code{dataclasses} module for Python 3.6.")
23900 (license license:asl2.0)))
23901
23902 (define-public python-pywatchman
23903 (package
23904 (name "python-pywatchman")
23905 (version "1.4.1")
23906 (source
23907 (origin
23908 (method url-fetch)
23909 (uri (pypi-uri "pywatchman" version))
23910 (sha256
23911 (base32
23912 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23913 (build-system python-build-system)
23914 (arguments
23915 `(#:tests? #f)) ;there are none
23916 (home-page
23917 "https://facebook.github.io/watchman/")
23918 (synopsis "Watchman client for python")
23919 (description "@code{python-pywatchman} is a library to connect and
23920 query Watchman to discover file changes.")
23921 (license license:bsd-3)))
23922
23923 (define-public python-helpdev
23924 (package
23925 (name "python-helpdev")
23926 (version "0.7.1")
23927 (source
23928 (origin
23929 (method url-fetch)
23930 (uri (pypi-uri "helpdev" version))
23931 (sha256
23932 (base32
23933 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
23934 (build-system python-build-system)
23935 (arguments
23936 `(#:phases
23937 (modify-phases %standard-phases
23938 (replace 'check
23939 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23940 (when tests?
23941 (add-installed-pythonpath inputs outputs)
23942 (invoke "pytest" "tests"))
23943 #t)))))
23944 (propagated-inputs
23945 `(("python-importlib-metadata" ,python-importlib-metadata)))
23946 (native-inputs
23947 `(("python-pytest" ,python-pytest)))
23948 (home-page "https://gitlab.com/dpizetta/helpdev")
23949 (synopsis
23950 "Extract information about the Python environment easily")
23951 (description
23952 "Helpdev is a library to easily extract information about the Python
23953 environment.")
23954 (license license:expat)))
23955
23956 (define-public python-qdarkstyle
23957 (package
23958 (name "python-qdarkstyle")
23959 (version "2.8.1")
23960 (source
23961 (origin
23962 (method url-fetch)
23963 (uri (pypi-uri "QDarkStyle" version))
23964 (sha256
23965 (base32
23966 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
23967 (build-system python-build-system)
23968 (arguments
23969 `(;; Fails unable to detect valid Qt bindings even when
23970 ;; added as native-inputs.
23971 #:tests? #f))
23972 (propagated-inputs
23973 `(("python-helpdev" ,python-helpdev)
23974 ("python-qtpy" ,python-qtpy)))
23975 (home-page
23976 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
23977 (synopsis
23978 "Complete dark stylesheet for Python and Qt applications")
23979 (description "QDarkStyle is the most complete dark stylesheet for Python and
23980 Qt applications.")
23981 (license license:expat)))
23982
23983 (define-public python-bitstring
23984 (package
23985 (name "python-bitstring")
23986 (version "3.1.7")
23987 (source
23988 (origin
23989 (method url-fetch)
23990 (uri (pypi-uri "bitstring" version))
23991 (sha256
23992 (base32
23993 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
23994 (build-system python-build-system)
23995 (arguments
23996 `(#:phases
23997 (modify-phases %standard-phases
23998 (replace 'check
23999 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24000 (when tests?
24001 (add-installed-pythonpath inputs outputs)
24002 (with-directory-excursion "test"
24003 (invoke "pytest")))
24004 #t)))))
24005 (native-inputs
24006 `(("python-pytest" ,python-pytest)))
24007 (home-page "https://github.com/scott-griffiths/bitstring")
24008 (synopsis
24009 "Simple construction, analysis and modification of binary data")
24010 (description
24011 "Bitstring is a library for simple construction, analysis and modification
24012 of binary data.")
24013 (license license:expat)))
24014
24015 (define-public python-confuse
24016 (package
24017 (name "python-confuse")
24018 (version "1.4.0")
24019 (source
24020 (origin
24021 (method url-fetch)
24022 (uri (pypi-uri "confuse" version))
24023 (sha256
24024 (base32
24025 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24026 (build-system python-build-system)
24027 (propagated-inputs
24028 `(("python-pathlib" ,python-pathlib)
24029 ("python-pyyaml" ,python-pyyaml)))
24030 (home-page "https://github.com/beetbox/confuse")
24031 (synopsis "Painless YAML configuration.")
24032 (description "Confuse is a configuration library for Python that uses
24033 YAML. It takes care of defaults, overrides, type checking, command-line
24034 integration, human-readable errors, and standard OS-specific locations.")
24035 (license license:expat)))
24036
24037 (define-public python-reflink
24038 (package
24039 (name "python-reflink")
24040 (version "0.2.1")
24041 (source
24042 (origin
24043 (method url-fetch)
24044 (uri (pypi-uri "reflink" version))
24045 (sha256
24046 (base32
24047 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24048 (build-system python-build-system)
24049 (arguments
24050 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24051 (propagated-inputs
24052 `(("python-cffi" ,python-cffi)))
24053 (native-inputs
24054 `(("python-pytest" ,python-pytest)
24055 ("python-pytest-runner" ,python-pytest-runner)))
24056 (home-page "https://gitlab.com/rubdos/pyreflink")
24057 (synopsis "Python wrapper around reflink system call")
24058 (description
24059 "Python reflink wraps around platform specific @code{reflink}
24060 implementations.")
24061 (license license:expat)))
24062
24063 (define-public python-pivy
24064 (package
24065 (name "python-pivy")
24066 (version "0.6.5")
24067 (source
24068 (origin
24069 (method git-fetch)
24070 (uri (git-reference
24071 (url "https://github.com/coin3d/pivy")
24072 (commit version)))
24073 (file-name (git-file-name name version))
24074 (sha256
24075 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24076 (build-system python-build-system)
24077 (arguments
24078 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24079 #:tests? #f
24080 #:phases
24081 (modify-phases %standard-phases
24082 (add-after 'unpack 'patch-cmake-include-dirs
24083 (lambda _
24084 ;; Patch buildsystem to respect Coin3D include directory
24085 (substitute* "CMakeLists.txt"
24086 (("\\$\\{SoQt_INCLUDE_DIRS}")
24087 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24088 #t)))))
24089 (native-inputs
24090 `(("cmake" ,cmake)
24091 ("swig" ,swig)))
24092 (inputs
24093 `(("python-wrapper" ,python-wrapper)
24094 ("qtbase" ,qtbase)
24095 ("libxi" ,libxi)
24096 ("libice" ,libice)
24097 ("soqt" ,soqt)
24098 ("glew" ,glew)
24099 ("coin3D" ,coin3D-4)))
24100 (home-page "https://github.com/coin3d/pivy")
24101 (synopsis "Python bindings to Coin3D")
24102 (description
24103 "Pivy provides python bindings for Coin, a 3D graphics library with an
24104 Application Programming Interface based on the Open Inventor 2.1 API.")
24105 (license license:isc)))
24106
24107 (define-public python-crayons
24108 (package
24109 (name "python-crayons")
24110 (version "0.4.0")
24111 (source
24112 (origin
24113 (method url-fetch)
24114 (uri (pypi-uri "crayons" version))
24115 (sha256
24116 (base32
24117 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24118 (build-system python-build-system)
24119 (propagated-inputs
24120 `(("python-colorama" ,python-colorama)))
24121 (home-page "https://github.com/MasterOdin/crayons")
24122 (synopsis "TextUI colors for Python")
24123 (description "This package gives you colored strings for the terminal.
24124 Crayons automatically wraps a given string in the foreground color and
24125 restores the original state after the string is printed.")
24126 (license license:expat)))
24127
24128 (define-public python-sane
24129 (package
24130 (name "python-sane")
24131 (version "2.9.1")
24132 (source
24133 (origin
24134 (method url-fetch)
24135 (uri (pypi-uri name version))
24136 (sha256
24137 (base32
24138 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24139 (build-system python-build-system)
24140 (native-inputs
24141 `(("python-pytest" ,python-pytest)))
24142 (inputs
24143 `(("sane-backends" ,sane-backends)))
24144 (home-page "https://github.com/python-pillow/Sane")
24145 (synopsis "Python interface to the SANE scanner")
24146 (description "This package provides Python interface to the SANE scanner
24147 and frame grabber interface.")
24148 (license (license:non-copyleft
24149 ;; Yet another variant of the X/MIT license.
24150 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24151
24152 (define-public python-screenkey
24153 (package
24154 (name "python-screenkey")
24155 (version "1.4")
24156 (source
24157 (origin
24158 (method git-fetch)
24159 (uri (git-reference
24160 (url "https://gitlab.com/screenkey/screenkey")
24161 (commit (string-append "v" version))))
24162 (file-name (git-file-name name version))
24163 (sha256
24164 (base32
24165 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24166 (build-system python-build-system)
24167 (arguments
24168 `(#:phases
24169 (modify-phases %standard-phases
24170 (add-after 'unpack 'fix-dlopen-paths
24171 (lambda* (#:key inputs outputs #:allow-other-keys)
24172 (let* ((x11 (assoc-ref inputs "libx11"))
24173 (xtst (assoc-ref inputs "libxtst")))
24174 (substitute* "Screenkey/xlib.py"
24175 (("libX11.so.6")
24176 (string-append x11 "/lib/libX11.so.6")))
24177 (substitute* "Screenkey/xlib.py"
24178 (("libXtst.so.6")
24179 (string-append xtst "/lib/libXtst.so.6")))
24180 #t)))
24181 (add-after 'install 'wrap-screenkey
24182 (lambda* (#:key outputs #:allow-other-keys)
24183 (wrap-program
24184 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24185 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24186 `("GI_TYPELIB_PATH"
24187 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24188 #t)))))
24189 (inputs
24190 `(("python-distutils-extra" ,python-distutils-extra)
24191 ("python-tokenize-rt" ,python-tokenize-rt)
24192 ("libx11" ,libx11)
24193 ("libxtst" ,libxtst)
24194 ("gtk+" ,gtk+)
24195 ("python-pygobject" ,python-pygobject)
24196 ("python-pycairo" ,python-pycairo)
24197 ("python-setuptools-git" ,python-setuptools-git)
24198 ("python-babel" ,python-babel)))
24199 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24200 (synopsis
24201 "Screencast tool to display pressed keys")
24202 (description
24203 "A screencast tool to display your keys inspired by Screenflick.")
24204 (license license:gpl3+)))
24205
24206 (define-public python-jinja2-cli
24207 (package
24208 (name "python-jinja2-cli")
24209 (version "0.7.0")
24210 (source
24211 (origin
24212 (method url-fetch)
24213 (uri (pypi-uri "jinja2-cli" version))
24214 (sha256
24215 (base32
24216 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24217 (build-system python-build-system)
24218 (propagated-inputs
24219 `(("python-jinja2" ,python-jinja2)))
24220 (native-inputs
24221 `(("python-flake8" ,python-flake8)
24222 ("python-jinja2" ,python-jinja2)
24223 ("python-pytest" ,python-pytest)))
24224 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24225 (synopsis "Command-line interface to Jinja2")
24226 (description
24227 "This package provides a command-line interface (CLI) to the Jinja2
24228 template engine.")
24229 (license license:bsd-3)))
24230
24231 (define-public python-readability
24232 (package
24233 (name "python-readability")
24234 (version "0.3.1")
24235 (source
24236 (origin
24237 (method url-fetch)
24238 (uri (pypi-uri "readability" version))
24239 (sha256
24240 (base32
24241 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24242 (build-system python-build-system)
24243 (home-page
24244 "https://github.com/andreasvc/readability/")
24245 (synopsis
24246 "Measure the readability of a given text using surface
24247 characteristics")
24248 (description
24249 "This package provides a Python library that is an implementation of
24250 traditional readability measures based on simple surface
24251 characteristics. These measures are basically linear regressions based on the
24252 number of words, syllables, and sentences.")
24253 (license license:asl2.0)))
24254
24255 (define-public python-listparser
24256 (package
24257 (name "python-listparser")
24258 (version "0.18")
24259 (source
24260 (origin
24261 (method url-fetch)
24262 (uri (pypi-uri "listparser" version))
24263 (sha256
24264 (base32
24265 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24266 (build-system python-build-system)
24267 (home-page
24268 "https://github.com/kurtmckee/listparser")
24269 (synopsis
24270 "Parse subscription lists in Python")
24271 (description
24272 "This package provides a Python library that can parse OPML, FOAF, and
24273 iGoogle subscription lists.")
24274 (license license:expat)))